Typewriter
Character-by-character text reveal with a deterministic blinking cursor
Installation
$ pnpm dlx shadcn@latest add @remocn/typewriterUsage
// src/Root.tsx
import { Composition } from "remotion";
import { Typewriter } from "@/components/remocn/typewriter";
const TypewriterScene = () => (
<Typewriter text="Hello, world" speed={20} fontSize={72} />
);
export const RemotionRoot = () => (
<Composition
id="Typewriter"
component={TypewriterScene}
durationInFrames={120}
fps={30}
width={1280}
height={720}
/>
);Props
| Prop | Type | Default | Description |
|---|---|---|---|
textrequired | string | — | The text to type out |
cursor | boolean | true | Whether to render the blinking cursor at the end |
speed | number | 20 | Typing speed in characters per second |
fontSize | number | 48 | Font size in pixels |
fontWeight | number | 600 | CSS font-weight |
color | string | "#171717" | Text color (any valid CSS color) |
cursorColor | string | "#171717" | Color of the blinking cursor block |
className | string | — | Optional className passed to the underlying span |