Viewport Slider, React
react-viewport-slider is a react component (obviously) that displays a sequence of contents using 100% of the viewport with and height.
Usage
CommonJS
Install via NPM:
npm install react-viewport-slider
Then:
; … { return <Slider> <SliderItem style= backgroundColor: '#a2d7c7' > <div className="content">Hello world</div> </SliderItem> <SliderItem style= backgroundColor: '#353330' > <div className="content">Sup?</div> </SliderItem> <SliderItem className="has-overlay" style= backgroundImage: `url()` backgroundSize: 'cover' > <div className="content">Yo</div> </SliderItem> </Slider> ); } …
Browser
Download or install via bower:
bower install react-viewport-slider
Then:
<script type=“text/jsx”>React;</script>
development
npm install
npm run demo
npm test
LICENSE
MIT: https://github.com/daviferreira/react-viewport-slider/blob/master/LICENSE