LabelDrift
The pill layer without the spark bed — quieter, and cheap enough to run below the fold.
Backdrop · canvasobstacle-aware
"use client";
import * as React from "react";
import { EmberField, type EmberFieldProps } from "./ember-field";
/**
* LabelDrift — the pill layer on its own, without the spark bed.
*
* Same measurement rules, quieter result: use it to float a feature list,
* command names or skill labels behind a section that already has enough going
* on. Cheap enough to run below the fold, where an ember bed would be noise —
* which is true because `density` below is LabelDrift's own default, not
* EmberField's hero-tuned one: sparser pills, so a scene that wakes up near
* the fold (`useCanvasScene`'s own `IntersectionObserver` still decides
* *when*) costs less once it does.
*/
export type LabelDriftProps = Omit<EmberFieldProps, "sparks">;
export function LabelDrift({ density = 220000, ...props }: LabelDriftProps) {
return <EmberField sparks={false} density={density} {...props} />;
}
Certified against the contract
- ✓Reduced motion paints one composed still frame — never a blank box
- ✓Pauses off-screen and in hidden tabs
- ✓Re-reads design tokens when the theme changes
- ✓SSR-safe: no hydration mismatch, no layout shift
- ✓Decorative layers are aria-hidden and pointer-events-none
- ✓Device pixel ratio clamped
- ✓Zero runtime dependencies beyond React