Build your next
Playground
Change the props and copy the code. The controls come from the component's TypeScript types.
Props
import { Typewriter } from "@/components/ui/typewriter";<Typewriter words={["components","blocks","themes"]} />Installation
$ pnpm dlx shadcn@latest add @synccn/typewriterFirst time in this project? Connect synccn with one command.
Usage
import { Typewriter } from "@/components/ui/typewriter";<Typewriter words={["fast", "accessible"]} />API reference
Generated from the component's TypeScript types, so it always matches the code.
Typewriter
Types each phrase, pauses, deletes it, then moves to the next.
- wordsrequired
string[]Phrases to type.
- typeSpeed
numberDefault
70Milliseconds per typed character.
- deleteSpeed
numberDefault
35Milliseconds per deleted character.
- pause
numberDefault
1400Milliseconds a phrase stays complete.
- loop
booleanDefault
trueStart again after the last phrase.
- cursorClassName
stringClasses for the cursor.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-label