Micro-interactions

Sigil

An SVG crest that traces itself in when it scrolls into view, stroke by stroke.

Install

bun add clsx tailwind-merge

Then copy 2 files into your project:

  • components/registry/sigil/sigil.tsx
  • lib/utils.ts

Props

PropTypeDefaultDescription
durationnumber1800Time for a single stroke to draw.
delaynumber0Wait after entering view before the first stroke.
strokeWidthnumber1.5Stroke width in viewBox units.
glownumber0.5Bloom trailing the stroke.
replayOnLeavebooleantrueRe-arm on exit so the crest redraws on the way back.
easing"ease-out" | "linear" | "ease-in-out" | "dramatic""ease-out"Curve the stroke advances on.
strokeColorstring (hex)"#a855f7"Amethyst stroke.

What It Demonstrates

Line drawing
An SVG path that draws itself in, like an invisible pen tracing it.
Reveal
Content is uncovered gradually, often by animating a clip-path or mask.
Scroll reveal
Elements fade or slide into place as they enter the viewport.
Enter / Exit
The animation an element plays when it's added to or removed from the screen.
Delay
Time before an animation starts.
Duration
How long an animation takes.
Fill mode
Whether an element keeps its first or last frame's styles before the animation starts or after it ends (e.g. forwards).
Stagger
Animate several items one after another with a small delay between each, creating a cascade.

Related Components

Appears In