# Toast figures

Ten small figures for the toast's picture slot that show an AI moment's own data in flat marks: a run, an approval gate, agents in parallel, a handoff, context, accuracy, a retry, latency, spend and a voice call.

Tier: free. Type: component. Category: feedback. Tags: agent, run, motion, tokens, evals.

## Install

```bash
npx shadcn@latest add https://pixilui.com/r/toast-figures.json
```

One-time setup: add the registry to `components.json`:

```json
{
  "registries": {
    "@pixilui": "https://pixilui.com/r/{name}.json"
  }
}
```

Files: `components/pixilui/toast-figures.tsx`.

## Preview

Live preview: https://pixilui.com/components/toast-figures

Knobs:

- `kind`: `run`, `approval gate`, `agents in parallel`, `handoff`, `context`, `accuracy`, `retry`, `latency`, `spend`, `voice`

Signature: The agent dot glides through the last two steps into the check, which bumps once as the toast turns to Reply ready for Lena.

Styles: `lively` (default), `quiet`, set with `data-style` on <html>. The item reads the style through the foundation; it needs no prop. Standalone files: lively https://pixilui.com/r/standalone/toast-figures.tsx, quiet https://pixilui.com/r/standalone/toast-figures.quiet.tsx.

## Code

`components/pixilui/toast-figures.tsx`

```tsx
"use client";

/*
  Toast figures (B13, locked 2 Dec 2026): a small figure in the toast's picture slot that shows an AI moment's own data in
  flat marks, one hue and grey, one size and weight. Ten kinds: run, approval gate (a run with a gate), agents in parallel,
  handoff, context, accuracy, retry, latency, spend, voice. As the toast lands the figure replays the moment (context first,
  then the news) from the toast's data-pxi-play; after that only the marks that change move. A port of the locked
  toast-figure.js: the same markup and inline values, its live changes as props, and its bumps (a value that lands gives
  one small scale bump) when a prop changes. Every value is a token in foundation.css section 8 (--pixilui-toast-figure-*).

  A figure goes in a toast as its picture: toast({ picture: <ToastFigures kind="run" at={2} />, ... }). A toast with a figure
  takes an 84 picture column (70 in quiet) and fades its picture in without the spring (toast-figure.css).
*/

import { forwardRef, useEffect, useLayoutEffect, useRef, type ComponentPropsWithoutRef, type CSSProperties } from "react";
import { cn } from "./lib/utils";
import { prefersReducedMotion } from "./lib/motion/reduced-motion";

/** Who spoke a bar of a voice call. */
export type ToastFigureSpeaker = "agent" | "user";

/** Each kind and its data. */
export type ToastFigureData =
  /** Five steps; at = the agent's step (0 to 4; 5 when all are done). gate = the step waiting on you; open once approved. */
  | {
      /** Which figure: run, crew, handoff, context, accuracy, retry, latency, spend or voice; the rest of the props are its data. */
      kind: "run";
      at: number;
      gate?: number;
      open?: boolean;
    }
  /** One lane per agent working in parallel, each 0 to 1. */
  | { kind: "crew"; progress: number[] }
  /** From one agent to the next, the brief at p (0 to 1); at 1 the receiver catches it. */
  | { kind: "handoff"; p: number }
  /** The thread's turns (k tokens) as one bar to the limit, the last `hot` in amber; keep and sum draw it compacted. */
  | { kind: "context"; turns: number[]; limit: number; hot: number; keep?: number; sum?: number }
  /** A bullet chart from 75% to 100%: the score against your bar. rerun (ms) empties it and refills in grey while it reruns. */
  | { kind: "accuracy"; value: number; target: number; rerun?: number }
  /** The tries on a time line (s), the last one the next try; now = time passed (s). wait (ms) runs the clock to the next try. */
  | { kind: "retry"; times: number[]; now: number; done?: boolean; wait?: number }
  /** Reply times (s) as a line, the last `hot` points in amber; tail = the recovery after a fix, drawn once ok. */
  | { kind: "latency"; points: number[]; hot: number; tail: number[]; ok?: boolean }
  /** The week as bars, today last; the cap line at cap, on a scale to max. */
  | { kind: "spend"; days: number[]; today: number; cap: number; max: number; capped?: boolean }
  /** A call's waveform, the agent's turns in blue; live while it is talking. */
  | { kind: "voice"; levels: number[]; who: ToastFigureSpeaker[]; live?: boolean };

export type ToastFiguresProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & ToastFigureData;

type Vars = CSSProperties & Record<string, string | number>;
const CHECK = (
  <svg viewBox="0 0 10 10" aria-hidden="true">
    <path d="M2.2 5.2l1.9 1.9 3.8-4.3" fill="none" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round" />
  </svg>
);
const tok = (n: Element, name: string) => getComputedStyle(n).getPropertyValue((name.startsWith("--pixilui-") ? name : name.replace(/^--/, "--pixilui-"))).trim();
const msOf = (n: Element, name: string) => parseFloat(tok(n, name)) * (/\dms$/.test(tok(n, name)) ? 1 : 1000) || 0;
// a value that lands: one small scale bump after the move that brought it (live changes only, never on first paint)
function bump(n: Element | null | undefined, delay = 0, to = 1.2) {
  if (!n || prefersReducedMotion() || typeof n.animate !== "function") return;
  n.animate([{ scale: 1 }, { scale: to }, { scale: 1 }], { duration: msOf(n, "--pixilui-toast-figure-bump"), delay, easing: tok(n, "--pixilui-ease-out") || "ease" });
}
/** Runs fn with the previous value whenever key changes (never on the first render). */
function useChange<V>(value: V, key: string, fn: (prev: V) => void) {
  const prev = useRef<{ key: string; value: V } | null>(null);
  useEffect(() => {
    const was = prev.current;
    prev.current = { key, value };
    if (was && was.key !== key) fn(was.value);
    // fn reads the latest props
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [key]);
}

// context: the window is 80px wide (the 84px drawing less the limit's room); each turn takes its share, less its 1px gap
const W = 80;
const wpx = (k: number, limit: number) => Math.max(1, (k / limit) * W - 1).toFixed(2) + "px";
// accuracy: 75% to 100%
const pos = (v: number) => Math.max(0, Math.min(100, ((v - 75) / 25) * 100)).toFixed(1);
// latency: x from 4 to 56 for the history (now sits two thirds along), 56 to 80 for the recovery; y 0 to 5s over 22 to 2
const X = (i: number, n: number) => 4 + (i * 52) / (n - 1), Y = (v: number) => 22 - (v / 5) * 20, pt = (x: number, y: number) => `${x.toFixed(1)} ${y.toFixed(1)}`;

/** A small figure for the toast's picture slot: one AI moment's own data, replayed as the toast lands. Decorative (aria-hidden). */
export const ToastFigures = forwardRef<HTMLSpanElement, ToastFiguresProps>(function ToastFigures(props, ref) {
  const own = useRef<HTMLSpanElement | null>(null);
  const setRef = (n: HTMLSpanElement | null) => { own.current = n; if (typeof ref === "function") ref(n); else if (ref) ref.current = n; };
  const el = () => own.current;
  const base = { "data-figure": props.kind, "aria-hidden": true as const, ref: setRef };

  // the bumps, as the lock's change functions give them
  const runAt = props.kind === "run" ? props.at : 0;
  useChange(runAt, `run${runAt >= 5}`, () => { const r = el(); if (r && runAt >= 5) bump(r.querySelector(".pixilui-toast-figure-end"), msOf(r, "--pixilui-toast-figure-glide") * 0.8 + msOf(r, "--pixilui-toast-figure-move") * 0.5, 1.25); });
  const handP = props.kind === "handoff" ? props.p : 0;
  useChange(handP, `p${handP >= 1}`, () => { const h = el(); if (h && handP >= 1) bump(h.querySelector('[data-role="to"]'), msOf(h, "--pixilui-toast-figure-glide") * 0.85, 1.18); });
  const folded = props.kind === "context" && props.keep != null;
  useChange(folded, `f${folded}`, () => { const c = el(); if (c && folded && props.kind === "context") bump(c.querySelector(".pixilui-toast-figure-summary"), msOf(c, "--pixilui-toast-figure-move") + (props.turns.length - props.keep!) * msOf(c, "--pixilui-toast-figure-stagger"), 1.3); });
  const tryDone = props.kind === "retry" && !!props.done;
  useChange(tryDone, `d${tryDone}`, () => { const r = el(); if (r && tryDone) bump([...r.querySelectorAll(".pixilui-toast-figure-try")].pop(), 0, 1.3); });
  // accuracy's rerun: the bar empties, then refills in grey up to your bar
  const rerun = props.kind === "accuracy" ? props.rerun : undefined;
  useEffect(() => {
    const a = el();
    if (!a || rerun == null) return;
    a.dataset.state = "rerun";
    const id = setTimeout(() => { if (a.dataset.state === "rerun") a.dataset.state = "refill"; }, msOf(a, "--pixilui-toast-figure-empty") + 20);
    return () => clearTimeout(id);
  }, [rerun]);
  // voice: live is set here, not in the markup, so the call ending can read each moving bar first and let it settle from
  // wherever it is instead of snapping (the lock's hush)
  const live = props.kind === "voice" ? !!props.live : false;
  useLayoutEffect(() => {
    const v = el();
    if (!v || props.kind !== "voice") return;
    if (live) { v.dataset.state = "live"; return; }
    if (v.dataset.state !== "live") return;
    const moving = [...v.querySelectorAll('[data-who="agent"]')].map((b) => [b, getComputedStyle(b).scale] as const);
    delete v.dataset.state;
    if (!prefersReducedMotion()) moving.forEach(([b, s]) => { if (s !== "none") b.animate([{ scale: s }, { scale: "1 1" }], { duration: msOf(v, "--pixilui-toast-figure-move"), easing: tok(v, "--pixilui-ease-out") || "ease" }); });
  }, [live, props.kind]);

  const { className, style, ...rest } = props as ToastFiguresProps & { className?: string; style?: CSSProperties };
  const span = (extra: Record<string, unknown>, vars: Vars | undefined, body: React.ReactNode) => {
    const pass = Object.fromEntries(Object.entries(rest).filter(([k]) => !DATA_KEYS.has(k)));
    return (
      <span {...pass} {...base} {...extra} className={cn("pixilui-toast-figure", className)} style={vars || style ? { ...vars, ...style } : undefined}>
        {body}
      </span>
    );
  };

  switch (props.kind) {
    case "run": {
      const { at, gate, open } = props;
      return span(at >= 5 ? { "data-state": "done" } : {}, { "--pixilui-figure-at": Math.min(at, 4) }, (
        <>
          <span className="pixilui-toast-figure-track"><b className="pixilui-toast-figure-fill" /></span>
          {[0, 1, 2, 3, 4].map((i) => (
            <i key={i} className={cn("pixilui-toast-figure-step", i === 4 && "pixilui-toast-figure-end")} style={{ "--pixilui-figure-i": i } as Vars} data-state={i < at ? "done" : "todo"}>{i === 4 ? CHECK : null}</i>
          ))}
          {gate != null ? <i className="pixilui-toast-figure-gate" style={{ "--pixilui-figure-g": gate } as Vars} data-state={open ? "open" : undefined} /> : null}
          <i className="pixilui-toast-figure-agent" />
        </>
      ));
    }
    case "crew":
      return span({}, undefined, props.progress.map((p, k) => (
        <span key={k} className="pixilui-toast-figure-lane" style={{ "--pixilui-figure-p": p, "--pixilui-figure-k": k } as Vars} data-state={p >= 1 ? "done" : undefined}><b className="pixilui-toast-figure-fill" /></span>
      )));
    case "handoff":
      return span({}, { "--pixilui-figure-p": props.p }, (
        <>
          <i className="pixilui-toast-figure-agent" data-role="from" />
          <span className="pixilui-toast-figure-link"><b className="pixilui-toast-figure-fill" /></span>
          <i className="pixilui-toast-figure-brief" />
          <i className="pixilui-toast-figure-agent" data-role="to" />
        </>
      ));
    case "context": {
      const { turns, limit, hot, keep, sum } = props;
      const fold = keep != null, n = turns.length;
      return span(fold ? {} : { "data-state": "full" }, undefined, (
        <>
          <span className="pixilui-toast-figure-window">
            <i className="pixilui-toast-figure-summary" data-state={fold ? undefined : "gone"} style={{ "--pixilui-figure-wpx": fold ? wpx(sum ?? 0, limit) : "0px" } as Vars} />
            {turns.map((k, i) => (
              <i key={i} className="pixilui-toast-figure-turn" style={{ "--pixilui-figure-wpx": wpx(k, limit), "--pixilui-figure-k": i } as Vars} data-state={fold ? (i < n - keep! ? "gone" : undefined) : i >= n - hot ? "hot" : undefined} />
            ))}
          </span>
          <i className="pixilui-toast-figure-limit" />
        </>
      ));
    }
    case "accuracy":
      return span(props.rerun == null && props.value >= props.target ? { "data-state": "ok" } : {}, { "--pixilui-figure-v": pos(props.value), "--pixilui-figure-t": pos(props.target), ...(props.rerun != null ? { "--pixilui-toast-figure-wait": `${props.rerun}ms` } : {}) } as Vars, (
        <>
          <span className="pixilui-toast-figure-track"><b className="pixilui-toast-figure-fill" /></span>
          <i className="pixilui-toast-figure-target" />
        </>
      ));
    case "retry": {
      const { times, now, done, wait } = props;
      const end = times[times.length - 1] || 1;
      return span({}, { "--pixilui-figure-t": wait != null ? 1 : (Math.min(now, end) / end).toFixed(3), ...(wait != null ? { "--pixilui-toast-figure-wait": `${wait}ms` } : {}) } as Vars, (
        <>
          <span className="pixilui-toast-figure-line"><b className="pixilui-toast-figure-fill" /></span>
          {times.map((s, i) => (
            <i key={i} className="pixilui-toast-figure-try" style={{ "--pixilui-figure-x": (s / end).toFixed(3) } as Vars} data-state={i < times.length - 1 ? "fail" : done ? "done" : "next"} />
          ))}
        </>
      ));
    }
    case "latency": {
      const { points, hot, tail, ok } = props;
      const n = points.length, xy = points.map((v, i) => [X(i, n), Y(v)] as [number, number]), cut = n - 1 - hot;
      const history = "M" + xy.slice(0, cut + 1).map((p) => pt(...p)).join(" L");
      const spike = "M" + xy.slice(cut).map((p) => pt(...p)).join(" L");
      const [ex, ey] = xy[n - 1]!, txy = tail.map((v, i) => [56 + ((i + 1) * 24) / tail.length, Y(v)] as [number, number]);
      const recovery = `M${pt(ex, ey)} L` + txy.map((p) => pt(...p)).join(" L"), [tx, ty] = txy[txy.length - 1]!;
      return span(ok ? { "data-state": "ok" } : {}, undefined, (
        <svg viewBox="0 0 84 24">
          <path className="pixilui-toast-figure-history" pathLength={1} d={history} />
          <path className="pixilui-toast-figure-spike" pathLength={1} d={spike} />
          <path className="pixilui-toast-figure-recovery" pathLength={1} d={recovery} />
          <circle className="pixilui-toast-figure-now" cx={ex.toFixed(1)} cy={ey.toFixed(1)} r="4" />
          <circle className="pixilui-toast-figure-now-ok" cx={tx.toFixed(1)} cy={ty.toFixed(1)} r="4" />
        </svg>
      ));
    }
    case "spend": {
      const { days, today, cap, max, capped } = props;
      return span(capped ? { "data-state": "capped" } : {}, { "--pixilui-figure-c": ((cap / max) * 100).toFixed(1) }, (
        <>
          {[...days, today].map((d, k) => (
            <i key={k} className={cn("pixilui-toast-figure-day", k === days.length && "pixilui-toast-figure-today")} style={{ "--pixilui-figure-h": ((d / max) * 100).toFixed(1), "--pixilui-figure-k": k } as Vars} />
          ))}
          <b className="pixilui-toast-figure-cap" />
        </>
      ));
    }
    case "voice":
      return span({}, undefined, props.levels.map((h, k) => (
        <i key={k} className="pixilui-toast-figure-bar" style={{ "--pixilui-figure-h": h, "--pixilui-figure-k": k } as Vars} data-who={props.who[k]} />
      )));
  }
});

const DATA_KEYS = new Set(["kind", "at", "gate", "open", "progress", "p", "turns", "limit", "hot", "keep", "sum", "value", "target", "rerun", "times", "now", "done", "wait", "points", "tail", "today", "days", "cap", "max", "capped", "levels", "who", "live"]);

/** Plays a figure's arrival again inside a toast's picture (a Replay button): the same arrival the toast plays as it lands. */
export function replayToastFigure(pic: HTMLElement | null) {
  if (!pic) return;
  const p = pic as HTMLElement & { _toastFigure?: ReturnType<typeof setTimeout> };
  p.removeAttribute("data-pxi-play"); void p.offsetWidth; p.setAttribute("data-pxi-play", "");
  clearTimeout(p._toastFigure); p._toastFigure = setTimeout(() => p.removeAttribute("data-pxi-play"), msOf(p, "--pixilui-toast-pic-play") || 900);
}

/** The locked page's data for each kind, as it happens and after (the demo, the examples and your tests can share it). */
export const toastFigureSamples = {
  turns: [9, 14, 11, 22, 13, 18, 12, 25, 16, 19, 21, 4],
  levels: [30, 55, 40, 72, 48, 26, 64, 88, 70, 52, 80, 44, 30, 58, 76, 62, 40, 68, 84, 56, 36, 50, 28],
  who: "uuuuuaaaaaauuuaaaaaaaaa".split("").map((c) => (c === "a" ? "agent" : "user")) as ToastFigureSpeaker[],
  week: [12, 16, 13, 10, 15, 14],
  points: [0.9, 1.0, 0.8, 0.9, 1.1, 0.9, 0.8, 1.0, 0.9, 1.0, 1.6, 2.9, 4.2],
  tail: [3.0, 1.6, 1.0, 0.9],
  tries: [0, 1, 3, 7],
};
```

## Usage

When to use:

- A toast about an agent's run or its numbers, where a picture of the data says it faster than a glyph: the step it is on, the context filling, a score against your bar, spend against the cap.
- A toast that turns: render the next figure in the morph and the marks that changed glide there, and a value that lands bumps once.

When not to use:

- Everyday news (saved, copied, offline): use the toast's glyph in a disc.
- A chart on a page: these are 84 by 24 pictures for a toast, not charts.

```tsx
import { Button } from "@/components/pixilui/button";
import { toast, Toast, type ToastOptions } from "@/components/pixilui/toast";
import { ToastFigures, toastFigureSamples as S, type ToastFigureData } from "@/components/pixilui/toast-figures";

// The first option of each knob is the demo's default; the docs preview starts there.
export const knobs = {
  kind: ["run", "approval gate", "agents in parallel", "handoff", "context", "accuracy", "retry", "latency", "spend", "voice"],
} as const;

type Kind = (typeof knobs.kind)[number];
// the locked page's toasts: each figure as it happens
const SEEN: Record<Kind, { fig: ToastFigureData; o: Omit<ToastOptions, "picture"> }> = {
  run: { fig: { kind: "run", at: 2 }, o: { tone: "neutral", title: "Researching the refund", sub: "Step 3 of 5, about 2 min left" } },
  "approval gate": { fig: { kind: "run", at: 2, gate: 3 }, o: { tone: "warn", title: "Waiting for your OK", sub: "Send 12 refund emails", actions: [{ label: "Approve", kind: "go" }] } },
  "agents in parallel": { fig: { kind: "crew", progress: [0.72, 0.38, 0.55] }, o: { tone: "neutral", title: "3 agents researching", sub: "Pricing, reviews and rivals", working: true } },
  handoff: { fig: { kind: "handoff", p: 0.45 }, o: { tone: "neutral", title: "Handing the brief to Writer", sub: "6 sources, from Research", working: true } },
  context: { fig: { kind: "context", turns: S.turns, limit: 200, hot: 3 }, o: { tone: "warn", title: "Context almost full", sub: "184k of 200k tokens", actions: [{ label: "Compact", kind: "go" }] } },
  accuracy: { fig: { kind: "accuracy", value: 86, target: 90 }, o: { tone: "fail", title: "Accuracy fell to 86%", sub: "3 evals fail since v12", actions: [{ label: "Roll back", kind: "go" }] } },
  retry: { fig: { kind: "retry", times: S.tries, now: 3.4 }, o: { tone: "warn", title: "Rate limited, retrying in 4s", sub: "Each wait twice the last" } },
  latency: { fig: { kind: "latency", points: S.points, hot: 3, tail: S.tail }, o: { tone: "warn", title: "Replies are slow", sub: "4.2s, usually 0.9s", actions: [{ label: "Add a worker", kind: "go" }] } },
  spend: { fig: { kind: "spend", days: S.week, today: 41.2, cap: 50, max: 54 }, o: { tone: "warn", title: "Spend is 3× usual today", sub: "$41.20 so far, usually $14", actions: [{ label: "Set a cap", kind: "go" }] } },
  voice: { fig: { kind: "voice", levels: S.levels, who: S.who, live: true }, o: { tone: "neutral", title: "On a call with Lena", sub: "The support agent is talking", working: true } },
};
// and after: what the toast turns into
const AFTER: Record<Kind, { fig: ToastFigureData; o: Omit<ToastOptions, "picture"> }> = {
  run: { fig: { kind: "run", at: 5 }, o: { tone: "done", title: "Reply ready for Lena", sub: "All 5 steps done in 1m 48s" } },
  "approval gate": { fig: { kind: "run", at: 3, gate: 3, open: true }, o: { tone: "neutral", title: "Sending 12 refund emails", sub: "Approved by you, step 4 of 5", working: true } },
  "agents in parallel": { fig: { kind: "crew", progress: [1, 1, 1] }, o: { tone: "done", title: "Research done", sub: "41 sources in 2m 6s" } },
  handoff: { fig: { kind: "handoff", p: 1 }, o: { tone: "done", title: "Brief handed to Writer", sub: "6 sources, from Research" } },
  context: { fig: { kind: "context", turns: S.turns, limit: 200, hot: 3, keep: 2, sum: 37 }, o: { tone: "done", title: "Context compacted", sub: "184k → 62k tokens" } },
  accuracy: { fig: { kind: "accuracy", value: 94, target: 90 }, o: { tone: "done", title: "Rolled back to v11", sub: "All 36 evals pass again" } },
  retry: { fig: { kind: "retry", times: S.tries, now: 7, done: true }, o: { tone: "done", title: "Sent on try 4", sub: "After 7s of waiting" } },
  latency: { fig: { kind: "latency", points: S.points, hot: 3, tail: S.tail, ok: true }, o: { tone: "done", title: "Replies back to 0.9s", sub: "With a second worker" } },
  spend: { fig: { kind: "spend", days: S.week, today: 41.2, cap: 50, max: 54, capped: true }, o: { tone: "done", title: "Daily cap set at $50", sub: "The agent pauses there and asks you" } },
  voice: { fig: { kind: "voice", levels: S.levels, who: S.who }, o: { tone: "done", title: "Call with Lena ended", sub: "4m 12s, refund issued" } },
};

/** The chosen figure in its toast, as it happens; Show plays it at the corner, landing and then turning into the result. */
export default function ToastFiguresDemo({ kind = "run" }: KnobValues<typeof knobs>) {
  const now = SEEN[kind];
  const show = () => {
    const t = toast({ ...now.o, actions: undefined, picture: <ToastFigures {...now.fig} />, hold: Infinity });
    setTimeout(() => { void t.morph({ ...AFTER[kind].o, picture: <ToastFigures {...AFTER[kind].fig} /> }).then(() => t.arm(3600)); }, 2400);
  };
  return (
    <div className="flex w-full max-w-md flex-col items-center gap-6">
      <Toast key={kind} state={{ ...now.o, picture: <ToastFigures {...now.fig} /> }} className="w-full" />
      <Button variant="soft" size="sm" onClick={show}>
        Show it
      </Button>
    </div>
  );
}
```

## Examples

None.

## API

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `kind` (required) | `"run" \| "crew" \| "handoff" \| "context" \| "accuracy" \| "retry" \| "latency" \| "spend" \| "voice"` |  | Which figure: run, crew, handoff, context, accuracy, retry, latency, spend or voice; the rest of the props are its data. |

Also accepts every native `<span>` attribute, and a ref to it.

## Keyboard

- `Tab`: Never takes focus: a figure is a picture, aria-hidden.

## Accessibility

- Every figure is aria-hidden: the toast's title and line say what it shows (Step 3 of 5, 184k of 200k tokens), so the picture is never the only signal.
- One hue and grey, one size and weight: the meaning is in the position of the marks and the words, never in color alone.
- Reduced motion: the figure draws at its end state and nothing bumps.

## Motion

- As the toast lands (its data-pxi-play), the figure replays the moment: the context first, then the news (the agent gliding, the bar filling, the spike tracing).
- After that only the marks that change move: the agent glides to its next step, a lane fills, the turns fold into a summary.
- A value that lands gives one small scale bump after the move that brought it (the check, the receiver, the summary, the try that went through). No loops but the call while it is live.

## Responsive

- Figures draw at 84 by 24 in lively and are zoomed to fit quiet's 70 column; a toast with a figure takes that column, an icon toast keeps 40.

## Performance

- CSS only: data attributes and inline values drive transitions and keyframes; no script runs per frame.

## Notes for AI

- toast({ picture: <ToastFigures kind="run" at={2} />, title: "Researching the refund", sub: "Step 3 of 5" }); then t.morph({ picture: <ToastFigures kind="run" at={5} />, ... }) when it finishes.
- Kinds and data: run { at, gate?, open? }, crew { progress[] }, handoff { p }, context { turns[], limit, hot, keep?, sum? }, accuracy { value, target, rerun? }, retry { times[], now, done?, wait? }, latency { points[], hot, tail[], ok? }, spend { days[], today, cap, max, capped? }, voice { levels[], who[], live? }.
- An approval gate is a run with gate (the step waiting on you); set open when it is approved.
- toastFigureSamples is the locked page's data; replayToastFigure(picEl) plays a figure's arrival again (a Replay button).
- Values are tokens: --pixilui-toast-figure-* (timings, sizes, the grey); inline data lands as --pixilui-figure-*.

## Related

- [Toast](https://pixilui.com/components/toast/markdown): Brief news at the corner on the locked float: a delete that waits while its red rim runs out, the agent asking one question, a run that stopped, money moved, and the everyday note, done, info, warning, error and save, in a stack that fans out.
- [Aurora light](https://pixilui.com/components/aurora-light/markdown): Soft light for an element's moment, in our glass colors: the glim crosses a card when work arrives, the rim blooms out of what you pressed and holds while the agent works, the ring pops for a moment that matters.
- [Activity mark](https://pixilui.com/components/thinking-mark/markdown): What an agent is doing right now, acted out on a 5 by 5 grid at 16px or larger: a radar sweep while it searches, a reading head through text, a question mark when it needs you. 36 activities.
