text animations
Text Along Path
Text follows a custom SVG path — continuously looping in auto mode or scrubbing with scroll. Supports any SVG path shape and exposes the path stroke for visual debugging.
Installation
Usage
Anatomy
Good to know
pathis an SVG path (dattribute) in the coordinates ofviewBox. SetshowPathwhile designing to see it.animationType="auto"moves the text along the path on a loop (durationin seconds)."scroll"moves it as the page scrolls; passscrollContainerto use another scrolling element.- The text is real SVG text, so screen readers can read it.
- When the user has turned on reduced motion, the
autoloop is turned off and the text stays at the start of the path. Thescrollmode still follows the scroll position, because the user drives it.
Props
Examples
Circular Badge
Text loops continuously around a circular path — classic badge or stamp design. Repeat the text with a bullet separator so the loop is seamless.
Wave Path
Text flows along a sinusoidal wave with animationType="auto". Adjust Q control points to steepen or flatten the wave.
Curved Path with Visible Stroke
A cubic Bézier curve with showPath={true} reveals the guide path in a muted colour — useful during design to position text before hiding the stroke.