Skip to content

Text on path

Playground

Text

Shape

Colour

Install

npm install @shavin/fx
import { 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

PropTypeDefaultDescription
text*string—The phrase that loops around the path; also the accessible label.
shape"ring" | "infinity""ring"Path the text follows.
separatorstring" · "Placed between repeats.
durationnumber24Seconds per full loop.
direction1 | -111 runs clockwise, -1 counter-clockwise.
tiltnumber0Tilts 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.
rotatenumber0Rotates the path in the page plane, in degrees.
fontSizenumber56Font size in units of the width / 1000.
colorFxColor"fg"Text colour: a theme token (fg, brand, muted), any CSS colour or var(--token), or a { light, dark } pair.
toneFxColor—Deprecated: use color.
timenumber—Controlled time in seconds (e.g. frame / fps in Remotion): draws exactly this moment, no clock of its own. Also read from FxTimeProvider.

* required

Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font