Animation

Circular Text

Text laid out around a circle, with the whole circle spinning on a keyframe. Hover behaviour swaps the spin rate (or pauses) without resetting the rotation angle. Pure CSS port — no JS animation loop.

Angular adaptation of an effect by David Haz / reactbits.dev.

Import

import { WrCircularText } from 'ngwr/circular-text';

Playground

HELLO * NGWR *
<wr-circular-text
  text="HELLO * NGWR * "
  [spinDuration]="20"
  onHover="speedUp"
/>

Customize

Spin Duration (s)
20 s
On Hover
Text

API

NameDescriptionTypeDefault
textrequiredText to lay out around the circle.string—
spinDurationSeconds per full revolution at rest.number20
onHoverHover behaviour. null disables hover reactivity.'speedUp' | 'slowDown' | 'pause' | 'goBonkers' | null'speedUp'

CSS variables

Custom properties ngwr/circular-text publishes. Each default below is declared on the component's own selector, so a :root override is shadowed by it — set them on that selector, on a wrapper you scope yourself, or inline on the element. Unlike the BEM class names, these are the supported way to restyle the component.

VariableDefaultDeclared on
--wr-circular-text-radiuscalc(var(--wr-circular-text-size) / 2).wr-circular-text
--wr-circular-text-size12rem.wr-circular-text