React Circular Text Animation
Spinning circular text with interactive hover effects. Perfect for React applications requiring dynamic rotating text displays.
Powered by
Trying to implement circular text animations?
Join our Discord community for help from other developers.
Most text layouts are linear and predictable—horizontal lines that don't utilize screen space creatively or capture attention through movement. This component arranges text in a perfect circle with continuous rotation, creating eye-catching animations that can respond interactively to user hover states.
Interactive circular spinning text
Text arranged in a circle with customizable hover effects and rotation speed:
Built with TypeScript and Motion for React applications, using precise trigonometric calculations for letter positioning. The component features multiple hover interaction modes including speed changes, pausing, and "bonkers" mode for playful user engagement.
Installation
npx shadcn@latest add https://www.shadcn.io/registry/circular-text.json
npx shadcn@latest add https://www.shadcn.io/registry/circular-text.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/circular-text.json
bunx shadcn@latest add https://www.shadcn.io/registry/circular-text.json
Usage
import CircularText from "@/components/text/circular-text";
<CircularText
text="REACT • COMPONENTS • BUILD FAST • "
onHover="speedUp"
spinDuration={20}
className="text-primary"
/>
Why most text layouts are boring
Most developers stick to linear text flows—left-to-right reading patterns that don't explore the full potential of screen real estate. Static text sits there doing nothing, missing opportunities to create visual interest through motion and spatial arrangement.
This React component uses mathematical positioning to place each character along a perfect circle, creating a mesmerizing rotation effect. The hover interactions add playful engagement, allowing users to control the animation speed and feel connected to the visual experience.
The key insight: circular motion draws attention naturally. When text moves in predictable patterns that users can influence, it transforms from static information into an interactive visual element that enhances user engagement.
Features
- Perfect circular text arrangement with precise trigonometric character positioning
- Multiple interactive hover modes: slowDown, speedUp, pause, and goBonkers for varied user experiences
- Smooth rotation animations with customizable duration and linear easing for consistent motion
- Spring-based hover transitions with configurable damping and stiffness for natural feel
- Theme-aware styling with CSS custom properties for seamless design system integration
- Performance optimized with Motion's animation controls and hardware-accelerated transforms
- Free open source component compatible with Next.js and shadcn/ui design systems
API Reference
CircularText
Circular rotating text component with interactive hover effects.
Prop | Type | Default | Description |
---|---|---|---|
text | string | required | Text content to display in circular arrangement |
spinDuration | number | 20 | Duration for one full rotation (seconds) |
onHover | 'slowDown' | 'speedUp' | 'pause' | 'goBonkers' | 'speedUp' | Hover interaction behavior |
className | string | - | Additional CSS classes |
Hover Effect Options
Different interaction modes for user engagement:
Mode | Behavior | Speed Change | Scale Effect |
---|---|---|---|
slowDown | Slower rotation on hover | 2x slower | Normal scale |
speedUp | Faster rotation on hover | 4x faster | Normal scale |
pause | Stops rotation on hover | Paused | Normal scale |
goBonkers | Very fast rotation | 20x faster | 0.8x scale |
Duration Configuration
Control rotation speed with spinDuration values:
Duration | Speed | Use Case |
---|---|---|
5s | Very fast | High energy, attention-grabbing |
15s | Moderate | Balanced visibility and motion |
30s | Slow | Subtle, ambient movement |
60s | Very slow | Almost imperceptible, zen-like |
Common gotchas
Text doesn't fit in circle: The component uses a fixed 200px circle. For longer text, consider adding separators (• or *) between words or adjusting the container size with custom CSS to accommodate more characters.
Letters appear cut off: Ensure the container has sufficient padding and the parent element doesn't have overflow:hidden that might clip the rotating text. Each letter is absolutely positioned and may extend beyond the base container.
Hover effects feel laggy: The component uses spring animations for smooth transitions. If performance is an issue, consider reducing the spring stiffness or using simpler linear transitions for faster response times.
Animation doesn't restart properly: The component tracks rotation state internally. If you need to reset the animation, consider adding a key prop to force component remounting or implementing a reset function.
Text spacing looks uneven: Character spacing is calculated mathematically based on text length. Very short text might look sparse while very long text might overlap. Consider optimal text lengths of 15-30 characters.
Integration with other components
Perfect for logo animations in Card headers or branding elements in Dialog modals. Works excellently as loading indicators with Progress components or as decorative elements in Badge designs.
For creative interfaces, combine with Avatar components for profile animations or Button components for interactive call-to-action elements. The component integrates seamlessly with Tabs for section identifiers and works well within Sheet overlays for dynamic navigation elements.
Questions developers actually ask
React Blur Text Animation
Text that animates from blur to focus with intersection observer. Perfect for React applications requiring elegant scroll-triggered text reveals.
React Colourful Text
Dynamic color-cycling text with character animations. Perfect for React applications requiring vibrant text effects with TypeScript support.