Text Animations

Inscribe

Text engraved stroke by stroke. Every character is a real SVG tspan with native kerning and selectable words, wearing the uniform-dash trick, because glyph outlines expose no pathLength and measuring their true perimeter has no API: the chisel simply travels each letter at its own apparent speed. When a stroke closes, its fill carves in after a beat, and the engraved finish darkens the fill and adds an inset relief so the word reads as cut into the panel rather than printed on it. The whole timeline runs on the animation-loop clock, so the bench pause freezes the chisel mid-stroke, and with no JavaScript at all the text simply sits there finished.

Install

# Inscribe needs no npm packages

Then copy 2 files into your project:

  • components/registry/inscribe/inscribe.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
durationnumber900Time for one character's stroke to draw.
staggernumber90Delay between one chisel start and the next.
fillDelaynumber250Beat between a finished stroke and its fill arriving.
strokeWidthnumber1.5Chisel line weight in viewBox units.
finish"engraved" | "inlay" | "stroke-only""engraved"Carved-in fill, bright accent inlay, or the bare trace.
replaybooleantrueWipe and re-engrave on a timer.
replayDelaynumber2500Dwell on the finished engraving before the wipe.
strokeColorstring (hex)"#c4b5fd"The chisel trace; the engraved fill derives from it at lower luminance, the inlay at full.

What It Demonstrates

Line drawing
An SVG path that draws itself in, like an invisible pen tracing it.
Stagger
Animate several items one after another with a small delay between each, creating a cascade.
Fade in / Fade out
Element appears or disappears by changing opacity.
Delay
Time before an animation starts.
Duration
How long an animation takes.

Related Components

Appears In