daviferreira / react-viewport-slider

react-viewport-slider is a react component (obviously) that displays a sequence of contents using 100% of the viewport with and height.

Home Page:http://daviferreira.github.io/react-viewport-slider/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

NPM info

Travis build status Dependency Status devDependency Status

Usage

CommonJS

Install via NPM:

npm install react-viewport-slider

Then:

import Slider from ‘react-viewport-slider’;

// http://alpha.wallhaven.cc/wallpaper/164335
const wallpaper =
  'http://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-164335.png';


	render: function () {
		return (
      <Slider>
        <Slider.Item style={{ backgroundColor: '#a2d7c7' }}>
          <div className="content">Hello, world.</div>
        </Slider.Item>
        <Slider.Item style={{ backgroundColor: '#353330' }}>
          <div className="content">Sup?</div>
        </Slider.Item>
        <Slider.Item className="has-overlay" style={{ backgroundImage: `url(${wallpaper})`, backgroundSize: 'cover' }}>
          <div className="content">Yo.</div>
        </Slider.Item>
      </Slider>

		);
	}

development

npm install

npm run demo

npm test

LICENSE

MIT: https://github.com/daviferreira/react-viewport-slider/blob/master/LICENSE

About

react-viewport-slider is a react component (obviously) that displays a sequence of contents using 100% of the viewport with and height.

http://daviferreira.github.io/react-viewport-slider/

License:Other


Languages

Language:JavaScript 100.0%