Typewriter Button

An interactive button that reveals its label character-by-character with optional synthesized mechanical audio feedback.

Click buttons to test typewriter text reveal + Web Audio mechanical clicks

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/typewriter-button

API Reference

PropTypeDefaultDescription
childrenstringLabel text to type out
charDurationnumber75Milliseconds per character reveal
soundEnabledbooleanfalseEnables mechanical keystroke sound cues
soundVolumenumber0.25Web Audio synthesizer output volume (0 to 1)
variant'primary' | 'secondary' | 'outline''primary'Styling appearance
autoStartbooleanfalseBegins typing immediately upon mounting
onComplete() => voidundefinedCallback on typing completion