TypewriterPro
Types phrases out, deletes them and moves on, with a blinking caret.
pnpm dlx shadcn@latest add @lode/typewriterBuild dashboards, onboarding, pricing pages, AI chat
in an afternoon.
$ npx shadcn@latest add @lode/dock, npx shadcn@latest add @lode/drawer
When to use
- Hero headlines that cycle through use cases.
- Terminal-style install hints.
When not to use
- Anything people need to read quickly or copy.
Installation
pnpm dlx shadcn@latest add @lode/typewriterPro components need an API key and the registry in components.json. See CLI and API keys.
1Install the dependencies
npm install motion2Copy the source into your project
Usage
Import it from @/components/ui/typewriter after installing.
import { Typewriter } from "@/components/ui/typewriter";
<h1>
Build <Typewriter words={["dashboards", "onboarding", "pricing pages"]} /> fast.
</h1>API reference
Typewriter
An inline span that types, pauses, deletes and moves to the next phrase.
words
string[]
Phrases in order.
typingSpeed / deletingSpeed= 60 / 32
number
ms per character.
pause= 1500
number
ms to hold a finished phrase.
loop= true
boolean
Start over after the last phrase; otherwise stop on it.
caret= true
boolean
Blinking caret.
| Prop | Type | Default | Description |
|---|---|---|---|
| words | string[] | – | Phrases in order. |
| typingSpeed / deletingSpeed | number | 60 / 32 | ms per character. |
| pause | number | 1500 | ms to hold a finished phrase. |
| loop | boolean | true | Start over after the last phrase; otherwise stop on it. |
| caret | boolean | true | Blinking caret. |
Accessibility
- Screen readers get every phrase once, from a hidden list; the typing is aria-hidden.
- Under reduced motion it shows the first phrase, without typing.
Motion
- Characters appear on a timer; the caret blinks once per second.
Responsive behavior
- Inline text that wraps with its sentence.
Performance
- One timeout at a time, cleared on unmount.
Notes for AI
- Keep phrases a similar length so the layout doesn't jump much.
This page as Markdown, for assistants and coding agents:
/components/typewriter/markdownThe full library index for assistants is at /llms.txt.
Related
Lode·229 doc pages·llms.txt