Backtop

Floating scroll-to-top control.

Backtop

Default

Appears after the scroll container passes 96px and stays at its lower-right edge. It does not need Affix.

Code copied

Near the bottom

Useful for lists and dynamic loading. visibility-height and visibility-bottom use OR logic. This example sets the former high to demonstrate the 72px remaining-distance trigger.

Code copied

Custom icon

Use the default slot to replace the built-in arrow with an icon or custom content.

Code copied

PROPS

PropertyTypeValuesDescriptiondefaultExampleMore
bottom / rightNumberpixelsSet the distance from the viewport, or from the target container when target is set.40 / 40
targetStringCSS selectorScrollable container selector. The control is positioned inside this container. Defaults to the window.
visibility-heightNumberpixelsMinimum scroll offset before the control appears. Either this or visibility-bottom can show the control.200
visibility-bottomNumberpixelsShows when the remaining scroll distance reaches this value. Either this or visibility-height can show the control.
behaviorStringauto | smoothNative scroll behavior after activation.smooth
No matching data

SLOTS

PropertyTypeValuesDescriptiondefaultExampleMore
defaultSloticon or custom contentReplace the default up arrow.IconArrow
No matching data

EVENTS

PropertyTypeValuesDescriptiondefaultExampleMore
clickFired after scroll-to-top starts.
No matching data
Last Updated: 2026-08-17, 08:33:54