crucıble

Gyre

Text flowing along an SVG path on a seamless loop — circle, wave, figure-eight, arc or a custom path. Scroll velocity boosts or flips the drift, drag scrubs it with inertia, arrow keys fling it, and an intro draws the path in before the text unveils along it. Static under reduced motion.

motionfree

Installation

CLI

npx shadcn@latest add @crucible/gyre

Props

PropTypeDefaultDescription
textstringThe phrase that flows along the path. Repeated internally to fill it; exposed once to assistive tech.
presetGyrePreset"circle"Built-in path shape. Ignored when path is set.
pathstringCustom SVG path d string. Paths ending in Z loop seamlessly as closed shapes.
viewBoxstringviewBox for a custom path. When omitted it is derived from the path's bounding box after mount (padded for glyph height).
speednumber60Drift speed in viewBox units per second. Negative reverses.
scrollReactivefalse | "speed" | "direction""speed"Couple the drift to page scroll. "speed" adds a smoothed boost from scroll velocity that decays back to base; "direction" also flips travel with the scroll direction.
draggablebooleantruePointer-drag scrubs the text along the path, gliding on release. Also enables arrow-key nudges.
pauseOnHoverbooleantrueEase the drift to a halt while a mouse hovers the text.
showPathbooleanfalseDraw a faint guide stroke along the path (it draws in during the intro).
separatorstring" • "Joins each repetition of text. Rendered at reduced opacity.
fontSizenumberper preset (circle 30, wave 34, loop 28, arc 34, custom 24)Glyph size in viewBox units.
trackingnumber0.04Extra letter spacing in em, applied before seam-fitting.
colorstringcurrentColor (inherits — neutral-100 out of the box)Text color.
pausedbooleanfalseFreeze the autoplay drift and scroll coupling. Dragging still works.
refReact.Ref<GyreHandle>Imperative handle — replay() and nudge(velocity?).
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"div">, "children" | "color"> — they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.