README
uxcore-sticky
React sticky
Development
git clone https://github.com/uxcore/uxcore-sticky
cd uxcore-sticky
npm install
npm run server
if you'd like to save your install time,you can use uxcore-tools globally.
npm install uxcore-tools -g
git clone https://github.com/uxcore/uxcore-sticky
cd uxcore-sticky
npm install
npm run dep
npm run start
Test Case
npm run test
Coverage
npm run coverage
Demo
http://uxcore.github.io/components/sticky
Contribute
Yes please! See the CONTRIBUTING for details.
API
Props
| Name | Type | Required | Default | Comments |
| prefixCls | --- | --- | --- | --- |
| className | --- | --- | --- | --- |
| offsetTop | number | false | 0 | 距离顶部的偏移量 |
| onChange | function | false | (isSticky) => {} | 粘性元素状态改变时的回调 |
| container | function | false | () => document | 定义粘性元素的容器 |