Components
Scroll cue
The small "keep going" cue at the foot of a first screen. A wheel dot slides down a mouse outline, or chevrons pour downward, until the person scrolls; then it fades away and leaves the tab order.
pnpm dlx shadcn@latest add @caliper/scroll-cueWhen to use
Use it for
- Full-height heroes where the next section is out of sight.
- Onboarding and story pages that continue below the fold.
Skip it when
- Pages whose content already shows past the fold.
- Anywhere it would sit over text.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Leaves for good on scroll
- After 48px of scroll, in the page or the nearest scrolling panel, it fades out and cannot be tabbed to.
Usage
- A real button
- Press it to scroll to a target or down by most of a screen; it is smooth unless the person prefers reduced motion.
Installation
pnpm dlx shadcn@latest add @caliper/scroll-cue
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
This is the code behind the preview above.
import { type ReactNode } from "react" import { ScrollCue } from "@/components/ui/scroll-cue" function Panel({ title, context, className = "max-w-md", children }: { title: string; context: string; className?: string; children: ReactNode }) { return ( <section className={`grid w-full gap-5 rounded-overlay border border-border bg-background p-6 shadow-resting max-sm:p-4 ${className}`}> <div className="grid gap-1"> <p className="font-medium">{title}</p> <p className="text-sm text-muted-foreground">{context}</p> </div> {children} </section> ); } export function ScrollCueDemo() { return ( <Panel title="Page start" context="Scroll inside the frame; the cue leaves." className="max-w-md"> <div className="h-64 overflow-y-auto rounded-control border border-border"> <div className="grid h-64 content-center justify-items-center gap-3 px-6 text-center"> <p className="text-2xl font-semibold">Quiet tools for loud days</p> <p className="text-sm text-muted-foreground">More below.</p> <ScrollCue target="#scroll-cue-next" /> </div> <div id="scroll-cue-next" className="grid h-64 content-center gap-2 bg-muted px-6"> <p className="font-medium">The next section</p> <p className="text-sm text-muted-foreground">The cue has gone and cannot be tabbed to.</p> </div> </div> </Panel> ); }
API reference
ScrollCue
component
Also accepts the native props of its root element and a ref.
Accessibility
It is built on native elements and keeps aria-label and aria-hidden in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.
Related
- Scroll aware fabThe main action kept in reach: it shows its label at the top and when scrolling up, and shrinks to its icon while you scroll down.
- Scroll spy navAn outline that follows your reading: a marker glides to the section in view, and choosing a link scrolls there and moves focus into it.
- Reading progressWhere you are in a long page, in a small pill that appears once you start scrolling: a ring that fills as you read, the section you are in and how far through you are. Press it to jump to another section.