FX · Text
Types text out character by character with a caret. Screen readers get the full text immediately and nothing reflows while typing.
- The full text is in a visually hidden span; the typed copy and caret are aria-hidden.
- An invisible copy of the final text reserves its size, so surrounding layout never shifts.
- prefers-reduced-motion: reduce (or data-rad-fx-motion="reduce" on an ancestor) shows the full text at once with a still caret.
- The caret stops blinking shortly after typing finishes.
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | Text to type. Screen readers get it whole, immediately. |
as | 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'p' | Element to render. |
speed | number | 45 | Milliseconds per character. |
delay | number | 0 | Milliseconds before typing starts. |
cursor | boolean | true | Show a caret. |
trigger | 'inView' | 'mount' | 'inView' | When typing starts. |