2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

ScrollToTop

Updated: May 9, 2025
View on GitHub
Use this utility to improve navigation for long-scrolling pages. It's customizable with positioning and visibility logic based on scroll offset. Define how far the user must scroll before the button becomes visible. The button can be customized using Flex props and additional className.
Prop
Type
Default
offset
How far down the page before it appears, in pixels.
number300
…and every FlexProps propinherited
className
string
style
React.CSSProperties
children
React.ReactNode
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club