{"id":5162,"date":"2019-04-04T02:00:00","date_gmt":"2019-04-04T00:00:00","guid":{"rendered":"https:\/\/alvarotrigo.com\/epa\/how-to-use-fullpage-in-webflow-create-full-screen-slider\/"},"modified":"2025-06-10T10:34:16","modified_gmt":"2025-06-10T08:34:16","slug":"how-to-use-fullpage-in-webflow-create-full-screen-slider","status":"publish","type":"post","link":"https:\/\/alvarotrigo.com\/blog\/how-to-use-fullpage-in-webflow-create-full-screen-slider\/","title":{"rendered":"Use fullPage.js slider in Webflow to create a full-screen slider"},"content":{"rendered":"\n<p>If you want to create a full-screen website in <a href=\"https:\/\/try.webflow.com\/landing\" data-type=\"link\" data-id=\"https:\/\/try.webflow.com\/landing\" rel=\"nofollow noopener\" target=\"_blank\">Webflow<\/a> to scroll through multiple fullscreen sections when using the mouse wheel or trackpad, then using <a href=\"https:\/\/alvarotrigo.com\/fullPage\/\">fullPage.js<\/a> is the solution for it. This way you&#8217;ll be able to create a full-page slidehow in a matter of minutes!<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/webflow.com\/made-in-webflow\/website\/fullPagejs-Horizontal-Slides\" title=\"See Webflow Clonable\" target=\"_blank\" rel=\"noopener nofollow\">See Webflow Clonable<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-the-layout\">Creating the layout<\/h2>\n\n\n\n<p>fullPage.js is a Javascript library that requires us to <a href=\"https:\/\/github.com\/alvarotrigo\/fullPage.js#required-html-structure\" target=\"_blank\" rel=\"noopener nofollow\">follow certain structure<\/a> in order to use it. More precisely the following one:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"fullpage\"<\/span>&gt;<\/span>\n\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"section\"<\/span>&gt;<\/span>Some section<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"section\"<\/span>&gt;<\/span>Some section<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"section\"<\/span>&gt;<\/span>Some section<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\t<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"section\"<\/span>&gt;<\/span>Some section<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To replicate the necessary structure, we will start by adding a div block that will be the container for all our full-screen sections on the site.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-1.jpeg\" alt=\"Adding div block.\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p>We will give it the id <code>fullpage<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-2.jpeg\" alt=\"Setting id fullpage\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p>And we will set its height to <code>100vh<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-3.jpeg\" alt=\"Setting height 100vh\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p>Inside that container we will be adding more <code>div blocks<\/code>, each of them will be a fullscreen section on our site.<br> We can add one and copy and paste the others. Each of them will have to use the class <code>section<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-4.jpeg\" alt=\"Setting class section\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-4-2.jpeg\" alt=\"Tree structure webflow editor\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p>fullPage.js creates part of the magic once the page has loaded, such as creating the full-width and full-height sections behind the scenes. But because we are now working with the Webflow editor, we will need to do those same tasks in our editor first so we can see the site as it would look like when applying fullpag.js.<\/p>\n\n\n\n<p>To do so, we will set the properties <code>width<\/code> and <code>height<\/code> of our sections to <code>100%<\/code>. Additionally, if we want to have centered content, then we can set the display options to <code>flex<\/code> with a <code>center<\/code> align and justify layout options.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-5.jpeg\" alt=\"Setting width and heigh dimensions for each section\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p>And that&#8217;s it! Now we have the main layout!<\/p>\n\n\n\n<p>Our structure should look like this in our navigator tab:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-6.jpeg\" alt=\"Sections structure in webflow editor\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p>We can now add a background color by clicking on each of our sections and adding a different class to each section such as &#8220;section-1&#8221;, &#8220;section-2&#8221; and &#8220;section-3&#8221; and then changing each section&#8217;s background color.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adding-the-fullpage.js-component\">Adding the fullpage.js component<\/h2>\n\n\n\n<p>When using any of <a href=\"https:\/\/try.webflow.com\/site-plan6424\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">the paid plans that Webflow provides<\/a>, you can make use of what they call <strong>&#8220;custom code<\/strong>&#8220;. (The previous link is an affiliate link, so if you want to get a payed plan, please consider using that link, I&#8217;ll appreciate it!)<\/p>\n\n\n\n<p>With these options, we will be able to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Import the files that the fullpage.js component requires.<\/li>\n\n\n\n<li>Initialize fullpage.js and customize its behavior.<\/li>\n<\/ul>\n\n\n\n<p>In order to do so, we will have to go the the <code>Pages<\/code> menu on the left. Under our <code>Home<\/code> page settings, we&#8217;ll see the <code>Custom Code<\/code> menu element.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-7.jpeg\" alt=\"Custom code for the fullscreen slider in webflow editor\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p>In it, we will add the following in the <code>&lt;head&gt;<\/code> tag:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">link<\/span> <span class=\"hljs-attr\">rel<\/span>=<span class=\"hljs-string\">\"stylesheet\"<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"text\/css\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"https:\/\/unpkg.com\/fullpage.js\/dist\/fullpage.min.css\"<\/span> \/&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>And the following code in the <code>&lt;\/body&gt;<\/code> tag:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"text\/javascript\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/unpkg.com\/fullpage.js\/dist\/fullpage.min.js\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"actionscript\">\n<span class=\"hljs-comment\">\/\/ fullpage.js initialization<\/span>\n<span class=\"hljs-keyword\">new<\/span> fullpage(<span class=\"hljs-string\">'#fullpage'<\/span>, {\n\tlicenseKey: <span class=\"hljs-string\">'YOUR_KEY_HERE'<\/span>,\n\tscrollingSpeed: <span class=\"hljs-number\">1000<\/span>,\n\tverticalCentered: <span class=\"hljs-literal\">false<\/span>\n});\n<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>That will do the magic!<\/p>\n\n\n\n<p>Now if we click on &#8220;Save&#8221;, and then on the top right on <em>&#8220;Publish&#8221; &gt; &#8220;Publish to selected domains&#8221;<\/em>, we will bea ble to see the result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2019-04-04\/use-fullpage-in-webflow-editor-8.jpeg\" alt=\"Publish fullscreen website in webflow\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"making-the-slider-responsive\">Making the slider responsive<\/h2>\n\n\n\n<p>Now, what if we want to desactivate fullpage.js and its auto scrolling behaviour for small screen devices such as mobile phones and tablets?<\/p>\n\n\n\n<p>Luckily for us, fullpage.js makes it easy. It is as simple as adding a new option in our fullpage.js initialization. Fullpage.js provides a few responsive options we can check <a href=\"https:\/\/github.com\/alvarotrigo\/fullPage.js\" target=\"_blank\" rel=\"noopener nofollow\">in the documentation<\/a> and one of them is <code>responsiveWidth<\/code>.<\/p>\n\n\n\n<p>With this option we can set a value in pixels so whenever the viewport is smaller than that value, fullpage.js will get disabled.<\/p>\n\n\n\n<p>Going back to Pages &gt; Home &gt; Custom Code, we edit our fullpage initialization on the <code>&lt;\/body&gt;<\/code> tag to make it look like the following:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">   <span class=\"hljs-keyword\">new<\/span> fullpage(<span class=\"hljs-string\">'#fullpage'<\/span>, {\n   \t  <span class=\"hljs-attr\">licenseKey<\/span>: <span class=\"hljs-string\">'YOUR_KEY_HERE'<\/span>,\n   \t  <span class=\"hljs-attr\">scrollingSpeed<\/span>: <span class=\"hljs-number\">1000<\/span>,\n   \t  <span class=\"hljs-attr\">verticalCentered<\/span>: <span class=\"hljs-literal\">false<\/span>,\n   \t  <span class=\"hljs-attr\">responsiveWidth<\/span>: <span class=\"hljs-number\">950<\/span>\n   });\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Now, if the viewport <code>width<\/code> is smaller than 950 pixels we will have a normal scrolling website.<\/p>\n\n\n\n<p>If we want to apply it also with a <code>height<\/code> limit, we can add the <code>responsiveHeight<\/code> option to it:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">   <span class=\"hljs-keyword\">new<\/span> fullpage(<span class=\"hljs-string\">'#fullpage'<\/span>, {\n   \t  <span class=\"hljs-attr\">licenseKey<\/span>: <span class=\"hljs-string\">'YOUR_KEY_HERE'<\/span>,\n   \t  <span class=\"hljs-attr\">scrollingSpeed<\/span>: <span class=\"hljs-number\">1000<\/span>,\n   \t  <span class=\"hljs-attr\">verticalCentered<\/span>: <span class=\"hljs-literal\">false<\/span>,\n   \t  <span class=\"hljs-attr\">responsiveWidth<\/span>: <span class=\"hljs-number\">950<\/span>,\n   \t  <span class=\"hljs-attr\">responsiveHeight<\/span>: <span class=\"hljs-number\">500<\/span>\n   });\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>So now whenever the viewport size is less than 950 pixels widht OR less than 500 pixels height, fullpage will turn off autoscrolling.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"video-tutorial\">Video tutorial<\/h2>\n\n\n\n<p>I&#8217;ve created a video tutorial about it too, so if you prefer videos rather than text, here you have it!<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"How to use fullPage.js full-screen slider in Webflow editor\" width=\"500\" height=\"281\" data-src=\"https:\/\/www.youtube.com\/embed\/1KF1_5A7Mes?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"related-articles\">Related articles<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/javascript-slider-how-to-make-one\/\">How to make a JavaScript slider<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/create-a-slider-with-pure-CSS\/\">Create a slider with CSS only<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Create a full-screen website in webflow and use snap scrolling on it. Have a full-page slidehow in a matter of minutes!<\/p>\n","protected":false},"author":1,"featured_media":5161,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[108],"tags":[40,43,88,21],"class_list":["post-5162","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sliders","tag-front-end","tag-slider","tag-webflow","tag-website-builders"],"acf":[],"_links":{"self":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/comments?post=5162"}],"version-history":[{"count":13,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5162\/revisions"}],"predecessor-version":[{"id":18865,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5162\/revisions\/18865"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media\/5161"}],"wp:attachment":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media?parent=5162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/categories?post=5162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/tags?post=5162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}