一个基于React的fullpage组件,第一个简陋版本目前只支持全屏切换,后续完善,欢迎大家去Issues提出宝贵意见。
$ npm install rc-fullpage
import React from 'react';
import { SectionsBox, Section } from 'rc-fullpage';
require('./index.css'); // This 'index.css' file is derived from the root directory
const props = {
...
}
// => in the render() method of your app
return (
<SectionsBox {...props}>
<Section>Page One</Section>
<Section>Page Two</Section>
<Section>Page Three</Section>
<Section>Page Four</Section>
</SectionsBox>
);
const props = {
speed: 800, // slide speed
}
$ git clone https://github.com/dodospace/react-full-page.git
$ npm install
$ npm start
Local documentation will then be available at http://localhost:2008/
.