Glin UI
Primitive / AtomAdapted from Motion Primitivesbeta

Spinning Text

Text laid out on a rotating circle with an accessible name and pause on hover.

Edit on GitHub

Own every component

Hover the seal to pause it.

Installation

Install from
pnpm dlx @glinui/cli@latest add spinning-text

Credits. Adapted from Motion Primitives (MIT, (c) 2024 ibelick). motion/react removed (CSS and Web Animations API), tokens, accessibility, reduced motion levels, RTL Attribution details.

Prefer the package?

Usage

Improvement over the original: pause on hover or focus, pause offscreen and in hidden tabs, static ring at motion none, no inline style attributes.

End the string with a separator and a space so the loop reads as a ring: `"open source * made to be owned * "`.

Variants

Type treatments.

<SpinningText variant="glass">{"glass * glass * "}</SpinningText>

States

Speed, direction and ring size.

<SpinningText duration={6} reverse radius={4} fontSize={0.7}>...</SpinningText>

In a layout

A verified badge beside a proof point.

Trusted by teams

A rotating badge beside a proof point.

<Card className="flex items-center gap-5">
<SpinningText>{"verified * "}</SpinningText>
<p>Trusted by teams</p>
</Card>

Accessibility

  • The wrapper is `role="img"` with `aria-label` set to the full string; the individual glyphs are `aria-hidden`.
  • Decorative by default. Pair it with a visible heading if the text carries meaning.
  • Never traps focus or intercepts pointer events beyond the optional hover pause.

ARIA Attributes

  • `role="img"` with `aria-label`
  • `aria-hidden="true"` on the glyph ring

Reduced Motion

The ring only turns at motion level full. Under motion none or prefers-reduced-motion the component renders its static frame. Glyphs stay placed on the circle.

Affected properties

ring rotation

API Reference

PropTypeRequiredDefaultDescription
childrenstringYes-Text laid out on the ring. It is also the accessible name.
variant"default" | "plain" | "glass"NodefaultType treatment.
durationnumberNo10Seconds per full turn.
reversebooleanNofalseSpin counter-clockwise (mirrored in RTL).
fontSizenumberNo1Glyph size in rem.
radiusnumberNo5Ring radius in ch units.
pauseOnHoverbooleanNofalsePause while hovered or focused within.

Source

Import directly from the package or browse the source on GitHub. Click any file to view it.

Import

import { SpinningText } from "@glinui/ui"

Dependencies

@glinui/ui@glinui/motionclass-variance-authority

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/spinning-text.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.

Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata

Primary Props Type

SpinningTextProps

SpinningTextProps

PropTypeRequiredDefaultDescription
childrenstringYes-The string laid out on the ring. It becomes the accessible name.
durationnumberNo10Seconds per full turn.
fontSizenumberNo1Glyph size in rem.
pauseOnHoverbooleanNofalsePause the rotation while hovered or focused within.
radiusnumberNo5Ring radius in ch units.
reversebooleanNofalseSpin counter-clockwise. In RTL documents the default direction is mirrored.
variant"default" | "plain" | "glass"No"default"Variant option from spinningTextVariants.