Text on path
Playground
Text
Shape
Colour
Install
npm install @shavin/fximport { TextOnPath } from "@shavin/fx";Works with
React
Client component; Next.js and any React 18+ app
Remotion
Frame-exact through FxTimeProvider or time
Ring
A phrase looping around a face-on ring, with * between repeats.
Component Source
import { TextOnPath } from "@shavin/fx/text-on-path";
<TextOnPath text="A DIN CLUB" separator=" * " fontSize={84} className="font-semibold" />Tilted orbit
tilt={64} leans the ring back so it reads as an orbit; the far side shows mirrored.
Component Source
<TextOnPath text="HALO" separator="-" tilt={64} rotate={-24} fontSize={72} duration={18} className="font-bold" />Infinity, brand colour
shape="infinity" runs the text along a figure-eight, here in reverse with direction={-1}.
Component Source
<TextOnPath shape="infinity" text="no" separator=" " color="brand" direction={-1} fontSize={40} duration={30} className="font-medium" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text* | string | — | The phrase that loops around the path; also the accessible label. |
| shape | "ring" | "infinity" | "ring" | Path the text follows. |
| separator | string | " · " | Placed between repeats. |
| duration | number | 24 | Seconds per full loop. |
| direction | 1 | -1 | 1 | 1 runs clockwise, -1 counter-clockwise. |
| tilt | number | 0 | Tilts the path back in 3D, in degrees (0 face-on, 90 edge-on). The ring is a band of upright glyphs, so 55 to 75 looks down onto it and the far side reads mirrored. |
| rotate | number | 0 | Rotates the path in the page plane, in degrees. |
| fontSize | number | 56 | Font size in units of the width / 1000. |
| color | FxColor | "fg" | Text colour: a theme token (fg, brand, muted), any CSS colour or var(--token), or a { light, dark } pair. |
| tone | FxColor | — | Deprecated: use color. |
| time | number | — | Controlled time in seconds (e.g. frame / fps in Remotion): draws exactly this moment, no clock of its own. Also read from FxTimeProvider. |
* required