Captions
Compositions
Core Primitives
Transitions
Typography
- Blur Reveal
- Staggered Fade Up
- Masked Slide Reveal
- Tracking In
- Inline Highlight
- Marker Highlight
- Shimmer Sweep
- Typewriter
- Text Fade Replace
- Slot Machine Roll
- Infinite Marquee
- Perspective Marquee
- Matrix Decode
- RGB Glitch Text
- Strikethrough Replace
- Blur Out Up
- Bottom Up Letters
- Top Down Letters
- Per Character Rise
- Soft Blur In
- Micro Scale Fade
- Scale Down Fade
- Focus Blur Resolve
- Spring Scale In
- Line by Line Slide
- Mask Reveal Up
- Short Slide Right
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.