Loading preview
Blur Text
Text animationsText whose words rise out of a blur one after another.
Types, pauses and deletes a list of words with a blinking caret.
npx shadcn@latest add @venusui/typewriterRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/typewriter.tsxThe code behind the preview above.
typewriter-demo.tsx
import { Typewriter } from "@/components/ui/typewriter"
export default function TypewriterDemo() {
return (
<p className="text-center text-3xl font-semibold tracking-tight">
Build{" "}
<Typewriter words={["landing pages", "dashboards", "design systems"]} className="text-muted-foreground" />
</p>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| words | string[] | — | Words or phrases to type in order. Required. |
| typeSpeed | number | 70 | Milliseconds per typed character. |
| deleteSpeed | number | 40 | Milliseconds per deleted character. |
| pause | number | 1600 | Milliseconds to wait after a word is complete. |
| loop | boolean | true | Start again after the last word. When false, the last word stays. |
| cursor | boolean | true | Show the blinking caret. |
All <span> props except children.
typewriter-caret keyframes and --animate-typewriter-caret to your CSS.cn helper at @/lib/utils.className, e.g. a muted or accent color, separate from the surrounding sentence.2px wide; edit its classes in the file to change it.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.Text whose words rise out of a blur one after another.
Text filled with a slowly moving gradient: a subtle sheen by default, or your own colors.
Counts up to a number when it scrolls into view, with locale-aware formatting.