Skip to content
GitHub (opens in a new tab)

TextReveal

A short heading that rises in by word or by line, for docs heroes and empty states. The full string is always in the DOM.

stableAtomcontracts/textreveal.json

Preview

TextReveal

A short heading that rises in by word or by line, for docs heroes and empty states. Not for body copy.

Master

A heading that rises in word by word. Press Replay to see it again; Variants shows the by-line reveal. The full sentence is always in the DOM; only the visible copy animates.

Agents that ask before they act

Usage

One per view, on a hero or empty-state heading. Each word or line fades up over motion.duration300 with ease-out, 40ms apart by word and 80ms by line. No bounce, no scale, no loop. Under reduced motion the final text is there at once. Change replayKey to play it again.

Do's

  • a docs or marketing hero heading
  • an empty-state title that should arrive gently

Don'ts

  • body copy or long paragraphs
  • text still being generated — ShimmerText
  • page titles in product UI — PageHeader
  • repeated headings in lists or tables
<TextReveal replayKey={replay}>Agents that ask before they act</TextReveal>

When to use

  • a docs or marketing hero heading
  • an empty-state title that should arrive gently

When not to use

  • body copy or long paragraphs
  • text still being generated — ShimmerText
  • page titles in product UI — PageHeader
  • repeated headings in lists or tables

What an agent reads

import { TextReveal } from "agentic-ds-kit";
must
  • the full string is in a visually hidden span; the animated units are aria-hidden
  • honours prefers-reduced-motion
  • no bounce, no scale, plays once
defaults
  • by word
  • as h2
stops if
  • Do not loop it
  • Do not use it for more than one heading per view
  • Do not use raw hex

From contracts/textreveal.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
childrenstringYes—Plain text. With by="line", separate lines with \n.
byword | lineNoword—
ash1 | h2 | h3 | p | spanNoh2—
replayKeystring|numberNo—Change it to play the reveal again.
labelstringNo—Accessible text when it should differ from children.
  • Component
    →

    ShimmerText

    Short live status copy (a running step, a loading line) with a highlight that sweeps over the text while the work runs.

  • Component
    →

    PageHeader

    Top-of-page title with optional Breadcrumb trail, subtitle, actions, page Tabs, a profile Avatar and a decorative cover.