Spinning Text

Use Spinning Text for a short decorative phrase that can orbit around an icon, mark, or focal point. Keep the text concise because the circular treatment is intended for recognition, not long reading.

Preview

Reduce motion:Off
Tune:Off
Inspect
This is example text!

Installation

Basic usage

TypeScript
spinning-label.tsx

Examples

Adjust duration, direction, radius, and text styling to fit the composition. Use reverse when the surrounding movement needs the opposite direction.

Usage

API

PropertyTypeDefaultDescription
childrenstring | string[]requiredThe text content to be animated. Can be a single string or an array of strings.
styleCSSProperties—Custom styles for the container.
durationnumber10Duration of the spinning animation in seconds.
classNamestring—Additional CSS classes for the container.
reversebooleanfalseReverses the spinning direction when set to `true`.
radiusnumber5Radius of the circular path in `ch` units.
transitionTransition—Custom transition settings for the animation. Merges with the default transition.
variants{ container?: Variants; item?: Variants; }—Custom animation variants for the container and individual characters.

Accessibility

The component includes a screen-reader-friendly text alternative. Do not use rotating text as the only place for essential information.

Styling

Use className and the radius options to fit the text around a central element. Reduced-motion preferences should retain the text without continuous rotation.

Contact

Found a bug or need help using this component? Open an issue on GitHub.

License & Usage

Sona UI is available under the MIT license. You may use, modify, and distribute this component in personal and commercial projects.

Was this page helpful?

Your response helps us improve component docs.

Related components