Elements

Reference

Back Top

A way home: after the page has scrolled past `threshold`, a small floating control rises at the page's corner and returns the reader to the top. The scroll itself stays native — `window.scrollTo` defers to the stylesheet's `scroll-behavior: smooth`, which reduced motion turns back into an instant jump (a moored control asks the media query directly, since a scroller of its own has no stylesheet to defer to). The button stays mounted either way so the entrance is a transition, never a pop. The control itself is the shared `Button` (outline, square) — the paper, hairline and halo are its; this family owns only the floating and the entrance.

Root

#BackTop

A way home: after the page has scrolled past threshold, a small floating control rises at the page's corner and returns the reader to the top. The scroll itself stays native — window.scrollTo defers to the stylesheet's scroll-behavior: smooth, which reduced motion turns back into an instant jump (a moored control asks the media query directly, since a scroller of its own has no stylesheet to defer to). The button stays mounted either way so the entrance is a transition, never a pop.

The control itself is the shared Button (outline, square) — the paper, hairline and halo are its; this family owns only the floating and the entrance.

PropTypeDefaultDescription
thresholdNumber400—
labelString"Back to top"—
scrollElFunctionundefined—