AsterUIDocsv1.0.2

Docs / Component reference

BackToTop

Scroll down inside the preview, then use the button to return to the start.

Back to top example

Install

sh
npx @fierst/ui@1.0.2 add back-to-top

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/back-to-top: BackToTop.

Download the registry source for back-to-top 1.0.2.

API contracts

ts
export function* BackToTop(
  props: {
    threshold?: number;
    label?: string;
    class?: string;
  },
  ctx: Ctx,
)