|
import { Typewriter } from "@/registry/aliimam/components/typewriter"
export function DemoOne() {
return (
<main className="flex h-full items-center justify-center">
<Typewriter
className="text-5xl"
words={["Developer", "Designer", "Freelancer"]}
/>
</main>
)
}
import { Typewriter } from "@/registry/aliimam/components/typewriter"
export function DemoOne() {
const words = ["Design", "Without", "Limits"]
return (
<main className="flex h-full items-center justify-center">
<div className="text-center">
<h1 className="mb-8">
<Typewriter
className="text-5xl font-bold tracking-tighter uppercase"
words={words}
speed={80}
delayBetweenWords={2000}
cursor={false}
/>
</h1>
</div>
</main>
)
}
|
import { Typewriter } from "@/registry/aliimam/components/typewriter"
export function DemoOne() {
const words = [
"Welcome to Typewriter",
"Create beautiful effects",
"With React & Tailwind",
"Type away!",
]
return (
<main className="flex h-full items-center justify-center">
<Typewriter
words={words}
speed={80}
delayBetweenWords={2000}
cursor={true}
cursorChar="|"
/>
</main>
)
}
_
import { Typewriter } from "@/registry/aliimam/components/typewriter"
export function DemoOne() {
return (
<main className="flex h-full items-center justify-center">
<Typewriter
words={["Custom Cursor", "Looks cool!"]}
cursorChar="_"
className="text-4xl"
/>
</main>
)
}
I am a |
import { Typewriter } from "@/registry/aliimam/components/typewriter"
export function DemoOne() {
return (
<main className="flex h-full items-center justify-center">
<h1 className="text-4xl font-semibold">
I am a{" "}
<Typewriter words={["Developer", "Designer", "Creator"]} speed={80} />
</h1>
</main>
)
}
Installation
pnpm dlx shadcn@latest add https://aliimam.in/r/typewriter.json
Usage
import { Typewriter } from "@/components/typewriter"<Typewriter
words={["Developer", "Designer", "Freelancer"]}
/>Props
| Prop | Type | Default |
|---|---|---|
words | string[] | — (required) |
speed | number | 100 |
delayBetweenWords | number | 2000 |
cursor | boolean | true |
cursorChar | string | "_" |
className | string | — |
savd

