Sections
Get Started
Components
- Accordion
- Alert Dialog
- Animated Gradient Text
- Animated Shiny Text
- Avatar
- Badge
- Bento Box
- Bento Grid
- Border Beam
- Breadcrumbs
- Card
- Checkbox
- Custom Cursor
- Dialog
- Glow Border
- Glow Card
- Hyper Text
- Logo Beam
- Marquee
- Number Counter
- Popover
- Ripple Button
- Scroll Area
- Separator
- Shimmer Button
- Shinny Icons
- Tabs
- Terminal
- Text Animate
- Theme Toggler
- Typing Animation
- Word Rotate
|
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<TypingAnimation
words={["Developer", "Designer", "Creator", "Dreamer"]}
typeSpeed={120}
deleteSpeed={60}
pauseDelay={1500}
loop
className="bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-3xl font-bold text-transparent md:text-6xl"
/>
)
}
Installation
pnpm dlx shadcn@latest add https://ebonui.com/r/typing-animation.json
Examples
Hero headline + subheadline combo
|
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<div className="space-y-6">
<TypingAnimation
words={["Design.", "Develop.", "Deploy.", "Dominate."]}
typeSpeed={200}
deleteSpeed={80}
pauseDelay={1000}
loop
className="bg-gradient-to-br from-blue-600 via-purple-600 to-red-600 bg-clip-text text-4xl font-black tracking-tighter text-transparent md:text-6xl"
/>
<TypingAnimation
words={["One line of code at a time."]}
typeSpeed={80}
showCursor={false}
className="text-2xl text-gray-500"
/>
</div>
)
}
Super fast glitch-style
▋
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<TypingAnimation
words={["HACKER", "CODER", "ENGINEER", "WIZARD"]}
typeSpeed={40}
deleteSpeed={20}
pauseDelay={800}
loop
cursorStyle="block"
className="font-mono text-7xl tracking-wider text-green-400"
/>
)
}
Elegant with underscore cursor
_
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<TypingAnimation
words={["minimalist", "elegant", "timeless", "refined"]}
typeSpeed={150}
pauseDelay={2000}
loop
cursorStyle="underscore"
className="font-serif text-6xl text-gray-800 italic"
/>
)
}
Emoji support
|
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<TypingAnimation
words={["Hello 👋", "Bonjour 🌍", "Ciao ✨", "Hola 🔥"]}
typeSpeed={100}
pauseDelay={1800}
loop
className="text-6xl"
/>
)
}
Very long phrases
|
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<TypingAnimation
words={[
"Building the next generation of AI-powered applications",
"Turning coffee into beautiful, performant code",
"Shipping features faster than you can say deploy",
]}
typeSpeed={80}
deleteSpeed={40}
pauseDelay={2000}
loop
className="mx-auto max-w-5xl text-4xl leading-relaxed md:text-5xl"
/>
)
}
One-time reveal with motion
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<TypingAnimation
words={["This is the moment you've been waiting for..."]}
showCursor={false}
className="text-5xl font-bold"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 3, duration: 1 }}
/>
)
}
Terminal style
$ ▋
import { TypingAnimation } from "@/components/ui/typing-animation"
export function Component() {
return (
<div className="mx-auto max-w-2xl rounded-lg bg-black p-8 text-left font-mono">
<span className="text-green-400">$ </span>
<TypingAnimation
as="span"
words={["npm run dev", "cargo build --release", "docker compose up"]}
typeSpeed={100}
pauseDelay={1200}
loop
cursorStyle="block"
className="text-green-400"
/>
</div>
)
}
Usage
import { TypingAnimation } from "@/components/ui/typing-animation"<TextAnimate
text="We build the future"
preset="fadeUp"
className="text-5xl font-bold tracking-tighter md:text-7xl"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | string | - | Single string to animate |
words | string[] | - | Array of strings to type and delete in sequence |
className | string | - | The class name to be applied to the component |
duration | number | 100 | Duration for each character |
typeSpeed | number | 100 | Speed of typing animation (ms per character) |
deleteSpeed | number | 50 | Speed of deleting animation (ms per character) |
delay | number | 0 | Delay before animation starts (in ms) |
pauseDelay | number | 1000 | Pause duration between words (in ms) |
loop | boolean | false | Whether to loop the animation |
as | React.ElementType | "span" | Component to render as |
startOnView | boolean | true | Start animation when component is in view |
showCursor | boolean | true | Whether to show the typing cursor |
blinkCursor | boolean | true | Whether the cursor should blink |
cursorStyle | "line" | "block" | "underscore" | "line" | Style of the cursor (like VSCode) |
Support Ebon UI by giving it a star on GitHub!
A lot of work goes into maintaining and improving Ebon UI. Your stars help show your support and encourage further development.
Star on Github