uxcore-totop ui component for react
$ git clone https://github.com/uxcore/uxcore-totop
$ cd uxcore-totop
$ npm install
$ gulp server
<Totop>
<div className="block1">了解我们</div>
<div className="block2"><i className="kuma-icon kuma-icon-comment"></i></div>
</Totop>
配置项 | 类型 | 必填 | 默认值 | 功能/备注 |
---|---|---|---|---|
prefixCls | string | optional | "kuma-totop" | 不想使用 kuma 主题时使用 |
className | string | optional | - | 额外的顶级类名 |
to | number | optional | 10 | 回到顶部时据顶端距离,单位 px |
distance | number | optional | 30 | 向下滑多少距离出现回到顶部 |
duration | number | optional | 600 | 动画持续时间 |
配置项 | 类型 | 必填 | 默认值 | 功能/备注 |
---|---|---|---|---|
label | string | require | ||
icon | React.Element | require | 推荐使用iconfont,见demo | |
onClick | function | optional |