Circular Text
Circular text animations create a circular text effect that continuously rotates. This engaging animation can be used to draw attention to important content or add visual interest to your design.
Installation
npm install framer-motion
pnpm install framer-motion
yarn add framer-motion
bun add framer-motion
Usage
import { CircularText } from "@/components/mvpblocks/text-animations/circular-text";
export default function MyComponent() {
return (
<div className="flex items-center justify-center h-screen bg-black">
<CircularText
text="Circular Text Animation • "
spinDuration={20}
onHover="speedUp"
className="text-white"
/>
</div>
);
}
API
Prop | Type | Default |
---|---|---|
text? | string | - |
spinDuration? | number | 20 |
onHover? | "slowDown" | "speedUp" | "pause" | "goBonkers" | "speedUp" |
className? | string | - |
Features
- 🎯 Smooth Animation: Continuous rotation with customizable speed
- 🎨 Hover Effects: Multiple hover behaviors (slowDown, speedUp, pause, goBonkers)
- 🎪 Customizable: Easy to style with CSS classes
- 📱 Responsive: Works well on different screen sizes
- ⚡ Performance: Optimized with framer-motion
Examples
Speed Up on Hover
<CircularText
text="Speed Up Effect • "
spinDuration={15}
onHover="speedUp"
/>
Pause on Hover
<CircularText
text="Pause on Hover • "
spinDuration={25}
onHover="pause"
/>
Go Bonkers on Hover
<CircularText
text="Go Bonkers! • "
spinDuration={30}
onHover="goBonkers"
/>
Last updated on
Masonry Grids
Masonry grids are a popular layout style that allows items to be arranged in a way that optimizes space and creates a visually appealing design. They are commonly used in image galleries, portfolios, and other content-heavy applications.
Random Unveil
Random unveil animations create a dynamic and engaging effect as elements appear on the screen. This technique can be used to draw attention to specific content or enhance the overall user experience.