0.0.1 • Published 1 year ago
rc-anchor-scroll v0.0.1
rc-anchor-scroll
介绍
基于react的锚点滚动组件
特性
- 支持React
- 支持TypeScript
安装
yarn add rc-anchor-scroll -S
or
npm add rc-anchor-scroll -S
如何使用
配置项
属性名 | 说明 | 类型 | 必填 | 默认值 | |
---|---|---|---|---|---|
containerId | 容器ID | string | false | 'x-anchor-scroll' | |
initActiveKey | 初始激活索引 | number | false | 0 | |
children | 内容列表 | any[] | true | false | -- |
className | 容器样式类名 | string | false | -- | |
style | 容器行内样式 | React.CSSProperties | false | -- | |
contentStyle | 内容区域行内样式 | React.CSSProperties | false | -- | |
offsetTop | 滚动偏移量 | number | false | 0 | |
onChange | 点击选择的tab | Function | false | -- | |
navbarProps | navbar属性 | ScrollNavbarType | true | -- |
预览
移动端
PC端
License
MIT
0.0.1
1 year ago