Captain UI

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-reveal
Pro

A 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.
  1. Layout

    Every region gets its box before a word is written.

  2. Type

    Names and states, one face at three sizes.

  3. Colour

    One accent, kept for the run that needs you.

  4. Data

    Real figures roll in, and they add up.

Runs

New run
  • Fix checkout race in the webhook handler

    Needs you
  • Cache font files on the CDN for a year

    Merged
  • Retry the S3 upload twice before failing

    Running
  • Explain the spend cap in the settings copy

    Merged

Spent this morning

$0.00

Agent time

0 min

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

PropTypeDefaultWhat it does
titleReactNodeThe section heading.
bodyReactNodeOne or two sentences under it.
steps{ label, text }[]The stages in order. The first is layout: every piece's box appears in it.
screenReactNodeYour product screen, made of Reveal pieces.
pacenumber0.7Scroll length per step, in viewport heights.
Reveal stepnumberThe step at which a piece resolves into its real content.
Reveal fromReactNodeWhat shows before that step, such as a grey version. Without it, a recessed block holds the space.
Reveal ordernumber0Staggers pieces within a step.
useRevealStep()() => numberThe 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.