Please use Desktop to view and interact with components
Page Transitions600mseaseOut
Staggered Text Hero
Hero section with staggered text reveal
herotextstagger
Useto navigate between components
Preview
Build
beautiful
experiences
With smooth animations
Code
TypeScript + React
'use client'
import { motion } from 'framer-motion'
const text = ['Build', 'beautiful', 'experiences']
export function StaggeredHero() {
const container = {
hidden: { opacity: 0 },
visible: {
opacity: 1,
transition: {
staggerChildren: 0.12,
},
},
}
const item = {
hidden: { opacity: 0, y: 20 },
visible: {
opacity: 1,
y: 0,
transition: {
duration: 0.5,
ease: 'easeOut',
},
},
}
return (
<motion.div
variants={container}
initial="hidden"
animate="visible"
className="text-center"
>
{text.map((word, index) => (
<motion.h1
key={index}
variants={item}
className="mb-2 text-4xl font-bold md:text-6xl"
>
{word}
</motion.h1>
))}
<motion.p
variants={item}
className="mt-4 text-lg text-[var(--foreground)]/70"
>
With smooth animations
</motion.p>
</motion.div>
)
}
How to Use
- 1Install Framer Motion:
npm install framer-motion - 2Copy the code from above
- 3Paste it into your project and customize as needed
- 4Colors are customizable via Tailwind CSS classes. The default theme uses dark mode colors defined in your globals.css file