Original Blocks/Text
Staggered Blur
A staggered blur effect for text elements.
HextaUI is awesome ❤️
<BlurredStagger text="HextaUI is awesome ❤️" />
Installation
Copy and paste the following code into your project.
"use client";
import { motion } from "motion/react";
export const BlurredStagger = ({
text = "we love hextaui.com ❤️",
}: {
text: string;
}) => {
const headingText = text;
const container = {
hidden: { opacity: 0 },
show: {
opacity: 1,
transition: {
staggerChildren: 0.015,
},
},
};
const letterAnimation = {
hidden: {
opacity: 0,
filter: "blur(10px)",
},
show: {
opacity: 1,
filter: "blur(0px)",
},
};
return (
<>
<div>
<motion.h1
variants={container}
initial="hidden"
animate="show"
className="text-base"
>
{headingText.split("").map((char, index) => (
<motion.span
key={index}
variants={letterAnimation}
transition={{ duration: 0.3 }}
>
{char === " " ? "\u00A0" : char}
</motion.span>
))}
</motion.h1>
</div>
</>
);
};
npx shadcn@latest add "https://21st.dev/r/hextaui/blurred-stagger-text"
pnpm dlx shadcn@latest add "https://21st.dev/r/hextaui/blurred-stagger-text"
yarn dlx shadcn@latest add "https://21st.dev/r/hextaui/blurred-stagger-text"
bun x shadcn@latest add "https://21st.dev/r/hextaui/blurred-stagger-text"
Usage
import { BlurredStagger } from "@/components/ui/BlurredStagger";
<BlurredStagger text="HextaUI is awesome ❤️" />
Props
Prop | Type | Default |
---|---|---|
text? | string | we love hextaui.com ❤️ |
Edit on GitHub
Last updated on