Motion UIComponentsComponent

Stagger reveal

An editorial entrance where a headline rises line by line, then followers stagger in behind it.

npx shadcn@latest add @motion/stagger-reveal

API reference

Components

<StaggerReveal />

Orchestration container for a headline plus staggered followers.

children

ReactNode

One StaggerRevealHeadline and any number of StaggerRevealItem followers.

as?

StaggerRevealTag = "div"

The element to render. Defaults to "div".

className?

string

Merged onto the container.

id?

string

Forwarded to the container element.

<StaggerRevealHeadline />

Split-target heading the container reveals line by line.

children

string

Plain headline text to split and reveal.

as?

StaggerRevealHeadlineTag = "h1"

The element to render. Defaults to "h1".

ariaLabel?

string

Whole-headline announce for assistive tech. Defaults to children.

className?

string

Merged onto the heading.

id?

string

Forwarded to the heading.

<StaggerRevealItem />

Follower the container staggers in after the headline.

children

ReactNode

The follower's content.

as?

StaggerRevealItemTag = "div"

The element to render. Defaults to "div".

className?

string

Merged onto the follower.

id?

string

Forwarded to the follower element.

Hooks

useStaggerReveal

Headless orchestration for a headline plus follower items.

useStaggerReveal(): StaggerRevealHandle

Returns

ref

RefObject<HTMLElement | null>

Attach to the container element.

Functions

runStaggerPreparation

Runs asynchronous measurement/splitting and always invokes the visible-state fallback.

runStaggerPreparation(prepare: () => Promise<void>, reveal: () => void): Promise<void>