Compositions
Core Primitives
Transitions
Typography
Customize
20
72
1
Installation
$ pnpm dlx shadcn@latest add @framecn/typewriter
Usage
import { Typewriter } from "@/components/framecn/typewriter";<Typewriter />API Reference
Typewriter
| Prop | Type | Default |
|---|---|---|
text | string | "console.log('hello, world')" |
cursor | boolean | true |
charsPerSecond | number | 20 |
speed | number | 1 |
fontSize | number | 48 |
color | string | "#171717" |
cursorColor | string | "#171717" |
fontWeight | number | 600 |
className | string | - |
fps | number | 30 |
durationInFrames | number | 120 |
width | number | 1000 |
height | number | 500 |
background | string | "white" |
Notes
Cursor blinks on every frame
The cursor uses a deterministic blink pattern that toggles visibility every frame. For a faster blink rate, decrease FPS or use a custom cursor implementation.
Text must be a string
The typewriter requires the text prop to be a string. If you need to type
JSX elements, consider using a separate typewriter component for each element.