Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
<BackToTop
label="Back To Top"
ariaLabel="Back To Top 1 example"
showProgress="true"
/>
// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page BackToTopDetail {
layout = "showcase"
state playground_threshold = ctx.url.searchParams.get("pg_threshold") ?? "500"
state playground_label = ctx.url.searchParams.get("pg_label") ?? "Back To Top"
state playground_ariaLabel = ctx.url.searchParams.get("pg_ariaLabel") ?? "Back To Top 1 example"
state playground_icon = ctx.url.searchParams.get("pg_icon") ?? ""
state playground_position = ctx.url.searchParams.get("pg_position") ?? "right"
state playground_offset = ctx.url.searchParams.get("pg_offset") ?? "md"
state playground_behavior = ctx.url.searchParams.get("pg_behavior") ?? "smooth"
state playground_showProgress = ctx.url.searchParams.get("pg_showProgress") ?? "true"
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "solid"
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
seo {
title = "Back To Top"
description = "Accessible scroll-to-top control with visibility threshold."
}
view {
Accessible scroll-to-top control with visibility threshold. Change any prop and inspect the server-rendered component immediately.Back To Top
Configure Back To Top
<BackToTop
label="Back To Top"
ariaLabel="Back To Top 1 example"
showProgress="true"
/>
Compare configurations and resize the browser to check responsive behavior.
Balanced spacing, hierarchy, and content for the most common product workflow.
<BackToTop
label="Back To Top"
ariaLabel="Back To Top 1 example"
showProgress="true"
/>
A tighter variation for dashboards, side panels, tables, and operational interfaces.
<BackToTop
label="Compact example"
ariaLabel="Back To Top 2 example"
icon="icon-[lucide--arrow-right]"
showProgress="true"
size="sm"
variant="secondary"
/>
A more expressive variation using additional data, stronger emphasis, and optional states.
<BackToTop
label="Advanced example"
ariaLabel="Back To Top 3 example"
icon="icon-[lucide--trash-2]"
showProgress="true"
size="lg"
variant="success"
/>
Public events declared by this component. Custom events bubble from the component root and expose state through event.detail.
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
threshold | number | 500 | No |
label | string | "Back to top" | No |
ariaLabel | string | "Scroll back to top" | No |
icon | string | "icon-[lucide--arrow-up]" | No |
position | string | "right" | No |
offset | string | "md" | No |
behavior | string | "smooth" | No |
showProgress | boolean | false | No |
size | string | "default" | No |
color | string | "primary" | No |
variant | string | "solid" | No |
class | string | "" | No |