Skip to main content
Version: Next

SpinningText

SpinningText arranges text around a circular path and spins it with configurable speed, direction, tone, and surface styling. It wraps the ui-spinning-text custom element from @editora/ui-core and is designed for production use with reduced-motion handling, pause controls, and an optional center slot.

Import

import { SpinningText } from '@editora/ui-react';
// or subpath
import { SpinningText } from '@editora/ui-react/SpinningText';

Basic Usage

<SpinningText
text="Editora launch systems editorial motion"
repeat={2}
separator=""
speed={4}
pauseOnHover
>
<SpinningText.Center>ET</SpinningText.Center>
</SpinningText>

Hero Seal

<SpinningText
text="Release systems ready for distribution"
repeat={2}
speed={4.5}
variant="glass"
tone="brand"
size="xl"
elevation="high"
>
<SpinningText.Center>
<img
alt="Launch medallion"
src="/img/launch-seal.png"
style={{ inlineSize: '100%', blockSize: '100%', objectFit: 'cover', borderRadius: '999px' }}
/>
</SpinningText.Center>
</SpinningText>

Product Trust Mark

<SpinningText
text="Quality review approved for rollout"
repeat={2}
direction="counterclockwise"
variant="soft"
tone="success"
size="lg"
radius={92}
fontSize={15}
letterSpacing={2}
>
<SpinningText.Center>
<div style={{ fontWeight: 800, letterSpacing: '0.08em' }}>QA</div>
</SpinningText.Center>
</SpinningText>

Imperative API

const ref = React.useRef<HTMLElement & { pause(): void; play(): void; refresh(): void }>(null);

<>
<button onClick={() => ref.current?.pause()}>Pause</button>
<button onClick={() => ref.current?.play()}>Play</button>
<button onClick={() => ref.current?.refresh()}>Refresh</button>

<SpinningText ref={ref} text="Always-on motion system" repeat={2}>
<SpinningText.Center>AI</SpinningText.Center>
</SpinningText>
</>

Props

SpinningText (root)

PropTypeDefaultDescription
textstringSource text for the circular ring
repeatnumber | string1Repeats the source text around the ring
separatorstring' • 'Separator inserted between repeated phrases
speednumber | string4Revolutions per minute when duration is not provided
durationnumber | string14sFull rotation duration override
direction'clockwise' | 'counterclockwise''clockwise'Orbit direction
variant'default' | 'surface' | 'soft' | 'solid' | 'glass' | 'contrast' | 'minimal''default'Surface styling
tone'brand' | 'neutral' | 'info' | 'success' | 'warning' | 'danger''brand'Accent tone
size'sm' | 'md' | 'lg' | 'xl' | '1' | '2' | '3' | '4''lg'Default scale preset
radiusnumber | stringRing radius override
paddingnumber | stringSurface padding override
fontSizenumber | stringGlyph font-size override
fontWeightnumber | stringGlyph font-weight override
letterSpacingnumber | stringGlyph tracking override
colorstringDirect text color override
accentstringAccent color override
orbitColorstringOrbit ring color override
easingstring'linear'Animation timing function
elevation'none' | 'low' | 'high''low'Surface shadow depth
pausedbooleanfalsePauses motion
pauseOnHoverbooleanfalsePauses when hovered
pauseOnFocusbooleanfalsePauses when focus enters the component

SpinningText.Center

PropTypeDefaultDescription
askeyof JSX.IntrinsicElements'div'Render tag for the center slot
childrenReact.ReactNodeContent rendered in the center medallion
...restReact.HTMLAttributes<HTMLElement>Passed through to the center wrapper

Notes

  • Use duration when you want exact timing and speed when you want a friendlier “how fast should this spin?” control.
  • The component exposes play(), pause(), and refresh() through the forwarded ref.
  • Reduced-motion users get a static circular layout automatically.
  • The center slot is optional and works well with icons, initials, badges, or images.