From r/vibecoding? 🫡 Get 35% off Wensity UI Lifetime with

Text Path

SVG text riding a curved wave, arc, or circle path on a seamless, light loop.

textpathsvgcurveheadlineanimationtypographymarquee
Text Path component preview

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add text-path

Usage

Import TextPath from @/components/wensity/text-path and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { TextPath } from "@/components/wensity/text-path";
export default function Example() {
return (
<TextPath
text="I think wensity has the best components"
curve="arc"
duration={14}
letterSpacing={0.05}
className="font-display max-w-3xl text-zinc-900 dark:text-zinc-100"
/>
);
}

Props

PropTypeDefaultDescription
textstring-The string to tile along the path.
curve"wave" | "arc" | "circle""arc"Built-in curve. Circle sizes the ring to the text; wave/arc use open path marquees. Ignored when path is set.
pathstring-Custom SVG path d. Wins over curve (open path marquee).
viewBoxstring-Custom SVG viewBox when using a custom path.
durationnumber14Seconds for one seamless loop. Lower = faster.
direction"forward" | "reverse""forward"Travel / spin direction.
separatorstring" · "Separator between tiled copies.
repeatsnumber3Tiles the string. Wave/arc: along the path. Circle: copies around the ring (radius grows to fit — no stacking).
fontSizenumber28Font size in CSS pixels.
fontWeightnumber | string500Font weight for the path text.
letterSpacingnumber0.05Letter spacing in em.
fillstringcurrentColorText fill. Omit to inherit currentColor.
showPathbooleanfalseDraw the underlying path stroke.
pathColorstringthemePath stroke color. Omit for soft theme line.
pathWidthnumber1Path stroke width in CSS pixels.
pausedboolean-Force the loop paused. When omitted, auto-pauses off-screen or when the tab is hidden.