Umbra UI

TextReveal

Reveals a line of text word by word or character by character.

Animatedimport { TextReveal } from 'umbra-ui/motion'

Props

PropTypeDefaultDescription
children requiredstring—The text to reveal. Must be a plain string so it can be split and still read as one phrase.
as ElementTypepElement to render, e.g. `"h1"`.
by "word" | "char"wordSplit unit.
delay number0Seconds to wait before starting.
reducedMotion "system" | "always" | "never""system"Reduced-motion override. Under reduced motion the whole text fades in at once, with no movement.
trigger "mount" | "inView"mountStart on mount, or when scrolled into view.

Usage notes

Children must be a plain string.

Accessibility

  • Assistive tech gets the full sentence once from a visually hidden copy; the animated pieces are aria-hidden.
  • Under reduced motion the text fades in as one block.

Import

import { TextReveal } from 'umbra-ui/motion';
import 'umbra-ui/styles.css'; // once, at the root of your app