# Actor tag (Notchset): prompt.md (v1.1.0)

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

Who made a change, a run or a version, told by shape before name: a person is a circle (photo or initials), the agent a rounded square in the viewer's Signature with its four-point mark, a subagent the same mark in outline on the tint, named with whom it works for ("Enricher for Assistant"). Sized as the avatar..

## 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: `lucide-react@^1` beyond `react` and `react-dom`.
- Files: `components/ui/notchset/actor-tag.tsx`; shared code: `lib/notchset/icons.ts`, `lib/notchset/motion.ts`.
- Registry dependencies, installed with it automatically: shadcn `utils` (cn), `notchset-foundation`, `avatar`.
- Builds: one set of files, the same for every shadcn style.
- Exports to keep: `ActorTag`, `AgentMark`, `ACTOR_TAG_LABELS`, 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-avatar-lg`, `--ns-avatar-md`, `--ns-avatar-sm`, `--ns-avatar-xs`, `--ns-ease`, `--ns-ease-move`, `--ns-ease-spring`, `--ns-hover`, `--ns-ink`, `--ns-ink-3`, `--ns-line`, `--ns-orb-core`, `--ns-orb-skin-hi`, `--ns-orb-skin-lo`, `--ns-radius-card`, `--ns-signal`, `--ns-text-body`, `--ns-text-small`, `--ns-time-color`, `--ns-time-panel`, `--ns-time-spring`.
- 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 { ActorTag, type Actor } from "@/components/ui/notchset/actor-tag";
```

## Parts
- A single export that takes props.

## Match the original
- Read `components/ui/notchset/actor-tag.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
- Beside any change, run or version a person or an agent could have made, so who did it reads at a glance.

### Not when
- A person alone in a list is an avatar; a group is an avatar stack.

## Built from
- avatar (`avatar`), installed with it: reuse it, don't rebuild it
- Icons (shared helper, ships with it)
- Motion (shared helper, ships with it)

## Mistakes
- A photo or a face for the agent: it is its mark, never a person
- A subagent without whom it works for: say "for Assistant"
- Colour alone to tell the agent from a person: the shape and the name do

## Usage

```tsx
"use client";
import * as React from "react";
import { ActorTag, type Actor } from "@/components/ui/notchset/actor-tag";
import { useLessMotion } from "@/lib/notchset/motion";
import { useSelfPlay } from "./self-play";

/*
 * Who did it, and for whom: the subagent's orb, then the agent it works for, then the person they both work for. On
 * view the delegation unfolds once, link by link, the working orb pulsing while it does; then it rests open. A press
 * (or Enter) folds it back to the one tag and opens it again.
 */
const NAMES = { sub: "Researcher", agent: "Assistant", person: "Ana Ruiz" };

export default function ActorTagDemo() {
  const less = useLessMotion();
  const names = NAMES;
  const lead: Actor = { kind: "subagent", name: names.sub, for: names.agent };
  const chain: Actor[] = [
    { kind: "agent", name: names.agent },
    { kind: "person", name: names.person, src: "https://notchset.dev/media/people/person-01.webp" },
  ];
  const root = React.useRef<HTMLDivElement>(null);
  const play = useSelfPlay(root, { beats: [0, 1400], off: less });
  /* folded until the play opens it (or at once, where nothing plays); the hand's choice wins after */
  const [chosen, choose] = React.useState<boolean | null>(null);
  const shown = chosen ?? (play.step >= 0 || play.control === "replay");
  const working = !play.mine && play.step === 0;
  return (
    <div ref={root} onPointerDownCapture={play.handOver} onKeyDownCapture={play.handOver} className="flex w-full justify-center">
      <ActorTag actor={lead} chain={chain} size="sm" working={working} chainOpen={shown} onChainChange={choose} />
    </div>
  );
}
```

## Props

| Prop | Type | Default | What it does |
|---|---|---|---|
| `actor` | `Actor` |  | Required. |
| `size` | `AvatarProps["size"]` | `"xs"` | matched to its row, as the avatar's: xs 20px, sm 26px, md 32px, lg 40px; default xs |
| `label` | `string \| false` |  | the words beside the mark (default the actor's name; "you" for the viewer); `false` draws the mark alone, which then says the name itself |
| `acted` | `string \| number` |  | a key the host changes when this actor's change lands: the agent's mark turns a quarter, once (not on first render) |
| `working` | `boolean` |  | this agent is at work now: its orb sends a soft ring on a 1400ms beat |
| `chain` | `Actor[]` |  | opt in: whom the actor works for, nearest first ("Assistant", then "Ana"); the tag becomes a button that folds and opens the chain |
| `chainOpen` | `boolean` |  | the chain shown open (controlled); with `onChainChange` |
| `defaultChainOpen` | `boolean` | `true` | the chain's first open state, uncontrolled; default true |
| `onChainChange` | `(open: boolean) => void` |  |  |
| `labels` | `Partial<ActorTagLabels>` |  | its words, over the English defaults ("{name}" is the agent a subagent works for) |

Full docs: https://notchset.dev/components/actor-tag

## 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 inline SVG path for the agent's mark; a person is the Avatar.
- No state, no effects.

## Responsive

- phone and desktop (touch sizes grow as the avatar's)
- dark (tokens)
- any Signature: the mark follows it
- reduced motion: nothing moves

## Motion inventory

| Interaction | What moves |
|---|---|
| working, the orb swells and a ring pulses out from it | ns-orb-swell and ns-orb-pulse, 1400ms, looping. Reduced motion: still (useLessMotion). |
| the reason opens beside the tag | grid columns on --ns-time-spring, opacity on --ns-time-panel. Reduced motion: at once (motion-reduce). |

## Accessibility contract (preserve when editing)
- Beside its words the mark is decoration and the words name the actor ("Enricher for Assistant"); the mark alone is an image named the same way.
- Shape and words tell agent from person, never colour alone.

## Install

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

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

### Manual

1. Install the packages: `npm install lucide-react@^1`.
2. Copy `components/ui/notchset/actor-tag.tsx`, `lib/notchset/icons.ts`, `lib/notchset/motion.ts` from https://notchset.dev/r/actor-tag.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`, `avatar`.

## Continue the workflow

- [Avatar card](https://notchset.dev/components/avatar-card)
- [Avatar stack](https://notchset.dev/components/avatar-stack)
- [Avatar upload](https://notchset.dev/components/avatar-upload)

## Source

### components/ui/notchset/actor-tag.tsx

```tsx
// Notchset actor-tag 1.1.0 · https://notchset.dev/changelog
"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
import { Avatar, type AvatarProps } from "@/components/ui/notchset/avatar";
import { ChevronRight } from "@/lib/notchset/icons";
import { useLessMotion } from "@/lib/notchset/motion";

/*
 * Actor tag: who made a change, a run or a version. The shape says it before the name does: a person is a circle (their
 * photo or initials, the Avatar), the agent is the orb, a small sphere lit from inside in the Signature's orb light, and
 * a subagent working for it is the same light at 78% inside a ring, named with whom it works for ("Researcher for
 * Assistant"). Sizes follow the avatar's, so it sits in the same rows. `working` sends a soft ring out from the orb on a
 * 1400ms beat while that agent is at it. When the host bumps `acted` (a change of the agent's just landed) the orb sends
 * one ring. Opt in to `chain` (whom the actor works for, in order) and the tag tells the delegation: "Researcher > for
 * Assistant > for Ana", each link unfolding from behind the one before; a press folds it back to the one tag and opens
 * it again. Reduced motion keeps everything still and shows the result at once.
 *
 *   <ActorTag actor={{ kind: "agent", name: "Assistant" }} working />
 *   <ActorTag actor={{ kind: "subagent", name: "Researcher", for: "Assistant" }} />
 *   <ActorTag actor={researcher} chain={[assistant, ana]} />
 */
type Actor = {
  /** a person, the agent, or a subagent working for it */
  kind: "person" | "agent" | "subagent";
  /** the full name: "Ana Ruiz", "Assistant", "Enricher" */
  name: string;
  /** a person's photo */
  src?: string | undefined;
  /** a subagent's agent: "Assistant" */
  for?: string | undefined;
};
type ActorTagLabels = { for: string; link: string; fold: string; open: string };
const ACTOR_TAG_LABELS: ActorTagLabels = { for: "for {name}", link: "for", fold: "Press to fold", open: "Press to see who it works for" };
type ActorTagProps = {
  actor: Actor;
  /** matched to its row, as the avatar's: xs 20px, sm 26px, md 32px, lg 40px; default xs */
  size?: AvatarProps["size"];
  /** the words beside the mark (default the actor's name; "you" for the viewer); `false` draws the mark alone, which then says the name itself */
  label?: string | false | undefined;
  /** a key the host changes when this actor's change lands: the agent's mark turns a quarter, once (not on first render) */
  acted?: string | number | undefined;
  /** this agent is at work now: its orb sends a soft ring on a 1400ms beat */
  working?: boolean | undefined;
  /** opt in: whom the actor works for, nearest first ("Assistant", then "Ana"); the tag becomes a button that folds and opens the chain */
  chain?: Actor[] | undefined;
  /** the chain shown open (controlled); with `onChainChange` */
  chainOpen?: boolean | undefined;
  /** the chain's first open state, uncontrolled; default true */
  defaultChainOpen?: boolean | undefined;
  onChainChange?: ((open: boolean) => void) | undefined;
  /** its words, over the English defaults ("{name}" is the agent a subagent works for) */
  labels?: Partial<ActorTagLabels> | undefined;
  className?: string | undefined;
};

const SIZE = { xs: "var(--ns-avatar-xs)", sm: "var(--ns-avatar-sm)", md: "var(--ns-avatar-md)", lg: "var(--ns-avatar-lg)" } as const;

/** the agent's orb alone: a sphere lit from inside (a subagent: the same light at 78% inside a ring). `radius` is kept for
 *  callers that passed it and no longer shapes the round orb. */
function AgentMark({ sub, size, acted, working = false }: { sub: boolean; size: string; radius?: string | undefined; acted?: string | number | undefined; working?: boolean | undefined }) {
  const less = useLessMotion();
  const ring = React.useRef<HTMLSpanElement>(null);
  const seen = React.useRef(acted);
  React.useEffect(() => {
    if (seen.current === acted) return;
    seen.current = acted;
    const el = ring.current;
    if (less || !el || typeof el.animate !== "function") return;
    el.animate([{ opacity: 0.85, scale: "1" }, { opacity: 0, scale: "1.6" }], { duration: 700, easing: "cubic-bezier(0.2, 0, 0, 1)" });
  }, [acted, less]);
  const beat = working && !less;
  return (
    <span aria-hidden data-slot="actor-tag-mark" data-sub={sub || undefined} data-working={beat || undefined} style={{ width: size, height: size }} className="relative inline-grid shrink-0 place-items-center">
      <span ref={ring} className="pointer-events-none absolute inset-0 rounded-full opacity-0 shadow-[0_0_0_1.5px_var(--ns-orb-core)]" />
      {beat && <span data-slot="actor-tag-beat" className="pointer-events-none absolute inset-0 rounded-full shadow-[0_0_0_1.5px_var(--ns-orb-core)] [animation:ns-orb-pulse_1400ms_var(--ns-ease)_infinite]" />}
      <span
        data-slot="actor-tag-orb"
        className={cn("block rounded-full", beat && "[animation:ns-orb-swell_1400ms_var(--ns-ease-move)_infinite]")}
        style={{
          width: sub ? "78%" : "100%",
          height: sub ? "78%" : "100%",
          background: "radial-gradient(circle at 46% 34%, var(--ns-orb-skin-hi) 0%, var(--ns-orb-core) 52%, var(--ns-orb-skin-lo) 100%)",
          boxShadow: "inset 0 0 0 1px color-mix(in oklab, var(--ns-orb-skin-lo) 35%, transparent)",
        }}
      />
      {sub && <span className="pointer-events-none absolute inset-0 rounded-full shadow-[inset_0_0_0_1.25px_color-mix(in_oklab,var(--ns-orb-core)_55%,transparent)]" />}
    </span>
  );
}

function Mark({ actor, size, acted, working }: { actor: Actor; size: NonNullable<AvatarProps["size"]>; acted?: string | number | undefined; working?: boolean | undefined }) {
  return actor.kind === "person" ? <Avatar name={actor.name} src={actor.src} size={size} /> : <AgentMark sub={actor.kind === "subagent"} size={SIZE[size]} acted={acted} working={working} />;
}

function ActorTag({ actor, size = "xs", label, acted, working, chain, chainOpen, defaultChainOpen = true, onChainChange, labels, className }: ActorTagProps) {
  const L = { ...ACTOR_TAG_LABELS, ...labels };
  const [own, setOwn] = React.useState(defaultChainOpen);
  const s = size ?? "xs";
  const forWho = actor.kind === "subagent" && actor.for && !chain?.length ? L.for.replace("{name}", actor.for) : "";
  const words = label === false ? null : (label ?? actor.name);
  if (chain?.length) {
    const open = chainOpen ?? own;
    const set = (v: boolean) => {
      if (chainOpen === undefined) setOwn(v);
      onChainChange?.(v);
    };
    const said = [actor.name, ...chain.map((c) => L.for.replace("{name}", c.name))].join(", ");
    return (
      <button
        type="button"
        data-slot="actor-tag"
        data-kind={actor.kind}
        data-chain={open ? "open" : "folded"}
        aria-expanded={open}
        aria-label={`${open ? said : actor.name}. ${open ? L.fold : L.open}`}
        onClick={() => set(!open)}
        className={cn(
          "inline-flex min-h-11 max-w-full cursor-pointer flex-wrap items-center gap-y-2 rounded-[var(--ns-radius-card)] p-1.5 align-middle outline-hidden transition-[background-color] duration-[var(--ns-time-color)] hover:bg-[var(--ns-hover)] focus-visible:outline-2 focus-visible:outline-[var(--ns-signal)]",
          className,
        )}
      >
        <ChainLink actor={actor} size={s} acted={acted} working={working} />
        {chain.map((c, i) => (
          <span
            key={`${c.kind}-${c.name}-${i}`}
            data-slot="actor-tag-link"
            aria-hidden
            style={{ transitionDelay: open ? `${i * 120}ms` : "0ms" }}
            className={cn("grid [transition:grid-template-columns_var(--ns-time-spring)_var(--ns-ease-spring),opacity_var(--ns-time-panel)_var(--ns-ease)] motion-reduce:transition-none", open ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0")}
          >
            <span className="min-w-0 overflow-hidden">
              <span
                style={{ transitionDelay: open ? `${i * 120}ms` : "0ms" }}
                className={cn("ms-2 inline-flex items-center gap-2 whitespace-nowrap [transition:translate_var(--ns-time-spring)_var(--ns-ease-spring)] motion-reduce:transition-none", open ? "translate-x-0" : "-translate-x-3.5")}
              >
                <ChevronRight aria-hidden className="size-3.5 text-[var(--ns-ink-3)] rtl:rotate-180" />
                <span className="text-[length:var(--ns-text-small)] text-[var(--ns-ink-3)]">{L.link}</span>
                <ChainLink actor={c} size={s} />
              </span>
            </span>
          </span>
        ))}
      </button>
    );
  }
  return (
    <span
      data-slot="actor-tag"
      data-kind={actor.kind}
      role={words === null ? "img" : undefined}
      aria-label={words === null ? [actor.name, forWho].filter(Boolean).join(", ") : undefined}
      className={cn("inline-flex min-w-0 items-center gap-1.5 align-middle", className)}
    >
      <Mark actor={actor} size={s} acted={acted} working={working} />
      {words !== null && (
        <span className="min-w-0 truncate text-[length:var(--ns-text-small)] text-[var(--ns-ink)]">
          {words}
          {forWho && <span className="text-[var(--ns-ink-3)]"> {forWho}</span>}
        </span>
      )}
    </span>
  );
}

/** one link of the chain: the mark and the first name, in a quiet pill */
function ChainLink({ actor, size, acted, working }: { actor: Actor; size: NonNullable<AvatarProps["size"]>; acted?: string | number | undefined; working?: boolean | undefined }) {
  return (
    <span className="inline-flex items-center gap-1.5 whitespace-nowrap rounded-full py-1 ps-1 pe-2.5 shadow-[inset_0_0_0_1px_var(--ns-line)]">
      <Mark actor={actor} size={size} acted={acted} working={working} />
      <span className="text-[length:var(--ns-text-body)] font-medium text-[var(--ns-ink)]">{actor.kind === "person" ? actor.name.split(" ")[0] : actor.name}</span>
    </span>
  );
}

export { ActorTag, AgentMark, ACTOR_TAG_LABELS, type Actor, type ActorTagLabels, type ActorTagProps };
```

### lib/notchset/icons.ts

```tsx
// Notchset actor-tag 1.1.0 · https://notchset.dev/changelog
/** Every piece imports its icons from here: swap the icon set in this one file. */
export * from "lucide-react";
```

### lib/notchset/motion.ts

```tsx
// Notchset actor-tag 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.
