Navigation · BackTop
BackTop
Demos
How to import
Basic Usage
BackTop can be used directly with the default styles.
Customized Style
The default styles for BackTop component could be overwritten.
API Reference
Properties | Instructions | type | Default |
---|---|---|---|
className | Class name | string | - |
duration | Time used to scroll to the top. | number | 450 |
style | Style | CSSProperties | - |
target | A function that returns the DOM element to add listener to its scrolling event. | () => any | () => window |
visibilityHeight | The scrolling heights to be reached in order to show up BackTop. | number | 400 |
onClick | The callback to onClick event. | (e: MouseEvent) => void | - |