# Live label (Notchset): prompt.md (v1.1.0)

- id: `live-label` · version 1.1.0 · component · free
- category: AI
- build: one set of files for every shadcn style
- install: `npx shadcn@latest add https://notchset.dev/r/live-label.json`
- npm dependencies: none
- registry dependencies: utils, https://notchset.dev/r/notchset-foundation.json
- docs: https://notchset.dev/components/live-label
- The install command carries everything this item needs (files, CSS, tokens, npm and registry dependencies). Prefer it to copying source by hand.

Work in the tense of where it stands: present while it runs, a soft ink sweep across the words (never the Signature); past tense in ink when it ends, the outcome after it in ink-3, or what failed in the danger ink. Both tenses share one cell, so the line never shifts: one crossfade with a 2px rise..

## Build it
- Stack: React 18.3 or 19, TypeScript, Tailwind CSS v4 utility classes on the foundation's roles, a components.json (imports use its aliases).
- Packages: none beyond `react` and `react-dom`.
- Files: `components/ui/notchset/live-label.tsx`; shared code: `lib/notchset/motion.ts`.
- Registry dependencies, installed with it automatically: shadcn `utils` (cn), `notchset-foundation`.
- Builds: one set of files, the same for every shadcn style.
- Exports to keep: `LiveLabel`, and every exported type.
- CSS: the install adds the notchset foundation (its roles, keyframes and motion switch, reading your shadcn tokens for colour) to your global stylesheet once. Nothing to import by hand.
- Re-running `add` (or `--overwrite`) re-applies those rules: put overrides in your own CSS, never in the installed rules.
- Colours: every part reads the foundation's roles (`--ns-canvas`, `--ns-ink`, `--ns-line`, `--ns-signal` …), which read your shadcn tokens (`--background`, `--foreground`, `--border`, `--destructive` …), plus the optional `--success` and `--warning`. Retheme on `:root` or any container; never add Tailwind colour classes inside the component.
- This item reads `--ns-bad-ink`, `--ns-ease`, `--ns-ease-breathe`, `--ns-ease-exit`, `--ns-ink`, `--ns-ink-2`, `--ns-ink-3`, `--ns-time-menu`, `--ns-time-quick`, `--ns-time-spin`.
- Retune it (on any ancestor) with the foundation's roles and hooks: `--ns-agent-b`, `--ns-agent-c`, `--ns-agent-d`, `--ns-agent-drift`, `--ns-agent-fill`, `--ns-agent-h1`, `--ns-agent-h2`, `--ns-agent-h3`, `--ns-agent-shift`, `--ns-avatar-card`, `--ns-avatar-lg`, `--ns-avatar-md`, `--ns-avatar-sm`, `--ns-avatar-xs`, `--ns-bad`, `--ns-bad-ink`, `--ns-band`, `--ns-band-edge`, `--ns-band-grade`, `--ns-band-optimal`, `--ns-banner-beat`, `--ns-banner-radius`, `--ns-beat`, `--ns-beat-ease`, `--ns-bezel`, `--ns-bloom-close`, `--ns-bloom-open`, `--ns-bloom-rise`, `--ns-btn-bad`, `--ns-btn-bad-hover`, `--ns-btn-bad-line`, `--ns-btn-bezel`, `--ns-btn-chosen`, `--ns-btn-gone`, `--ns-btn-morph`, `--ns-btn-ok`, `--ns-btn-press`, `--ns-btn-release`, `--ns-btn-result`, `--ns-btn-roll`, `--ns-btn-stagger`, `--ns-btn-stagger-step`, `--ns-btn-tick`, `--ns-btn-tonal`, `--ns-btn-tonal-edge`, `--ns-btn-tonal-hover`, `--ns-bulk-clear`, `--ns-button`, `--ns-button-field-inset`, `--ns-button-lg`, `--ns-button-sm`, `--ns-canvas`, `--ns-card-tilt`, `--ns-cat-1`, `--ns-cat-2`, `--ns-cat-3`, `--ns-cat-4`, `--ns-cat-5`, `--ns-cat-6`, `--ns-check`, `--ns-check-round`, `--ns-cheer-1`, `--ns-cheer-2`, `--ns-cheer-3`, `--ns-cheer-edge`, `--ns-cheer-fold`, `--ns-cheer-glow`, `--ns-cheer-lift`, `--ns-chip`, `--ns-chip-pick`, `--ns-control`, `--ns-control-lg`, `--ns-control-pad`, `--ns-control-sm`, `--ns-corner`, `--ns-danger`, `--ns-deep`, `--ns-deep-ink`, `--ns-deep-ink-2`, `--ns-deep-line`, `--ns-depth-card`, `--ns-depth-lift`, `--ns-depth-surface`, `--ns-dialog`, `--ns-dialog-grow`, `--ns-dialog-lg`, `--ns-dialog-max`, `--ns-dialog-shrink`, `--ns-dialog-sm`, `--ns-dialog-top`, `--ns-dock-bottom`, `--ns-drop`, `--ns-ease`, `--ns-ease-arrive`, `--ns-ease-breathe`, `--ns-ease-drum`, `--ns-ease-exit`, `--ns-ease-fling`, `--ns-ease-glide`, `--ns-ease-grow`, `--ns-ease-move`, `--ns-ease-panel`, `--ns-ease-pop`, `--ns-ease-press`, `--ns-ease-spring`, `--ns-ebg-arm`, `--ns-ebg-lit`, `--ns-emoji`, `--ns-emoji-md`, `--ns-emoji-sm`, `--ns-field`, `--ns-field-edge`, `--ns-field-h`, `--ns-fill`, `--ns-fill-time`, `--ns-flood-arc`, `--ns-flood-aurora`, `--ns-flood-behind-1`, `--ns-flood-behind-2`, `--ns-flood-bloom`, `--ns-flood-deep`, `--ns-flood-dial-bloom`, `--ns-flood-glass`, `--ns-flood-grain`, `--ns-flood-image`, `--ns-flood-ink`, `--ns-flood-ink-low`, `--ns-flood-light`, `--ns-flood-mid`, `--ns-flood-pale`, `--ns-flood-pane`, `--ns-flood-pane-edge`, `--ns-flood-pill-ink`, `--ns-flood-ribbon`, `--ns-flood-ribbon-core`, `--ns-flood-shadow`, `--ns-flood-sheen`, `--ns-flood-wash`, `--ns-font-body`, `--ns-font-display`, `--ns-font-mono`, `--ns-font-script`, `--ns-glass`, `--ns-glass-blur`, `--ns-glass-shadow`, `--ns-glow`, `--ns-glyph-pad`, `--ns-grain`, `--ns-gutter`, `--ns-header`, `--ns-help-max`, `--ns-hit`, `--ns-hover`, `--ns-icon`, `--ns-icon-lg`, `--ns-icon-sm`, `--ns-icon-stroke`, `--ns-info`, `--ns-info-ink`, `--ns-ink`, `--ns-ink-2`, `--ns-ink-3`, `--ns-ink-4`, `--ns-layer-bar`, `--ns-layer-modal`, `--ns-layer-panel`, `--ns-layer-popup`, `--ns-layer-sticky`, `--ns-layer-tip`, `--ns-layer-toast`, `--ns-layer-zoom`, `--ns-lead-body`, `--ns-lead-figure`, `--ns-lead-large`, `--ns-lead-meta`, `--ns-lead-small`, `--ns-lead-sub`, `--ns-lead-title`, `--ns-leading`, `--ns-leading-prose`, `--ns-leading-title`, `--ns-lift`, `--ns-light-1`, `--ns-light-2`, `--ns-light-3`, `--ns-light-spread`, `--ns-light-strength`, `--ns-line`, `--ns-line-soft`, `--ns-lit-edge`, `--ns-map-grass`, `--ns-map-water`, `--ns-mark-edge`, `--ns-mark-lifted`, `--ns-mark-rest`, `--ns-mark-swap`, `--ns-marker`, `--ns-marker-ink`, `--ns-mc-place`, `--ns-mc-roll`, `--ns-measure`, `--ns-menu-dy`, `--ns-menu-lit`, `--ns-menu-pad`, `--ns-menu-row`, `--ns-menu-rule`, `--ns-mesh`, `--ns-mesh-frost`, `--ns-nest-inset`, `--ns-nest-outer`, `--ns-nest-r`, `--ns-notch-ease`, `--ns-ok`, `--ns-ok-ink`, `--ns-on-fill`, `--ns-orb-body`, `--ns-orb-cool`, `--ns-orb-core`, `--ns-orb-dawn`, `--ns-orb-deep`, `--ns-orb-edge`, `--ns-orb-grain`, `--ns-orb-ground`, `--ns-orb-halo`, `--ns-orb-inner`, `--ns-orb-key`, `--ns-orb-lift`, `--ns-orb-limb`, `--ns-orb-limb-from`, `--ns-orb-rim`, `--ns-orb-skin-hi`, `--ns-orb-skin-lo`, `--ns-orb-skin-mid`, `--ns-orb-warm`, `--ns-palette-min`, `--ns-panel`, `--ns-panel-room`, `--ns-panel-w`, `--ns-panel-w-lg`, `--ns-pick-slot`, `--ns-pill-prop`, `--ns-play-fill`, `--ns-play-fill-color`, `--ns-play-lift`, `--ns-play-lift-y`, `--ns-play-open`, `--ns-play-open-content`, `--ns-play-press`, `--ns-play-press-box`, `--ns-play-reduced`, `--ns-play-ring`, `--ns-play-roll`, `--ns-play-shake`, `--ns-play-spring`, `--ns-play-swap`, `--ns-play-swap-blur`, `--ns-press-min`, `--ns-press-scale`, `--ns-press-x`, `--ns-press-y`, `--ns-primary-hover`, `--ns-primary-press`, `--ns-prism-edge`, `--ns-prism-glint`, `--ns-prism-sheen`, `--ns-prism-tint`, `--ns-pulse`, `--ns-radius`, `--ns-radius-2xl`, `--ns-radius-button`, `--ns-radius-button-lg`, `--ns-radius-button-sm`, `--ns-radius-card`, `--ns-radius-check`, `--ns-radius-control`, `--ns-radius-control-sm`, `--ns-radius-float`, `--ns-radius-full`, `--ns-radius-lg`, `--ns-radius-mark`, `--ns-radius-menu-row`, `--ns-radius-modal`, `--ns-radius-pill`, `--ns-radius-sm`, `--ns-radius-xl`, `--ns-radius-xs`, `--ns-raised`, `--ns-ramp-1`, `--ns-ramp-2`, `--ns-ramp-3`, `--ns-ramp-4`, `--ns-ramp-5`, `--ns-ramp-shine`, `--ns-range`, `--ns-rest-1`, `--ns-rest-2`, `--ns-rest-3`, `--ns-rise`, `--ns-row`, `--ns-row-compact`, `--ns-row-hue`, `--ns-scrim`, `--ns-search-h`, `--ns-segment`, `--ns-segment-inset`, `--ns-segment-lift`, `--ns-segment-sm`, `--ns-selected`, `--ns-series`, `--ns-series-core`, `--ns-series-glint`, `--ns-series-tint`, `--ns-shadow-dialog`, `--ns-shadow-float`, `--ns-shadow-lift`, `--ns-shadow-panel`, `--ns-sheet`, `--ns-sheet-back`, `--ns-sheet-bottom`, `--ns-sheet-drop`, `--ns-sheet-rise`, `--ns-shift`, `--ns-side`, `--ns-signal`, `--ns-signal-ink`, `--ns-signal-wash`, `--ns-sk-figure`, `--ns-sk-land`, `--ns-sk-p`, `--ns-sk-p0`, `--ns-sk-p1`, `--ns-sk-p2`, `--ns-sk-p3`, `--ns-sk-p4`, `--ns-sk-p5`, `--ns-sk-p6`, `--ns-sk-p7`, `--ns-sk-read`, `--ns-sk-sweep`, `--ns-skeleton`, `--ns-skeleton-bone`, `--ns-skeleton-bone-light`, `--ns-skeleton-light`, `--ns-slab`, `--ns-slab-edge`, `--ns-slab-ink`, `--ns-sleep-awake`, `--ns-sleep-deep`, `--ns-sleep-light`, `--ns-sleep-rem`, `--ns-space-1`, `--ns-space-2`, `--ns-space-3`, `--ns-space-4`, `--ns-space-5`, `--ns-space-6`, `--ns-space-8`, `--ns-space-section`, `--ns-stack-fan`, `--ns-stack-fan-gap`, `--ns-stack-fan-lag`, `--ns-stack-on`, `--ns-stagger-item`, `--ns-stagger-mark`, `--ns-stagger-max`, `--ns-standing-critical`, `--ns-standing-in`, `--ns-standing-out`, `--ns-state-doing`, `--ns-state-done`, `--ns-state-review`, `--ns-state-todo`, `--ns-step`, `--ns-step-from`, `--ns-step-sign`, `--ns-swipe-surface`, `--ns-switch-h`, `--ns-switch-w`, `--ns-text-body`, `--ns-text-control`, `--ns-text-control-lg`, `--ns-text-display`, `--ns-text-editorial`, `--ns-text-empty`, `--ns-text-figure`, `--ns-text-giant`, `--ns-text-heading`, `--ns-text-headline`, `--ns-text-input`, `--ns-text-large`, `--ns-text-lede`, `--ns-text-meta`, `--ns-text-record`, `--ns-text-sentence`, `--ns-text-small`, `--ns-text-sub`, `--ns-text-title`, `--ns-theme-fade`, `--ns-tile-shadow`, `--ns-time-born`, `--ns-time-color`, `--ns-time-confirm`, `--ns-time-dialog`, `--ns-time-fling`, `--ns-time-flip`, `--ns-time-glide`, `--ns-time-grow`, `--ns-time-hold`, `--ns-time-menu`, `--ns-time-page`, `--ns-time-panel`, `--ns-time-quick`, `--ns-time-roll`, `--ns-time-settle`, `--ns-time-snap`, `--ns-time-spin`, `--ns-time-spring`, `--ns-time-sweep`, `--ns-time-toast`, `--ns-tint`, `--ns-tint-c`, `--ns-tint-ease`, `--ns-tint-fill`, `--ns-tint-gap`, `--ns-tint-h1`, `--ns-tint-h2`, `--ns-tint-h3`, `--ns-tint-ink`, `--ns-tint-row`, `--ns-tip-fold`, `--ns-tip-grow`, `--ns-toast-bottom`, `--ns-toast-gap`, `--ns-toast-left`, `--ns-toast-lift`, `--ns-toast-peek`, `--ns-toast-scale`, `--ns-toast-w`, `--ns-touch`, `--ns-tracking-body`, `--ns-tracking-caps`, `--ns-tracking-control`, `--ns-tracking-display`, `--ns-tracking-headline`, `--ns-tracking-sub`, `--ns-tracking-title`, `--ns-warn`, `--ns-warn-ink`, `--ns-wash-clay`, `--ns-wash-dusk`, `--ns-wash-graphite`, `--ns-wash-ink`, `--ns-wash-sage`, `--ns-wash-sand`, `--ns-weight-light`, `--ns-weight-medium`, `--ns-weight-regular`, `--ns-weight-strong`, `--ns-well`, `--ns-width-lg`, `--ns-width-md`, `--ns-width-sm`, `--ns-width-xl`.
- Never add Tailwind colour classes inside the component.

```tsx
import { Card } from "@/components/ui/notchset/card";
```

## Parts
- A single export that takes props.

## Match the original
- Read `components/ui/notchset/live-label.tsx` as the reference implementation before changing or recreating anything, and match it: sizes, colours per theme, motion timings, copy and behaviour.
- If you deviate (a prop you can't honour, a style you changed, a dependency you swapped), say so in your reply, part by part.
- Keep the accessibility contract, the keyboard map and the motion levels listed below.

## Use it when
- The words of one step an agent or a job is doing, where the person watches it happen (a tool call, an import, an enrichment).

### Not when
- A status in a list that isn't happening now is plain text; a whole run's state is Status glyph's run states beside it.

## Built from
- Motion (shared helper, ships with it)

## Mistakes
- A spinner beside a sweeping label: the sweep is the sign of work
- Changing the words while it runs every second: the present names the step, a count belongs in the outcome
- The outcome in the Signature or green: it is ink-3; only a failure takes a colour

## Usage

```tsx
"use client";
import { Card } from "@/components/ui/notchset/card";
import { CompanyMark } from "@/components/ui/notchset/company-mark";
import { LiveLabel } from "@/components/ui/notchset/live-label";
import { StatusGlyphRun } from "@/components/ui/notchset/status-glyph-run";
import { brandGlyph } from "./brands";

/*
 * One tool call's line in an assistant's thread: it searches Linear while the words sweep, then turns past tense with
 * what it found, or says Linear didn't answer. The morph row plays running, done and failed once on view, until the
 * first touch. At work, the same atom in a Tasks import and a CRM enrichment.
 */
const LINEAR = { name: "Linear", color: "#5E6AD2", glyph: brandGlyph("Linear") };
const AIRTABLE = { name: "Airtable", color: "#18BFFF", glyph: brandGlyph("Airtable") };
const WORDS = { present: "Searching Linear issues", past: "Searched Linear issues", found: "4 results", failed: "Linear didn't answer" };

export default function LiveLabelDemo() {
  const mode = "running" as "running" | "done" | "failed";
  const words = WORDS;
  return (
    <Card inset className="w-[min(100%,var(--ns-width-md))]">
      <div className="flex min-h-[var(--ns-row)] min-w-0 items-center gap-2.5 text-[length:var(--ns-text-body)]">
        <StatusGlyphRun state={mode} label={mode === "running" ? words.present : words.past} />
        <CompanyMark {...LINEAR} size="xs" />
        <LiveLabel state={mode} present={words.present} past={words.past} outcome={mode === "failed" ? words.failed : words.found} />
      </div>
    </Card>
  );
}

/* at work: a Tasks import still reading, a CRM enrichment done; held still, as At work always is */
export function AtWork() {
  return (
    <div data-ns-asleep="" className="flex w-[min(100%,var(--ns-width-md))] flex-col gap-3">
      <Card inset>
        <div className="flex min-h-[var(--ns-row)] min-w-0 items-center gap-2.5 text-[length:var(--ns-text-body)]">
          <StatusGlyphRun state="running" label="Reading 212 rows from Airtable" />
          <CompanyMark {...AIRTABLE} size="xs" />
          <LiveLabel state="running" present="Reading 212 rows from Airtable" past="Read 212 rows from Airtable" />
        </div>
      </Card>
      <Card inset>
        <div className="flex min-h-[var(--ns-row)] min-w-0 items-center gap-2.5 text-[length:var(--ns-text-body)]">
          <StatusGlyphRun state="done" label="Enriched 12 contacts" />
          <LiveLabel state="done" present="Enriching 12 contacts" past="Enriched 12 contacts" outcome="2 skipped" />
        </div>
      </Card>
    </div>
  );
}
```

This example also uses `card` (https://notchset.dev/components/card), `company-mark` (https://notchset.dev/components/company-mark), `status-glyph-run` (https://notchset.dev/components/status-glyph-run). Installing this item doesn't bring them; to paste the example as it is: `npx shadcn@latest add https://notchset.dev/r/live-label.json https://notchset.dev/r/card.json https://notchset.dev/r/company-mark.json https://notchset.dev/r/status-glyph-run.json`.

## Props

| Prop | Type | Default | What it does |
|---|---|---|---|
| `state` | `LiveLabelState` |  | where the work stands: running (present tense, sweeping), done or failed (past tense with the outcome) |
| `present` | `string` |  | the words while it runs, in the present: "Searching Linear issues" |
| `past` | `string` |  | the words once it ends, in the past: "Searched Linear issues" |
| `outcome` | `string` |  | what came of it, after the past words: "4 results"; on a failure, what failed: "Linear didn't answer" |

Full docs: https://notchset.dev/components/live-label

## Customising
- Colours: every part reads the foundation's roles (`--ns-canvas`, `--ns-ink`, `--ns-line`, `--ns-signal` …), which read your shadcn tokens (`--background`, `--foreground`, `--border`, `--destructive` …), plus the optional `--success` and `--warning`. Retheme on `:root` or any container; never add Tailwind colour classes inside the component.
- Dark mode follows the `.dark` class or `data-theme="dark"` on an ancestor (the shadcn and next-themes conventions).
- Update later: Commit or stash local changes first (or copy the files), so the update can be undone. Read https://notchset.dev/r/changelog.json for the new versions: a major version, an entry marked breaking or a merge says what to change. Then re-run the install with `--overwrite`, on a branch. It replaces the component's files, the shared helper files they import, and the item's CSS rules in the global stylesheet, so review the whole diff (components, shared files, CSS), re-apply your own edits, and run the app's typecheck, tests and build.

## Keyboard

| Keys | Action |
|---|---|
| Tab | passes over it: a reading, not a control |

## Performance

- One background-position animation on one line of text while running, none at rest.
- No dependencies.

## Responsive

- phone and desktop
- dark (tokens)
- reduced motion: the words swap, nothing sweeps

## Motion inventory

| Interaction | What moves |
|---|---|
| a highlight of ink sweeps the present words while the work runs | ns-shimmer on --ns-time-spin, --ns-ease-breathe, infinite (data-ns-still). Reduced motion: still words in ink-2. |
| the tense changes in one crossfade: the present out, the past in with a 2px rise | opacity on --ns-time-quick, --ns-ease-exit; opacity and translate on --ns-time-menu, --ns-ease, after --ns-time-quick (data-ns-glide). Reduced motion: the words swap at once. |

## Accessibility contract (preserve when editing)
- Plain text: only the tense on screen is read, the other hidden from assistive tech.
- It never announces itself; the run that holds it announces its phases once in one polite region (started, done, failed).

## Install

```bash
# npm
npx shadcn@latest add https://notchset.dev/r/live-label.json
# pnpm
pnpm dlx shadcn@latest add https://notchset.dev/r/live-label.json
# yarn
yarn dlx shadcn@latest add https://notchset.dev/r/live-label.json
# bun
bunx --bun shadcn@latest add https://notchset.dev/r/live-label.json
```

Or add the `@notchset` registry to components.json and run `npx shadcn@latest add @notchset/live-label`. Every components.json style gets the same files.

### Manual

1. Install the packages: none beyond `react` and `react-dom`.
2. Copy `components/ui/notchset/live-label.tsx`, `lib/notchset/motion.ts` from https://notchset.dev/r/live-label.json (each file's `content`, at its `target`), keeping the `@/` path alias of your tsconfig.
3. Add what it builds on: shadcn `utils` (cn), `notchset-foundation`.

## Continue the workflow

- [Change set](https://notchset.dev/components/change-set)
- [Checkpoint rail](https://notchset.dev/components/checkpoint-rail)
- [Message](https://notchset.dev/components/message)

## Source

### components/ui/notchset/live-label.tsx

```tsx
// Notchset live-label 1.1.0 · https://notchset.dev/changelog
"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
import { useLessMotion } from "@/lib/notchset/motion";

/* Live label: the words of a piece of work, in the tense of where it stands. */
type LiveLabelState = "running" | "done" | "failed";
type LiveLabelProps = {
  /** where the work stands: running (present tense, sweeping), done or failed (past tense with the outcome) */
  state: LiveLabelState;
  /** the words while it runs, in the present: "Searching Linear issues" */
  present: string;
  /** the words once it ends, in the past: "Searched Linear issues" */
  past: string;
  /** what came of it, after the past words: "4 results"; on a failure, what failed: "Linear didn't answer" */
  outcome?: string | undefined;
  className?: string | undefined;
};

const layer = "col-start-1 row-start-1 min-w-0 truncate";

const LiveLabel = React.forwardRef<HTMLSpanElement, LiveLabelProps>(function LiveLabel({ state, present, past, outcome, className }, ref) {
  const still = useLessMotion();
  const running = state === "running";
  const ended = running ? undefined : `${past}${outcome ? ` · ${outcome}` : ""}`;
  return (
    <span ref={ref} data-slot="live-label" data-state={state} title={ended ?? present} className={cn("inline-grid min-w-0 max-w-full grid-cols-[minmax(0,max-content)] align-bottom", className)}>
      {/* present tense: the sweep is a highlight of ink drawn through the words, not a colour of its own */}
      <span
        aria-hidden={!running || undefined}
        data-slot="live-label-present"
        data-ns-still=""
        data-ns-glide=""
        className={cn(
          layer,
          "[transition:opacity_var(--ns-time-quick)_var(--ns-ease-exit)]",
          running ? "opacity-100" : "opacity-0",
          running && !still
            ? "bg-[linear-gradient(90deg,var(--ns-ink-2)_0%,var(--ns-ink-2)_38%,var(--ns-ink)_50%,var(--ns-ink-2)_62%,var(--ns-ink-2)_100%)] bg-[length:200%_100%] bg-clip-text text-transparent [animation:ns-shimmer_var(--ns-time-spin)_var(--ns-ease-breathe)_infinite]"
            : "text-[var(--ns-ink-2)]",
        )}
      >
        {present}
      </span>
      {/* past tense and its outcome, in the same cell: it rises 2px as it fades in, once the present has gone */}
      <span
        aria-hidden={running || undefined}
        data-slot="live-label-past"
        data-ns-glide=""
        className={cn(
          layer,
          "text-[var(--ns-ink)]",
          /* leaving (a rerun) it goes at once; arriving it waits for the present to go */
          running ? "translate-y-[2px] opacity-0 [transition:opacity_var(--ns-time-quick)_var(--ns-ease-exit)]" : "translate-y-0 opacity-100 [transition:opacity_var(--ns-time-menu)_var(--ns-ease)_var(--ns-time-quick),translate_var(--ns-time-menu)_var(--ns-ease)_var(--ns-time-quick)]",
        )}
      >
        {past}
        {outcome && (
          <span data-slot="live-label-outcome" className={state === "failed" ? "text-[var(--ns-bad-ink)]" : "text-[var(--ns-ink-3)]"}>
            <span className="text-[var(--ns-ink-3)]"> · </span>
            {outcome}
          </span>
        )}
      </span>
    </span>
  );
});

export { LiveLabel, type LiveLabelProps, type LiveLabelState };
```

### lib/notchset/motion.ts

```tsx
// Notchset live-label 1.1.0 · https://notchset.dev/changelog
"use client";
/*
 * Less motion, the one switch every piece reads, and a motion role's timing for a Web Animation. Split from
 * physics.ts so a piece that needs only these does not carry the springs.
 */
import * as React from "react";

/**
 * Less motion where `el` sits: the device's setting, then a data-motion="reduced" on `el` or any ancestor, falling
 * back to <html>'s when there is no element. The one copy: every piece reads this.
 */
const REDUCED = '[data-motion="reduced"],[data-motion="off"]';
export function lessMotion(el?: Element | null): boolean {
  if (typeof document === "undefined") return true;
  if (typeof matchMedia !== "undefined" && matchMedia("(prefers-reduced-motion: reduce)").matches) return true;
  return !!(el?.closest?.(REDUCED) ?? document.documentElement.matches(REDUCED));
}

/** Less motion, kept current as the setting changes; true on a server, so a piece starts in its still. */
export function useLessMotion(): boolean {
  return React.useSyncExternalStore(
    (f) => {
      if (typeof matchMedia === "undefined") return () => {};
      const q = matchMedia("(prefers-reduced-motion: reduce)");
      q.addEventListener("change", f);
      const mo = typeof MutationObserver === "undefined" ? null : new MutationObserver(f);
      mo?.observe(document.documentElement, { attributes: true, attributeFilter: ["data-motion"] });
      return () => {
        q.removeEventListener("change", f);
        mo?.disconnect();
      };
    },
    () => lessMotion(),
    () => true,
  );
}

/** A motion role's duration and curve (0 under less motion: the result at once), read from the foundation where `el` sits, for a Web Animation that glides
    something CSS can't transition (a width to `auto`, a node on its way out): `roleTiming(el, "--ns-time-menu")`. */
export function roleTiming(el: Element, time: string, ease = "--ns-ease"): KeyframeAnimationOptions {
  if (lessMotion(el)) return { duration: 0, easing: "linear" };
  const cs = getComputedStyle(el);
  const t = cs.getPropertyValue(time).trim();
  const ms = t.endsWith("ms") ? parseFloat(t) : parseFloat(t) * 1000;
  return { duration: Number.isFinite(ms) ? ms : 0, easing: cs.getPropertyValue(ease).trim() || "linear" };
}

/** The foundation's curves as literal strings, for a Web Animation (`element.animate`, `KeyframeEffect`,
    `updateTiming`): those take a literal easing and throw on a CSS var. Copied from foundation.css's `--ns-ease-*`;
    CSS transitions and keyframes keep the vars. */
export const EASE = {
  enter: "cubic-bezier(0.22, 1, 0.36, 1)",
  move: "cubic-bezier(.5, 0, .2, 1)",
  exit: "cubic-bezier(.6, 0, .9, .5)",
  panel: "cubic-bezier(0.32, 0.72, 0, 1)",
  press: "cubic-bezier(0.2, 0, 0, 1)",
  spring: "cubic-bezier(0.16, 1, 0.3, 1)",
  arrive: "cubic-bezier(.3, 1.22, .5, 1)",
  breathe: "cubic-bezier(.45, 0, .55, 1)",
} as const;
```

The foundation (the tokens listed above, keyframes and motion levels) installs once with the first component; its CSS is public at https://notchset.dev/r/notchset-foundation.json.
