Typewriter
Reveals text character by character, like a terminal being typed in real time. Screen readers receive the full string immediately; reduced motion renders it statically.
Installation
npx dafink-ui add typewriterDemo
Props
| Name | Type | Default | Description |
|---|---|---|---|
| text | string | - | Required. The full text to type out. |
| speed | number | 50 | Milliseconds between each character. |
| delay | number | 0 | Milliseconds to wait before typing begins. |
| cursor | boolean | true | Show a blinking | cursor while typing. |
| cursorPersist | boolean | false | Keep the cursor visible after typing completes. |
| onComplete | () => void | - | Called when all characters have been revealed. |
| className | string | "" | Additional Tailwind classes merged onto the root span. |