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

PropertiesInstructionstypeDefault
classNameClass namestring-
durationTime used to scroll to the top.number450
styleStyleCSSProperties-
targetA function that returns the DOM element to add listener to its scrolling event.() => any() => window
visibilityHeightThe scrolling heights to be reached in order to show up BackTop.number400
onClickThe callback to onClick event.(e: MouseEvent) => void-

Design Tokens