Scroll Reveal
ScrollEntrance on scroll that plays once and stays, staggers its children, scrubs with the scroll position when asked, honours reduced motion, and keeps working after every ClientRouter navigation.
A vertical timeline: the line draws itself down the page in step with the scroll, each step revealing from the line's side as it is reached, markers numbered or dated. Zero JavaScript of its own; where scroll timelines are missing the line is simply drawn.
scroll inside
npx astro add moonarc
One component at a time.
The budget test prints every byte.
Verified on Astro 5, 6 and 7.
Live, from the library itself, at full size: scroll, hover, navigate away and back. The demo is never gated.
Variants · each row writes the attribute the prop writes; the section's own CSS answers
JavaScript of its own
0 B
Uses Reveal and the shared runtime (1.9 kB raw, once per site). With those included: 3.0 kB raw.
CSS 10.1 kB raw including the base tokens. Measured from a production build, and again in CI for every change that can move it.
Browser support
Chrome 115 · not Firefox · Safari 26; needs scroll-timeline. Elsewhere: the line is fully drawn; steps still reveal (Firefox).
The demo above is never gated; the source is. With a key in components.json (see account), the registry serves it like any other item:
npx shadcn@latest add @moonarc-pro/steps-section---
import StepsSection from '@/components/moonarc/pro/StepsSection.astro';
---
<StepsSection headline="How it ships" steps={[
{ title: 'Install', body: 'npx astro add moonarc' },
{ title: 'Import', body: 'One component at a time.' },
{ title: 'Measure', body: 'The budget test prints every byte.' },
]} />Without a key the registry answers 401 with an upgrade message. Everything this section composes is free: reveal.
| Prop | Type | Default | Description |
|---|---|---|---|
steps | { title, body, label? }[] | none | Steps in order; label replaces the number (a date, a version) and, unlike the number, is read by screen readers. |
headline | string | none | Section heading. |
tone | 'surface' | 'muted' | 'ink' | 'brand' | unset (paints nothing) | The ground: the page surface, a muted band, an always-dark ink panel, or a deep brand panel. Each paints --background, --ma-tone-muted (over --muted, with a --border hairline), --ma-tone-ink or --ma-tone-brand (over --primary) with the matching text. With theme.css, a painted tone also re-declares --card, --border, --input and --ring inside the section, so cards and fields follow the ground. Decoration is strongest on brand. |
density | 'compact' | 'cozy' | 'roomy' | 'cozy' | Block padding and the gap between steps ×0.8 / ×1 / ×1.25 through --ma-density. |
align | 'start' | 'center' | 'start' | Heading alignment. |
The section reads the theme contract (shadcn's variable names with the base tokens as fallback), so a pasted theme or one --ma-brand recolours it. Its class names are the override surface and stay stable; a named slot replaces the matching prop with your own markup.
.ma-steps.ma-steps__aside.ma-steps__body.ma-steps__copy.ma-steps__eyebrow.ma-steps__head.ma-steps__headline.ma-steps__line.ma-steps__list.ma-steps__marker.ma-steps__step.ma-steps__title.ma-steps__track
slot="eyebrow"slot="headline"slot="copy"slot="aside"
Steps fade in place; the line is drawn.
ClientRouterInherits Reveal; nothing to rebind.
Replaces: Timeline (Aceternity) · Steps sections (Tailwind Plus). See the migration table.
Entrance on scroll that plays once and stays, staggers its children, scrubs with the scroll position when asked, honours reduced motion, and keeps working after every ClientRouter navigation.
Bind translate, scale, rotate and opacity to the scroll position: the element goes from the start values you give to neutral across a range of its own passage through the viewport, exactly in step.
Also: view transitions · how costs are measured · browser support · accessibility policy · five-minute setup · MCP for agents · this page as Markdown