motion-circle
Positions text characters evenly around a circle and spins them continuously. Great for badges, labels, and decorative type.
Preview
Import
Usage
Counterclockwise
Set direction="ccw" to reverse the spin direction.
Upright characters
Add upright to keep each character vertically oriented instead of radiating outward from the center.
With slotted content
Place any element inside motion-circle to anchor it at the center. The slot content is stationary — only the text ring rotates.
Pause on hover
Add pause-on-hover to freeze the rotation when the cursor enters and resume it on leave.
How it works
Each character is wrapped in an absolutely positioned span centered in the container. A CSS transform chain — rotate(angle) translateY(-radius) — places each character at its position on the ring. The .ring container then spins continuously via Motion One's animate with
repeat: Infinity and
ease: "linear".
When upright is set, a counter-rotation (rotate(-angle)) is appended to each character's transform so characters stay
axis-aligned regardless of their position on the ring.
Properties
| Attribute | Property | Type | Default | Description |
|---|---|---|---|---|
| | | string | — | Text to arrange around the circle |
| | | number | 80 | Circle radius in px |
| | | number | 8 | Seconds per full rotation |
| | | "cw" | "ccw" | "cw" | Clockwise or counterclockwise spin |
| | | boolean | false | Keep characters vertically oriented |
| | | boolean | false | Pause the rotation on mouseenter, resume on mouseleave |
Accessibility
When prefers-reduced-motion is set, the ring does not animate and the text renders statically around the circle.