React Full Page
This is an implementation of fullpage.js in react. For the moment this is still in development and a lot of things can change.
Install
npm install --save react-fullpage
Usage
A basic usage
;; let options = ...; // => in the render() method of your appreturn <SectionsContainer ...options> <Section>Page 1</Section> <Section>Page 2</Section> <Section>Page 3</Section> </SectionsContainer>;
Fixed header and footer
In case you need a fixed header and footer you can also include the Header
or Footer
component
; // => in the render() method of your appreturn <Header> <a href="#sectionOne" className="opa">Section One</a> <a href="#sectionTwo">Section Two</a> <a href="#sectionThree">Section Three</a> </Header> <Footer> <a href="" className="opa">Dcoumentation</a> <a href="">Example Source</a> <a href="">About</a> </Footer> <SectionsContainer ...options> <Section>Page 1</Section> <Section>Page 2</Section> <Section>Page 3</Section> </SectionsContainer>;
Default Props
Some of this props can be referenced with the fullpage.js options
let options = activeClass: 'active' // the class that is appended to the sections links anchors: // the anchors for each sections arrowNavigation: true // use arrow keys className: 'SectionContainer' // the class name for the section container delay: 1000 // the scroll animation speed navigation: true // use dots navigatio scrollBar: false // use the browser default scrollbar sectionClassName: 'Section' // the section class name sectionPaddingTop: '0' // the section top padding sectionPaddingBottom: '0' // the section bottom padding verticalAlign: false // align the content of each section vertical;
Full example
You can find the full example here
;; ; const app = document; const Example = React; ReactDOM;