Ember Field

Warm sparks rising through a section, gathering and swirling around the pointer.

PROGet Ember Field and 168 other Pro components with pro lifetime — Get Pro

Category
Creative
Access
Pro
Source
290 lines · one file
States
4 drawn

The decision inside it

The pointer is a current, not a magnet

Near the pointer, sparks are pulled in and sent around at once, so they orbit and stream past instead of collapsing into a clump. Each ember lives its own life, so there is never a visible loop. The count follows the area with a ceiling, and phones get fewer.

When to use it

Use Ember Field for a warm, celebratory section like a launch or an event: sparks rise from a glow along the bottom and gather around the pointer.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Ember Field for this.
Install it: npx shadcn@latest add @liro/ember-field
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/ember-field.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/launch-week.tsx
import { EmberField } from "@/components/ui/ember-field";

export function LaunchWeek() {
  return (
    <EmberField className="h-[480px] bg-neutral-950">
      <div className="flex h-full items-center justify-center text-white">
        <h2 className="text-5xl font-bold tracking-tight">Five days. Five launches.</h2>
      </div>
    </EmberField>
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
densitynumber NoSparks per 10,000 px² of area. Default 2.2.
maxnumber NoHard ceiling on sparks. Default 260.
speednumber NoRising speed multiplier. Default 1.
hotClassNamestring NoHot colour class (new sparks), read as `color`. Default amber.
coolClassNamestring NoCool colour class (dying sparks), read as `color`. Default orange.
interactiveboolean NoGather around the pointer and burst on tap. Default true.

Dependencies

npm packages

clsxtailwind-merge

Liro foundations, installed alongside it

liro-theme

States

All of them are drawn by the component. None is left for you to design.

  • Burning
  • Gathering
  • Tap burst
  • Reduced motion

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances