X Enterprises
nuxt-x-affiliate

Back To Top

Floating back-to-top button — appears after a scroll threshold, smooth-scrolls to the top.

Back To Top

The XAFBackToTop component is a fixed-position button that fades in once the reader scrolls past a threshold, and smoothly scrolls back to the top of the page on click. Safe to mount globally — it has no DOM footprint when invisible.

Components

<XAFBackToTop />

<XAFBackToTop :threshold="600" side="right" />

Props

PropTypeDefaultDescription
thresholdnumber400Show after this many pixels scrolled.
minScrollnumber0Don't show until the user has scrolled this far in any direction.
side'right' | 'left''right'Horizontal side of the viewport.
bottomnumber24Bottom offset (px).
offsetnumber24Horizontal offset (px).
behavior'smooth' | 'auto''smooth'Scroll behavior on click.

AI Context

component: XAFBackToTop
package: "@xenterprises/nuxt-x-affiliate"
use-when: Floating back-to-top button that appears after a scroll threshold and smooth-scrolls to the top.
Copyright © 2026