Background

Glyph

A field of characters woken by a trail of light and rings.

glyph.tsx

Installation

1

Install the packages

npm install @prequelui/react motion

@prequelui/react reuses the primitive library your components already depend on.

2

Add the component

npx shadcn@latest add https://animate.prequelui.terravidhal.me/r/glyph.json

npx shadcn@latest add https://animate.prequelui.terravidhal.me/r/glyph.json

3

Turn on the motion

npx @prequelui/cli@latest animate glyph

The CLI finds the component through components.json, swaps the import and removes the CSS animation classes that Motion replaces.

Usage

Import the component and compose it exactly like the primitive it wraps. Motion is enabled by default; the tempo prop scales every duration and softens every spring.

glyph.tsx
import { GlyphBackground } from "@/components/prequelui/backgrounds/glyph";

export default function Demo() {
  return (
    <div className="relative h-96 overflow-hidden rounded-xl">
      <GlyphBackground />
    </div>
  );
}
import { Glyph } from "@/components/prequelui/glyph";

export function Variant() {
  return (
    <Glyph tempo={1.2}>
      …
    </Glyph>
  );
}

Animation

A field of characters is mostly asleep. Moving the pointer leaves a trail that lights the nearby glyphs, and a click sends an expanding wave through the grid; the accents switch colour where the wave is strongest.

  • Cells are 11 px glyphs on a 1.35 line height, redrawn at 30 fps.
  • The trail keeps the last 12 points for 700 ms and decays quadratically.
  • Waves expand for 4 s with a 10 px edge and a 560 px front.
  • Reduced motion draws the resting field with no trail and no waves.
11 px glyphstrail 700 mswave 4 stwo colour levels

API Reference

Each part accepts the usual HTML props in addition to the motion props below. No accessibility prop is hidden behind the animation layer.

GlyphBackground

PropTypeDefault
interactivebooleantrue
fontSizenumber11
glowColorstring | undefinedforeground
shapeColorstring | undefinedcyan
speednumber1
pausedbooleanfalse
classNamestring—

Built by Vidhal. The source is available on GitHub.

Last updated: 11/17/2026