BackToTop - Aspect UI

The BackToTop component provides users with a convenient way to quickly scroll back to the top of the page. It becomes visible after the user scrolls past a certain point and typically appears as a floating button. Fully customizable, it supports smooth scrolling, icon integration, and positioning options, enhancing user experience on long or content-heavy pages.

Table of Contents#

Default Back To Top#


BackToTop Props#


PropTypeDefaultDescription
thresholdnumber300Scroll distance in pixels before the button appears.
smoothbooleantrueEnables smooth scroll to top.
childrenReactNode-Custom content for the button.
classNamestring''Additional CSS classes for the button.