Skip to content
VenusUI
Get started

Typewriter Machine

A typewriter whose carriage slides as you type, with a bell near the end of each line.

Preview

Installation

npx shadcn@latest add @venusui/typewriter-machine

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/typewriter-machine.tsx

Usage

The code behind the preview above.

typewriter-machine-demo.tsx

import { TypewriterMachine } from "@/components/ui/typewriter-machine"

export default function TypewriterMachineDemo() {
  return <TypewriterMachine />
}

API reference

PropTypeDefaultDescription
defaultValuestring"Dear reader,\n"Starting text.
columnsnumber30Characters per line.
onValueChange(text: string) => void—Called as the text changes.

All <div> props.

Requirements

  • React 19 and Tailwind CSS v4. The CLI adds the keyframes.

Customization

  • The paper is a real text field, so it works with any keyboard, including phones.

Accessibility

  • Typing goes into a labelled text field; the round keys are a pointer shortcut.

Troubleshooting

Something looks different from the preview.
Components use your project’s theme tokens, so surrounding colours and radius follow your styles.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (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 found
Run npx shadcn@latest init in your project first.
Loading preview

A café dial for choosing a drink, with a cup that shows what goes into it.

Loading preview

A wall plate of rocker switches that light a row of pendant bulbs.

Loading preview

A graphic equalizer panel with faders, LED columns, a response curve and presets.