Back to top

A floating scroll-to-top button.

The button is position: fixed and reveals itself once you scroll past the threshold (300px by default). Scroll down to see the live one appear in the bottom-right corner. The cards below show the available styles.

Subtle

Keep scrolling — the live back-to-top button stays pinned to the bottom-right corner.

API reference

Inputs

PropTypeDefaultDescription
thresholdnumber300Pixel scroll distance before the button appears.
variant"primary" | "subtle"'primary'Visual style of the button.
labelstringAccessible label for the button; falls back to the i18n default.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.