127+ Primitives

Glyph Trail

Text

Interactive monospace text matrix that scrambles characters into kinetic mathematical glyphs under cursor proximity, relaxing back with fluid color decay.

InteractiveText EffectFramer MotionA11y Ready
/r/glyph-trail.json

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:framer-motionclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/glyph-trail.json"

Props

TypeScript props supported by <GlyphTrail />.

6 props
PropTypeDefaultDescription
linesstring[]DEFAULT_GLYPH_LINESMonospace text lines centered and rendered in the interactive matrix.
highlightstring"corca"Specific keyword that remains locked in crisp white and never scrambles.
glyphsstring | string[]DEFAULT_GLYPHSCharacter set of mathematical symbols and glyphs used for scramble animations.
radiusnumber30Influence radius in pixels around pointer coordinates where scrambling occurs.
lifeMsnumber1200Average duration in milliseconds a scrambled glyph persists before settling back.
classNamestringundefinedAdditional Tailwind CSS classes merged into the container element.

Key Features

  • Dynamic pointer proximity field that detects character distance squared (r²) for optimal 60fps performance.
  • Dual-phase decay engine: characters first scramble into mathematical glyphs, transition to original letters in color, and gracefully settle back to neutral.
  • Per-character randomized palette accents with subtle outline boxing, bold weights, and italic styling.
  • Zero layout shift monospace rasterization with ResizeObserver and FontFaceSet measurement caching.
  • Configurable highlight keywords that remain locked and protected from scrambling.

Keyboard & Accessibility

  • Semantic role='img' and aria-label containing the full readable text lines for screen reader accessibility.
  • Automatically honors prefers-reduced-motion by bypassing hover proximity scrambling.
  • Maintains readable text contrast against dark backgrounds across all decay phases.