Ember Path

EmberPath is a client-side canvas background that lights grid pixels along the cursor's path. Each pixel burns white-hot, cools to the chosen color, shrinks, and fades out.

Ember Path
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add @glint-ui/ember-path

Requires @glint-ui in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { EmberPath } from "@/components/ui/ember-path";export function Example() {  return (    <div className="relative h-96 overflow-hidden rounded-xl bg-black">      <EmberPath />    </div>  );}
  • Adding an interactive pixel-art or retro ember effect behind a hero section or landing page
  • Decorating a CTA or card background that should react to pointer movement with a glowing trail
  • Creating a subtle idle animation for empty or waiting states that keeps moving when the user is away
  • Replacing a static grid or dot background with a cursor-reactive one

Examples

Hero background

Default lime ember trail behind a hero headline. The parent must be positioned so the absolutely positioned canvas fills it.

hero-background.tsx
import { EmberPath } from '@/components/ui/ember-path';export function Hero() {  return (    <section className='relative flex h-[480px] items-center justify-center overflow-hidden bg-black'>      <EmberPath />      <h1 className='relative z-10 text-5xl font-bold text-white'>Build something bright</h1>    </section>  );}

CTA card with orange ember

Smaller cells and an orange color make a punchier call-to-action surface. The content sits above the canvas with z-10.

cta-card-with-orange-ember.tsx
import { EmberPath } from '@/components/ui/ember-path';export function CtaCard() {  return (    <div className='relative isolate overflow-hidden rounded-2xl bg-zinc-900 p-10'>      <EmberPath color='#ff7a1a' pixelSize={16} className='-z-10' />      <button className='relative z-10 rounded-lg bg-white px-5 py-3 font-semibold text-black'>Get started</button>    </div>  );}

Calm, grid-free variant

Disables the grid and idle wandering, lengthens the fade, and widens the brush for a softer, cursor-only trail.

calm,-grid-free-variant.tsx
import { EmberPath } from '@/components/ui/ember-path';export function CalmBackground() {  return (    <div className='relative h-72 overflow-hidden rounded-xl bg-slate-950'>      <EmberPath showGrid={false} idle={false} decay={1400} brush={2} color='#7dd3fc' />    </div>  );}

API reference

PropTypeDefaultDescription
pixelSizenumber24Cell size in pixels. Smaller values produce a finer grid and more cells to draw.
decaynumber700Time in milliseconds for a lit pixel to fade out completely.
brushnumber1Brush radius in cells. Each pointer sample lights a rounded area of this radius.
colorstring"#c6ff3d"Hex color (#rrggbb) used for the trail. Fresh pixels blend toward white before cooling to this color.
showGridbooleantrueWhether to draw faint grid lines under the trail.
idlebooleantrueWhether to draw a wandering trail automatically after 1.5 s without pointer movement.
classNamestring—Additional class names applied to the canvas element.

Accessibility

  • The canvas is marked aria-hidden, so it is decorative and is ignored by screen readers.
  • Place interactive content above the effect with position: relative and z-index, because the canvas is absolutely positioned and covers its parent.
  • When the user has prefers-reduced-motion: reduce enabled, the component draws nothing and attaches no pointer or animation listeners, so no motion is shown.
  • The effect does not convey information; do not rely on it to communicate state or status.
  • Pointer listeners are attached to the parent element, so the parent should be the interactive region the user hovers over.

Docs written by anthropic:claude-haiku-5-5 from the registry source.

Use with Coding Agent

Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.

prompt.md
Use the "Ember Path" component (glint-ui/ember-path) from its shadcn registry.1. Install it with: npx shadcn@latest add @glint-ui/ember-path2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: pixelSize, decay, brush, color, showGrid, idle, className.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { EmberPath } from "@/components/ui/ember-path";export function Example() {  return (    <div className="relative h-96 overflow-hidden rounded-xl bg-black">      <EmberPath />    </div>  );}```

Files & dependencies

  • registry/ui/ember-path.tsx

Looks similar, elsewhere