Good software is quiet. It does the work, gets out of the way, and leaves you a little more time than you had this morning.

Scroll inside

Code

<!-- reveal-text.free.js: download it from the Install section below and host it with your site -->
<script src="/reveal-text.free.js" defer></script>

<h2>
  <reveal-text theme="light">
    Good software is quiet. It does the work, <em>gets out of the way</em>,
    and leaves you a little more time than you had this morning.
  </reveal-text>
</h2>

In context

Every screen was drawn by hand, then tuned until nothing was left to take away.

Played once, line by line

Every screen was drawn by hand, then tuned until nothing was left to take away.

Scroll inside
Sunset, by character Pro

Install · Free Web Component

One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.

1. Install with one command — or download the file
shadcn CLI · React
npx shadcn@latest add https://www.ui-design.co/r/reveal-text.json
2. Load it and use the element
HTML
<!-- reveal-text.free.js: download it from the Install section below and host it with your site -->
<script src="/reveal-text.free.js" defer></script>

<h2>
  <reveal-text theme="light">
    Good software is quiet. It does the work, <em>gets out of the way</em>,
    and leaves you a little more time than you had this morning.
  </reveal-text>
</h2>
3. React + TypeScript (optional)

The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:

TypeScript
// reveal-text.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    'reveal-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
      mode?: 'scrub' | 'once';
      start?: number | string;
      end?: number | string;
      by?: 'word' | 'line' | 'char';
      progress?: number | string;
      scroller?: string;
      theme?: 'light' | 'dark';
    };
  }
}

Pro · React + TypeScript Pro

One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.

  • React component with TypeScript types, an as prop for the tag, and a ref with setProgress() and replay()
  • Sunset, Mint and Mono tints, plus custom tints from Brand Fit
  • The vanilla Web Component with every tint, a demo page, README and license

Attributes & props

NameTypeDefaultDescription
content text + inline tags—The text is the element’s content. Inline tags such as <em>, <a> and <br> are kept as they are.
mode 'scrub' | 'once''scrub'scrub ties the light to the scroll position, forwards and back. once plays it through by time when the text enters view: words rise out of a blur, one after another.
start number 0..10.85Where in the viewport the reveal begins, as a share of its height from the top: it starts when the top of the text crosses this line.
end number 0..10.35Where it is complete: the last word is lit when the bottom of the text crosses this line.
by 'word' | 'line' | 'char''word'What the light steps through. Lines are measured from the real layout and re-measured on resize.
progress number 0..1—Pins the reveal at a fixed point instead of following scroll or time — drive it from your own timeline. Also el.setProgress(p); null hands control back.
scroller CSS selector | "window"autoThe scrolling box to follow. By default the nearest scrollable ancestor, else the window.
theme 'light' | 'dark''light'Ink colour: dark ink for light pages, light ink for dark ones.
tint Pro'aurora' | 'sunset' | 'mint' | 'mono' | object'aurora'Colours of the words at the front of the light, or a custom tint. Free build ships Aurora only.

It inherits font, size and line height from where you put it, so wrap it in your own heading or paragraph. Screen readers get the whole text once, as a label, and the split words are hidden from them; when the text contains links, the words stay readable instead so the links keep working. It fires reveal when the last word is lit, and replay() restarts mode="once". One passive scroll listener and one animation frame drive it, and it idles while off-screen. With reduced motion the text is simply fully lit. No WebGL, no dependencies.

More components