Setting up Fullpage.js in Webflow involves incorporating custom code to create full-page scrolling sections.
1. Prepare Your Webflow Project
- Create multiple sections in your Webflow project that you wish to display as full-screen.
- Ensure each section has a unique identifier (ID) as you'll reference these IDs in your custom code.
2. Get Fullpage.js
- Download Fullpage.js from its official website or use a CDN link available in its documentation.
- Ensure you have both fullpage.js and fullpage.css ready for use.
3. Add Fullpage.js to Webflow
- Go to Project Settings and navigate to the Custom Code tab.
- In the Header Code section, link the Fullpage.js CSS by adding a link tag referencing the CSS file or CDN.
- In the Footer Code section, link the Fullpage.js JavaScript file or add the CDN script tag.
4. Configure Fullpage.js Settings
- In the Page Settings or your custom code, initialize Fullpage.js:
- Under the script added in the Footer, include the initialization code:
```javascript
new fullpage('#fullpage', {
sectionsColor: ['#fff', '#ccc', '#aaa', '#888'],
navigation: true,
// Include other options as needed
});
```
- Replace
#fullpage with the ID of the parent element containing your sections. - Ensure each full-page section in Webflow corresponds to the order in the
sectionsColor or any other configuration settings.
5. Test Your Setup
- Publish your site and navigate to the live link.
- Test the scrolling to ensure each section snaps correctly into view.
- Tweak any configuration options in the initialization code for desired effects.
Summary
Setting up Fullpage.js in Webflow requires you to download or link Fullpage.js files, integrate them via Project Settings, and initialize Fullpage.js with appropriate configuration. Ensure all your sections are clearly defined with unique identifiers, and verify functionality on the live site.