@tsx-react-ui/backtop
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@tsx-react-ui/backtop

介绍

The backtop component of the react written in Typescript


安装

组件使用 npm 进行管理,请使用以下命令进行组件安装:

npm i @tsx-react-ui/backtop --save
  • 安装cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org

使用

样例文档

  • 待开发

使用

最少配置参数为:

<Backtop />

详细配置:

<Backtop className="custom-back-top" showHeight={300} target={() => document.getElementById('target')} >
    <div className="custom-back-top-icon">UP</div>
</Backtop>

配置参数

Prop Type Default Description
showHeight number 200 当滚动高度超过此值时显示"返回顶部"按钮
className string undefined 自定义样式
target function () => window 返回指定滚动的DOM元素,默认为window
children ReactNode undefined 自定义图标

注意事项

  • 组件注意事项

Changelog


Dependents (0)

Package Sidebar

Install

npm i @tsx-react-ui/backtop

Weekly Downloads

1

Version

1.0.1

License

none

Unpacked Size

16 kB

Total Files

12

Last publish

Collaborators

  • ideas-ma
  • maqing01