Feature reveal
A scroll section where a product screen is built the way a designer builds it: grey boxes for the layout, then type, then colour, then live figures that roll in. Scroll back and it comes apart.
npx shadcn@latest add @captain/feature-revealA screen, built the way you would build it
Scroll, and the runs screen goes from grey boxes to live figures. Scroll back up and it comes apart again.
Layout
Every region gets its box before a word is written.
Type
Names and states, one face at three sizes.
Colour
One accent, kept for the run that needs you.
Data
Real figures roll in, and they add up.
Runs
New run
Fix checkout race in the webhook handler
Needs youCache font files on the CDN for a year
MergedRetry the S3 upload twice before failing
RunningExplain the spend cap in the settings copy
Merged
Spent this morning
$0.00
Agent time
0 min
Feature reveal is a Pro component
The demo and the docs are free. The source comes with Pro, through this page, the shadcn CLI and the MCP.
Usage
import { FeatureReveal, Reveal } from "@/components/ui/feature-reveal"
<FeatureReveal
title="A screen, built the way you would build it"
steps={[{ label: "Layout", text: "Boxes first." }, { label: "Type", text: "Then words." }]}
screen={<Reveal step={1} className="h-8 w-28"><h3>Runs</h3></Reveal>}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | ReactNode | The section heading. | |
| body | ReactNode | One or two sentences under it. | |
| steps | { label, text }[] | The stages in order. The first is layout: every piece's box appears in it. | |
| screen | ReactNode | Your product screen, made of Reveal pieces. | |
| pace | number | 0.7 | Scroll length per step, in viewport heights. |
| Reveal step | number | The step at which a piece resolves into its real content. | |
| Reveal from | ReactNode | What shows before that step, such as a grey version. Without it, a recessed block holds the space. | |
| Reveal order | number | 0 | Staggers pieces within a step. |
| useRevealStep() | () => number | The step reached, for pieces that change by step, such as a NumberFlow that rolls in. |
Accessibility
- The scroll drives the reveal; nothing is hidden from the accessibility tree, and the steps are an ordered list with aria-current on the one reached.
- Reversible by construction: every piece is a function of scroll position, so scrolling up takes it apart in the same order.
- Reduced motion drops the pinning and shows the finished screen, whole, with the steps listed beside it.