cnippet/ui
  1. motion
  2. text animations
  3. spinning text

text animations

Spinning Text

Characters are arranged in a circle and rotate continuously. Use it as a decorative badge ring, a CTA orbit, or layered concentric rings at different speeds.

Installation

Usage

Anatomy

Good to know

  • children must be a plain string. End it with a separator such as " • " so the start and end don't touch.
  • Give it a size with className. fontSize is in rem and radius in ch units.
  • duration is the seconds per full turn. reverse spins counter-clockwise.
  • Screen readers read the full text once; the individual letters are hidden from them.
  • When the user has turned on reduced motion, the ring of text stays still.

Props

Examples

Badge Ring

A spinning label orbits a centered icon — the classic "stamp" or "award badge" pattern. Adjust radius and fontSize to fit any icon size.

CTA Orbit

A reversed ring (reverse) spins around a clickable arrow button. The group-hover:scale-110 on the button creates a satisfying focal-point interaction.

Concentric Rings

Two SpinningText rings at different radii, speeds, and directions with a dot at the centre. The inner ring spins fast and the outer ring slow — a common decorative hero motif.