ScrollTop

Provides a quick way for users to scroll back to the top of long pages.

lucide-react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/scroll-top.json

Examples


Particular parent

Custom button


API Reference

ScrollTop

PropTypeDefault
targetwindow,parentwindow
thresholdnumber200
childrenReact.ReactNode-