{
  "$schema": "https://sable.design/registry.schema.json",
  "name": "@sableui/react",
  "version": "0.26.0",
  "description": "Themeable React components, semantic tokens, layout patterns, presets, and package-owned agent skills. Default theme: Sable.",
  "engine": {
    "behavior": "@base-ui/react",
    "styling": "tailwindcss@4",
    "variants": "class-variance-authority"
  },
  "consume": {
    "package": "@sableui/react",
    "private": false,
    "registry": "https://registry.npmjs.org",
    "auth": "None: a public npm package.",
    "install": "pnpm add @sableui/react",
    "peerDependencies": {
      "react": "^19",
      "react-dom": "^19",
      "tailwindcss": "^4"
    },
    "bundlerDedupe": [
      "react",
      "react-dom"
    ],
    "css": [
      "@import \"tailwindcss\";",
      "@import \"@sableui/react/styles.css\";",
      "@source \"<node_modules>/@sableui/react/dist/**/*.{js,mjs}\";"
    ],
    "stack": "Sable depends on no router, data or form library; an existing app keeps its own, and links take any router's Link through render. For a blank-slate app the suggested stack is Vite + TypeScript, TanStack Router, TanStack Query, TanStack Form for forms with validation logic, and TanStack Table once a table outgrows DataTable (sable docs tables-with-tanstack).",
    "cssSources": "That @source ships every component's classes (about 49 KB minified and gzipped). Once the app is built, `sable sources --write src/sable-sources.css` lists just the modules it imports; @import that file in place of the @source. sable check fails while it is stale.",
    "fonts": {
      "sans": "Figtree",
      "mono": "DM Mono",
      "note": "theme declares the stacks; the host app loads the font files"
    },
    "providers": {
      "required": "IconProvider at the app root: import { reiconIconSet } from \"@sableui/react/icons/reicon\" and wrap the app in <IconProvider set={reiconIconSet}> (or pass your own IconSet). Without it every <Icon> renders nothing; development builds warn once.",
      "optional": "Extend Reicon with composeIconSets(appExtras, reiconIconSet) — composeIconSets from \"@sableui/react\", reiconIconSet from \"@sableui/react/icons/reicon\". MotionProvider controls motion. SableThemeProvider supplies user-selectable color modes and themes."
    },
    "themeSwitching": "Preferred: wrap the app in SableThemeProvider and call useSableTheme() to read mode/preference/themeId/themes and setPreference/setThemeId. The provider persists choices, toggles the `dark` class for light/dark/system, and writes data-sable-theme for non-default design themes.",
    "darkMode": "The theme is designed dark-first, but :root holds the light values: a page renders light until the `dark` class is on <html>. For a dark default, put class=\"dark\" on <html> or pass defaultPreference=\"dark\" to SableThemeProvider (its default is system). In a server-rendered app the provider applies the class after hydration; render <SableThemeScript /> in <head>, with the provider's options, to apply it before first paint (sable docs nextjs). Sable uses no `dark:` utilities, so a Tailwind `@custom-variant dark` is only needed if your own app code uses them.",
    "designTheme": "Set data-sable-theme for alternate or app-owned themes; omit the attribute or use base for the default. Register portable presets with presetManifest() through SableThemeProvider customThemes, and load their scoped CSS and fonts.",
    "import": "import { Button, Card } from \"@sableui/react\"",
    "cssOptional": {
      "themes.css": "@import \"@sableui/react/themes.css\"; — all bundled alternatives. styles.css already includes the Sable theme. Alternate CSS is scoped by data-sable-theme.",
      "theme/<id>.css": "@import \"@sableui/react/theme/prism.css\"; — one bundled alternative. Prefer this when the app uses exactly one.",
      "symptom": "The active theme renders as the Sable theme when its stylesheet has not been imported. Load the selected theme CSS before applying its ID."
    },
    "designWorkflow": {
      "brief": "sable docs designing-a-surface",
      "taste": "sable docs developing-taste",
      "skill": "sable init (or sable setup --agent in an app wired by hand); modes build, inspire, audit, polish, fix; package-owned skills/sable/SKILL.md",
      "presets": "sable docs using-presets; sable preset --check <path> --json; sable preset --css <path>",
      "assets": "sable docs creating-design-assets",
      "journey": "sable docs reviewing-a-journey",
      "motionReview": "sable docs reviewing-motion",
      "visualAtlas": "Optional, project-owned (.sable/atlas/atlas.json); the package ships none. sable atlas --search \"<context>\" --contrast --limit 3 --json; then --show <id> and view the returned evidence paths",
      "exploration": "Optional when alternatives materially affect the brief: sable explore --template; build bounded rendered directions; --check <manifest.json>; --compare <manifest.json>",
      "preferences": "sable prefer --search \"<decision>\" --scope project:<id> --json; human choices and agent observations remain distinct",
      "precedents": "sable learn --search \"<context>\" --json",
      "composition": "Inspect a relevant pattern skeleton. Reuse when its information architecture fits; original compositions from layout primitives are equally valid.",
      "review": "sable docs reviewing-a-design",
      "finish": "sable check <source paths> runs doctor, lint and grade in one pass and exits 1 on any failure, then lists the review steps no tool can verify. Optional Claude Code Stop hook: sable setup --agent --target claude --hook",
      "adoption": "sable check reports how much of the UI composes Sable and the app-built components Sable already ships (grade --json → adoption). Never a failure; at level none or low, ask the user before moving working screens: sable docs auditing-an-app → Adoption.",
      "evidenceTemplate": "sable grade --template",
      "learning": "sable docs learning-from-builds",
      "localMemory": ".sable/lessons/ for causal observations; .sable/preferences/ for scoped judgments; both project-owned and preserved across package upgrades",
      "qualityLimit": "Source checks and evidence completeness do not independently judge visual quality. Inspect rendered desktop/mobile states and real interactions."
    },
    "agentSetup": {
      "command": "pnpm exec sable setup --agent",
      "preview": "pnpm exec sable setup --agent --dry-run",
      "monorepo": "When Sable belongs to one workspace package, run setup in that package with --root at the repository root: pnpm --filter <package> exec sable setup --agent --root <path to root>. Entries go to the root and resolve Sable through the package.",
      "targets": {
        "codex": ".agents/skills/sable",
        "cursor": ".agents/skills/sable",
        "claude": ".claude/skills/sable"
      },
      "canonical": "skills/sable/SKILL.md in the installed package; entries resolve it on every task",
      "instructions": "A short managed block in AGENTS.md (Codex, Cursor) and CLAUDE.md (Claude Code), between <!-- sable:begin --> and <!-- sable:end -->, that sends every UI request through the skill even when it doesn't name Sable. --no-instructions skips it.",
      "upgrade": "pnpm exec sable upgrade (updates the package, then runs the new version's init). From 0.17 or earlier: pnpm update @sableui/react --latest; pnpm exec sable init",
      "preserves": "Local edits, project instructions outside the Sable block, presets and preferences; setup only refreshes unchanged managed entries and blocks, and refuses linked destinations."
    },
    "distributionStatus": "Public on npm as @sableui/react; install with pnpm add @sableui/react.",
    "ios": {
      "when": "Only for an explicitly requested browser iOS prototype; match components by role with sable target ios --json.",
      "install": "pnpm add konsta",
      "entry": "@sableui/react/ios",
      "css": "@import \"tailwindcss\"; then @import \"@sableui/react/ios/styles.css\"; in the isolated native document.",
      "previewEntry": "@sableui/react/ios/preview",
      "previewCss": "@sableui/react/ios/frame.css",
      "guide": "sable docs building-an-ios-prototype",
      "updates": "Consume the shipped adapter instead of copying demo helpers. Package upgrades update the brand bridge, material, safe areas, navigation, sheets and input bindings."
    },
    "init": {
      "command": "pnpm exec sable init",
      "preview": "pnpm exec sable init --dry-run",
      "after": "Run it once the package is installed; before that `npx sable` resolves an unrelated package.",
      "does": "Installs missing packages with the lockfile's package manager (React, React DOM, Tailwind and its build plugin), writes the css imports in order into the global stylesheet with an @source path computed from it, runs agentSetup (skill entries plus the AGENTS.md / CLAUDE.md block; in a terminal it offers the Stop hook), then sable doctor. It does not add antialiasing, alternate theme CSS (cssOptional), MotionProvider or SableThemeProvider.",
      "frameworks": "Vite: also adds the Tailwind plugin and bundlerDedupe to the Vite config, the Figtree + DM Mono links to index.html, and wraps a starter's <App /> (one <App /> in an entry that calls createRoot) in IconProvider. Next.js: also writes postcss.config.mjs when there is none, needs no dedupe, and prints a \"use client\" app/providers.tsx with IconProvider and the font <link> tags for the root layout (sable docs nextjs, which adds SableThemeScript). Other setups: the packages and the stylesheet; the bundler and provider steps are printed.",
      "manual": "Each edit it cannot make safely (an unfamiliar config shape, a Next.js layout, a stylesheet split across files) is printed as the exact snippet and the file it belongs in. Apply them, then run sable doctor.",
      "flags": "--dry-run previews; --no-agent skips the skill; --no-install prints install commands instead of running them.",
      "repair": "In an app that is already wired: pnpm exec sable doctor --fix (or --dry-run) applies the same fixes to whatever doctor flags."
    },
    "guides": {
      "setup": "sable docs getting-started",
      "nextjs": "sable docs nextjs",
      "colorMode": "sable docs color-mode",
      "troubleshooting": "sable docs troubleshooting",
      "migrate": "sable docs converting-an-app; from shadcn/ui: sable docs migrating-from-shadcn"
    }
  },
  "themes": {
    "default": "sable",
    "available": [
      {
        "id": "sable",
        "label": "Sable",
        "featured": true,
        "css": "./src/themes/sable/sable.css",
        "manifest": "./src/themes/sable/index.ts",
        "import": "@sableui/react/styles.css",
        "modes": [
          "dark",
          "light"
        ],
        "defaultMode": "dark",
        "fonts": {
          "sans": "Figtree",
          "mono": "DM Mono"
        },
        "fontStacks": {
          "sans": "\"Figtree\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif",
          "mono": "\"DM Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Courier New\", monospace"
        }
      },
      {
        "id": "meridian",
        "label": "Meridian",
        "featured": true,
        "css": "./src/themes/meridian/meridian.css",
        "manifest": "./src/themes/meridian/index.ts",
        "import": "@sableui/react/theme/meridian.css",
        "modes": [
          "light",
          "dark"
        ],
        "defaultMode": "light",
        "fonts": {
          "sans": "Instrument Sans",
          "mono": "Geist Mono"
        },
        "fontStacks": {
          "sans": "\"Instrument Sans\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif",
          "mono": "\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Courier New\", monospace"
        },
        "artDirection": "./src/themes/meridian/art-direction.md"
      },
      {
        "id": "prism",
        "label": "Prism",
        "featured": true,
        "css": "./src/themes/prism/prism.css",
        "manifest": "./src/themes/prism/index.ts",
        "import": "@sableui/react/theme/prism.css",
        "modes": [
          "light",
          "dark"
        ],
        "defaultMode": "light",
        "fonts": {
          "sans": "Outfit",
          "mono": "Roboto Mono",
          "display": "Playfair Display"
        },
        "fontStacks": {
          "sans": "\"Outfit\", ui-sans-serif, system-ui, sans-serif",
          "mono": "\"Roboto Mono\", ui-monospace, monospace",
          "display": "\"Playfair Display\", ui-serif, Georgia, serif"
        },
        "artDirection": "./src/themes/prism/art-direction.md"
      },
      {
        "id": "verdant",
        "label": "Verdant",
        "featured": true,
        "css": "./src/themes/verdant/verdant.css",
        "manifest": "./src/themes/verdant/index.ts",
        "import": "@sableui/react/theme/verdant.css",
        "modes": [
          "light",
          "dark"
        ],
        "defaultMode": "light",
        "fonts": {
          "sans": "Inter",
          "mono": "IBM Plex Mono",
          "display": "Instrument Serif"
        },
        "fontStacks": {
          "sans": "\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif",
          "mono": "\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Courier New\", monospace",
          "display": "\"Instrument Serif\", Georgia, \"Times New Roman\", serif"
        },
        "artDirection": "./src/themes/verdant/art-direction.md"
      },
      {
        "id": "ember",
        "label": "Ember",
        "featured": true,
        "css": "./src/themes/ember/ember.css",
        "manifest": "./src/themes/ember/index.ts",
        "import": "@sableui/react/theme/ember.css",
        "modes": [
          "dark",
          "light"
        ],
        "defaultMode": "dark",
        "fonts": {
          "sans": "Work Sans",
          "mono": "DM Mono"
        },
        "fontStacks": {
          "sans": "\"Work Sans\", sans-serif",
          "mono": "\"DM Mono\", ui-monospace, monospace"
        },
        "artDirection": "./src/themes/ember/art-direction.md"
      },
      {
        "id": "poppy",
        "label": "Poppy",
        "featured": true,
        "css": "./src/themes/poppy/poppy.css",
        "manifest": "./src/themes/poppy/index.ts",
        "import": "@sableui/react/theme/poppy.css",
        "modes": [
          "light",
          "dark"
        ],
        "defaultMode": "light",
        "fonts": {
          "sans": "Albert Sans",
          "mono": "Red Hat Mono",
          "display": "Unbounded"
        },
        "fontStacks": {
          "sans": "\"Albert Sans\", ui-sans-serif, system-ui, sans-serif",
          "mono": "\"Red Hat Mono\", ui-monospace, monospace",
          "display": "\"Unbounded\", ui-sans-serif, system-ui, sans-serif"
        }
      }
    ],
    "fontsNote": "fonts is the first family of each role's stack; fontStacks is the full stack the theme CSS declares. The host app loads the files (Google Fonts for every built-in primary). Generated from src/themes/*/index.ts — do not hand-edit."
  },
  "tokens": {
    "semantic": [
      {
        "name": "background",
        "intent": "The page. The furthest-back surface in the page register.",
        "whenToUse": "The document body, and any surface meant to read as 'the page itself'. Never anything that floats: background is the BOTTOM of the surface stack (background < card < popover in every dark mode), so a floating panel painted with it reads as a hole beneath the cards it hovers over.",
        "insteadOf": "`popover` for anything floating, `card` for a bounded block on the page. `canvas`. `canvas` is the *work* surface in a tool — the artboard being edited — which is not the page behind the UI. Using `background` for an artboard makes the thing being edited indistinguishable from the chrome around it."
      },
      {
        "name": "foreground",
        "intent": "The default ink, for `background`.",
        "whenToUse": "Body text and any content sitting directly on the page.",
        "insteadOf": "any other surface's ink. On `card`, `popover`, `panel` or a tone, use that surface's own `-foreground`.",
        "pairsWith": [
          "background"
        ]
      },
      {
        "name": "card",
        "intent": "A raised content container on the page.",
        "whenToUse": "A bounded block of related content on a page: an article teaser, a settings group, a stat panel.",
        "insteadOf": "`popover`. A card sits *in* the document flow; a popover floats above it and needs its own elevation and border treatment. And never inside a docked panel — use `panel` surfaces and `PanelSection`; a card in a 240px panel spends its border and inset on nothing. Never rely on `card` as a FILL to separate something from the page: a preset's `card` can equal `background`, because a card separates by its border. A track, well or pad that must read with no border is `muted`."
      },
      {
        "name": "card-foreground",
        "intent": "Ink paired with `card`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `card`. Use them as a pair — `bg-card text-card-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "card"
        ]
      },
      {
        "name": "popover",
        "intent": "A floating surface: menu, popover, tooltip body, select list, dialog, and any persistent floating panel (an inspector, a toolbar over a canvas).",
        "whenToUse": "Anything rendered in a layer above the page that needs its own background, dismissible or not. The test is elevation: if it floats over content (`shadow-md` or higher, fixed or absolutely positioned above the page), it is popover. Pair with `text-popover-foreground`.",
        "insteadOf": "`card` and `background`. The distinction is elevation, not shape or lifetime: a panel that stays open is still floating. `background` is the page ground and `card` sits on it; both read as sunk under a floating panel. In light mode several presets make all three equal, so a floating surface also needs its edge (ring or border) and shadow, never the fill alone."
      },
      {
        "name": "popover-foreground",
        "intent": "Ink paired with `popover`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `popover`. Use them as a pair — `bg-popover text-popover-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "popover"
        ]
      },
      {
        "name": "muted",
        "intent": "A recessed surface. Quieter than the page, not interactive.",
        "whenToUse": "An inset well: a code block background, a disabled field, a read-only region, a table's zebra stripe, a segmented-control track. On the page it always differs from `background`. Inside any OTHER surface (a card, a popover, a floating panel) use the `sable-well` utility instead: it derives the well from the surface it sits in, so it is the same visible step everywhere, whereas `muted` can land within a step of a popover in some dark modes. Never compensate with an outline on every well — that turns a panel into a stack of boxes.",
        "insteadOf": "`secondary` and `accent`. All three are near-identical in most themes, which is exactly why the rule is by ROLE: `muted` is *recessed and inert*, `secondary` is a *control fill*, `accent` is a *transient state*. Pick by what the surface does, never by which looks right — they diverge in other themes."
      },
      {
        "name": "muted-foreground",
        "intent": "De-emphasised ink. The single most-used token after `foreground`.",
        "whenToUse": "Secondary text: captions, helper text, placeholder-adjacent labels, a property name next to its value, timestamps.",
        "insteadOf": "`foreground` at reduced opacity. Opacity on text compounds unpredictably against whatever is behind it and can fall below the contrast floor; this token is a tuned value that does not.",
        "pairsWith": [
          "background",
          "card",
          "muted"
        ]
      },
      {
        "name": "border",
        "intent": "The default hairline. Tuned to be subtle.",
        "whenToUse": "Input outlines, badge edges, card borders — chrome that should not draw the eye.",
        "insteadOf": "`border-strong`. Reach for `border-strong` when the line carries *structure* (a grid rule, a table divider, a section separator) and for `border` when it merely bounds a control."
      },
      {
        "name": "border-strong",
        "intent": "A structural divider. Visibly stronger than `border`.",
        "whenToUse": "Grid lines, table rules, separators between major sections.",
        "insteadOf": "`border`. If removing the line would make the layout ambiguous, it is structural and belongs here."
      },
      {
        "name": "input",
        "intent": "The outline of a form control specifically.",
        "whenToUse": "Text inputs, textareas and selects (through `field-border`, which derives from it). Not the edge of a checkbox, radio or switch — that is `control-border`.",
        "insteadOf": "`border`. They are often the same value, but a theme is entitled to make form controls read differently from other chrome, and only this token gives it the hook."
      },
      {
        "name": "control-border",
        "intent": "The resting edge of a control whose outline is the whole control. Held to 3:1 (WCAG 1.4.11) on every surface.",
        "whenToUse": "An unchecked checkbox, an unselected radio, an off switch track, a selection card's check or radio mark — anywhere removing the edge would make the control disappear.",
        "insteadOf": "`input`. A text field is also found by its fill, caret and placeholder, so its outline may stay quiet; a checkbox has nothing else, and at `input`'s strength it measures about 1.4:1."
      },
      {
        "name": "ring",
        "intent": "The focus indicator colour.",
        "whenToUse": "Only for `focus-visible`. Nothing else.",
        "insteadOf": "`primary`. Focus must remain distinguishable from selection; if the ring is the same colour as a selected state, a keyboard user cannot tell where focus is."
      },
      {
        "name": "primary",
        "intent": "The one high-emphasis action colour.",
        "whenToUse": "The single most important action on a surface — one per view. A submit button, the primary CTA.",
        "insteadOf": "`accent`. `primary` says *do this*; `accent` says *this is the current one*. Two primary buttons on one screen means neither is primary."
      },
      {
        "name": "primary-foreground",
        "intent": "Ink paired with `primary`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `primary`. Use them as a pair — `bg-primary text-primary-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "primary"
        ]
      },
      {
        "name": "secondary",
        "intent": "A lower-emphasis control fill.",
        "whenToUse": "A secondary button, a segmented control's resting fill, a neutral chip.",
        "insteadOf": "`muted`. `secondary` is for something you can *press*; `muted` is for a surface that is inert. See the `muted` note — role, not appearance."
      },
      {
        "name": "secondary-foreground",
        "intent": "Ink paired with `secondary`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `secondary`. Use them as a pair — `bg-secondary text-secondary-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "secondary"
        ]
      },
      {
        "name": "accent",
        "intent": "A transient state fill: hover, selected, current.",
        "whenToUse": "The fill behind a hovered menu item, a selected list row, the active segment of a switcher.",
        "insteadOf": "`primary` for selection, and `muted` for hover. `accent` is the state layer; the other two are emphasis and recession respectively."
      },
      {
        "name": "accent-foreground",
        "intent": "Ink paired with `accent`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `accent`. Use them as a pair — `bg-accent text-accent-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "accent"
        ]
      },
      {
        "name": "destructive",
        "intent": "Irreversible or data-losing actions.",
        "whenToUse": "Delete, revoke, remove, discard — and the error state of a form field.",
        "insteadOf": "`tone-warning`. Destructive means *this destroys something*; warning means *be careful*. A confirmation dialog's action is destructive; the banner explaining it is a warning."
      },
      {
        "name": "destructive-foreground",
        "intent": "Ink paired with `destructive`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `destructive`. Use them as a pair — `bg-destructive text-destructive-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "destructive"
        ]
      },
      {
        "name": "success",
        "intent": "A confirmed, completed, healthy state.",
        "whenToUse": "A passing check, a saved indicator, a healthy status dot.",
        "insteadOf": "`tone-info`. Success asserts an outcome; info asserts a fact. 'Saved' is success, '3 items' is info."
      },
      {
        "name": "success-foreground",
        "intent": "Ink paired with `success`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `success`. Use them as a pair — `bg-success text-success-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "success"
        ]
      },
      {
        "name": "tone-3",
        "intent": "Extra colour 3: the third, and usually the quietest, category in a classified set.",
        "whenToUse": "A third category, or the baseline one that means 'nothing special'.",
        "insteadOf": "`muted`. A tone is *semantic classification* that a reader is meant to decode; `muted` is de-emphasis. If a legend would help the user, it is a tone."
      },
      {
        "name": "tone-2",
        "intent": "Extra colour 2: the second category in a classified set.",
        "whenToUse": "A second category, distinct from tone-1, in a badge, dot, card or chart.",
        "insteadOf": "`tone-1`. Distinct categories must stay visually distinct."
      },
      {
        "name": "tone-1",
        "intent": "Extra colour 1, the lead of the three a theme defines beyond its status colours. The numbered tones exist so a product can classify content (categories, plans, series) without inventing colours per feature; the product decides what each one means.",
        "whenToUse": "The most prominent category in a classified set, or the first series of a chart.",
        "insteadOf": "`primary`. A tone classifies the *thing*; primary drives an *action*. A category badge is not a button."
      },
      {
        "name": "tone-info",
        "intent": "Domain tone: neutral, factual information.",
        "whenToUse": "An informational note or banner, a neutral count, a 'did you know' surface.",
        "insteadOf": "`success`. Info states a fact; success states an outcome. Also not `primary` — an info banner is not an action."
      },
      {
        "name": "tone-warning",
        "intent": "Domain tone: proceed with care, nothing is broken yet.",
        "whenToUse": "A caution banner, a nearing-limit indicator, a soloed/overridden state in a tool.",
        "insteadOf": "`destructive`. Warning is *advisory*; destructive is *consequential*. If nothing is lost by continuing, it is a warning."
      },
      {
        "name": "highlight",
        "intent": "A marker on content the user is meant to notice — search hits, diffs, annotations.",
        "whenToUse": "Highlighting matched text, a changed line, a called-out passage.",
        "insteadOf": "`accent`. `accent` is UI state that follows the pointer or selection; `highlight` marks the *content* and persists independently of interaction."
      },
      {
        "name": "tone-3-foreground",
        "intent": "Ink paired with `tone-3`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `tone-3`. Use them as a pair — `bg-tone-3 text-tone-3-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "tone-3"
        ]
      },
      {
        "name": "tone-2-foreground",
        "intent": "Ink paired with `tone-2`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `tone-2`. Use them as a pair — `bg-tone-2 text-tone-2-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "tone-2"
        ]
      },
      {
        "name": "tone-1-foreground",
        "intent": "Ink paired with `tone-1`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `tone-1`. Use them as a pair — `bg-tone-1 text-tone-1-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "tone-1"
        ]
      },
      {
        "name": "tone-info-foreground",
        "intent": "Ink paired with `tone-info`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `tone-info`. Use them as a pair — `bg-tone-info text-tone-info-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "tone-info"
        ]
      },
      {
        "name": "tone-warning-foreground",
        "intent": "Ink paired with `tone-warning`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `tone-warning`. Use them as a pair — `bg-tone-warning text-tone-warning-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "tone-warning"
        ]
      },
      {
        "name": "highlight-foreground",
        "intent": "Ink paired with `highlight`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `highlight`. Use them as a pair — `bg-highlight text-highlight-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "highlight"
        ]
      },
      {
        "name": "destructive-text",
        "intent": "`destructive` drawn on a surface: text, icons, borders and focus rings.",
        "whenToUse": "Write `text-destructive`, `border-destructive` or `ring-destructive` — they read this token; only `bg-destructive` reads the fill.",
        "insteadOf": "`destructive` itself for marks on a page. The fill is tuned to carry a label (dark mode lowers it under white ink), which can leave it too dark to read on a dark card.",
        "pairsWith": [
          "background",
          "card",
          "popover",
          "muted"
        ]
      },
      {
        "name": "success-text",
        "intent": "`success` drawn on a surface: text, icons, borders and focus rings.",
        "whenToUse": "Write `text-success`, `border-success` or `ring-success` — they read this token; only `bg-success` reads the fill.",
        "insteadOf": "`success` itself for marks on a page. The fill is tuned to carry a label (dark mode lowers it under white ink), which can leave it too dark to read on a dark card.",
        "pairsWith": [
          "background",
          "card",
          "popover",
          "muted"
        ]
      },
      {
        "name": "tone-warning-text",
        "intent": "`tone-warning` drawn on a surface: text, icons, borders and focus rings.",
        "whenToUse": "Write `text-tone-warning`, `border-tone-warning` or `ring-tone-warning` — they read this token; only `bg-tone-warning` reads the fill.",
        "insteadOf": "`tone-warning` itself for marks on a page. The fill is tuned to carry a label (dark mode lowers it under white ink), which can leave it too dark to read on a dark card.",
        "pairsWith": [
          "background",
          "card",
          "popover",
          "muted"
        ]
      },
      {
        "name": "tone-info-text",
        "intent": "`tone-info` drawn on a surface: text, icons, borders and focus rings.",
        "whenToUse": "Write `text-tone-info`, `border-tone-info` or `ring-tone-info` — they read this token; only `bg-tone-info` reads the fill.",
        "insteadOf": "`tone-info` itself for marks on a page. The fill is tuned to carry a label (dark mode lowers it under white ink), which can leave it too dark to read on a dark card.",
        "pairsWith": [
          "background",
          "card",
          "popover",
          "muted"
        ]
      },
      {
        "name": "overlay",
        "intent": "A scrim over the page behind a modal, and the wash behind media chrome.",
        "whenToUse": "Dialog and sheet backdrops, letterboxing, a pill sitting on top of an image.",
        "insteadOf": "`bg-black/50`. Pure black is never right — it crushes whatever is behind it, and a theme cannot tune it. This token is the sanctioned answer, which is why `raw-black-white` is a lint rule."
      },
      {
        "name": "overlay-foreground",
        "intent": "Ink paired with `overlay`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `overlay`. Use them as a pair — `bg-overlay text-overlay-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "overlay"
        ]
      },
      {
        "name": "sidebar",
        "intent": "The app sidebar's own surface. Heads a small family (`sidebar-*`) that lets navigation chrome diverge from the page without overriding page tokens.",
        "whenToUse": "The `Sidebar` / `SideNav` background.",
        "insteadOf": "`card`. A sidebar is persistent chrome, not content — a theme frequently wants it a different tone from the cards inside the page it frames."
      },
      {
        "name": "sidebar-foreground",
        "intent": "Ink paired with `sidebar`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `sidebar`. Use them as a pair — `bg-sidebar text-sidebar-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "sidebar"
        ]
      },
      {
        "name": "sidebar-primary",
        "intent": "The high-emphasis colour *within* the sidebar.",
        "whenToUse": "The active nav item's fill, when the sidebar has its own tonal world.",
        "insteadOf": "`primary`. Page primary on a sidebar surface may not clear contrast; this token is tuned against `sidebar`.",
        "pairsWith": [
          "sidebar"
        ]
      },
      {
        "name": "sidebar-primary-foreground",
        "intent": "Ink paired with `sidebar-primary`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `sidebar-primary`. Use them as a pair — `bg-sidebar-primary text-sidebar-primary-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "sidebar-primary"
        ]
      },
      {
        "name": "sidebar-accent",
        "intent": "The state layer within the sidebar — hover, current.",
        "whenToUse": "Hovered or current nav items.",
        "insteadOf": "`accent`, for the same contrast reason as `sidebar-primary`.",
        "pairsWith": [
          "sidebar"
        ]
      },
      {
        "name": "sidebar-accent-foreground",
        "intent": "Ink paired with `sidebar-accent`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `sidebar-accent`. Use them as a pair — `bg-sidebar-accent text-sidebar-accent-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "sidebar-accent"
        ]
      },
      {
        "name": "sidebar-border",
        "intent": "Hairlines inside the sidebar.",
        "whenToUse": "Dividers between nav sections, and the sidebar's own trailing edge.",
        "insteadOf": "`border`, which is tuned against page surfaces.",
        "pairsWith": [
          "sidebar"
        ]
      },
      {
        "name": "sidebar-ring",
        "intent": "Focus indicator inside the sidebar.",
        "whenToUse": "`focus-visible` on nav items.",
        "insteadOf": "`ring`, which is tuned against page surfaces.",
        "pairsWith": [
          "sidebar"
        ]
      }
    ],
    "typography": [
      {
        "name": "display-4xl",
        "intent": "The largest type: display-lg through display-4xl. Marketing-scale, one per view at most.",
        "whenToUse": "A landing page hero, a section opener on a brand surface.",
        "insteadOf": "`heading-1` for page titles. Display is a *statement*; headings are *structure*. A settings page titled in display-3xl looks like an advert."
      },
      {
        "name": "display-3xl",
        "intent": "The largest type: display-lg through display-4xl. Marketing-scale, one per view at most.",
        "whenToUse": "A landing page hero, a section opener on a brand surface.",
        "insteadOf": "`heading-1` for page titles. Display is a *statement*; headings are *structure*. A settings page titled in display-3xl looks like an advert."
      },
      {
        "name": "display-2xl",
        "intent": "The largest type: display-lg through display-4xl. Marketing-scale, one per view at most.",
        "whenToUse": "A landing page hero, a section opener on a brand surface.",
        "insteadOf": "`heading-1` for page titles. Display is a *statement*; headings are *structure*. A settings page titled in display-3xl looks like an advert."
      },
      {
        "name": "display-xl",
        "intent": "The largest type: display-lg through display-4xl. Marketing-scale, one per view at most.",
        "whenToUse": "A landing page hero, a section opener on a brand surface.",
        "insteadOf": "`heading-1` for page titles. Display is a *statement*; headings are *structure*. A settings page titled in display-3xl looks like an advert."
      },
      {
        "name": "display-lg",
        "intent": "The largest type: display-lg through display-4xl. Marketing-scale, one per view at most.",
        "whenToUse": "A landing page hero, a section opener on a brand surface.",
        "insteadOf": "`heading-1` for page titles. Display is a *statement*; headings are *structure*. A settings page titled in display-3xl looks like an advert."
      },
      {
        "name": "heading-1",
        "intent": "Structural document headings, heading-1 through heading-4.",
        "whenToUse": "The real outline of a page. Pick the level by depth in the document, not by desired size.",
        "insteadOf": "`display` for size, or `title` for structure. If it belongs in a table of contents, it is a heading."
      },
      {
        "name": "heading-2",
        "intent": "Structural document headings, heading-1 through heading-4.",
        "whenToUse": "The real outline of a page. Pick the level by depth in the document, not by desired size.",
        "insteadOf": "`display` for size, or `title` for structure. If it belongs in a table of contents, it is a heading."
      },
      {
        "name": "heading-3",
        "intent": "Structural document headings, heading-1 through heading-4.",
        "whenToUse": "The real outline of a page. Pick the level by depth in the document, not by desired size.",
        "insteadOf": "`display` for size, or `title` for structure. If it belongs in a table of contents, it is a heading."
      },
      {
        "name": "heading-4",
        "intent": "Structural document headings, heading-1 through heading-4.",
        "whenToUse": "The real outline of a page. Pick the level by depth in the document, not by desired size.",
        "insteadOf": "`display` for size, or `title` for structure. If it belongs in a table of contents, it is a heading."
      },
      {
        "name": "title-lg",
        "intent": "The title of a *component*, not of a document.",
        "whenToUse": "A card's heading, a dialog title, a section label inside a panel.",
        "insteadOf": "`heading-*`. A card title is not part of the page outline, and using a heading tier for it produces a document structure that lies to a screen reader's heading navigation."
      },
      {
        "name": "title-sm",
        "intent": "The title of a *component*, not of a document.",
        "whenToUse": "A card's heading, a dialog title, a section label inside a panel.",
        "insteadOf": "`heading-*`. A card title is not part of the page outline, and using a heading tier for it produces a document structure that lies to a screen reader's heading navigation."
      },
      {
        "name": "body-lg",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "body-md",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "body-sm",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "body-xs",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "label-lg",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "label-md",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "label-sm",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "label-xs",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "caption",
        "intent": "The smallest page-register tier. Metadata beneath something.",
        "whenToUse": "Image captions, timestamps, footnotes, a card's secondary line.",
        "insteadOf": "`text-overline`. Caption sits *below* and explains; overline sits *above* and categorises."
      },
      {
        "name": "mono-xl",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "mono-lg",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "mono-md",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "mono-caption",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "mono-sm",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      }
    ],
    "radii": [
      {
        "name": "none",
        "intent": "Square. A deliberate 0.",
        "whenToUse": "Edge-to-edge surfaces, table cells, anything whose corners meet another element's corners.",
        "insteadOf": "omitting a radius class. Stating `none` records the intent; omitting it means the next person cannot tell square-on-purpose from square-by-accident."
      },
      {
        "name": "xs",
        "intent": "The tightest real corner. Reads as 'crisp', not 'rounded'.",
        "whenToUse": "Tool-chrome controls, tree rows, small swatches — anywhere the radius should be felt but not seen. The workspace register runs ~5px on essentially everything.",
        "insteadOf": "`sm`. In a 24px-tall control an `sm` radius starts to read as a lozenge."
      },
      {
        "name": "sm",
        "intent": "The default control corner.",
        "whenToUse": "Inputs, buttons in the page register, badges, small cards."
      },
      {
        "name": "md",
        "intent": "A container corner.",
        "whenToUse": "Cards, panels, popovers, menus — surfaces that hold other things.",
        "insteadOf": "`sm`. A container should be softer than the controls inside it, or the nesting reads inverted."
      },
      {
        "name": "lg",
        "intent": "A prominent container corner.",
        "whenToUse": "Dialogs, sheets, hero media, feature cards."
      },
      {
        "name": "xl",
        "intent": "The softest rectangular corner. A styling statement.",
        "whenToUse": "Marketing surfaces, large imagery, a theme that wants a soft character.",
        "insteadOf": "`full`. `xl` is still a rectangle with soft corners; `full` is a capsule. Using `xl` on a small element makes it look like a failed capsule."
      },
      {
        "name": "full",
        "intent": "A capsule or circle — radius exceeds half the height.",
        "whenToUse": "Avatars, status dots, notification badges, pills, and page-register actions (the 'round action in a tight container' contrast that says *this is a control*).",
        "insteadOf": "any fixed radius, for circles. And NOT in tool chrome: neither Figma nor Paper has a single pill in its chrome, which is why the compact density scope flattens `--button-radius` to ~5px."
      }
    ],
    "layout": [
      {
        "name": "rhythm-unit",
        "intent": "The vertical rhythm base — one baseline step (8px at the default scale). Every vertical measure is a multiple of it, and it follows the type and the density control.",
        "whenToUse": "Through `Stack`/`Row`/`Grid` gap numbers, which are rhythm units rather than pixels. A gap of 2 is 16px at the default scale, and grows or tightens with density.",
        "insteadOf": "arbitrary vertical spacing. The rhythm is what makes unrelated sections of a page feel like one document."
      },
      {
        "name": "grid-columns",
        "intent": "The column count of the content grid — 12.",
        "whenToUse": "`Grid`/`Columns`, WITHIN a region, for genuinely multi-column content.",
        "insteadOf": "using a column span as the page's reading width. A span is not a measure — see `measure-prose`."
      },
      {
        "name": "grid-gutter",
        "intent": "The gap between grid columns and rows — 2 baseline steps on phones, 3 on desktop, snapped to the step.",
        "whenToUse": "`Grid`/`Columns` spacing."
      },
      {
        "name": "page-inset",
        "intent": "The page's outer breathing room, left and right.",
        "whenToUse": "The gutter between content and the viewport edge, at every breakpoint.",
        "insteadOf": "a global max-width. Sable caps width per REGION by role, never once for the whole page."
      },
      {
        "name": "measure-prose",
        "intent": "The maximum comfortable line length for prose, in `ch`.",
        "whenToUse": "Any long-form text column.",
        "insteadOf": "a layout width. Measure and width are different things: a wide region can still hold a narrow measure, and capping the region instead makes everything else in it too narrow."
      },
      {
        "name": "region-form",
        "intent": "The region cap for a form — narrow, because fields should not run long.",
        "whenToUse": "Settings pages, auth screens, any column of inputs.",
        "insteadOf": "`region-content`. A 700px-wide text input is harder to use, not more generous."
      },
      {
        "name": "region-feed",
        "intent": "The region cap for a scrolling list of items.",
        "whenToUse": "Feeds, timelines, search results."
      },
      {
        "name": "region-content",
        "intent": "The default region cap for mixed page content.",
        "whenToUse": "Article bodies with media, documentation, most product pages."
      },
      {
        "name": "region-wide",
        "intent": "A wide region for dense or tabular content.",
        "whenToUse": "Data tables, dashboards, galleries — content that genuinely needs the room."
      },
      {
        "name": "region-full",
        "intent": "No cap. Edge to edge.",
        "whenToUse": "Hero imagery, full-bleed sections, and a workspace, which is always edge-to-edge."
      },
      {
        "name": "region-ultrawide (legacy — prefer region-full)",
        "intent": "Deprecated. Kept so existing usage keeps resolving.",
        "whenToUse": "Nothing new. Use `region-full`.",
        "insteadOf": "`region-full`, which is what this became."
      }
    ],
    "motion": {
      "durations": [
        "instant",
        "fast",
        "base",
        "slow",
        "slower",
        "enter",
        "exit"
      ],
      "easings": [
        "standard",
        "decelerate",
        "emphasized",
        "spring",
        "bounce",
        "linear"
      ],
      "scale": "motion-scale",
      "recipes": [
        "motion-interactive",
        "motion-press",
        "motion-fade",
        "motion-pop",
        "motion-slide-up",
        "motion-slide-down",
        "motion-slide-left",
        "motion-slide-right",
        "motion-disclosure",
        "motion-icon-swap",
        "motion-glide",
        "motion-shake",
        "motion-tick",
        "motion-appear",
        "motion-arrive",
        "motion-bloom",
        "motion-size",
        "motion-swap-in",
        "motion-swap-out",
        "motion-stack-card",
        "motion-reveal",
        "motion-draw",
        "motion-spin",
        "motion-orbit",
        "motion-shimmer",
        "motion-text-shimmer",
        "motion-stream-in",
        "motion-caret",
        "motion-pulse",
        "motion-dot-bounce",
        "motion-ping",
        "animate-fade-in",
        "animate-fade-up",
        "animate-fade-down"
      ],
      "policy": [
        "data-motion=full",
        "data-motion=subtle",
        "data-motion=reduced",
        "data-motion=off",
        "prefers-reduced-motion"
      ]
    },
    "typographyOverrides": [
      {
        "name": "type-base",
        "intent": "The base size the page type scale is built on, as a unitless px number — 16 by default. Every page tier keeps its ratio to it, so `14` rebuilds the whole scale at 14, and the baseline step and spacing follow the body down.",
        "whenToUse": "When the product asks for smaller or larger type everywhere: a dense technical tool at 13-14, a reading product at 17. Set it on :root, a theme scope or a preset (`tokens.shared[\"type-base\"]: \"14\"`), not per component.",
        "insteadOf": "Changing the root font-size, which also moves every rem the app wrote and the control ladder; or overriding tier sizes one by one, which breaks the ratios between them. Unitless: `14`, never `14px`.",
        "pairsWith": [
          "leading-scale",
          "baseline-step"
        ]
      },
      {
        "name": "type-display-4xl-size",
        "intent": "The largest type: display-lg through display-4xl. Marketing-scale, one per view at most.",
        "whenToUse": "A landing page hero, a section opener on a brand surface.",
        "insteadOf": "`heading-1` for page titles. Display is a *statement*; headings are *structure*. A settings page titled in display-3xl looks like an advert."
      },
      {
        "name": "type-title-lg-size",
        "intent": "The title of a *component*, not of a document.",
        "whenToUse": "A card's heading, a dialog title, a section label inside a panel.",
        "insteadOf": "`heading-*`. A card title is not part of the page outline, and using a heading tier for it produces a document structure that lies to a screen reader's heading navigation."
      },
      {
        "name": "type-title-sm-size",
        "intent": "The title of a *component*, not of a document.",
        "whenToUse": "A card's heading, a dialog title, a section label inside a panel.",
        "insteadOf": "`heading-*`. A card title is not part of the page outline, and using a heading tier for it produces a document structure that lies to a screen reader's heading navigation."
      },
      {
        "name": "type-body-lg-size",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-lg-weight",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-lg-leading",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-lg-tracking",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-md-size",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-md-weight",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-md-leading",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-md-tracking",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-sm-size",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-sm-weight",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-sm-leading",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-sm-tracking",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-xs-size",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-xs-weight",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-xs-leading",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-body-xs-tracking",
        "intent": "The reading tier: body-lg through body-xs. Prose and long-form content.",
        "whenToUse": "Paragraphs, descriptions, help text, anything a person reads a sentence of.",
        "insteadOf": "`label-*`. Body is for reading, label is for naming. A form's help text is body; the field's name is a label. Getting this wrong is why some UIs feel like a wall of controls."
      },
      {
        "name": "type-label-lg-size",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-lg-weight",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-lg-leading",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-lg-tracking",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-md-size",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-md-weight",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-md-leading",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-md-tracking",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-sm-size",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-sm-weight",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-sm-leading",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-sm-tracking",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-xs-size",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-xs-weight",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-xs-leading",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-xs-tracking",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-label-xs-transform",
        "intent": "The naming tier: label-lg through label-xs. Short, denser, slightly heavier.",
        "whenToUse": "Field labels, table column headers, button text, tab titles, chip text.",
        "insteadOf": "`body-*` at the same size. Labels carry more weight and tighter leading because they are scanned, not read."
      },
      {
        "name": "type-caption-size",
        "intent": "The smallest page-register tier. Metadata beneath something.",
        "whenToUse": "Image captions, timestamps, footnotes, a card's secondary line.",
        "insteadOf": "`text-overline`. Caption sits *below* and explains; overline sits *above* and categorises."
      },
      {
        "name": "type-caption-weight",
        "intent": "The smallest page-register tier. Metadata beneath something.",
        "whenToUse": "Image captions, timestamps, footnotes, a card's secondary line.",
        "insteadOf": "`text-overline`. Caption sits *below* and explains; overline sits *above* and categorises."
      },
      {
        "name": "type-caption-leading",
        "intent": "The smallest page-register tier. Metadata beneath something.",
        "whenToUse": "Image captions, timestamps, footnotes, a card's secondary line.",
        "insteadOf": "`text-overline`. Caption sits *below* and explains; overline sits *above* and categorises."
      },
      {
        "name": "type-caption-tracking",
        "intent": "The smallest page-register tier. Metadata beneath something.",
        "whenToUse": "Image captions, timestamps, footnotes, a card's secondary line.",
        "insteadOf": "`text-overline`. Caption sits *below* and explains; overline sits *above* and categorises."
      },
      {
        "name": "type-mono-xl-size",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-xl-weight",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-xl-leading",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-xl-tracking",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-lg-size",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-lg-weight",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-lg-leading",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-lg-tracking",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-md-size",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-md-weight",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-md-leading",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-md-tracking",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-caption-size",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-caption-weight",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-caption-leading",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-caption-tracking",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-sm-size",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-sm-weight",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-sm-leading",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      },
      {
        "name": "type-mono-sm-tracking",
        "intent": "The monospace family: mono-xl through mono-sm, plus mono-caption.",
        "whenToUse": "Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.",
        "insteadOf": "the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page."
      }
    ],
    "derived": [
      {
        "name": "canvas",
        "intent": "The WORK surface — the artboard, the document being edited.",
        "whenToUse": "Behind the thing the tool operates on. `WorkspaceCanvas` uses it.",
        "insteadOf": "`background`. The thing being edited is not the page behind the UI, and collapsing the two makes the document indistinguishable from its chrome."
      },
      {
        "name": "canvas-foreground",
        "intent": "Ink paired with `canvas`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `canvas`. Use them as a pair — `bg-canvas text-canvas-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "canvas"
        ]
      },
      {
        "name": "panel",
        "intent": "Docked chrome: the surface of a side panel or an inspector.",
        "whenToUse": "`Panel`, `WorkspaceBar`, `StatusBar` backgrounds.",
        "insteadOf": "`card`. Panels are chrome and sit in a deliberately compressed tonal band — see DESIGN.md → Registers. A card's elevation language is wrong here."
      },
      {
        "name": "panel-foreground",
        "intent": "Ink paired with `panel`. Evaluate the rendered contrast together; never choose it independently.",
        "whenToUse": "Whenever the background is `panel`. Use them as a pair — `bg-panel text-panel-foreground` — so a theme can retune the surface and the ink together.",
        "insteadOf": "`foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.",
        "pairsWith": [
          "panel"
        ]
      },
      {
        "name": "panel-raised",
        "intent": "One step up from `panel`: a selected row, a hover fill, a nested well.",
        "whenToUse": "Tree row selection, hovered panel rows, and the light square of a checkerboard.",
        "insteadOf": "`accent`. In a workspace the tonal band is only a few units wide; `accent` is a page-register step and reads as a shout in chrome."
      },
      {
        "name": "panel-field",
        "intent": "The inset fill of a compact control docked in a panel.",
        "whenToUse": "The `size=\"xs\"` field rung (Input, SelectTrigger, ScrubField share it) and `<Button variant=\"field\">`. A panel control of your own that should sit among those fields.",
        "insteadOf": "`canvas`. `canvas` names the work surface, and its step off the panel is too faint to read as a field in dark mode. This one is mixed from the panel itself, so it follows a theme that retunes the panel. Tune it with `--theme-panel-field`.",
        "pairsWith": [
          "panel-field-hover"
        ]
      },
      {
        "name": "panel-field-hover",
        "intent": "The hover step of a `panel-field` control.",
        "whenToUse": "`hover:bg-panel-field-hover` on anything filled with `panel-field`.",
        "insteadOf": "`hover:bg-panel-raised`. A fixed surface token as a hover is what the surface-hover lint rejects; this one is defined against the panel field it steps from.",
        "pairsWith": [
          "panel-field"
        ]
      },
      {
        "name": "hairline",
        "intent": "The 1px structural line that carries all separation in tool chrome.",
        "whenToUse": "Between panel sections, under a toolbar, above a status bar.",
        "insteadOf": "a bigger tonal step. This is one of the two rules the workspace register deliberately reverses: on a page prefer space or tone over a line, in chrome the hairline *is* the structure."
      },
      {
        "name": "hairline-strong",
        "intent": "A hairline that must be seen — an input edge, a swatch ring.",
        "whenToUse": "Bounding a control whose fill is arbitrary (a colour swatch) or user content.",
        "insteadOf": "`hairline`, when the line would otherwise disappear against what it bounds."
      },
      {
        "name": "border-floating",
        "intent": "The edge of a floating surface. Fainter than `border`: the shadow carries the elevation.",
        "whenToUse": "Every floating surface — popover, menu, select, tooltip, dialog, sheet, toast, a floating panel — as `border-border-floating` or `ring-border-floating`, together with `bg-popover` and a `shadow-md`+ shadow. Derived for every theme (a faint alpha of the foreground); a theme may tune it with `--theme-border-floating`.",
        "insteadOf": "`border`. A full hairline plus a shadow stacks into a heavy outline around anything that floats. `border` is for resting edges: inputs, cards, badges."
      },
      {
        "name": "field",
        "intent": "The fill of a text field: Input, Textarea, Select, Combobox, SearchInput, InputGroup, ChatComposer.",
        "whenToUse": "Read by every field through its shell, so you rarely name it. Derived for every theme (`card`, an outlined field on the card); a theme fills its fields instead with `--theme-field: var(--muted)` and `--theme-field-border: transparent`, and every field changes at once. Name it only for a field-shaped surface of your own that must match.",
        "insteadOf": "`card` or `muted` on a hand-built field. A field that paints `card` keeps its outline when the theme fills the rest, and one that paints `muted` stays filled when the theme outlines them.",
        "pairsWith": [
          "field-border"
        ]
      },
      {
        "name": "field-border",
        "intent": "The outline of a text field. Derived from `input`; `transparent` in a theme with filled fields.",
        "whenToUse": "With `field`, on the same field-shaped surfaces. Tune it with `--theme-field-border`.",
        "insteadOf": "`input` on a text field. `input` stays the theme's outline colour for form chrome; this is the field's outline, which a filled theme turns off.",
        "pairsWith": [
          "field"
        ]
      },
      {
        "name": "shell-ground",
        "intent": "The ground of an inset app frame: the rail and the gap around the raised main panel.",
        "whenToUse": "Painted by `<AppShell frame=\"inset\">` and the Sidebar in its slot; you rarely name it. Derived for every theme as one step off `sidebar` toward its ink, so the panel reads as lifted even where the rail is the page colour. Tune it with `--theme-shell-ground`.",
        "insteadOf": "`sidebar` or `canvas` behind an inset panel. `sidebar` is the page colour in most themes, so the panel would sit on itself; `canvas` is a workspace's artboard, not app chrome.",
        "pairsWith": [
          "sidebar"
        ]
      },
      {
        "name": "destructive-mark",
        "intent": "`destructive` at graphic strength: the same hue lifted and saturated, for a mark that carries no text.",
        "whenToUse": "A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-destructive-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-destructive-mark` or gets one derived from `destructive`.",
        "insteadOf": "`bg-destructive` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-destructive` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "success-mark",
        "intent": "`success` at graphic strength: the same hue lifted and saturated, for a mark that carries no text.",
        "whenToUse": "A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-success-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-success-mark` or gets one derived from `success`.",
        "insteadOf": "`bg-success` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-success` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "tone-warning-mark",
        "intent": "`tone-warning` at graphic strength: the same hue lifted and saturated, for a mark that carries no text.",
        "whenToUse": "A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-warning-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-warning-mark` or gets one derived from `tone-warning`.",
        "insteadOf": "`bg-tone-warning` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-warning` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "tone-info-mark",
        "intent": "`tone-info` at graphic strength: the same hue lifted and saturated, for a mark that carries no text.",
        "whenToUse": "A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-info-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-info-mark` or gets one derived from `tone-info`.",
        "insteadOf": "`bg-tone-info` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-info` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "tone-1-mark",
        "intent": "`tone-1` at graphic strength: the same hue lifted and saturated, for a mark that carries no text.",
        "whenToUse": "A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-1-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-1-mark` or gets one derived from `tone-1`.",
        "insteadOf": "`bg-tone-1` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-1` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "tone-2-mark",
        "intent": "`tone-2` at graphic strength: the same hue lifted and saturated, for a mark that carries no text.",
        "whenToUse": "A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-2-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-2-mark` or gets one derived from `tone-2`.",
        "insteadOf": "`bg-tone-2` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-2` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "tone-3-mark",
        "intent": "`tone-3` at graphic strength: the same hue lifted and saturated, for a mark that carries no text.",
        "whenToUse": "A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-3-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-3-mark` or gets one derived from `tone-3`.",
        "insteadOf": "`bg-tone-3` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-3` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-1",
        "intent": "Slot 1 of the categorical chart palette: the colour series 1 takes when it names none.",
        "whenToUse": "Read through `chartColor(0)` (or `var(--chart-1)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-2",
        "intent": "Slot 2 of the categorical chart palette: the colour series 2 takes when it names none.",
        "whenToUse": "Read through `chartColor(1)` (or `var(--chart-2)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-3",
        "intent": "Slot 3 of the categorical chart palette: the colour series 3 takes when it names none.",
        "whenToUse": "Read through `chartColor(2)` (or `var(--chart-3)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-4",
        "intent": "Slot 4 of the categorical chart palette: the colour series 4 takes when it names none.",
        "whenToUse": "Read through `chartColor(3)` (or `var(--chart-4)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-5",
        "intent": "Slot 5 of the categorical chart palette: the colour series 5 takes when it names none.",
        "whenToUse": "Read through `chartColor(4)` (or `var(--chart-5)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-6",
        "intent": "Slot 6 of the categorical chart palette: the colour series 6 takes when it names none.",
        "whenToUse": "Read through `chartColor(5)` (or `var(--chart-6)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-7",
        "intent": "Slot 7 of the categorical chart palette: the colour series 7 takes when it names none.",
        "whenToUse": "Read through `chartColor(6)` (or `var(--chart-7)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      },
      {
        "name": "chart-8",
        "intent": "Slot 8 of the categorical chart palette: the colour series 8 takes when it names none.",
        "whenToUse": "Read through `chartColor(7)` (or `var(--chart-8)`) for a series with no meaning attached — a category, a product, a region — and to hand the theme's palette to a charting library. Take the slots in order: the set is validated as neighbours, so skipping slots can put two similar hues side by side. Past eight series, fold the rest into \"Other\".",
        "insteadOf": "A tone mark (`tone-1-mark`, `success-mark`) when the series MEANS something — revenue is the brand, errors are destructive. The chart palette is for categories with no meaning, and a reader will not map its colours to status. And not a palette family step (`blue-500`): those are tuned for washes and text, not for separating eight neighbours under colour-blindness.",
        "pairsWith": [
          "background",
          "card"
        ]
      }
    ],
    "palette": {
      "about": "More colour for apps, generated from the active theme: neutral and eight hue families, plus a 50–950 scale under every tone. Each family keeps its hue and leans toward the brand (half the gap, at most 15°; --theme-palette-harmony scales it, 0 = own hues). Neutral is the theme's --background mixed toward its --foreground. Steps follow the mode: low steps sit near the page and high ones far from it in light and dark alike, so a pair needs no dark: variant. For decorative and categorical colour (tags, avatars, labels, legends, illustration); surfaces, text and actions take roles. Components never name a step.",
      "families": [
        "neutral",
        "red",
        "orange",
        "yellow",
        "green",
        "teal",
        "blue",
        "purple",
        "pink"
      ],
      "toneScales": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "success",
        "destructive"
      ],
      "steps": [
        50,
        100,
        200,
        300,
        400,
        500,
        600,
        700,
        800,
        900,
        950
      ],
      "utilities": "bg-blue-100, text-blue-800, border-neutral-200, bg-tone-1-100 — or var(--teal-500). Tailwind's other families (slate, gray, zinc, stone, amber, lime, emerald, cyan, sky, indigo, violet, fuchsia, rose) are switched off.",
      "pairs": {
        "tag / label": "bg-<family>-100 text-<family>-800 (held to 4.5:1 in every theme and mode)",
        "text on the page": "text-<family>-700",
        "solid fill": "bg-<family>-700 text-<family>-50",
        "hairline": "border-<family>-300"
      },
      "components": "Badge, Pill and StatusDot take a family as tone (tone=\"blue\"): a category with no meaning attached.",
      "slots": {
        "about": "data-palette=\"<family>\" on an element fills these from that family, so one set of classes paints any family: bg-palette-wash text-palette-text.",
        "names": {
          "palette-wash": 100,
          "palette-wash-strong": 200,
          "palette-edge": 300,
          "palette-dot": 500,
          "palette-solid": 700,
          "palette-text": 800,
          "palette-solid-ink": 50
        }
      },
      "scales": [
        "neutral",
        "red",
        "orange",
        "yellow",
        "green",
        "teal",
        "blue",
        "purple",
        "pink",
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "success",
        "destructive"
      ]
    }
  },
  "enforcement": {
    "note": "The design-system hard rules are enforced in CI, not just documented. design-lint is a zero-dependency lexical linter over the package's own src/ (excludes themes/ and *.meta.ts).",
    "tool": "scripts/design-lint.mjs",
    "run": "pnpm design-lint",
    "ci": ".github/workflows/ci.yml (also runs typecheck, package build, docs build)",
    "rules": [
      {
        "id": "inline-color",
        "fails-on": "inline oklch()/hex literals"
      },
      {
        "id": "palette-ref",
        "fails-on": "raw palette-step refs (--zinc-950, text-(--purple-heart-700))",
        "exceptions": "none"
      },
      {
        "id": "raw-black-white",
        "fails-on": "bg-black/text-white etc.; use overlay/overlay-foreground or a semantic token"
      },
      {
        "id": "transition-colors",
        "fails-on": "bare transition-colors; use the motion-interactive recipe"
      },
      {
        "id": "transition-all",
        "fails-on": "transition-all / transition: all; it animates properties you never named. Use motion-interactive, or list the properties"
      },
      {
        "id": "builtin-animate",
        "fails-on": "Tailwind animate-{spin,pulse,bounce,ping} (bypass --motion-scale)"
      },
      {
        "id": "raw-duration",
        "fails-on": "raw duration-<n>; use duration-(--motion-duration-*)"
      },
      {
        "id": "decomposed-type",
        "fails-on": "bare text-{size} + font-{weight}; use a paired type utility"
      },
      {
        "id": "raw-z-index",
        "fails-on": "a raw z-index utility that joins the global layer order (z-50, z-[9999]); name a step on the layering scale instead — z-(--z-sticky|nav|overlay|toast|skip-link)",
        "exceptions": "z-0 through z-20 are local stacking inside one component's own box and are not flagged; the scale starts at 30 so the two ranges never overlap"
      },
      {
        "id": "unknown-token",
        "fails-on": "typo'd tone/overlay/highlight token (validated against _contract.ts)"
      },
      {
        "id": "unknown-motion",
        "fails-on": "typo'd motion duration var / easing (validated against _contract.ts)"
      },
      {
        "id": "static-interactive",
        "fails-on": "an element styled for pointer states (hover:/active:/focus-visible:) carrying no motion recipe",
        "note": "The only PRESCRIPTIVE rule. Every other motion rule fires on motion that is present and wrong; none can fire on motion that is absent, so an interface that simply snaps between states used to clear the whole contract. Fix with motion-interactive, or motion-press when it should also move under the press."
      },
      {
        "id": "self-import",
        "fails-on": "importing the package's own barrel (@sableui/react) from inside src/; deep-import a relative module instead",
        "exceptions": "none"
      },
      {
        "id": "icon-contract",
        "fails-on": "a hard-coded <Icon name>/icon: literal that is missing from iconContract.names (keeps the machine-readable icon contract complete)"
      },
      {
        "id": "version-sync",
        "fails-on": "SABLE_UI_VERSION in src/index.ts OR registry.json version not matching package.json version"
      },
      {
        "id": "unknown-meta-token",
        "fails-on": "a <name>.meta.ts tokensUsed entry that is not a real SEMANTIC_TOKEN (validated against _contract.ts) — so component meta can't advertise a token that doesn't exist"
      },
      {
        "id": "unmanaged-overflow",
        "fails-on": "an overflow-*-auto|scroll utility with no scrollbar policy; pair with `scrollbar-quiet` or `scrollbar-hidden`"
      },
      {
        "id": "raw-control-height",
        "fails-on": "a hardcoded control height (h-[40px]); read the density ladder (h-(--control-md)) so a data-density scope can retune it"
      },
      {
        "id": "tailwind-color-alias",
        "fails-on": "var(--color-*) — Tailwind's generated alias, frozen to the DEFAULT theme. Read the semantic token (var(--primary)) or a themed subtree silently paints the wrong theme"
      },
      {
        "id": "physical-direction",
        "fails-on": "a physical direction utility (ml-*, pr-*, text-left, left-*) where a logical property belongs, so RTL mirrors for free. A per-file ratchet: existing occurrences are grandfathered in scripts/lint-baseline.json and only an increase fails"
      },
      {
        "id": "faded-focus-ring",
        "fails-on": "Opacity on semantic focus ink weakens the theme's tested contrast. Use ring-ring or ring-sidebar-ring at full opacity; tune the semantic token in the theme instead."
      },
      {
        "id": "text-opacity",
        "fails-on": "Opacity on a surface text ink (text-foreground/60). An alpha step over an unknown surface has unknown contrast and shifts per theme. Use text-muted-foreground — it is contrast-tested on every surface. See `sable docs typography`."
      },
      {
        "id": "highlight-as-ink",
        "fails-on": "`highlight` is a SURFACE, always paired with `highlight-foreground` (bg-highlight text-highlight-foreground). Presets disagree on what it looks like (a vivid accent in some, a pale wash in others), so as a bare text or icon ink it vanishes in half of them. For an accented mark put the icon in a bg-highlight chip; for links and hovers use text-foreground."
      },
      {
        "id": "hand-rolled-control",
        "fails-on": "A hand-built control where Sable ships the component. Sable's version carries the keyboard model, focus handling, ARIA wiring and theming (it is built on Base UI); a hand-rolled one usually misses some of it — a role=\"radio\" button row without arrow keys is the common case. Use the named component. If none genuinely fits (a 2D pad, a bespoke strip), keep it keyboard-complete and add the escape hatch with the reason."
      },
      {
        "id": "floating-on-ground",
        "fails-on": "A floating surface painted with the page ground. `shadow-md` and above mean the element floats (menus, popovers, floating panels, toolbars over a canvas, dialogs), and every floating surface is `bg-popover`. `background` is the BOTTOM of the stack — background < card < popover in every theme's dark mode — so a floating panel on `bg-background` reads as a hole beneath the cards it hovers over (Sable's own Customize inspector shipped that way). Use `bg-popover text-popover-foreground`. A device screen or other genuine page ground that happens to carry a shadow takes the escape hatch with the reason."
      },
      {
        "id": "floating-surface",
        "fails-on": "A floating surface with a resting surface's fill or edge. `shadow-md` and above mean the element floats (menus, popovers, selects, tooltips, dialogs, sheets, toasts, a floating panel), and a floating surface is `bg-popover text-popover-foreground` with `border-border-floating` (or `ring-border-floating`). FILL: `background` is the bottom of the stack and `card` sits on it — background < card < popover in every dark mode — so a floating panel on either reads as sunk beneath what it hovers over (Sable's Customize inspector shipped on `bg-background`; Dialog, Sheet and Toast shipped on `bg-card`). EDGE: the shadow carries the elevation; a full `border-border` hairline on top of it stacks into a heavy outline. `border-floating` is the lighter, alpha edge made for this. A device screen or other genuine page ground that carries a shadow takes the escape hatch with the reason."
      },
      {
        "id": "lookalike-control",
        "fails-on": "A raw element dressed as a Sable component. `border-input` is the field shell (Input, Textarea, SearchInput, Select…); a `bg-primary` / `bg-secondary` / `bg-destructive` fill or a `--control-*` height on a <button> or <a> is a Button. Hand-built, they drift from the component — no density, no loading or disabled states, no focus contract — and every token on them still passes lint. Use the component: Button (a link takes `render={<a href=… />}`), Input / SearchInput, or CommandMenuTrigger for a search-shaped button that opens a palette. If none fits, that is a library gap: say so, then take the escape hatch with the reason."
      },
      {
        "id": "hand-derived-surface",
        "fails-on": "A colour hand-mixed from the foreground ink — `color-mix(… var(--foreground) …)`. Sable already derives these from the surface underneath, in every theme and mode: `sable-well` (a recessed track, pad or well), `sable-surface` + `sable-surface-interactive` (hover and selected fills on any surface), `bg-hairline` / `border-hairline` (a faint ink edge or fill). `npx sable search` finds them; `registry.json → utilities` explains each. If none fits, it is a gap — report it, then take the escape hatch with the reason."
      },
      {
        "id": "surface-hover",
        "fails-on": "A hover, highlight or selected state painted with a fixed token (hover:bg-muted, hover:bg-accent, hover:bg-popover, data-[selected]:bg-card…). It only reads on the surface it was designed for: on a well, a muted row or a popover it can match the parent, and the state turns into a hole. Use `sable-surface-interactive`, which steps hover and selected off whatever surface the element sits on — or a Sable component whose states are built in. Exempt: an opacity step on the element's own surface (bg-popover/90 hover:bg-popover, bg-card hover:bg-card/85), which is not a surface swap."
      },
      {
        "id": "raw-button",
        "fails-on": "A component renders a raw <button> instead of composing Sable's Button. A hand-built button picks its own height, padding, icon size, radius, hover and focus ring, so it drifts from every other button (CopyButton was 28px with a 14px glyph beside 32px icon buttons)."
      },
      {
        "id": "control-height-override",
        "fails-on": "A control-height class passed to a sized component (h-(--control-*) on Input, Button, SelectTrigger or ComboboxInput). These components take their height from `size` — Button: xs | sm | md | cta | icon-*; Input, SelectTrigger, ComboboxInput: md | xs. Use the size prop; if no size fits, that is a gap in the component, not a className."
      },
      {
        "id": "clickable-static",
        "fails-on": "An `onClick` on a non-interactive element (div, span, li, img, td, tr, section, article, p). It reaches mouse users only: no focus, no Enter/Space, no role. Use Button (variant=\"ghost\" for a quiet hit area; `render={<a href=… />}` for a link), or a Sable component whose rows are interactive (Entity, TreeRow, a Menu/Select item). A handler that only stops propagation, or a backdrop whose keyboard path is elsewhere, takes the escape hatch with the reason."
      },
      {
        "id": "hand-written-fade",
        "fails-on": "A hand-written `mask-image` gradient. For a scroll region, Scroller draws the edge fade — only on the side that has more, following the scroll. For streaming text, StreamingText. For clamped text that expands, ShowMore. If none of these fit, take the escape hatch with the reason."
      },
      {
        "id": "destructive-item-ink",
        "fails-on": "A menu row coloured by className (text-destructive, a tone ink, or a destructive highlight). MenuItem and ContextMenuItem take `variant=\"destructive\"`, which keeps the ink while highlighted and tints the highlight to match; a class override loses it on hover. Use the variant."
      },
      {
        "id": "component-restyle",
        "fails-on": "A look-changing class on a Sable component (border*, bg-*, rounded*, ring-*, shadow-* on Button, Pill or Badge). Their appearance is set by variants — Button `variant` (floating for a control over content), Pill `appearance`/`size`, Badge `appearance`/`tone` — and an override fights the variant's own hover, selected and focus states. Use a real variant, or add one to the component. Layout classes (width, margin, flex, position) are fine."
      },
      {
        "id": "table-edge-padding",
        "fails-on": "Inline-edge padding hand-set on a TableHead or TableCell (pl-*, pr-*, ps-*, pe-*). Table insets its first and last columns by `--table-edge-px`; put the table in `<CardContent flush>`, which sets it to the card's padding at every density — or set `[--table-edge-px:…]` on a wrapper. Never pad the cells by hand."
      },
      {
        "id": "popup-separator-bleed",
        "fails-on": "A separator bled to the popup edge with a fixed negative margin (-mx-1, -mx-[…]). Popup padding is `popup-inset`, which follows the radius and the density; use `popup-bleed`, which bleeds by exactly that amount, or the popup's own *Separator part (MenuSeparator, ContextMenuSeparator, SelectSeparator) which already does."
      },
      {
        "id": "fixed-spacing",
        "fails-on": "A fixed rem/px padding, margin, gap or inset in a component (p-[1.5rem], px-[12px], gap-[0.5rem], padding: \"12px\", \"--card-p\": \"1.5rem\"). Spacing goes on the scale — a step (p-3, gap-2) or `--spacing(n)` / `calc(var(--spacing) * n)` in an arbitrary value — so the density control moves it. Keep fixed units only for what must not scale (a 1px hairline, a ring width), and disable the rule at the site with that reason."
      },
      {
        "id": "native-ui-import",
        "fails-on": "A direct import from konsta. In an iOS prototype, Sable components build every screen; Konsta supplies only system chrome, and that comes through @sableui/react/ios (NativeApp, IosPage, IosNavbar, IosBackLink, IosTabbar, IosTab, IosSheet, IosIconButton, NavigationStack). For a row, input, switch, slider, search, button, list or toast, use the Sable component — `sable target ios --component <Name>` says which."
      },
      {
        "id": "label-contrast",
        "fails-on": "A label on a brand fill (`--primary`, `--sidebar-primary`, `--highlight`, each with its `-foreground`) should clear 4.5:1 AND APCA Lc 60 — a pair can pass the ratio and still read muddy (dark ink on a bright red-orange, Lc 42). The finding names the nearest pair that reads: the ink the colour takes as picked, with the fill's lightness moved to meet it, hue kept. If the pair is your brand's deliberate choice, keep it on the record: `/* design-lint-disable-next-line label-contrast -- <reason> */` above the declaration."
      },
      {
        "id": "status-text-drift",
        "fails-on": "A status colour has two tokens: the fill (`--destructive`, `--success`, `--tone-warning`, `--tone-info`), which `bg-*` paints, and its `-text` (`--destructive-text` …), which `text-*`, `border-*`, `ring-*`, `outline-*`, `fill-*` and `stroke-*` read. Setting the fill alone leaves the text on the theme's colour, so a retuned red button sits beside the theme's red error message. Set the `-text` in the same theme and mode: the fill itself where it already reads on your surfaces, or a step of it moved away from them (lighter in dark mode) so it clears 4.5:1 on a card."
      },
      {
        "id": "lookalike-grid",
        "fails-on": "A raw CSS grid laid over a collection — `grid` with an auto-fill/auto-fit `minmax()` track, or uniform `grid-cols-N` columns over mapped or repeated items. That is Sable's `Grid`: `cols` takes the same counts per breakpoint (`{ base: 2, md: 4 }`), `minItemWidth` is the auto-fit track with a `min(…, 100%)` guard so a cell never overflows a narrow container (a bare `minmax(12rem,1fr)` does), every track is `minmax(0, 1fr)` so one long string cannot blow a column out, and the gap defaults to the theme's `--grid-gutter` or takes rhythm units (`gap={2}` = `gap-4`). Not flagged: a grid with no columns, a form layout (field children, no mapping), a non-uniform track (`grid-cols-[auto_1fr]`), a `ul`/`ol`/`dl` (Grid renders a div), or an element with a widget role."
      },
      {
        "id": "lookalike-card",
        "fails-on": "A link or button dressed as a card — a radius, a surface (`bg-card` / `bg-popover`, or a border) and card padding on an <a>, <button> or router <Link>. That is `<Card render={<Link to=… />}>` (or `<a href>` / `<button>`): rendered as a link or button, Card adds the hover (a stronger edge and shadow), a full-card focus-visible ring and motion-interactive easing; its padding follows the density control (`--card-p`) and its corner follows the theme radius; children answer the hover with `group-hover/card:`. Hand-built, a tile keeps none of that when the theme or density moves. Not flagged: a text link, a nav row (no surface), a pill (`rounded-full`), a button fill (lookalike-control's), or an element inside a `render` prop."
      },
      {
        "id": "lookalike-avatar",
        "fails-on": "A round, fixed-size box holding a person's or artist's picture — `rounded-full` + `size-*` (or equal `h-*`/`w-*`) around an <img>, GradientArt or initials, or a round fixed-size <img> itself. That is `Avatar`: `src`/`alt` with a fallback that shows while the image loads or when it fails, `variant=\"art\"` for initials over GradientArt seeded by the person (a stable colour each, from the theme), a `size` ladder, an accessible name (role=img), a `status` slot that clears the circle, and AvatarGroup for an overlapping stack. Not flagged: a dot or an icon in a circle (no picture or initials), a round box without a fixed size, or AvatarRoot and its parts."
      },
      {
        "id": "lookalike-media-frame",
        "fails-on": "A cover or media frame built by hand — an `aspect-*` ratio + `overflow-hidden` wrapped around an <img>, <video>, <picture> or GradientArt. That is `AspectBox`: `ratio` as a number reserves the box before the media arrives (no layout shift while a cover loads or a shader starts), it clips and positions what it holds (`relative w-full overflow-hidden`), and it is the one frame the media components share, so a change to how frames behave reaches every cover. Put the radius on it as a className. For a cover with its title beneath (an album, an episode, a product), `MediaTile` composes this frame with fallback art for a missing or broken image and an action revealed on hover. Not flagged: a ratio box with no media in it (a pad, a canvas well), a frame without overflow clipping, an <img> sized by its own aspect class, or a round fixed-size frame (lookalike-avatar's)."
      },
      {
        "id": "form-required-error",
        "fails-on": "A `required` Field with an `error` prop, inside a `Form` that validates for you. On submit Form checks every Field first, so an empty required one stops the submit with the browser's message (\"Please fill out this field.\") and your onSubmit, which would set `error`, never runs. Either let your code own validation, `<Form noValidate>` (onSubmit always runs and the Field shows your `error`), or let Form validate and word the message on the Field: `messages={{ valueMissing: \"Enter a subject.\" }}`."
      },
      {
        "id": "shadcn-leftover",
        "fails-on": "Leftover shadcn/ui or Radix code. Sable replaces the stack: `asChild` → `render`, `@radix-ui/*` and `@/components/ui/*` → the Sable component (`sable search \"<name>\"`), `lucide-react` → <Icon name> under IconProvider, `sonner` → ToastProvider + toast, `vaul` → Sheet, `cmdk` → CommandMenu, `input-otp` → OtpField, `next-themes` → SableThemeProvider. `sable docs migrating-from-shadcn` has the full map."
      },
      {
        "id": "agent-initials",
        "fails-on": "An AI agent drawn as an Avatar with initials (`fallback=\"AI\"`, \"Bot\", \"GPT\"). \"AI\" in a circle reads as a person called A. I., and it cannot show the agent working. An agent's turns take `<AgentAvatar state=… />`: the default agent identity, which sinks to think and comes up to talk, so the row needs no spinner of its own. Pass `live={false}` on every agent turn but the newest."
      },
      {
        "id": "tabs-without-panels",
        "fails-on": "A `TabsList` with no `TabsPanel`. Tabs announce a panel for each tab, so a tab row that only switches or filters what is already on the page tells a screen reader about panels that do not exist. For a view switch use `<ToggleGroup appearance=\"segmented\">`."
      }
    ],
    "escapeHatch": {
      "syntax": [
        "// design-lint-disable-next-line <ruleId> -- <reason>",
        "// design-lint-disable-line <ruleId> -- <reason>",
        "// design-lint-disable <ruleId> -- <reason> ... // design-lint-enable <ruleId>"
      ],
      "reasonRequired": true,
      "note": "A disable directive with no reason is itself a lint error — every exception is auditable."
    }
  },
  "iconContract": {
    "note": "Components reference semantic names through <Icon>, rendered by the app's IconProvider set. Reicon is opt-in from @sableui/react/icons/reicon; there is no fallback, so an app that supplies its own set ships no Reicon code. reiconIconSet draws the outline weight, and solid only for the glyphs Sable components fill; for variant=\"solid\" on any icon, compose reiconSolidIconSet from @sableui/react/icons/reicon-solid in front: composeIconSets(reiconSolidIconSet, reiconIconSet).",
    "names": [
      "heart",
      "comment",
      "share",
      "gem",
      "image-stack",
      "home",
      "bell",
      "gear",
      "user",
      "search",
      "plus",
      "minus",
      "check",
      "xmark",
      "chevron-down",
      "chevron-up",
      "chevron-left",
      "chevron-right",
      "arrow-up",
      "arrow-up-right",
      "expand",
      "eye",
      "eye-off",
      "external",
      "spinner",
      "ellipsis",
      "info",
      "warning",
      "circle-check",
      "calendar",
      "copy",
      "file",
      "folder",
      "sun",
      "moon",
      "desktop",
      "lock",
      "list",
      "bars",
      "grid",
      "layout",
      "book",
      "component",
      "sparkles",
      "play",
      "pause",
      "next",
      "previous",
      "arrow-down",
      "arrow-left",
      "arrow-right",
      "clock",
      "send",
      "trash",
      "edit",
      "download",
      "upload",
      "link",
      "inbox",
      "mail",
      "logout",
      "star",
      "refresh",
      "filter",
      "bold",
      "italic",
      "eyedropper",
      "stop",
      "key",
      "wallet",
      "thumbs-up",
      "thumbs-down",
      "shuffle",
      "repeat",
      "repeat-one",
      "volume",
      "volume-low",
      "volume-off",
      "queue",
      "music",
      "tag",
      "paperclip",
      "chart",
      "flag",
      "at-sign",
      "replay",
      "motion",
      "emoji",
      "briefcase",
      "layers",
      "microphone",
      "video",
      "broadcast",
      "newspaper",
      "palette",
      "gamepad",
      "users",
      "archive",
      "kanban",
      "sliders",
      "help",
      "sidebar",
      "chevron-up-down"
    ],
    "aliases": {
      "chevrons-up-down": "chevron-up-down",
      "check-circle": "circle-check",
      "check-circle-2": "circle-check",
      "circle-check-big": "circle-check",
      "settings": "gear",
      "settings-2": "sliders",
      "cog": "gear",
      "x": "xmark",
      "close": "xmark",
      "more-horizontal": "ellipsis",
      "more": "ellipsis",
      "dots-horizontal": "ellipsis",
      "ellipsis-horizontal": "ellipsis",
      "message-square": "comment",
      "message-circle": "comment",
      "message": "comment",
      "messages": "comment",
      "chat": "comment",
      "menu": "bars",
      "hamburger": "bars",
      "help-circle": "help",
      "circle-help": "help",
      "question": "help",
      "circle-question": "help",
      "alert-triangle": "warning",
      "triangle-alert": "warning",
      "info-circle": "info",
      "circle-info": "info",
      "external-link": "external",
      "loader": "spinner",
      "loader-2": "spinner",
      "loader-circle": "spinner",
      "log-out": "logout",
      "sign-out": "logout",
      "monitor": "desktop",
      "laptop": "desktop",
      "layout-grid": "grid",
      "layout-dashboard": "layout",
      "file-text": "file",
      "document": "file",
      "rotate-cw": "refresh",
      "rotate-ccw": "replay",
      "refresh-cw": "refresh",
      "refresh-ccw": "replay",
      "funnel": "filter",
      "user-circle": "user",
      "circle-user": "user",
      "person": "user",
      "people": "users",
      "team": "users",
      "user-group": "users",
      "users-round": "users",
      "box": "archive",
      "archive-box": "archive",
      "columns": "kanban",
      "columns-3": "kanban",
      "board": "kanban",
      "square-kanban": "kanban",
      "sliders-horizontal": "sliders",
      "sliders-vertical": "sliders",
      "adjustments": "sliders",
      "panel-left": "sidebar",
      "sidebar-left": "sidebar",
      "calendar-days": "calendar",
      "house": "home",
      "pencil": "edit",
      "edit-2": "edit",
      "edit-3": "edit",
      "square-pen": "edit",
      "trash-2": "trash",
      "delete": "trash",
      "envelope": "mail",
      "arrow-path": "refresh",
      "eye-slash": "eye-off",
      "lock-closed": "lock",
      "paper-airplane": "send",
      "paper-clip": "paperclip",
      "arrow-down-tray": "download",
      "arrow-up-tray": "upload",
      "magnifying-glass": "search",
      "cog-6-tooth": "gear",
      "bars-3": "bars",
      "chat-bubble-left": "comment",
      "exclamation-triangle": "warning",
      "information-circle": "info",
      "question-mark-circle": "help",
      "adjustments-horizontal": "sliders",
      "squares-2x2": "grid",
      "view-columns": "kanban",
      "arrow-top-right-on-square": "external",
      "computer-desktop": "desktop",
      "x-mark": "xmark",
      "document-text": "file"
    }
  },
  "layoutPrimitives": {
    "doctrine": [
      "A page's width is a Region — a centered, opt-in, purpose-named cap (prose/form/feed/content/wide/full). Pick by ROLE, not size. Never a global page max-width.",
      "The 12-column grid (Grid/Columns) is used WITHIN a region, for genuinely multi-column content. Never use a column span as the page's reading width.",
      "App chrome is not on the grid: Sidebar and rails are fixed-width chrome outside the content grid.",
      "Measure ≠ width: cap text line-length (prose, in ch) independently of a region's layout width.",
      "One direction is flex (Stack, Row); content that must line up across rows AND columns is Grid/Columns; width is a Region. A card's single column stacks with Stack, not a one-track grid.",
      "Vertical space is set in lines: the baseline is one line of body text, split into steps (thirds by default, 8px at 15/24). Line heights round to the step, Stack/Row/Grid gap numbers are steps, and even Tailwind spacing steps (p-4 = two steps) stay on it. A rhythm to keep, not a grid to force: components are as tall as their content."
    ],
    "primitives": [
      {
        "name": "Region",
        "status": "stable",
        "path": "layout",
        "summary": "The page region: fluid, edge-to-edge with the fluid page inset (--page-inset). Opt-in centered max cap picked by ROLE (prose/form/feed/content/wide/full), never a global page max-width. The root of nearly every route. The inset and cap are classes (px-(--page-inset), max-w-…), so className overrides them at a breakpoint (max-sm:px-0); only safeArea padding is inline.",
        "keywords": [
          "region",
          "page width",
          "container",
          "layout"
        ],
        "usage": {
          "description": "Use Region as the page-width primitive that applies fluid page inset and an optional purpose-named max width.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Choose the max value by what the person does on the page: read (prose), fill in a form (form), scroll one stream (feed), review one record or settings (content), scan and compare rows or cards (wide)."
            },
            {
              "guidance": "do",
              "description": "Omit max (fluid) for work across panes, a board, an editor or a map, where a flexible part uses the extra width; cap text inside it with --measure-prose."
            },
            {
              "guidance": "do",
              "description": "Give sibling routes in one nav the same width so the header does not jump between them."
            },
            {
              "guidance": "do",
              "description": "Review a capped or fluid route at 1920px and 2560px: a cap is a ceiling, so below the cap plus app chrome every choice looks the same."
            },
            {
              "guidance": "do",
              "description": "Use Region near the route or section boundary so inner layout stays intentional."
            },
            {
              "guidance": "dont",
              "description": "Do not use Region as a global wrapper that forces every page into the same max width."
            },
            {
              "guidance": "dont",
              "description": "Do not go fluid when the extra width only widens the gaps between fixed columns; cap it."
            },
            {
              "guidance": "dont",
              "description": "Do not read full as edge to edge: it is the largest cap and keeps the page inset. Use bleed for edge to edge."
            }
          ]
        },
        "related": {
          "components": [
            "Page",
            "Grid",
            "Columns"
          ]
        },
        "props": [
          {
            "name": "as",
            "type": "ElementType",
            "default": "\"div\"",
            "description": "Semantic element to render (e.g. \"main\", \"section\", \"nav\")."
          },
          {
            "name": "inset",
            "type": "boolean",
            "default": "true",
            "description": "Apply the fluid horizontal page inset (--page-inset)."
          },
          {
            "name": "max",
            "type": "\"prose\" | \"form\" | \"feed\" | \"content\" | \"wide\" | \"full\" | CSS length",
            "description": "Opt-in centered max-width cap, purpose-named: prose 65ch (long-form reading) · form 480px (auth, narrow single-column forms) · feed 640px (single-column timeline) · content 896px (settings/admin panes) · wide 1280px (dashboards, tables, card grids) · full 1536px (the largest cap; keeps the inset, so not edge to edge — that is bleed). Omit for fluid: work views whose panes, board or canvas use the extra width. A cap is a ceiling: it applies only once the viewport minus app chrome exceeds it, so judge it at 1920px and up."
          },
          {
            "name": "bleed",
            "type": "boolean",
            "default": "false",
            "description": "Full-bleed: edge to edge with no inset. Overrides inset."
          },
          {
            "name": "safeArea",
            "type": "boolean | (\"top\"|\"bottom\"|\"left\"|\"right\")[]",
            "default": "false",
            "description": "env(safe-area-inset-*) padding for fixed or native-shell surfaces. true pads top+bottom; pass an edge array to target edges."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Settings pane",
            "code": "<Region as=\"main\" max=\"content\"><PageHeader title=\"Settings\" /></Region>",
            "imports": "import { PageHeader, Region } from \"@sableui/react\""
          },
          {
            "label": "Dashboard region (capped at wide)",
            "code": "<Region max=\"wide\"><Grid minItemWidth=\"16rem\"><Card><CardHeader><CardTitle>Revenue</CardTitle></CardHeader></Card><Card><CardHeader><CardTitle>Orders</CardTitle></CardHeader></Card></Grid></Region>",
            "imports": "import { Card, CardHeader, CardTitle, Grid, Region } from \"@sableui/react\""
          },
          {
            "label": "Fluid workspace: the queue's table takes the extra width",
            "code": "<Region as=\"main\"><Columns count={{ base: 1, lg: 12 }}><Col span={{ base: 1, lg: 3 }}><SideNav aria-label=\"Views\"><SideNavItem label=\"Open\" active /><SideNavItem label=\"Pending\" /></SideNav></Col><Col span={{ base: 1, lg: 9 }}><Card><CardContent flush><DataTable columns={columns} data={tickets} /></CardContent></Card></Col></Columns></Region>",
            "imports": "import { Card, CardContent, Col, Columns, DataTable, Region, SideNav, SideNavItem } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Page",
        "status": "stable",
        "path": "layout",
        "summary": "A route shell: Region (inset + opt-in max cap) whose children flow as a vertically-rhythmic Stack. Use as the top-level wrapper of a route's content — distinct from AppShell (the frame around routes) and PageHeader (the heading block inside).",
        "keywords": [
          "page",
          "route shell",
          "region",
          "stack"
        ],
        "usage": {
          "description": "Use Page as a route content shell that combines Region sizing with vertical rhythm.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use it as the top-level wrapper for route content after application chrome."
            },
            {
              "guidance": "do",
              "description": "Set max by the page's content role rather than by the current viewport."
            },
            {
              "guidance": "dont",
              "description": "Do not confuse Page with AppShell; Page is content, AppShell is the frame around routes."
            }
          ]
        },
        "related": {
          "components": [
            "Region",
            "Stack",
            "PageHeader",
            "AppShell"
          ]
        },
        "props": [
          {
            "name": "gap",
            "type": "number | string",
            "default": "4",
            "description": "Vertical gap between stacked page sections. Number = rhythm units (one baseline step each — 8px at Sable's default type, two Tailwind spacing steps, so gap={2} is gap-4; 4 is 32px at the default type); string = raw CSS."
          },
          {
            "name": "align",
            "type": "\"start\" | \"center\" | \"end\" | \"stretch\"",
            "default": "\"stretch\"",
            "description": "Cross-axis alignment of the stacked sections."
          },
          {
            "name": "…RegionProps",
            "type": "as, inset, max, bleed, safeArea",
            "description": "All Region props pass through (Page IS a Region)."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Feed route",
            "code": "<Page as=\"main\" max=\"feed\"><PageHeader title=\"Home\" description=\"Latest posts from people you follow.\" /><Card><CardContent><p className=\"text-body-md\">First post.</p></CardContent></Card></Page>",
            "imports": "import { Card, CardContent, Page, PageHeader } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Grid",
        "status": "stable",
        "path": "layout",
        "summary": "CSS Grid within a region. Two modes: fixed/responsive cols count, or minItemWidth so cells breathe with NO breakpoints (the default choice for card grids). A minItemWidth grid keeps its empty columns (track=\"fill\"), so one result stays one cell wide; track=\"fit\" stretches a fixed set across the row. display is the grid class and the gap a CSS variable, so className utilities win at any breakpoint (hidden md:grid, md:gap-6, lg:grid-cols-3).",
        "keywords": [
          "grid",
          "card grid",
          "auto fit",
          "layout"
        ],
        "usage": {
          "description": "Use Grid for uniform grid layouts inside a Region, especially card grids that can breathe responsively.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Prefer minItemWidth for responsive card grids that do not need breakpoint-specific spans."
            },
            {
              "guidance": "do",
              "description": "Keep the default track=\"fill\" for collections whose count is data (search results, shelves, galleries): sparse rows keep their empty columns, so one result stays one cell wide."
            },
            {
              "guidance": "do",
              "description": "Use track=\"fit\" only for a fixed set designed to span the row, such as three KPI cards."
            },
            {
              "guidance": "do",
              "description": "Use explicit columns only when the design truly needs a fixed track count."
            },
            {
              "guidance": "dont",
              "description": "Do not use Grid to set a page's reading width; use Region or Center."
            },
            {
              "guidance": "dont",
              "description": "Do not use track=\"fit\" for results or other data-driven collections: with one or two items the empty columns collapse and each item stretches across the row (a single result rendered as a full-width cover)."
            }
          ]
        },
        "related": {
          "components": [
            "Region",
            "Columns",
            "Card"
          ]
        },
        "props": [
          {
            "name": "cols",
            "type": "number | { base?, sm?, md?, lg?, xl?, \"2xl\"? }",
            "default": "12",
            "description": "Fixed column count or a mobile-first breakpoint map ({ base: 2, md: 4 }). Ignored when minItemWidth is set."
          },
          {
            "name": "minItemWidth",
            "type": "string",
            "description": "Breathing mode: repeat(auto-fill, minmax(minItemWidth, 1fr)) — as many columns of at least minItemWidth as fit, wrapping without breakpoints. e.g. \"16rem\"."
          },
          {
            "name": "track",
            "type": "\"fill\" | \"fit\"",
            "default": "\"fill\"",
            "description": "What a minItemWidth grid does with columns it has no items for (only visible when fewer items than fit one row). \"fill\" (auto-fill) keeps them, so items keep their size whatever their count — one search result is one cover wide, not a banner. Use it for collections whose count is data: results, shelves, galleries. \"fit\" (auto-fit) collapses them and stretches the items to share the row — only for a fixed set designed to span it (three KPI cards, plan tiers)."
          },
          {
            "name": "gap",
            "type": "number | [row, column] | string",
            "default": "var(--grid-gutter)",
            "description": "Gap between cells. Number = rhythm units (one baseline step each — 8px at Sable's default type, two Tailwind spacing steps, so gap={2} is gap-4); [row, column] = two rhythm counts, for a gallery whose rows want more air than its columns; string = raw CSS."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Card grid that breathes (no breakpoints)",
            "code": "<Grid minItemWidth=\"16rem\" gap={3}><Card><CardHeader><CardTitle>Alpha</CardTitle></CardHeader></Card><Card><CardHeader><CardTitle>Beta</CardTitle></CardHeader></Card><Card><CardHeader><CardTitle>Gamma</CardTitle></CardHeader></Card></Grid>",
            "imports": "import { Card, CardHeader, CardTitle, Grid } from \"@sableui/react\""
          },
          {
            "label": "Sparse results keep their size",
            "code": "// One match still renders one cover wide: the empty columns are kept (track=\"fill\", the default).\n<Grid minItemWidth=\"10rem\" gap={2}><Card><CardHeader><CardTitle>Night Swim</CardTitle><CardDescription>Album · Undertow</CardDescription></CardHeader></Card></Grid>",
            "imports": "import { Card, CardDescription, CardHeader, CardTitle, Grid } from \"@sableui/react\""
          },
          {
            "label": "A fixed set that spans the row",
            "code": "<Grid minItemWidth=\"12rem\" track=\"fit\" gap={2}><Card><CardHeader><CardDescription>Listeners</CardDescription><span className=\"text-mono-xl\">48.2k</span></CardHeader></Card><Card><CardHeader><CardDescription>Streams</CardDescription><span className=\"text-mono-xl\">1.3M</span></CardHeader></Card><Card><CardHeader><CardDescription>Saves</CardDescription><span className=\"text-mono-xl\">9,410</span></CardHeader></Card></Grid>",
            "imports": "import { Card, CardDescription, CardHeader, Grid } from \"@sableui/react\""
          },
          {
            "label": "Responsive fixed columns",
            "code": "<Grid cols={{ base: 1, md: 2, lg: 4 }}><Badge appearance=\"plain\" tone=\"3\" dot /><Badge appearance=\"plain\" tone=\"warning\" dot /><Badge appearance=\"plain\" tone=\"neutral\" dot /><Badge appearance=\"plain\" tone=\"destructive\" dot /></Grid>",
            "imports": "import { Badge, Grid } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Columns",
        "status": "stable",
        "path": "layout",
        "summary": "An explicit N-column track (default 12) for proportioned layouts — pair with Col spans (list-detail, asymmetric editorial layouts). For uniform card grids prefer Grid minItemWidth. display is the grid class, so hidden md:grid works; a gap-* utility replaces both gaps and the column-gap cap.",
        "keywords": [
          "columns",
          "12 column",
          "span",
          "layout"
        ],
        "usage": {
          "description": "Use Columns and Col for proportioned layouts that need explicit spans, such as list-detail or asymmetric panes.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use breakpoint span maps when the same layout needs to collapse cleanly on smaller screens."
            },
            {
              "guidance": "do",
              "description": "Use Columns for proportional composition, not for uniform card wrapping."
            },
            {
              "guidance": "dont",
              "description": "Do not use column spans as a replacement for Region width or text measure."
            }
          ],
          "anatomy": [
            {
              "name": "Columns",
              "required": true,
              "description": "The explicit column track container."
            },
            {
              "name": "Col",
              "required": true,
              "description": "A child cell with span and optional start placement."
            }
          ]
        },
        "related": {
          "components": [
            "Grid",
            "SplitPane",
            "Region"
          ]
        },
        "props": [
          {
            "name": "count",
            "type": "number | breakpoint map",
            "default": "12",
            "description": "Columns in the track; a breakpoint map ({ base: 2, md: 6, lg: 12 }) thins the track on small screens."
          },
          {
            "name": "gap",
            "type": "number | string",
            "default": "var(--grid-gutter)",
            "description": "Gap between columns and rows. Number = rhythm units (one baseline step each — 8px at Sable's default type, two Tailwind spacing steps, so gap={2} is gap-4); string = raw CSS. The column gap is capped so all gaps together never take more than 75% of the track's width — a large gap can't push a narrow screen into horizontal scroll, and at normal desktop widths it renders exactly as given. The row gap is never capped."
          }
        ],
        "subcomponents": [
          {
            "name": "Col",
            "type": "span?: number | breakpoint map · start?: number | breakpoint map",
            "description": "A cell in the track: columns to span (default 1) and optional 1-based start column. Both accept breakpoint maps ({ base: 12, lg: 8 })."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "List-detail (8/4)",
            "code": "<Columns count={12}><Col span={{ base: 12, lg: 8 }}><Card><CardHeader><CardTitle>Posts</CardTitle></CardHeader></Card></Col><Col span={{ base: 12, lg: 4 }}><Card variant=\"flat\"><CardHeader><CardTitle>Filters</CardTitle></CardHeader></Card></Col></Columns>",
            "imports": "import { Card, CardHeader, CardTitle, Col, Columns } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Stack",
        "status": "stable",
        "path": "layout",
        "summary": "Vertical flow on the baseline rhythm — the default container for stacked content. Gap by role: tight within a group (1.5–2), looser between groups (3–4), generous between sections (6+). Layout lives in classes (flex flex-col items-* justify-*) and the gap in a CSS variable, never inline style, so className utilities override any prop at a breakpoint (max-lg:hidden, md:flex-row, md:gap-8).",
        "keywords": [
          "stack",
          "vertical rhythm",
          "layout",
          "spacing"
        ],
        "usage": {
          "description": "Use Stack for vertical flow where child spacing should follow the Sable rhythm scale.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use smaller gaps within a group and larger gaps between sections."
            },
            {
              "guidance": "do",
              "description": "Use Stack instead of ad hoc margins when siblings form a vertical composition."
            },
            {
              "guidance": "dont",
              "description": "Do not use Stack to create page width or grid structure; pair it with Region, Grid, or Columns."
            }
          ]
        },
        "related": {
          "components": [
            "Row",
            "Page",
            "Fieldset"
          ]
        },
        "props": [
          {
            "name": "gap",
            "type": "number | string",
            "default": "2",
            "description": "Vertical gap. Number = rhythm units (one baseline step each — 8px at Sable's default type, two Tailwind spacing steps, so gap={2} is gap-4; fractions ok); string = raw CSS."
          },
          {
            "name": "align",
            "type": "\"start\" | \"center\" | \"end\" | \"stretch\"",
            "default": "\"stretch\"",
            "description": "Cross-axis alignment."
          },
          {
            "name": "justify",
            "type": "\"start\" | \"center\" | \"end\" | \"between\"",
            "default": "\"start\"",
            "description": "Main-axis distribution."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Form field group",
            "code": "<Stack gap={2}><Field label=\"Display name\"><Input name=\"name\" /></Field><Field label=\"Bio\"><Textarea name=\"bio\" /></Field></Stack>",
            "imports": "import { Field, Input, Stack, Textarea } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Row",
        "status": "stable",
        "path": "layout",
        "summary": "Horizontal flex flow — inline rows of controls, toolbars, action clusters. Defaults to center-aligned, no wrap. Layout lives in classes (flex flex-row items-* justify-*) and the gap in a CSS variable, never inline style, so className utilities override any prop at a breakpoint (hidden md:flex, max-md:flex-col, md:gap-6).",
        "keywords": [
          "row",
          "toolbar",
          "horizontal",
          "layout"
        ],
        "usage": {
          "description": "Use Row for horizontal clusters such as action groups, toolbars, metadata, and inline controls.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use wrap when controls may not fit on smaller screens."
            },
            {
              "guidance": "do",
              "description": "Use justify and align intentionally so clusters scan as one unit."
            },
            {
              "guidance": "dont",
              "description": "Do not use Row for navigation menus or dense tabular structure."
            }
          ]
        },
        "related": {
          "components": [
            "Stack",
            "Button",
            "Spacer"
          ]
        },
        "props": [
          {
            "name": "gap",
            "type": "number | string",
            "default": "2",
            "description": "Horizontal gap. Number = rhythm units (one baseline step each — 8px at Sable's default type, two Tailwind spacing steps, so gap={2} is gap-4); string = raw CSS."
          },
          {
            "name": "align",
            "type": "\"start\" | \"center\" | \"end\" | \"stretch\"",
            "default": "\"center\"",
            "description": "Cross-axis alignment."
          },
          {
            "name": "justify",
            "type": "\"start\" | \"center\" | \"end\" | \"between\"",
            "default": "\"start\"",
            "description": "Main-axis distribution."
          },
          {
            "name": "wrap",
            "type": "boolean",
            "default": "false",
            "description": "Allow items to wrap."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Action cluster",
            "code": "<Row gap={2} justify=\"end\"><Button variant=\"ghost\">Cancel</Button><Button>Save changes</Button></Row>",
            "imports": "import { Button, Row } from \"@sableui/react\""
          },
          {
            "label": "Responsive through className",
            "code": "<Row justify=\"between\"><span className=\"text-title-sm\">Acme</span><Row gap={1} className=\"max-md:hidden\"><Button variant=\"ghost\" size=\"sm\">Docs</Button><Button variant=\"ghost\" size=\"sm\">Pricing</Button></Row></Row>",
            "imports": "import { Button, Row } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Spacer",
        "status": "stable",
        "path": "layout",
        "summary": "Explicit space on the rhythm, or a flexible grow pusher between siblings (e.g. pushing a footer item to the end of a Row). The size is a class reading a CSS variable, so className resizes or hides it at a breakpoint.",
        "keywords": [
          "spacer",
          "spacing",
          "grow",
          "layout"
        ],
        "usage": {
          "description": "Use Spacer for explicit rhythm space or a flex grow pusher between siblings.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use grow inside Row when one side of a cluster should push to the far edge."
            },
            {
              "guidance": "do",
              "description": "Use fixed size only when the space has semantic rhythm value."
            },
            {
              "guidance": "dont",
              "description": "Do not use Spacer to patch broad layout problems that should be solved by Stack, Row, Grid, or Region."
            }
          ]
        },
        "related": {
          "components": [
            "Row",
            "Stack"
          ]
        },
        "props": [
          {
            "name": "size",
            "type": "number",
            "default": "1",
            "description": "Fixed size in rhythm units (one baseline step each — 8px at Sable's default type, two Tailwind spacing steps, so gap={2} is gap-4; fractions ok). Ignored when grow."
          },
          {
            "name": "axis",
            "type": "\"vertical\" | \"horizontal\"",
            "default": "\"vertical\"",
            "description": "Axis the fixed size applies to."
          },
          {
            "name": "grow",
            "type": "boolean",
            "description": "Flex-grow to push siblings apart (fills available space)."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Push actions to the end",
            "code": "<Row><span className=\"text-title-sm\">Members</span><Spacer grow /><Button size=\"sm\">Invite</Button></Row>",
            "imports": "import { Button, Row, Spacer } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Center",
        "status": "stable",
        "path": "layout",
        "summary": "Horizontally center a block, optionally capping its width (commonly \"prose\" for a reading column inside a wider layout). Centering and cap are classes, so className overrides them at a breakpoint.",
        "keywords": [
          "center",
          "measure",
          "reading width",
          "layout"
        ],
        "usage": {
          "description": "Use Center to center a block and optionally cap its width inside a wider layout.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use it for reading columns, forms, or compact content inside a broad Region."
            },
            {
              "guidance": "do",
              "description": "Choose a named max when the content role matches Sable's measure tokens."
            },
            {
              "guidance": "dont",
              "description": "Do not use Center for full page inset or app chrome; use Region or AppShell."
            }
          ]
        },
        "related": {
          "components": [
            "Region",
            "Page",
            "Stack"
          ]
        },
        "props": [
          {
            "name": "max",
            "type": "\"prose\" | \"form\" | \"feed\" | \"content\" | \"wide\" | CSS length",
            "description": "Cap width: a named region token or any raw CSS length."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Reading column in a wide page",
            "code": "<Center max=\"prose\"><p className=\"text-body-lg\">Long-form description text that should hold a comfortable reading measure even inside a wide dashboard region.</p></Center>",
            "imports": "import { Center } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "AspectBox",
        "status": "stable",
        "path": "layout",
        "summary": "Reserves space via aspect-ratio so async media loads with zero layout shift. Wrap images, video, embeds. The ratio is a class reading a CSS variable, so className reshapes it at a breakpoint (md:aspect-video).",
        "keywords": [
          "aspect box",
          "aspect ratio",
          "media",
          "layout shift"
        ],
        "usage": {
          "description": "Use AspectBox to reserve stable aspect-ratio space for async media, embeds, and responsive previews.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use it around images, video, and embeds that should not shift layout while loading."
            },
            {
              "guidance": "do",
              "description": "Match the ratio to the expected media or design slot."
            },
            {
              "guidance": "dont",
              "description": "Do not use AspectBox for content whose height should grow with text or controls."
            }
          ]
        },
        "related": {
          "components": [
            "Video",
            "Dialog",
            "Browser"
          ]
        },
        "props": [
          {
            "name": "ratio",
            "type": "number",
            "default": "16/9",
            "description": "Width / height ratio (e.g. 1 for square, 4/5 for portrait)."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Cover image slot",
            "code": "<AspectBox ratio={16 / 9}><img src={post.coverUrl} alt={post.title} className=\"size-full object-cover\" /></AspectBox>",
            "imports": "import { AspectBox } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "Bleed",
        "status": "stable",
        "path": "layout",
        "summary": "Escape a width-capped or inset ancestor to span the full CONTENT area (container-query units, so it stops at a fixed Sidebar instead of bleeding under it). Hero bands, profile covers, full-bleed media inside a capped Page. Width and margins are classes, so a breakpoint can turn the bleed off (lg:mx-0 lg:w-auto).",
        "keywords": [
          "bleed",
          "full bleed",
          "media band",
          "layout"
        ],
        "usage": {
          "description": "Use Bleed to let a band or media element escape an inset or width-capped ancestor while staying within the content area.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use it for hero bands, profile covers, or media that should align beyond a capped page column."
            },
            {
              "guidance": "do",
              "description": "Keep surrounding content inside Region or Page so the bleed remains intentional."
            },
            {
              "guidance": "dont",
              "description": "Do not use Bleed to place content under fixed app chrome or sidebars."
            }
          ]
        },
        "related": {
          "components": [
            "Page",
            "Region",
            "AspectBox"
          ]
        },
        "props": [],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Full-bleed hero inside a capped page",
            "code": "<Page max=\"feed\"><Bleed><AspectBox ratio={3}><img src=\"/cover.jpg\" alt=\"\" className=\"size-full object-cover\" /></AspectBox></Bleed><PageHeader title=\"Profile\" /></Page>",
            "imports": "import { AspectBox, Bleed, Page, PageHeader } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "SplitPane",
        "status": "stable",
        "path": "layout",
        "summary": "Responsive two-pane layout: side-by-side at/above a breakpoint, stacked (primary first) below. List-detail, media + metadata. display is the grid class and the breakpoint rules are layered, so className utilities (hidden lg:grid, gap-8) win.",
        "keywords": [
          "split pane",
          "two pane",
          "list detail",
          "responsive"
        ],
        "usage": {
          "description": "Use SplitPane for responsive two-pane layouts where a primary pane and supporting pane stay conceptually linked.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use it for media-detail, list-detail, or editor-preview workflows."
            },
            {
              "guidance": "do",
              "description": "Pick a ratio that reflects the actual priority of the panes."
            },
            {
              "guidance": "dont",
              "description": "Do not use SplitPane for unrelated columns or uniform grids."
            }
          ]
        },
        "related": {
          "components": [
            "Columns",
            "Grid",
            "Sheet"
          ]
        },
        "props": [
          {
            "name": "primary",
            "type": "ReactNode",
            "description": "The leading / larger pane (e.g. the media column)."
          },
          {
            "name": "secondary",
            "type": "ReactNode",
            "description": "The trailing / supporting pane (e.g. the detail column)."
          },
          {
            "name": "collapseBelow",
            "type": "\"sm\" | \"md\" | \"lg\" | \"xl\"",
            "default": "\"lg\"",
            "description": "Breakpoint at/above which panes sit side by side."
          },
          {
            "name": "ratio",
            "type": "string",
            "default": "\"1/1\"",
            "description": "Primary:secondary width ratio as \"a/b\" fr units (e.g. \"2/1\")."
          },
          {
            "name": "gap",
            "type": "number | string",
            "default": "var(--grid-gutter)",
            "description": "Gap between panes."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Media + detail",
            "code": "<SplitPane ratio=\"2/1\" primary={<AspectBox ratio={1}><img src={post.imageUrl} alt={post.title} className=\"size-full object-cover\" /></AspectBox>} secondary={<Stack gap={2}><h1 className=\"text-heading-1\">{post.title}</h1><p className=\"text-body-md text-muted-foreground\">{post.description}</p><Button>Add to cart</Button></Stack>} />",
            "imports": "import { AspectBox, Button, SplitPane, Stack } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "SafeArea",
        "status": "stable",
        "path": "layout",
        "summary": "Pads for device safe-areas (notch, home indicator) on fixed or native-shell surfaces. Wrap fixed bars; content in normal flow rarely needs it.",
        "keywords": [
          "safe area",
          "notch",
          "home indicator",
          "fixed chrome"
        ],
        "usage": {
          "description": "Use SafeArea to pad fixed or native-shell surfaces away from device notches and home indicators.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use it around fixed headers, bottom bars, and native-shell surfaces."
            },
            {
              "guidance": "do",
              "description": "Target only the edges that need device inset padding when possible."
            },
            {
              "guidance": "dont",
              "description": "Do not wrap normal document-flow content in SafeArea unless it actually touches unsafe edges."
            }
          ]
        },
        "related": {
          "components": [
            "BottomNav",
            "AppHeader",
            "AppShell"
          ]
        },
        "props": [
          {
            "name": "edges",
            "type": "(\"top\" | \"bottom\" | \"left\" | \"right\")[]",
            "default": "all four",
            "description": "Which edges get env(safe-area-inset-*) padding."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Fixed bottom bar",
            "code": "<SafeArea edges={[\"bottom\"]} className=\"fixed inset-x-0 bottom-0 bg-card border-t border-border\"><Row gap={2} justify=\"between\" className=\"p-3\"><span className=\"text-label-md\">1 item selected</span><Button size=\"sm\">Continue</Button></Row></SafeArea>",
            "imports": "import { Button, Row, SafeArea } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "GridOverlay",
        "status": "stable",
        "path": "layout",
        "summary": "Dev/docs structure visualizer — overlays the column grid so the layout skeleton is legible. Place inside a position:relative container; never ships in product UI.",
        "keywords": [
          "grid overlay",
          "debug",
          "layout visualizer",
          "docs"
        ],
        "usage": {
          "description": "Use GridOverlay only as a development or documentation visualizer for the column structure.",
          "bestPractices": [
            {
              "guidance": "do",
              "description": "Use it inside a position-relative layout while debugging alignment."
            },
            {
              "guidance": "do",
              "description": "Keep it gated behind docs, debug, or development-only state."
            },
            {
              "guidance": "dont",
              "description": "Do not ship GridOverlay as visible product UI."
            }
          ]
        },
        "related": {
          "components": [
            "Grid",
            "Columns",
            "Region"
          ]
        },
        "props": [
          {
            "name": "columns",
            "type": "number",
            "default": "12",
            "description": "Number of column bands."
          },
          {
            "name": "gap",
            "type": "string",
            "default": "var(--grid-gutter)",
            "description": "Gap between bands."
          },
          {
            "name": "inset",
            "type": "boolean",
            "default": "true",
            "description": "Align bands to the fluid page inset."
          },
          {
            "name": "show",
            "type": "boolean",
            "default": "true",
            "description": "Toggle visibility."
          }
        ],
        "tokensUsed": [],
        "examples": [
          {
            "label": "Debugging a layout",
            "code": "<div className=\"relative\"><GridOverlay show={debug} /><Columns count={12}><Col span={8}><Card><CardContent><p className=\"text-body-md\">Main</p></CardContent></Card></Col><Col span={4}><Card><CardContent><p className=\"text-body-md\">Rail</p></CardContent></Card></Col></Columns></div>",
            "imports": "import { Card, CardContent, Col, Columns, GridOverlay } from \"@sableui/react\""
          }
        ]
      }
    ]
  },
  "components": [
    {
      "name": "Accordion",
      "status": "stable",
      "group": "Containers",
      "register": "either",
      "path": "components/accordion",
      "summary": "Stacked, collapsible disclosure sections over Base UI Accordion — roving focus, arrow-key navigation, ARIA region/heading/button wiring, and an animated height transition. Each item pairs a full-width trigger (with a rotating chevron) and a panel.",
      "keywords": [
        "accordion",
        "disclosure",
        "collapse",
        "faq"
      ],
      "usage": {
        "description": "Use Accordion to reveal a vertical set of related sections while keeping the surrounding page scannable.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use concise trigger text that describes the content revealed below it."
          },
          {
            "guidance": "do",
            "description": "Keep section content focused so expanding one item does not feel like navigating to a new page."
          },
          {
            "guidance": "dont",
            "description": "Do not hide required fields, primary actions, or critical errors inside collapsed sections."
          },
          {
            "guidance": "dont",
            "description": "Do not nest an Accordion inside an Accordion. Two layers of roving focus fight each other, and the arrow keys become ambiguous — flatten the hierarchy or use a Tree.",
            "instead": [
              "Tree"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "AccordionItem",
            "required": true,
            "description": "One expandable section in the group."
          },
          {
            "name": "AccordionTrigger",
            "required": true,
            "description": "The button-like control that opens the section."
          },
          {
            "name": "AccordionPanel",
            "required": true,
            "description": "The content revealed by the trigger."
          }
        ]
      },
      "related": {
        "components": [
          "Collapsible",
          "Tabs"
        ]
      },
      "props": [
        {
          "name": "Accordion (Root)",
          "type": "Base UI Accordion.Root props (value, defaultValue, multiple, disabled, onValueChange, orientation, loopFocus, keepMounted, hiddenUntilFound)",
          "default": "—",
          "description": "Groups all items and owns the open value(s). Uncontrolled via defaultValue, controlled via value."
        },
        {
          "name": "defaultValue",
          "type": "Value[]",
          "default": "[]",
          "description": "Uncontrolled set of item values that start expanded (e.g. ['faq-1'])."
        },
        {
          "name": "value",
          "type": "Value[]",
          "default": "—",
          "description": "Controlled set of expanded item values; pair with onValueChange."
        },
        {
          "name": "onValueChange",
          "type": "(value: Value[]) => void",
          "description": "Called with the new set of expanded item values when an item opens or closes."
        },
        {
          "name": "multiple",
          "type": "boolean",
          "default": "false",
          "description": "Whether more than one item can be open at the same time. When false, opening one closes the others."
        }
      ],
      "subcomponents": [
        {
          "name": "AccordionItem",
          "type": "Base UI Accordion.Item props + className (value, disabled, onOpenChange)",
          "description": "Pairs a header with its panel. Give each a stable `value` to control or set initial open state."
        },
        {
          "name": "AccordionTrigger",
          "type": "Base UI Accordion.Trigger props + className + indicator?: ReactNode + headingLevel?: 2 | 3 | 4 | 5 | 6 (default 3)",
          "description": "The header button (Header + Trigger composed). Renders children plus a chevron that rotates via data-[panel-open] by default; pass `indicator` to replace the icon and its open-state behavior entirely (e.g. a plus that becomes an × for a FAQ-style toggle). `headingLevel` sets the heading that wraps the button so the accordion fits the page outline: h2 for an FAQ directly under the page title, h4 under an h3 section. Defaults to h3."
        },
        {
          "name": "AccordionPanel",
          "type": "Base UI Accordion.Panel props + className (keepMounted, hiddenUntilFound)",
          "description": "The collapsible body. Animates height using the --accordion-panel-height CSS var; fades on data-[starting-style]/data-[ending-style]."
        }
      ],
      "tokensUsed": [
        "border",
        "foreground",
        "muted-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "An accordion is page furniture that is present from first paint. Animating it in would stage content the reader is already scanning past."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "AccordionTrigger",
          "why": "The whole header row is the hit target, and it looks like a heading rather than a control. The hover shift is what tells the reader it can be clicked before they click it."
        },
        {
          "slot": "transition",
          "recipe": "motion-disclosure",
          "part": "AccordionPanel",
          "why": "Panel height is the only cue that content came from THIS header rather than appearing at the bottom of the page. Snapping it open moves everything below by a screenful with nothing connecting cause to effect."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Chevron",
          "why": "The chevron turning is the header's half of the same event as the panel opening. motion-interactive lists `rotate` (what Tailwind's rotate-* writes), so it turns with the panel instead of flipping 180° in one frame beside an easing panel. A custom `indicator` that rotates should carry motion-interactive itself."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Nothing here is indeterminate — the panel content is already resident. A panel that loads on expand should put its own loader inside the panel."
        }
      ],
      "a11y": [
        "Base UI renders the trigger inside an <h3> heading and wires aria-expanded / aria-controls to the panel region.",
        "Arrow keys move roving focus between triggers; Home/End jump to the first/last; loopFocus wraps by default.",
        "Each trigger toggles its panel with Enter/Space; the panel is announced as a labelled region.",
        "A disabled AccordionItem dims and is skipped by keyboard focus while neighbouring items stay interactive.",
        "The chevron rotation is driven by data-[panel-open] and the focus ring by focus-visible; both ride motion-interactive, so reduced motion stills them with everything else."
      ],
      "examples": [
        {
          "label": "Single (default)",
          "code": "<Accordion defaultValue={[\"a\"]}><AccordionItem value=\"a\"><AccordionTrigger>Can I cancel anytime?</AccordionTrigger><AccordionPanel>Yes — from billing settings.</AccordionPanel></AccordionItem><AccordionItem value=\"b\"><AccordionTrigger>How much?</AccordionTrigger><AccordionPanel>$16 per seat each month.</AccordionPanel></AccordionItem></Accordion>",
          "imports": "import { Accordion, AccordionItem, AccordionPanel, AccordionTrigger } from \"@sableui/react\""
        },
        {
          "label": "Multiple open",
          "code": "<Accordion multiple defaultValue={[\"a\", \"b\"]}><AccordionItem value=\"a\"><AccordionTrigger>First</AccordionTrigger><AccordionPanel>One.</AccordionPanel></AccordionItem><AccordionItem value=\"b\"><AccordionTrigger>Second</AccordionTrigger><AccordionPanel>Two.</AccordionPanel></AccordionItem></Accordion>",
          "imports": "import { Accordion, AccordionItem, AccordionPanel, AccordionTrigger } from \"@sableui/react\""
        },
        {
          "label": "Heading level",
          "code": "<Accordion><AccordionItem value=\"a\"><AccordionTrigger headingLevel={2}>Can I cancel anytime?</AccordionTrigger><AccordionPanel>Yes — from billing settings.</AccordionPanel></AccordionItem></Accordion>",
          "imports": "import { Accordion, AccordionItem, AccordionPanel, AccordionTrigger } from \"@sableui/react\""
        },
        {
          "label": "Custom indicator (plus-becomes-×)",
          "code": "<Accordion defaultValue={[\"a\"]}><AccordionItem value=\"a\"><AccordionTrigger indicator={<Icon name=\"plus\" className=\"text-xs text-muted-foreground motion-interactive [[data-panel-open]_&]:rotate-45\" />}>Can I cancel anytime?</AccordionTrigger><AccordionPanel>Yes — from billing settings.</AccordionPanel></AccordionItem></Accordion>",
          "imports": "import { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, Icon } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ActivityHeatmap",
      "status": "stable",
      "group": "Charts",
      "register": "either",
      "path": "components/activity-heatmap",
      "summary": "A calendar heatmap: one value per day as a grid of weeks by weekdays — the GitHub contribution graph, for any daily measure. Levels by quartile, categories by source, a real ARIA grid with one tab stop, and a sideways scroll on narrow screens that opens on the latest week.",
      "keywords": [
        "heatmap",
        "calendar heatmap",
        "contribution graph",
        "contributions",
        "activity",
        "github",
        "streak",
        "habit",
        "daily",
        "commits",
        "uptime"
      ],
      "usage": {
        "description": "Use ActivityHeatmap to show how often something happened day by day over weeks or months: commits, habits kept, orders, uptime. Pass days as ISO dates with a value; levels, colours, labels, keyboard and tooltips work with no further props. Put it inside a Card and compose any totals beside it (NumberTicker, StatRowBlock). For a value over time that a reader needs to compare precisely, use AreaChart or BarChart; for a month calendar with marked days (a streak calendar), use Calendar.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pass dates as \"YYYY-MM-DD\" strings. The grid reads them as calendar days, so no time zone can shift a day — never build them with `new Date(...).toISOString()` from a local date."
          },
          {
            "guidance": "do",
            "description": "Give it a `unit` (\"contribution\" / \"contributions\") so the tooltip and every cell's name say what the number counts."
          },
          {
            "guidance": "do",
            "description": "Let the default quantile scale pick levels — one exceptional day then does not wash every other day out. Pass a day's own `level` when the source already has one (GitHub's API)."
          },
          {
            "guidance": "dont",
            "description": "Use it for a handful of values or for values a reader must compare exactly; a heatmap shows rhythm, not amounts. Use BarChart.",
            "instead": [
              "BarChart",
              "AreaChart"
            ]
          },
          {
            "guidance": "dont",
            "description": "Use it for a single month of marked days with a streak; that is Calendar with modifiers.",
            "instead": [
              "Calendar"
            ]
          },
          {
            "guidance": "dont",
            "description": "Fetch inside the component or call GitHub from the browser with a token. Fetch on your server and pass days in; `@sableui/react/adapters/github` converts GitHub's response."
          }
        ],
        "anatomy": [
          {
            "name": "Weekday labels",
            "required": false,
            "description": "Short weekday names beside the rows, outside the scroller so the weeks never slide under them."
          },
          {
            "name": "Month labels",
            "required": false,
            "description": "Short month names over each month's first week; they scroll with their weeks."
          },
          {
            "name": "Cell grid",
            "required": true,
            "description": "A role=grid table, one gridcell per day, inside a horizontal Scroller that opens on the latest week."
          },
          {
            "name": "Tooltip",
            "required": false,
            "description": "The chart tooltip card, anchored to the hovered, focused or tapped day."
          },
          {
            "name": "Legend",
            "required": false,
            "description": "A Less–More ramp for intensity, or swatches for categories."
          }
        ]
      },
      "related": {
        "components": [
          "Card",
          "NumberTicker",
          "BarChart",
          "Calendar",
          "Scroller"
        ]
      },
      "props": [
        {
          "name": "label",
          "type": "string",
          "description": "What the grid shows (\"Contributions in 2026\") — its caption and accessible name."
        },
        {
          "name": "data",
          "type": "ActivityDay[] | Record<string, number>",
          "description": "The days: `{ date: \"YYYY-MM-DD\", value, level?, category? }[]`, or a map of date to value. Sparse is fine — a missing day is 0; duplicates sum."
        },
        {
          "name": "start",
          "type": "string",
          "default": "53 weeks before end",
          "description": "First day drawn, \"YYYY-MM-DD\". The default starts at the beginning of that week, as GitHub's does."
        },
        {
          "name": "end",
          "type": "string",
          "default": "today",
          "description": "Last day drawn. Days after today inside the range are drawn hollow and skipped by the keyboard."
        },
        {
          "name": "year",
          "type": "number",
          "description": "Draw Jan 1 – Dec 31 of this year. Wins over start / end."
        },
        {
          "name": "weekStart",
          "type": "0 | 1",
          "default": "the locale's",
          "description": "0 puts Sunday on the top row, 1 Monday."
        },
        {
          "name": "levels",
          "type": "number",
          "default": "5",
          "description": "How many levels, including the empty level 0."
        },
        {
          "name": "levelScale",
          "type": "\"quantile\" | \"linear\" | number[] | ((value, stats) => number)",
          "default": "\"quantile\"",
          "description": "How a value becomes a level. Quantile splits the positive values evenly, as GitHub does; an array gives each level's lower bound from 1 up; a function decides. A day's own `level` always wins."
        },
        {
          "name": "tone",
          "type": "ChartTone",
          "default": "\"1\"",
          "description": "The hue of the intensity ramp. Decorative tones lead, as on every chart; \"success\" gives the GitHub look."
        },
        {
          "name": "categories",
          "type": "ChartCategories",
          "description": "Colour days by `day.category` (label, tone or colour per key). Pair with `levels={2}` for flat category colours."
        },
        {
          "name": "unit",
          "type": "string | { one: string; other: string }",
          "description": "Names the value in the tooltip and each cell's accessible name, pluralised with Intl.PluralRules."
        },
        {
          "name": "formatValue",
          "type": "(value: number) => string",
          "default": "full to 9,999, compact past",
          "description": "Formats a value wherever it is shown or read."
        },
        {
          "name": "tooltip",
          "type": "boolean | ((day: ActivityHeatmapDay) => ReactNode)",
          "default": "true",
          "description": "Show the tooltip on hover, focus and tap; a function replaces its content on the same card."
        },
        {
          "name": "legend",
          "type": "boolean",
          "default": "true",
          "description": "The Less–More ramp for intensity, swatches for categories."
        },
        {
          "name": "legendLabels",
          "type": "[string, string]",
          "default": "[\"Less\", \"More\"]",
          "description": "The ramp's end words."
        },
        {
          "name": "monthLabels",
          "type": "boolean",
          "default": "true",
          "description": "Short month names over each month's first week."
        },
        {
          "name": "weekdayLabels",
          "type": "\"alternate\" | \"all\" | \"none\"",
          "default": "\"alternate\"",
          "description": "Which weekday names to show beside the rows; alternate is Mon, Wed, Fri."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "The smallest a cell may get (10, 12, 14 px) before the grid scrolls instead of shrinking."
        },
        {
          "name": "stretch",
          "type": "boolean",
          "default": "true",
          "description": "Grow cells to fill the width, up to 20 px. false keeps them at `size`."
        },
        {
          "name": "activeDate",
          "type": "string | null",
          "description": "The hovered or focused day, controlled. Pair with defaultActiveDate / onActiveDateChange."
        },
        {
          "name": "selectedDate",
          "type": "string | null",
          "description": "The selected day, controlled. Selection is on only when onSelectDate is set."
        },
        {
          "name": "onSelectDate",
          "type": "(date: string) => void",
          "description": "Called when a day is clicked or chosen with Enter / Space — to filter a feed below, as GitHub does."
        },
        {
          "name": "renderCell",
          "type": "(day, cell) => ReactNode",
          "description": "Draw something over a cell's fill — an icon for a milestone, a reward, an outage."
        },
        {
          "name": "loading",
          "type": "boolean",
          "default": "false",
          "description": "Draw the empty grid, shimmering, while data loads."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "Turns the arrival down; `subtle` shows the finished grid at once."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "Month and weekday names, numbers and plurals."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "border-strong",
        "ring",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark",
        "success-mark",
        "tone-info-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Cell grid",
          "why": "Weeks fade in left to right as the grid first scrolls into view, staggered on the chart motion helpers; expressive, so subtle shows the finished grid."
        },
        {
          "slot": "response",
          "recipe": "custom",
          "part": "Cell",
          "why": "The active day takes a ring outline at once and the tooltip glides to it; the other cells stay still — dimming hundreds of cells reads as a flash."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Cell",
          "why": "When data or the range changes, each cell's fill cross-fades on the base duration token, so the reader sees which days changed."
        },
        {
          "slot": "activity",
          "recipe": "motion-shimmer",
          "part": "Cell grid",
          "why": "`loading` shimmers the empty grid until days arrive."
        }
      ],
      "a11y": [
        "The grid is a role=grid table, as GitHub's is: weekday row headers and month column headers carry full names for screen readers, and the caption is `label`.",
        "One tab stop. Arrows move a day or a week; Home / End go to the ends of the row, Page Up / Page Down to the ends of the column, Ctrl+Home / Ctrl+End to the first and last day. Enter or Space selects when onSelectDate is set; Escape hides the tooltip.",
        "Each cell is named with its date and value (\"Tuesday, October 14, 2026: 12 contributions\") and described by its level's words, which the legend repeats visually.",
        "Levels rise in lightness, so they read without colour; under forced colours each level draws as a larger inner square."
      ],
      "examples": [
        {
          "label": "Contributions, last year",
          "code": "const days = [\n\t{ date: \"2026-10-12\", value: 4 },\n\t{ date: \"2026-10-13\", value: 11 },\n\t{ date: \"2026-10-14\", value: 2 },\n]\n\n<ActivityHeatmap label=\"Contributions in the last year\" data={days} tone=\"success\" unit={{ one: \"contribution\", other: \"contributions\" }} />",
          "imports": "import { ActivityHeatmap } from \"@sableui/react\""
        },
        {
          "label": "Two sources, in a card",
          "code": "const github = [{ date: \"2026-10-13\", value: 6 }]\nconst codex = [{ date: \"2026-10-13\", value: 1 }, { date: \"2026-10-14\", value: 3 }]\n\n<Card>\n\t<CardHeader>\n\t\t<CardTitle>Building, day by day</CardTitle>\n\t</CardHeader>\n\t<CardContent>\n\t\t<ActivityHeatmap\n\t\t\tlabel=\"GitHub and Codex activity in 2026\"\n\t\t\tyear={2026}\n\t\t\tlevels={2}\n\t\t\tdata={mergeActivity({ github, codex })}\n\t\t\tcategories={{ github: { label: \"GitHub\", tone: \"success\" }, codex: { label: \"Codex\", tone: \"info\" }, both: { label: \"Both\", tone: \"2\" } }}\n\t\t/>\n\t</CardContent>\n</Card>",
          "imports": "import { ActivityHeatmap, Card, CardContent, CardHeader, CardTitle, mergeActivity } from \"@sableui/react\""
        },
        {
          "label": "Selecting a day",
          "code": "const [day, setDay] = useState<string | null>(null)\n\n<ActivityHeatmap label=\"Orders per day\" data={{ \"2026-10-13\": 18, \"2026-10-14\": 25 }} unit=\"orders\" selectedDate={day} onSelectDate={setDay} />",
          "imports": "import { ActivityHeatmap } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "AgentAvatar",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/agent-avatar",
      "summary": "The default avatar for an AI agent's turns: a sable looking out of its den. It peeks at rest, climbs out to look at a nearby pointer, sinks low to think and comes up to talk, so the avatar itself says the agent is working. SVG from semantic tokens on the Avatar size ladder; every agent avatar on a page shares one animation loop.",
      "keywords": [
        "agent",
        "assistant",
        "ai",
        "bot",
        "chat",
        "avatar",
        "copilot",
        "llm",
        "thinking",
        "speaking",
        "mascot",
        "sable"
      ],
      "usage": {
        "description": "Use AgentAvatar as the avatar of every AI agent turn in a conversation — the Message `avatar` of an assistant reply, the header of an agent panel. Drive `state` from the turn's own pending state: `thinking` before the first token, `speaking` while the reply streams, `idle` once it settles. It replaces the \"AI\" initials avatar, which reads as a person called A. I.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep only the newest agent turn live. Pass `live={false}` to every earlier turn: they settle into the resting frame and stop tracking the pointer, so a long transcript does not watch the reader from every row."
          },
          {
            "guidance": "do",
            "description": "Drive `state` from the same flag that drives the composer's busy state and the reply's streaming, so the avatar, the composer and the message never disagree about whether the agent is still working."
          },
          {
            "guidance": "do",
            "description": "Let the thinking state stand in for a spinner in the message row. Pair it with a text status (role=status) for thinking, writing and completion, so the wait remains understandable without animation or sight. A second animated indicator is unnecessary."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a person, a team or an account. People are an Avatar — a photo, initials, or GradientArt seeded by the person. A character on a human's turn reads as a joke at their expense.",
            "instead": [
              "Avatar"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it as a standalone loading indicator outside a conversation. It is an identity that also shows state; a wait with no agent attached is a Spinner, or a ThinkingOrb when the wait is the experience.",
            "instead": [
              "Spinner",
              "ThinkingOrb"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not wrap it in a button or make it clickable to fake an interaction. The pointer reactions are ambient; a control that looks like the agent belongs in the panel header as a real Button.",
            "instead": [
              "Button"
            ]
          }
        ]
      },
      "related": {
        "components": [
          "Avatar",
          "Message",
          "ThinkingOrb",
          "ChatComposer",
          "StreamingText",
          "Bubble"
        ]
      },
      "props": [
        {
          "name": "state",
          "type": "\"idle\" | \"thinking\" | \"speaking\"",
          "default": "\"idle\"",
          "description": "What the agent is doing. `thinking` sinks it low in the den with its eyes scanning upward; `speaking` brings it up to talk, bobbing with the reply; `idle` peeks."
        },
        {
          "name": "size",
          "type": "\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\"",
          "default": "\"md\"",
          "description": "The Avatar size ladder: 20 / 24 / 32 / 40 / 48px for rows, 96 / 160px for portraits. In a Message, match its `avatarSize` (default `sm`)."
        },
        {
          "name": "live",
          "type": "boolean",
          "default": "true",
          "description": "Whether it animates. `false` settles into the resting frame (ignoring `state`) and stops tracking the pointer — for every agent turn except the newest."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Assistant\"",
          "description": "The accessible name (role=img). Use the agent's product name if it has one."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "description": "Turns this avatar's motion down. `subtle` keeps the states (sinking to think, bobbing to speak) and drops the flourishes: pointer tracking, blinks, ear twitches, idle glances, the spring's overshoot. `off` draws each state as a still pose. The reader's reduce-motion setting always wins."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Layout only. The frame and ink come from the theme's muted, foreground and background tokens."
        }
      ],
      "tokensUsed": [
        "muted",
        "foreground",
        "background"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with its message, and the message owns the arrival. Its first painted frame is already the resting pose for its state, so there is nothing to stage."
        },
        {
          "slot": "response",
          "recipe": "custom",
          "part": "Root",
          "why": "Within about four of its widths it notices the pointer: the eyes follow it, the ears perk and it climbs out of the den; over it, the eyes turn happy. Driven per frame in JS from one shared pointer listener, expressive motion only, and only on a live avatar. It is not a control, so there is no press."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Root",
          "why": "Between states the body travels on a spring: up to speak, down to think, back to peeking. The spring's overshoot is expressive; under `subtle` it becomes a plain ease that still carries the state change."
        },
        {
          "slot": "activity",
          "recipe": "custom",
          "part": "Root",
          "why": "Thinking scans the eyes upward and speaking bobs the body with the reply — the avatar's own way of saying the agent is working, in place of a spinner. These run under `subtle` too; under reduced motion or `off`, each state is a still pose (thinking: sunk low, eyes up)."
        }
      ],
      "a11y": [
        "role=img with an aria-label (default \"Assistant\"); the SVG is aria-hidden.",
        "State changes are not announced by the image. Provide a separate text status (role=status) for thinking, writing and completion. Keep announcements to phase changes rather than every streamed token.",
        "Not focusable and not clickable: every reaction is ambient, so nothing is lost to a keyboard or switch user.",
        "Honours the motion policy: reduce-motion or MotionProvider off draws a still pose per state and never starts the loop; `subtle` drops tracking, blinks and twitches.",
        "Ink is the theme's foreground on the muted frame, held to contrast in every theme; the eyes are the background colour, so they read in light and dark alike."
      ],
      "examples": [
        {
          "label": "Default",
          "code": "<AgentAvatar />",
          "imports": "import { AgentAvatar } from \"@sableui/react\""
        },
        {
          "label": "States",
          "code": "<AgentAvatar size=\"lg\" />\n<AgentAvatar size=\"lg\" state=\"thinking\" />\n<AgentAvatar size=\"lg\" state=\"speaking\" />",
          "imports": "import { AgentAvatar } from \"@sableui/react\""
        },
        {
          "label": "Sizes",
          "code": "<AgentAvatar size=\"2xs\" />\n<AgentAvatar size=\"xs\" />\n<AgentAvatar size=\"sm\" />\n<AgentAvatar size=\"md\" />\n<AgentAvatar size=\"lg\" />\n<AgentAvatar size=\"xl\" />",
          "imports": "import { AgentAvatar } from \"@sableui/react\""
        },
        {
          "label": "In a conversation (only the newest turn is live)",
          "code": "<Message messageId=\"a1\" avatar={<AgentAvatar size=\"sm\" live={false} />}>\n\t<Bubble>Anchor on the oldest rendered message instead.</Bubble>\n</Message>\n<Message messageId=\"u1\" align=\"end\">\n\t<Bubble variant=\"primary\" align=\"end\">Does that cover new messages too?</Bubble>\n</Message>\n<Message messageId=\"a2\" avatar={<AgentAvatar size=\"sm\" state=\"speaking\" />}>\n\t<Bubble>Yes. Appends leave the anchor alone, so the same rule covers both.</Bubble>\n</Message>",
          "imports": "import { AgentAvatar, Bubble, Message } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "AppHeader",
      "status": "stable",
      "group": "Layout",
      "register": "page",
      "path": "components/app-header",
      "summary": "Mobile top bar (sticky, hidden at lg) with leading / title / actions slots on a 3-column grid that keeps the title optically centered. Grows into the top safe-area.",
      "keywords": [
        "app header",
        "top bar",
        "mobile header",
        "chrome"
      ],
      "usage": {
        "description": "Use AppHeader for compact application chrome at the top of a screen, usually with navigation, identity, and a small action set. Pass it to AppShell's `header` slot so screen content clears it on mobile (it is sticky and hides itself at lg).",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep the header actions narrow and predictable so the page title remains legible."
          },
          {
            "guidance": "do",
            "description": "Use it once per app view as chrome, not as repeated content inside page sections."
          },
          {
            "guidance": "dont",
            "description": "Do not overload it with filters, forms, or page-specific controls that belong in the content area."
          },
          {
            "guidance": "dont",
            "description": "Do not render more than one per app, or put a second one inside a route. It is sticky chrome, so two of them stack and permanently eat the top of the viewport."
          }
        ]
      },
      "related": {
        "components": [
          "AppShell",
          "PageHeader",
          "BottomNav",
          "NavigationMenu"
        ]
      },
      "props": [
        {
          "name": "leading",
          "type": "ReactNode",
          "description": "Leading slot — back button, create action, or menu trigger."
        },
        {
          "name": "title",
          "type": "ReactNode",
          "description": "Center slot — brand wordmark or contextual page title."
        },
        {
          "name": "actions",
          "type": "ReactNode",
          "description": "Trailing slot — account menu, action buttons."
        }
      ],
      "tokensUsed": [
        "background",
        "border",
        "foreground"
      ],
      "a11y": [
        "Renders a <header> landmark.",
        "Pair with a leading control that has an accessible label (e.g. a BackButton)."
      ],
      "examples": [
        {
          "label": "Contextual header",
          "code": "<AppHeader leading={<Button size=\"icon\" variant=\"ghost\" aria-label=\"Back\"><Icon name=\"chevron-left\" /></Button>} title=\"Notifications\" />",
          "imports": "import { AppHeader, Button, Icon } from \"@sableui/react\""
        },
        {
          "label": "Choosing between AppHeader and PageHeader",
          "code": "// AppHeader is APP chrome — it persists across routes and holds global\n// affordances (brand, search, account). One per app.\n<AppShell header={<AppHeader title=\"Studio\" />}>\n  <Region max=\"content\">Route content</Region>\n</AppShell>\n\n// PageHeader is CONTENT — it introduces the current route and scrolls away\n// with it. One per page, INSIDE the region.\n<Region max=\"content\">\n  <PageHeader title=\"Billing\" description=\"Plans, invoices, payment methods.\" />\n</Region>\n\n// ✗ Putting route-specific actions in AppHeader. They then persist onto routes\n//   where they mean nothing, and the header becomes a dumping ground.",
          "imports": "import { AppHeader, AppShell, PageHeader, Region } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "AppShell",
      "status": "stable",
      "group": "Layout",
      "register": "page",
      "path": "components/app-shell",
      "summary": "The application frame: slots for status banners, a mobile header, a desktop sidebar, main content, a mobile bottom nav, a persistent dock (a now-playing or call bar), and floating overlays — plus a built-in skip link and #main-content target.",
      "keywords": [
        "app shell",
        "layout",
        "frame",
        "sidebar",
        "header",
        "bottom nav",
        "mobile",
        "banners",
        "main",
        "dock",
        "player bar",
        "now playing",
        "persistent",
        "inset",
        "inset frame",
        "floating panel",
        "rounded content",
        "scroll container"
      ],
      "usage": {
        "description": "Use AppShell as the outer product frame for authenticated or app-like experiences. It coordinates responsive chrome slots and guarantees a skip link plus main landmark; put route content inside the children and let AppHeader, Sidebar, BottomNav, and Banner own their own semantics.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use AppShell once around the route tree or major app area so the skip link and main landmark stay stable."
          },
          {
            "guidance": "do",
            "description": "Pass app-wide outage or status messages through banners so they remain above the frame."
          },
          {
            "guidance": "do",
            "description": "Use Region inside the main content to choose each route's reading width."
          },
          {
            "guidance": "do",
            "description": "Wrap EVERY return of a route in its own Page or Region — including early returns for loading, empty and error states. AppShell's <main> deliberately carries no padding (it is a frame, and padding belongs to the region that chose the width), so a route that returns a bare spinner or error renders flush against the chrome. This is the most common conversion bug: the happy path gets a Page, the three early returns do not."
          },
          {
            "guidance": "do",
            "description": "Use frame=\"inset\" for dense, multi-pane product apps — a CRM, an issue tracker, an AI workspace — where framing the content as one raised panel on the rail's ground helps it read as the workspace and the rail as chrome. Keep the Sidebar on surface=\"rail\" so its tint is the ground. Inset moves the page scroll from the window to <main id=\"main-content\"> on desktop: point scroll listeners, scroll restoration and scroll-to-top at that element, not window."
          },
          {
            "guidance": "dont",
            "description": "Nest AppShell inside route cards or panels. It is page chrome, not local content."
          },
          {
            "guidance": "dont",
            "description": "Wrap a route in its own h-full overflow-y-auto box inside an inset shell. main is already the page's scroll container; a second one traps the scrollbar inside a smaller box and breaks sticky headers and the skip link's scroll target. Scroll a genuinely separate pane (a list beside a detail view) with Scroller.",
            "instead": [
              "Scroller"
            ]
          },
          {
            "guidance": "dont",
            "description": "Combine frame=\"inset\" with a full-width header bar above the rail. The inset ground is the rail running the full height of the window; a bar across the top cuts it off. Use the flush frame with Sidebar surface=\"page\" for that layout."
          },
          {
            "guidance": "dont",
            "description": "Put desktop-only navigation in the mobile header slot or mobile-only controls in the sidebar slot."
          }
        ],
        "anatomy": [
          {
            "name": "Banners",
            "required": false,
            "description": "Full-width app status messages rendered above the shell."
          },
          {
            "name": "Header",
            "required": false,
            "description": "Mobile top chrome, usually AppHeader."
          },
          {
            "name": "Sidebar",
            "required": false,
            "description": "Desktop navigation chrome, usually Sidebar."
          },
          {
            "name": "Main",
            "required": true,
            "description": "The route content landmark with id main-content. With frame=\"inset\", from lg it is a rounded, bordered panel that scrolls inside itself."
          },
          {
            "name": "Bottom nav",
            "required": false,
            "description": "Mobile fixed navigation with reserved bottom space."
          },
          {
            "name": "Dock",
            "required": false,
            "description": "Persistent bottom chrome that outlives routes — a now-playing bar, a call bar. Sticky above the bottom nav; the desktop Sidebar shortens to clear it."
          }
        ]
      },
      "related": {
        "components": [
          "AppHeader",
          "Sidebar",
          "SideNav",
          "BottomNav",
          "Banner"
        ],
        "patterns": [
          "DashboardPage",
          "FeedPage",
          "SettingsPage"
        ]
      },
      "props": [
        {
          "name": "banners",
          "type": "ReactNode",
          "description": "Full-width status banners pinned in flow above the frame (offline / chain-down)."
        },
        {
          "name": "header",
          "type": "ReactNode",
          "description": "Mobile top header (e.g. AppHeader); expected to hide itself at lg."
        },
        {
          "name": "sidebar",
          "type": "ReactNode",
          "description": "Desktop side navigation (e.g. Sidebar); expected to hide itself below lg. Leading column of the body row."
        },
        {
          "name": "bottomNav",
          "type": "ReactNode",
          "description": "Mobile bottom navigation (e.g. BottomNav); fixed to the bottom edge. main reserves space for it."
        },
        {
          "name": "dock",
          "type": "ReactNode",
          "description": "Persistent chrome kept on screen across routes (a now-playing bar, an active-call bar, an upload tray). Full width, sticky to the bottom edge and above bottomNav on mobile; its height is published as --dock-height and the app Sidebar subtracts it. In flow, so main needs no reserved space. The contents paint their own surface and top border, and name themselves (e.g. <section aria-label=\"Player\">). Mount AppShell in a layout that survives navigation, or the playback restarts."
        },
        {
          "name": "overlays",
          "type": "ReactNode",
          "description": "Floating overlays — a message launcher, FAB, or modal mount points."
        },
        {
          "name": "frame",
          "type": "\"flush\" | \"inset\"",
          "default": "\"flush\"",
          "description": "How the desktop frame (lg and up) holds the content; below lg both are the same mobile layout with page scroll. \"flush\": main sits on the page beside the rail and the document scrolls. \"inset\": the shell fills the viewport and paints the shell-ground token (one step off the rail's surface, tunable with --theme-shell-ground) behind the rail and around the panel; main becomes a rounded-lg panel with a hairline border and shadow-sm, inset by a spacing step from the window edges, that scrolls inside itself (scrollbar-quiet) while the rail stays put. The Sidebar in the sidebar slot drops its right border and fills the row. main stays the #main-content focus target (tabIndex -1 in both frames, so the skip link lands focus in the scroller) and the inline-size query container; sticky children stick to the panel's top; banners and the dock stay in flow, so the panel's bottom gap sits above a dock. With Sidebar surface=\"page\" the ground is the page colour and the panel's border alone lifts it."
        },
        {
          "name": "mainId",
          "type": "string",
          "default": "\"main-content\"",
          "description": "The id of the main landmark, which the built-in skip link targets. Change it when another shell on the page already uses main-content (a Workspace nested inside), so the ids do not collide."
        },
        {
          "name": "skipLinkLabel",
          "type": "string",
          "default": "\"Skip to content\"",
          "description": "Text for the built-in skip link."
        }
      ],
      "subcomponents": [
        {
          "name": "SkipLink",
          "type": "ComponentProps<\"a\">",
          "description": "AppShell's skip link on its own, for a layout that is not an AppShell (a storefront with a top header). Put it first in the body and give the page's <main> the matching id: `<SkipLink />` then `<main id=\"main-content\" tabIndex={-1}>`. `href` defaults to #main-content, the label to \"Skip to content\"."
        }
      ],
      "tokensUsed": [
        "background",
        "foreground",
        "primary",
        "primary-foreground",
        "sidebar",
        "shell-ground",
        "border"
      ],
      "a11y": [
        "Renders a skip link to #main-content as the first focusable element.",
        "Wraps content in a <main id=\"main-content\"> landmark.",
        "Slot components own their own ARIA (nav landmarks, labels).",
        "The dock follows <main> in DOM order, so keyboard and screen-reader users reach the player after the page content, not before it.",
        "With frame=\"inset\", <main> is the desktop scroll container and takes tabIndex -1: the skip link moves focus into it, so PageDown and the arrow keys scroll the content, without adding a tab stop."
      ],
      "examples": [
        {
          "label": "Full frame",
          "code": "<AppShell\n  banners={<Banner tone=\"warning\">Sync is delayed — changes may be slow to appear.</Banner>}\n  header={<AppHeader title=\"Studio\" />}\n  sidebar={\n    <Sidebar>\n      <SidebarNav>\n        <SidebarItem icon={<Icon name=\"home\" />} label=\"Home\" active render={<Link to=\"/\" />} />\n        <SidebarItem icon={<Icon name=\"bell\" />} label=\"Notifications\" render={<Link to=\"/notifications\" />} />\n        <SidebarItem icon={<Icon name=\"gear\" />} label=\"Settings\" render={<Link to=\"/settings\" />} />\n      </SidebarNav>\n    </Sidebar>\n  }\n  bottomNav={\n    <BottomNav>\n      <BottomNavItem icon={<Icon name=\"home\" />} label=\"Home\" active render={<Link to=\"/\" />} />\n      <BottomNavItem icon={<Icon name=\"bell\" />} label=\"Alerts\" render={<Link to=\"/notifications\" />} />\n    </BottomNav>\n  }\n>\n  <Region max=\"feed\">\n    <PageHeader title=\"Home\" description=\"Latest posts from people you follow.\" />\n  </Region>\n</AppShell>",
          "imports": "import { AppHeader, AppShell, Banner, BottomNav, BottomNavItem, Icon, PageHeader, Region, Sidebar, SidebarItem, SidebarNav } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Inset frame",
          "code": "<AppShell\n  frame=\"inset\"\n  header={<AppHeader title=\"Pipeline\" />}\n  sidebar={\n    <Sidebar>\n      <SidebarHeader>\n        <SidebarBrand mark={<Icon name=\"gem\" variant=\"solid\" />} label=\"Relay\" render={<Link to=\"/\" />} />\n      </SidebarHeader>\n      <SidebarNav>\n        <SidebarItem icon={<Icon name=\"inbox\" />} label=\"Inbox\" render={<Link to=\"/inbox\" />} />\n        <SidebarItem icon={<Icon name=\"user\" />} label=\"People\" active render={<Link to=\"/people\" />} />\n        <SidebarItem icon={<Icon name=\"folder\" />} label=\"Companies\" render={<Link to=\"/companies\" />} />\n      </SidebarNav>\n    </Sidebar>\n  }\n  bottomNav={\n    <BottomNav>\n      <BottomNavItem icon={<Icon name=\"inbox\" />} label=\"Inbox\" render={<Link to=\"/inbox\" />} />\n      <BottomNavItem icon={<Icon name=\"user\" />} label=\"People\" active render={<Link to=\"/people\" />} />\n      <BottomNavItem icon={<Icon name=\"folder\" />} label=\"Companies\" render={<Link to=\"/companies\" />} />\n    </BottomNav>\n  }\n>\n  <Page max=\"wide\" gap={4} className=\"py-6\">\n    <PageHeader\n      title=\"People\"\n      description=\"Everyone in your pipeline, newest first.\"\n      actions={<Button><Icon name=\"plus\" />Add person</Button>}\n    />\n    <Card>\n      <CardContent flush>\n        <Table>\n          <TableHeader>\n            <TableRow>\n              <TableHead>Name</TableHead>\n              <TableHead>Company</TableHead>\n              <TableHead numeric>Deals</TableHead>\n            </TableRow>\n          </TableHeader>\n          <TableBody>\n            <TableRow>\n              <TableCell>Ada Lovelace</TableCell>\n              <TableCell>Northwind</TableCell>\n              <TableCell numeric>4</TableCell>\n            </TableRow>\n            <TableRow>\n              <TableCell>Grace Hopper</TableCell>\n              <TableCell>Harbor Labs</TableCell>\n              <TableCell numeric>2</TableCell>\n            </TableRow>\n          </TableBody>\n        </Table>\n      </CardContent>\n    </Card>\n  </Page>\n</AppShell>",
          "imports": "import { AppHeader, AppShell, BottomNav, BottomNavItem, Button, Card, CardContent, Icon, Page, PageHeader, Sidebar, SidebarBrand, SidebarHeader, SidebarItem, SidebarNav, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "SkipLink in a layout of your own",
          "code": "<>\n  <SkipLink />\n  <header className=\"flex items-center justify-between px-(--page-inset) py-4\">\n    <Link to=\"/\">Alder & Lune</Link>\n    <Button variant=\"ghost\" size=\"icon\" aria-label=\"Search\"><Icon name=\"search\" /></Button>\n  </header>\n  <main id=\"main-content\" tabIndex={-1}>\n    <Region max=\"wide\">\n      <PageHeader title=\"Lighting\" />\n    </Region>\n  </main>\n</>",
          "imports": "import { Button, Icon, PageHeader, Region, SkipLink } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Minimal (sidebar + content only)",
          "code": "<AppShell\n  sidebar={\n    <Sidebar>\n      <SidebarNav>\n        <SidebarItem icon={<Icon name=\"home\" />} label=\"Dashboard\" active render={<Link to=\"/\" />} />\n      </SidebarNav>\n    </Sidebar>\n  }\n>\n  <Region max=\"wide\">\n    <PageHeader title=\"Dashboard\" />\n  </Region>\n</AppShell>",
          "imports": "import { AppShell, Icon, PageHeader, Region, Sidebar, SidebarItem, SidebarNav } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Route content width",
          "code": "<AppShell sidebar={<Sidebar><SidebarNav><SidebarItem icon={<Icon name=\"home\" />} label=\"Home\" active /></SidebarNav></Sidebar>}><Region max=\"content\"><PageHeader title=\"Settings\" description=\"Manage account and workspace preferences.\" /><Card><CardHeader><CardTitle>Profile</CardTitle></CardHeader><CardContent><Field label=\"Display name\"><Input defaultValue=\"Nova\" /></Field></CardContent></Card></Region></AppShell>",
          "imports": "import { AppShell, Card, CardContent, CardHeader, CardTitle, Field, Icon, Input, PageHeader, Region, Sidebar, SidebarItem, SidebarNav } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "AreaChart",
      "status": "beta",
      "group": "Charts",
      "register": "page",
      "path": "components/area-chart",
      "summary": "A trend over a sequence, filled to the baseline: overlapping translucent series, stacked, or stacked to 100%, with smooth, linear or step curves and optional gradient fills. The line draws on and the fill rises as it scrolls into view.",
      "keywords": [
        "chart",
        "area",
        "trend",
        "time series",
        "stacked",
        "graph",
        "analytics",
        "dashboard",
        "visitors",
        "revenue"
      ],
      "usage": {
        "description": "Use AreaChart for volume over time — visitors, revenue, usage — where the filled shape helps the eye read the size of the total. Stack the series to show a total and its parts; `stacked=\"expand\"` shows each category as 100%. For comparing how measures move relative to each other, LineChart is cleaner; for amounts per category, BarChart.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep to one to three series; past that the tints muddy — stack them or switch to LineChart."
          },
          {
            "guidance": "do",
            "description": "Leave a value out with null, never 0: a gap breaks the line, and a zero is a claim about the data. A forecast is a second, dashed series with values only where it runs."
          },
          {
            "guidance": "do",
            "description": "Set a height on className (h-72, aspect-video h-auto); the chart fills the box it is given."
          },
          {
            "guidance": "dont",
            "description": "Overlap more than two unstacked series — the translucent tints blend into a colour no series has."
          },
          {
            "guidance": "dont",
            "description": "Use it for data-heavy views — streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
          }
        ]
      },
      "related": {
        "components": [
          "LineChart",
          "BarChart",
          "Sparkline",
          "Card"
        ]
      },
      "props": [
        {
          "name": "data",
          "type": "Record<string, unknown>[]",
          "description": "The rows, in order along the category axis."
        },
        {
          "name": "index",
          "type": "string",
          "description": "The datum field naming each row's category (a month, a day, a channel)."
        },
        {
          "name": "series",
          "type": "{ key: string; label: string; tone?: ChartTone; color?: string; icon?: string }[]",
          "description": "The measures to plot: the datum field, its name in the legend/tooltip/table, and its colour (a tone by role, or any CSS colour). Omitted, series take the chart palette in order: --chart-1 … --chart-8, validated for colour-blind separation in light and dark; a theme may override the set."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
        },
        {
          "name": "className",
          "type": "string",
          "default": "\"h-60\"",
          "description": "Sizes the chart (plot + legend). Set a height: `h-72`, `aspect-video h-auto`."
        },
        {
          "name": "valueFormatter",
          "type": "(value: number) => string",
          "description": "Format values everywhere (axis, labels, tooltip, table) — units like \"$12,480\". Default: compact on the axis, full elsewhere."
        },
        {
          "name": "indexFormatter",
          "type": "(value: string) => string",
          "description": "Shorten category labels on the axis (\"January\" → \"Jan\"); the tooltip keeps the full value."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for default number and date formatting."
        },
        {
          "name": "tooltip",
          "type": "boolean | { indicator?: \"dot\" | \"line\" | \"dashed\" | \"none\"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean; cursor?: \"line\" | \"dashed\" | \"none\"; order?: \"series\" | \"reverse\" }",
          "default": "true",
          "description": "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row, the cursor, the row order. A stack lists its rows top to bottom; order: \"series\" keeps the series order."
        },
        {
          "name": "legend",
          "type": "boolean",
          "default": "true when there is more than one series",
          "description": "Show the legend under the chart."
        },
        {
          "name": "grid",
          "type": "boolean",
          "default": "true (false for horizontal bars)",
          "description": "Hairline gridlines along the value axis."
        },
        {
          "name": "xAxis",
          "type": "boolean",
          "default": "true for columns; false for horizontal bars",
          "description": "The horizontal axis."
        },
        {
          "name": "yAxis",
          "type": "boolean",
          "default": "false for columns; true for horizontal bars",
          "description": "The vertical axis."
        },
        {
          "name": "yAxisSide",
          "type": "\"left\" | \"right\"",
          "default": "\"left\"",
          "description": "Which edge the value axis sits on, on a vertical chart."
        },
        {
          "name": "yAxisWidth",
          "type": "number",
          "description": "The vertical axis's label width, in px. Left unset it follows the longest label, so the plot slides sideways when new data changes the labels; set it where a chart swaps data in place, such as tabs."
        },
        {
          "name": "categoryTicks",
          "type": "number",
          "description": "At most this many category labels. They already thin to fit, from the latest back; this asks for fewer."
        },
        {
          "name": "domain",
          "type": "\"auto\" | [number, number]",
          "description": "The value axis's range. \"auto\" fits the data, so a price line uses the plot instead of sitting at the top of an axis from zero. A [min, max] pair fixes the range, and values past it stop at the plot's edge. Defaults to zero up to the data."
        },
        {
          "name": "referenceLines",
          "type": "ChartReferenceLine[]",
          "description": "Mark positions on the plot, each { category } or { value }, with an optional label and tone: a Today line, a target."
        },
        {
          "name": "axisFormatter",
          "type": "(value: number) => string",
          "description": "Format values on the axis alone, when it needs less than valueFormatter prints: $50K beside $41,746.08."
        },
        {
          "name": "lineWidth",
          "type": "number",
          "default": "2",
          "description": "The line's weight, in px."
        },
        {
          "name": "fillStrength",
          "type": "number",
          "description": "How strong the fill is, from 0 to 1: the tint's opacity, or the top of the gradient. Lower it when stacked bands read as one wall of colour. Defaults to 0.14, or 0.32 stacked; with gradient, 0.22, or 0.5 stacked."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The arrival (draw-on, rising fill) and the data-change morph are the flourish; the gliding cursor and tooltip are the feedback `subtle` keeps."
        },
        {
          "name": "animate",
          "type": "boolean",
          "default": "true",
          "description": "Play the arrival once the chart scrolls into view. Reduced motion shows the finished chart. `animate={false}` is `motion=\"subtle\"`.",
          "deprecated": "motion=\"subtle\" (what animate={false} now maps to: no arrival, hover kept) or motion=\"off\""
        },
        {
          "name": "activeIndex",
          "type": "number | null",
          "description": "The highlighted row (controlled); `null` for none."
        },
        {
          "name": "defaultActiveIndex",
          "type": "number | null",
          "description": "The row highlighted at first — a tooltip already open before anyone hovers."
        },
        {
          "name": "onActiveIndexChange",
          "type": "(index: number | null) => void",
          "description": "Called as the pointer or keyboard moves between rows."
        },
        {
          "name": "curve",
          "type": "\"smooth\" | \"linear\" | \"step\"",
          "default": "\"smooth\"",
          "description": "How the line runs between points. `smooth` is monotone: it never overshoots a value the data does not contain."
        },
        {
          "name": "stacked",
          "type": "boolean | \"expand\"",
          "default": "false",
          "description": "Stack the series, or `\"expand\"` to show each category as 100%."
        },
        {
          "name": "gradient",
          "type": "boolean",
          "default": "false",
          "description": "Fill each area with a fade from its colour to transparent instead of a flat tint."
        }
      ],
      "tokensUsed": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "primary",
        "muted-foreground",
        "border",
        "popover",
        "popover-foreground",
        "foreground",
        "background",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Area + line",
          "why": "Once on screen, each line draws on (stroke-dashoffset) and its fill rises from the baseline, series staggered — the trend is read as it is drawn. On the motion tokens; reduced motion shows the finished chart. The arrival is expressive: it plays at the full motion level only, so `motion=\"subtle\"` (or a subtle app policy) shows the finished chart while hover feedback stays."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Cursor + tooltip",
          "why": "Hover and focus move the cursor and tooltip instantly — a lagging cursor reads as a slow chart."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Area + line",
          "why": "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place. Expressive, like the arrival: under `subtle` new data swaps in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "AreaChart",
          "why": "A chart has no indeterminate state; show a Skeleton while the data loads."
        }
      ],
      "a11y": [
        "The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
        "With a tooltip, the chart is one tab stop (role=group, aria-roledescription=\"chart\"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.",
        "Colour is never the only key: series are named in the legend, tooltip and table."
      ],
      "examples": [
        {
          "label": "A forecast and a Today line",
          "code": "const prices = [\n\t{ day: \"Mon\", price: 41200, forecast: null },\n\t{ day: \"Tue\", price: 41900, forecast: null },\n\t{ day: \"Wed\", price: 42300, forecast: 42300 },\n\t{ day: \"Thu\", price: null, forecast: 43100 },\n\t{ day: \"Fri\", price: null, forecast: 44200 },\n]\n\n<AreaChart\n\tlabel=\"Price\"\n\tdata={prices}\n\tindex=\"day\"\n\tseries={[\n\t\t{ key: \"price\", label: \"Price\" },\n\t\t{ key: \"forecast\", label: \"Forecast\", dashed: true },\n\t]}\n\tdomain=\"auto\"\n\tgradient\n\tyAxis\n\tyAxisSide=\"right\"\n\tyAxisWidth={48}\n\taxisFormatter={(v) => `$${Math.round(v / 1000)}K`}\n\tvalueFormatter={(v) => `$${v.toLocaleString()}`}\n\treferenceLines={[{ category: \"Wed\", label: \"Today\" }]}\n/>",
          "imports": "import { AreaChart } from \"@sableui/react\""
        },
        {
          "label": "Two series with a legend",
          "code": "const visitors = [\n\t{ month: \"January\", desktop: 186, mobile: 80 },\n\t{ month: \"February\", desktop: 305, mobile: 200 },\n\t{ month: \"March\", desktop: 237, mobile: 120 },\n\t{ month: \"April\", desktop: 73, mobile: 190 },\n\t{ month: \"May\", desktop: 209, mobile: 130 },\n\t{ month: \"June\", desktop: 214, mobile: 140 },\n]\n\n<AreaChart\n\tlabel=\"Visitors, January to June\"\n\tdata={visitors}\n\tindex=\"month\"\n\tseries={[\n\t\t{ key: \"desktop\", label: \"Desktop\" },\n\t\t{ key: \"mobile\", label: \"Mobile\" },\n\t]}\n\tindexFormatter={(m) => m.slice(0, 3)}\n\tgradient\n/>",
          "imports": "import { AreaChart } from \"@sableui/react\""
        },
        {
          "label": "Stacked to 100%",
          "code": "<AreaChart\n\tlabel=\"Share of visitors by device\"\n\tdata={visitors}\n\tindex=\"month\"\n\tseries={[\n\t\t{ key: \"desktop\", label: \"Desktop\" },\n\t\t{ key: \"mobile\", label: \"Mobile\" },\n\t]}\n\tstacked=\"expand\"\n\tyAxis\n\ttooltip={{ indicator: \"line\", showTotal: true }}\n/>",
          "imports": "import { AreaChart } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Attachment",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/attachment",
      "summary": "A file or image attached to a message: media or icon lead, name and metadata, upload and error states, an actions slot, and a full-card trigger that keeps those actions separately clickable.",
      "keywords": [
        "attachment",
        "file",
        "upload",
        "image preview",
        "chat file",
        "document",
        "drag and drop",
        "file card"
      ],
      "usage": {
        "description": "The card a file takes in a conversation — in the composer while it uploads, and in the transcript once it has. It renders all four states an attachment actually moves through (queued, uploading, failed, delivered) rather than only the delivered one, because the other three are the states that are hard to get right and would otherwise fall back on every caller.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use `variant=\"media\"` for images and `variant=\"card\"` for documents. A filename tells you nothing about a photo, and a thumbnail tells you nothing about a contract."
          },
          {
            "guidance": "do",
            "description": "Pass `onOpen` rather than wrapping the card in your own button. It renders a stretched trigger underneath the actions, so the card is one tab stop, each action is its own, and clicking \"remove\" never opens the file."
          },
          {
            "guidance": "do",
            "description": "Give `status=\"uploading\"` a numeric `progress` when you have one and omit it when you do not — the bar goes indeterminate rather than lying about 0%."
          },
          {
            "guidance": "do",
            "description": "Put the reason in `meta` when `status=\"error\"`. The card re-colors but keeps its shape, so a failed upload stays recognisable as the file it was — the text is what says why."
          },
          {
            "guidance": "dont",
            "description": "Do not nest interactive controls inside a card you have wrapped in a link or button yourself. That is invalid HTML and unreachable in the order it looks like; `onOpen` exists to avoid it."
          },
          {
            "guidance": "dont",
            "description": "Do not use it as a generic file-list row. `Tree` is the file listing; this one is shaped for a conversation, where an attachment is a message payload."
          },
          {
            "guidance": "dont",
            "description": "Do not rely on the error colour alone to signal failure. Colour is not a status for anyone who cannot see it — say what happened in `meta`."
          }
        ],
        "anatomy": [
          {
            "name": "Media",
            "required": true,
            "description": "Thumbnail crop or file glyph. Fills the tile in `media`, a lead square in `card`."
          },
          {
            "name": "Label",
            "required": true,
            "description": "Name and metadata. A row beside the media in `card`; a scrim strip over the picture in `media`, shown only when there is something to say."
          },
          {
            "name": "Actions",
            "required": false,
            "description": "Remove / retry / download controls, stacked above the stretched trigger so they stay separately clickable."
          },
          {
            "name": "Progress",
            "required": false,
            "description": "A hairline bar along the bottom edge while `status=\"uploading\"`; determinate with `progress`, indeterminate without."
          }
        ]
      },
      "related": {
        "components": [
          "Message",
          "Bubble",
          "MessageScroller",
          "Progress"
        ]
      },
      "props": [
        {
          "name": "name",
          "type": "string",
          "description": "File name. Truncated rather than wrapped — the stem truncates and a short extension stays visible — and used as the default label for the stretched trigger and the media tile's alt text."
        },
        {
          "name": "meta",
          "type": "ReactNode",
          "description": "Size, type, upload progress, or the failure reason — the quiet second line."
        },
        {
          "name": "thumbnail",
          "type": "string",
          "description": "Image preview URL. Present means the card shows a crop of the file instead of a glyph."
        },
        {
          "name": "icon",
          "type": "string",
          "default": "\"file\"",
          "description": "Semantic icon name for a non-image file (resolved through IconProvider). Defaults to \"image-stack\" when a thumbnail is set."
        },
        {
          "name": "variant",
          "type": "\"card\" | \"media\"",
          "default": "\"card\"",
          "description": "`card` is a name-led horizontal row for documents; `media` is a square tile that is mostly picture."
        },
        {
          "name": "status",
          "type": "\"idle\" | \"uploading\" | \"error\"",
          "default": "\"idle\"",
          "description": "Transfer state. `uploading` adds a progress bar; `error` re-colors the card without changing its shape."
        },
        {
          "name": "progress",
          "type": "number",
          "description": "Percentage 0–100 while uploading. Omit for an indeterminate bar."
        },
        {
          "name": "actions",
          "type": "ReactNode",
          "description": "Remove / retry / download controls. Stay clickable when `onOpen` makes the card a trigger. On a `media` tile they float on the top-end corner over the picture, so pass `variant=\"floating\"` buttons there."
        },
        {
          "name": "onOpen",
          "type": "() => void",
          "description": "Makes the whole card activate, via a stretched button rendered beneath the actions rather than by wrapping the card."
        },
        {
          "name": "openLabel",
          "type": "string",
          "default": "`Open ${name}`",
          "description": "Accessible label for that stretched trigger."
        },
        {
          "name": "uploadingLabel",
          "type": "string",
          "default": "`Uploading ${name}`",
          "description": "Accessible name of the progress bar while status is \"uploading\"."
        },
        {
          "name": "...div props",
          "type": "Omit<ComponentPropsWithRef<\"div\">, \"onClick\">",
          "description": "Spread onto the card. Use `onOpen` rather than `onClick` — a click handler on a div is not a control."
        }
      ],
      "variants": {
        "variant": [
          "card",
          "media"
        ],
        "status": [
          "idle",
          "uploading",
          "error"
        ]
      },
      "tokensUsed": [
        "card",
        "border",
        "border-strong",
        "muted",
        "muted-foreground",
        "foreground",
        "destructive",
        "overlay",
        "overlay-foreground",
        "ring",
        "destructive-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "An attachment lands as part of a composer or a message, and that surface owns the entrance. A card that animated in on its own would read as a second, separate event — as if another file had been added."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "With `onOpen`, the edge steps up under the pointer; it is the only cue that the card itself opens the file, not just its actions. Eased, it reads as the card answering the cursor rather than a border flickering as the pointer crosses a busy composer."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "Uploading to failed re-colours the edge and fill without changing the shape. The ease keeps it legible as the same file turning red; snapped, a failed card looks like a different card replaced the one that was sent."
        },
        {
          "slot": "activity",
          "recipe": "motion-pulse",
          "part": "Progress",
          "why": "While uploading with no known `progress`, the bar is indeterminate and pulses (Progress's own recipe); with a number, the fill eases toward each new value. A still bar at a fixed width is indistinguishable from an upload that has stalled."
        }
      ],
      "a11y": [
        "The full-card trigger is a real stretched `<button>` with an accessible label, not a click handler on a div — so it is one tab stop, keyboard-activatable, and focus-ringed.",
        "Actions sit above that trigger in the stacking order, which keeps them individually focusable and stops a click on `remove` from also opening the file. Text is only made click-through when a trigger is present, so a filename stays selectable otherwise.",
        "A thumbnail is described as the attachment in `media` (where the picture is the only label) and left decorative in `card` (where the filename is right beside it), so AT never reads the same name twice.",
        "The upload bar carries an accessible name via Progress; the error state is carried by text in `meta` as well as colour.",
        "Label text on a media tile sits on `overlay` / `overlay-foreground` — a fixed pairing that stays legible over arbitrary imagery, where a theme surface token would not."
      ],
      "examples": [
        {
          "label": "Document with a remove action",
          "code": "<Attachment name=\"proposal.pdf\" meta=\"2.4 MB · PDF\" onOpen={() => open(file)} actions={<Button variant=\"ghost\" size=\"icon-xs\" aria-label=\"Remove\"><Icon name=\"xmark\" /></Button>} />",
          "imports": "import { Attachment, Button, Icon } from \"@sableui/react\""
        },
        {
          "label": "Image tile, uploading",
          "code": "<Attachment variant=\"media\" name=\"cover.png\" thumbnail={previewUrl} status=\"uploading\" progress={62} meta=\"Uploading… 62%\" />",
          "imports": "import { Attachment } from \"@sableui/react\""
        },
        {
          "label": "Failed upload with a retry",
          "code": "<Attachment name=\"recording.mov\" meta=\"Upload failed — file is over the 50 MB limit\" status=\"error\" icon=\"warning\" actions={<Button variant=\"ghost\" size=\"xs\" onClick={retry}>Retry</Button>} />",
          "imports": "import { Attachment, Button } from \"@sableui/react\""
        },
        {
          "label": "Attachments as a message payload",
          "code": "<Message messageId=\"m7\" align=\"end\" footer={<RelativeTime date={sentAt} />}>\n\t<div className=\"flex flex-wrap gap-2\">\n\t\t{files.map((f) => (<Attachment key={f.id} variant=\"media\" name={f.name} thumbnail={f.url} onOpen={() => open(f)} />))}\n\t</div>\n</Message>",
          "imports": "import { Attachment, Message, RelativeTime } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Avatar",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/avatar",
      "summary": "Circular (or square) profile image over Base UI Avatar — automatic image-load tracking with an initials/glyph fallback. Ergonomic Avatar plus low-level AvatarRoot/AvatarImage/AvatarFallback parts, and AvatarGroup for an overlapping stack with a \"+N\" overflow count.",
      "keywords": [
        "avatar",
        "profile",
        "user",
        "identity",
        "initials",
        "fallback",
        "group",
        "team",
        "stack",
        "overflow",
        "collaborators",
        "facepile",
        "monogram",
        "project mark",
        "workspace icon",
        "org logo",
        "assignee"
      ],
      "usage": {
        "description": "Use Avatar to represent a person, team, or account with a compact visual identity. Wrap several in AvatarGroup for collaborators, assignees, or attendees — it overlaps them, rings each in the surface colour, and collapses the rest into a \"+N\" count; use the low-level parts only when you need custom image/fallback layout.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use `variant=\"art\"` where people without photos sit side by side — a member list, an activity feed, a chat. Seeded by the person, each gets their own colour, so faces stay tellable apart at a glance; the neutral fallback makes everyone the same grey circle."
          },
          {
            "guidance": "do",
            "description": "Provide meaningful alt text for profile images, or an empty alt when the adjacent text already names the person."
          },
          {
            "guidance": "dont",
            "description": "Do not stand in for an AI agent with initials like \"AI\" or a glyph fallback. \"AI\" in a circle reads as a person called A. I. An agent's turns take AgentAvatar, whose states also show the agent working.",
            "instead": [
              "AgentAvatar"
            ]
          },
          {
            "guidance": "do",
            "description": "Use initials or a simple glyph fallback so missing images still communicate identity."
          },
          {
            "guidance": "do",
            "description": "Pick the size by the job: 2xs (20px) or xs (24px) in a compact workspace row (an assignee in an issue list, a project mark in a nav item), sm in dense rows and tables, md (the default) beside one line of text, lg in a row with a title and subtitle, xl (96px) for a profile header beside the person's name, 2xl (160px) for an artist or profile hero and roster portraits. Keep one size within a list or group."
          },
          {
            "guidance": "do",
            "description": "Use AvatarGroup for a stack of people, and give it an aria-label with the real count (\"12 collaborators\"). Set `surface` (or `--avatar-group-ring`) to whatever the group sits on, so the separating ring matches a card or popover, not the page. When it shares a row with actions, set `fit` so it gives up avatars to the \"+N\" count before the row has to wrap."
          },
          {
            "guidance": "do",
            "description": "Use `shape=\"square\"` for what is not a person (a workspace, a project, an org, a team), with `tone` set to a palette family so each one keeps its own colour: `<Avatar shape=\"square\" tone=\"teal\" fallback=\"N\" alt=\"Northwind storefront\" size=\"xs\" />`. Circles mean people; keep that distinction across the app."
          },
          {
            "guidance": "dont",
            "description": "Hand-build a stack with negative margins and per-avatar ring classes, or fake the overflow as an Avatar with \"+4\" initials — screen readers hear \"plus 4\" with no context. Use AvatarGroup's `max`/`total`, or AvatarGroupCount."
          },
          {
            "guidance": "dont",
            "description": "Use avatars as decoration without nearby identity context. They should help users recognize a person or account."
          },
          {
            "guidance": "dont",
            "description": "Overload a dense table with large avatars; use sm or omit images when scanning data is more important."
          },
          {
            "guidance": "dont",
            "description": "Resize an Avatar with size classes (`className=\"size-5\"`, `className=\"size-40\"`) — the initials, the status indicator and the image fade stay at the size they were drawn for. Use size=\"2xs\"/\"xs\" for dense rows and size=\"xl\"/\"2xl\" for portraits, which scale all three. Don't hand-build a tinted initials tile for a project or workspace mark either: that is Avatar shape=\"square\" with a tone. Past 160px, or for a cover, it is media: an AspectBox, not an avatar."
          }
        ],
        "anatomy": [
          {
            "name": "Root",
            "required": true,
            "description": "The circular frame that clips the image, owns size, and contains image plus fallback."
          },
          {
            "name": "Image",
            "required": false,
            "description": "The loaded profile image, cropped to fill the root."
          },
          {
            "name": "Fallback",
            "required": true,
            "description": "Initials, a glyph, or short text shown while loading, on error, or when no image exists."
          },
          {
            "name": "Group",
            "required": false,
            "description": "AvatarGroup: the overlapping stack. Sets one size for every avatar and rings each in the surface colour."
          },
          {
            "name": "Count",
            "required": false,
            "description": "AvatarGroupCount: the \"+N\" avatar ending a group, read as \"and N more\". Rendered automatically by `max`/`total`."
          }
        ]
      },
      "related": {
        "components": [
          "Entity",
          "StatusDot",
          "Badge",
          "Row"
        ],
        "patterns": [
          "DashboardPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "src",
          "type": "string",
          "description": "Image source. When omitted, still loading, or failed, the fallback shows."
        },
        {
          "name": "alt",
          "type": "string",
          "default": "\"\"",
          "description": "Alt text for the image. Without an image it becomes the avatar's accessible name (role=img), so the initials are never read out as the name."
        },
        {
          "name": "fallback",
          "type": "ReactNode",
          "description": "Initials or a glyph rendered when no image is displayed."
        },
        {
          "name": "fallbackDelay",
          "type": "number",
          "description": "Delay before showing the fallback, in ms — avoids a flash on fast loads."
        },
        {
          "name": "status",
          "type": "ReactNode",
          "description": "A presence indicator pinned to the bottom-end edge, usually <StatusDot tone=\"success\" />. It sits outside the clipped circle and wears a ring in the surface colour (--avatar-group-ring, else the page background). Use this instead of absolutely positioning a dot over an Avatar."
        },
        {
          "name": "size",
          "type": "\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\"",
          "default": "\"md\"",
          "description": "Square footprint: 20px / 24px for compact workspace rows; 32px / 40px / 48px for rows; 96px / 160px for portraits (a profile header, an artist hero, a roster tile). The initials, a status indicator and its cut-out ring scale with it, and at the portrait sizes the photo fades in over the resting surface."
        },
        {
          "name": "cutout",
          "type": "boolean",
          "default": "false",
          "description": "Ring the avatar in the colour of the surface it sits on (--avatar-group-ring, else the card or section's surface, else the page), so where it overlaps a banner or cover it reads as cut out of it. The ring is 2px at row sizes and thickens with the portrait. Use it instead of ring-* classes on an Avatar."
        },
        {
          "name": "fit",
          "type": "\"cover\" | \"contain\"",
          "default": "\"cover\"",
          "description": "How the image fills the frame. cover crops it to fill, for a photo. contain fits the whole image inside, for a logo, which then needs no safe area built into the file."
        },
        {
          "name": "shape",
          "type": "\"circle\" | \"square\"",
          "default": "\"circle\"",
          "description": "The frame's corner. circle is a person. square is what is not a face — a workspace, a project, an org, a team — with a radius from the theme's steps that grows with the size (4px at 20–24px to 20px at 160px), so a square theme stays square. A status indicator sits on the square's corner."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\"",
          "default": "\"neutral\"",
          "description": "The fallback's colour. neutral is the muted surface; a palette family paints its wash behind the initials and its deep ink on them (a soft Badge's pair, held to contrast in every theme), for a category colour such as one per project. Ignored by variant=\"art\", which colours by seed."
        },
        {
          "name": "variant",
          "type": "\"neutral\" | \"art\"",
          "default": "\"neutral\"",
          "description": "What the fallback looks like. neutral: initials on the muted surface. art: initials over a two-colour GradientArt (variant=\"linear\") seeded by the person, so each person without a photo gets their own stable colour from the theme."
        },
        {
          "name": "seed",
          "type": "string | number",
          "description": "The art variant's seed. Defaults to the fallback text, then `alt`, so a person keeps one colour wherever they appear; pass a user id to tell apart two people who share initials."
        }
      ],
      "subcomponents": [
        {
          "name": "AvatarRoot",
          "type": "Base UI Avatar.Root props + size + shape + tone + className",
          "description": "Low-level circular frame for full composition control — clips the image and holds the `size` axis. Wraps AvatarImage and AvatarFallback."
        },
        {
          "name": "AvatarImage",
          "type": "Base UI Avatar.Image props + fit?: \"cover\" | \"contain\" + className",
          "description": "The profile image. Fills and crops the frame, or fits inside it with fit=\"contain\"; hidden by Base UI until it loads."
        },
        {
          "name": "AvatarFallback",
          "type": "Base UI Avatar.Fallback props (delay) + className",
          "description": "Shown when no image is available — typically initials or a glyph. Accepts a delay prop."
        },
        {
          "name": "AvatarGroup",
          "type": "{ size?: \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\"; surface?: \"background\" | \"card\" | \"popover\" | \"muted\"; max?: number; fit?: boolean; total?: number; countLabel?: (count: number) => string; \"aria-label\"?: string; className?: string; children: ReactNode }",
          "description": "Overlapping stack (role=group) — name it with aria-label (\"12 collaborators\"). `size` applies to every avatar inside. `max` shows that many and collapses the rest into a \"+N\" count; `total` is the real head-count when you only pass some people. `fit` shows only as many avatars as fit the width the group is given (it fills the space left in a flex row) and folds the rest into the count, so a tight row reads \"MO SR +5\" instead of wrapping. The separating ring reads the inherited `--avatar-group-ring` (default: the page background); `surface` sets it to card, popover, or muted."
        },
        {
          "name": "AvatarGroupCount",
          "type": "{ count: number; label?: string; size?: \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\"; className?: string }",
          "description": "The \"+N\" avatar. Shows \"+4\" and reads \"and 4 more\" (override with label). AvatarGroup renders it for you from max/total; use it directly only when composing the stack yourself."
        }
      ],
      "variants": {
        "size": [
          "2xs",
          "xs",
          "sm",
          "md",
          "lg",
          "xl",
          "2xl"
        ],
        "shape": [
          "circle",
          "square"
        ],
        "variant": [
          "neutral",
          "art"
        ]
      },
      "tokensUsed": [
        "muted",
        "muted-foreground",
        "background",
        "card",
        "popover",
        "overlay-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-fade",
          "part": "Image",
          "why": "At the portrait sizes (xl, 2xl) the photo replacing the initials is a visible pop across one of the page's largest elements; fading it in reads as the picture arriving, not the layout glitching. Row sizes swap instantly — too small to register, and a list of fading faces would shimmer."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Root",
          "why": "An avatar is not interactive itself; a link or button wrapping it owns the response."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "It has no states of its own to move between beyond the image arriving."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Loading shows the fallback, which is already a finished resting state rather than a spinner."
        }
      ],
      "a11y": [
        "Base UI tracks the image loading status and swaps to the fallback on missing/loading/error — no manual onError wiring.",
        "Provide meaningful alt text via the alt prop; pass an empty alt for decorative avatars.",
        "The fallback (initials/glyph) gives a non-image identity cue for screen readers and slow connections.",
        "AvatarGroup renders role=group; give it an aria-label naming the whole set (\"12 collaborators\"), since the visible stack only shows some of them.",
        "The \"+N\" count is hidden from screen readers and replaced by \"and N more\" (AvatarGroupCount `label`, or AvatarGroup `countLabel`)."
      ],
      "examples": [
        {
          "label": "With image",
          "code": "<Avatar src=\"/pfp.png\" alt=\"Alex Morgan\" fallback=\"AM\" />",
          "imports": "import { Avatar } from \"@sableui/react\""
        },
        {
          "label": "Fallback only",
          "code": "<Avatar fallback=\"AM\" alt=\"Alex Morgan\" />",
          "imports": "import { Avatar } from \"@sableui/react\""
        },
        {
          "label": "Art fallback",
          "code": "<Avatar variant=\"art\" fallback=\"AM\" alt=\"Alex Morgan\" />",
          "imports": "import { Avatar } from \"@sableui/react\""
        },
        {
          "label": "Sizes",
          "code": "<Avatar src=\"/pfp.png\" alt=\"Alex Morgan\" fallback=\"AM\" size=\"sm\" />\n<Avatar src=\"/pfp.png\" alt=\"Alex Morgan\" fallback=\"AM\" size=\"md\" />\n<Avatar src=\"/pfp.png\" alt=\"Alex Morgan\" fallback=\"AM\" size=\"lg\" />",
          "imports": "import { Avatar } from \"@sableui/react\""
        },
        {
          "label": "Profile portrait",
          "code": "<div className=\"flex flex-col items-center gap-3 text-center\">\n\t<Avatar variant=\"art\" size=\"2xl\" fallback=\"LV\" alt=\"Lena Vale\" status={<StatusDot tone=\"success\" />} />\n\t<div className=\"flex flex-col gap-1\">\n\t\t<h1 className=\"text-heading-1\">Lena Vale</h1>\n\t\t<p className=\"text-body-sm text-muted-foreground\">1.2M monthly listeners</p>\n\t</div>\n</div>",
          "imports": "import { Avatar, StatusDot } from \"@sableui/react\""
        },
        {
          "label": "Dense row sizes",
          "code": "<Avatar fallback=\"EL\" alt=\"Emma Lee\" size=\"2xs\" />\n<Avatar fallback=\"EL\" alt=\"Emma Lee\" size=\"xs\" />",
          "imports": "import { Avatar } from \"@sableui/react\""
        },
        {
          "label": "Project marks",
          "code": "<Avatar shape=\"square\" tone=\"teal\" size=\"xs\" fallback=\"N\" alt=\"Northwind storefront\" />\n<Avatar shape=\"square\" tone=\"orange\" size=\"xs\" fallback=\"H\" alt=\"Harbor brand refresh\" />\n<Avatar shape=\"square\" tone=\"purple\" size=\"xs\" fallback=\"L\" alt=\"Lumen editorial\" />",
          "imports": "import { Avatar } from \"@sableui/react\""
        },
        {
          "label": "Low-level parts",
          "code": "<AvatarRoot size=\"lg\"><AvatarImage src=\"/pfp.png\" alt=\"Mara Okafor\" /><AvatarFallback>MO</AvatarFallback></AvatarRoot>",
          "imports": "import { AvatarFallback, AvatarImage, AvatarRoot } from \"@sableui/react\""
        },
        {
          "label": "Group with overflow",
          "code": "<AvatarGroup aria-label=\"6 collaborators\" max={3} size=\"sm\" surface=\"card\"><Avatar src=\"/ana.png\" alt=\"Ana Chen\" fallback=\"AC\" /><Avatar src=\"/mika.png\" alt=\"Mika Lee\" fallback=\"ML\" /><Avatar fallback=\"JL\" alt=\"Jo Lund\" /><Avatar fallback=\"AK\" alt=\"Ari Kim\" /><Avatar fallback=\"SR\" alt=\"Sam Reyes\" /><Avatar fallback=\"MO\" alt=\"Mo Ortiz\" /></AvatarGroup>",
          "imports": "import { Avatar, AvatarGroup } from \"@sableui/react\""
        },
        {
          "label": "Group of a larger set",
          "code": "<AvatarGroup aria-label=\"12 attendees\" total={12} countLabel={(n) => `and ${n} more attendees`}><Avatar fallback=\"MO\" alt=\"Mo Ortiz\" /><Avatar fallback=\"SR\" alt=\"Sam Reyes\" /><Avatar fallback=\"JL\" alt=\"Jo Lund\" /></AvatarGroup>",
          "imports": "import { Avatar, AvatarGroup } from \"@sableui/react\""
        },
        {
          "label": "Composed count",
          "code": "<AvatarGroup aria-label=\"7 reviewers\"><Avatar fallback=\"AC\" alt=\"Ana Chen\" /><Avatar fallback=\"ML\" alt=\"Mika Lee\" /><AvatarGroupCount count={5} label=\"and 5 more reviewers\" /></AvatarGroup>",
          "imports": "import { Avatar, AvatarGroup, AvatarGroupCount } from \"@sableui/react\""
        },
        {
          "label": "With status",
          "code": "<Entity leading={<Avatar src=\"/pfp.png\" alt=\"Nova Reed\" fallback=\"NR\" status={<StatusDot tone=\"success\" />} />} title=\"Nova Reed\" subtitle=\"Online\" />",
          "imports": "import { Avatar, Entity, StatusDot } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Badge",
      "status": "stable",
      "group": "Badges & pills",
      "register": "either",
      "path": "components/badge",
      "summary": "Compact static label, set on two axes: appearance (soft, outline, solid, overlay on media, plain text) and tone (neutral, a semantic tone, or a palette family like blue for a category with no meaning attached). An optional leading icon, or a status dot (with pulse) for state.",
      "keywords": [
        "badge",
        "tag",
        "label",
        "status",
        "metadata",
        "chip",
        "pill",
        "tone",
        "category"
      ],
      "usage": {
        "description": "Use Badge for any short static label: metadata, categories, tone-coded labels, a label on artwork (appearance=\"overlay\"), or a status line (appearance=\"plain\" with dot). Use Pill for a chip someone clicks, NotificationBadge for an unread count on an icon, and Banner or Toast for messages that need attention.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep badge text short: one to three words or a compact count."
          },
          {
            "guidance": "do",
            "description": "Use tone variants when the badge carries meaning, such as success, warning or destructive, or a decorative tone for a category or plan."
          },
          {
            "guidance": "do",
            "description": "Pair icons with text; the icon reinforces meaning but should not be the only cue."
          },
          {
            "guidance": "dont",
            "description": "Use a Badge as a button. If it triggers an action, use Button, Toggle, or a menu item.",
            "instead": [
              "Button",
              "Toggle"
            ]
          },
          {
            "guidance": "do",
            "description": "Choose appearance and tone separately: appearance is how loud it is (soft by default, solid for emphasis, overlay on images, plain for a status line); tone is what it means."
          },
          {
            "guidance": "dont",
            "description": "Stack many loud tone badges in one row; too many semantic colors compete with the actual content."
          }
        ],
        "anatomy": [
          {
            "name": "Container",
            "required": true,
            "description": "The compact pill surface carrying the tone or neutral treatment."
          },
          {
            "name": "Label",
            "required": true,
            "description": "Short visible text that names the category, state, role, or metadata value."
          },
          {
            "name": "Icon",
            "required": false,
            "description": "Optional leading Icon used to reinforce the label."
          }
        ]
      },
      "related": {
        "components": [
          "Pill",
          "StatusDot",
          "NotificationBadge",
          "Banner",
          "Toast"
        ],
        "patterns": [
          "DashboardPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "appearance",
          "type": "\"soft\" | \"outline\" | \"solid\" | \"overlay\" | \"plain\"",
          "default": "\"soft\"",
          "description": "How it is drawn. soft: a tinted fill (neutral is the secondary surface). outline: a hairline. solid: the tone at full strength (neutral is the inverted chip). overlay: legible on images — a dark scrim, or the solid tone. plain: no fill or padding, a status line."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"1\" | \"2\" | \"3\" | \"info\" | \"success\" | \"warning\" | \"destructive\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\"",
          "default": "\"neutral\"",
          "description": "What it means. Every appearance takes every tone. The palette families (red … pink) are categories with no meaning attached — tags, labels, project colours — painted from the theme's generated palette, so they lean toward the brand and read in both modes."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\"",
          "default": "\"md\"",
          "description": "\"sm\" uses tighter padding + text-label-sm; \"md\" is the default look."
        },
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "Optional leading glyph (e.g. <Icon name=\"lock\" />), rendered before the children with the base gap. Ignored when dot is set."
        },
        {
          "name": "dot",
          "type": "boolean",
          "default": "false",
          "description": "A leading status dot in the badge's tone. With appearance=\"plain\" it is a status line (● Ready)."
        },
        {
          "name": "pulse",
          "type": "boolean",
          "default": "false",
          "description": "Pulse the dot, for a state in progress. Needs dot."
        }
      ],
      "variants": {
        "appearance": [
          "soft",
          "outline",
          "solid",
          "overlay",
          "plain"
        ],
        "tone": [
          "neutral",
          "1",
          "2",
          "3",
          "info",
          "success",
          "warning",
          "destructive",
          "red",
          "orange",
          "yellow",
          "green",
          "teal",
          "blue",
          "purple",
          "pink"
        ],
        "size": [
          "sm",
          "md"
        ]
      },
      "tokensUsed": [
        "palette-wash",
        "palette-wash-strong",
        "palette-edge",
        "palette-dot",
        "palette-solid",
        "palette-text",
        "palette-solid-ink",
        "secondary",
        "secondary-foreground",
        "border",
        "foreground",
        "background",
        "muted",
        "muted-foreground",
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "success",
        "tone-warning",
        "destructive",
        "overlay",
        "overlay-foreground",
        "tone-1-foreground",
        "tone-2-foreground",
        "tone-3-foreground",
        "tone-info-foreground",
        "success-foreground",
        "tone-warning-foreground",
        "destructive-foreground",
        "destructive-mark",
        "success-mark",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "a11y": [
        "Badges are static text by default; do not rely on color alone for meaning.",
        "Use clear label text for semantic tones so assistive tech receives the same status information sighted users see."
      ],
      "examples": [
        {
          "label": "Tones",
          "code": "<Row gap={1}><Badge tone=\"1\">Business</Badge><Badge tone=\"2\">Studio</Badge><Badge tone=\"3\">Starter</Badge></Row>",
          "imports": "import { Badge, Row } from \"@sableui/react\""
        },
        {
          "label": "Palette colours (categories)",
          "code": "<Row gap={1}><Badge tone=\"blue\">Design</Badge><Badge tone=\"teal\">Research</Badge><Badge tone=\"orange\">Marketing</Badge><Badge tone=\"pink\" appearance=\"outline\">Ops</Badge><Badge tone=\"purple\" appearance=\"solid\">Launch</Badge></Row>",
          "imports": "import { Badge, Row } from \"@sableui/react\""
        },
        {
          "label": "Solid",
          "code": "<Badge appearance=\"solid\" size=\"sm\">Admin</Badge>",
          "imports": "import { Badge } from \"@sableui/react\""
        },
        {
          "label": "Success",
          "code": "<Badge tone=\"success\">Resolved</Badge>",
          "imports": "import { Badge } from \"@sableui/react\""
        },
        {
          "label": "With icon",
          "code": "<Badge size=\"sm\" icon={<Icon name=\"lock\" />}>Locked</Badge>",
          "imports": "import { Badge, Icon } from \"@sableui/react\""
        },
        {
          "label": "Small",
          "code": "<Badge size=\"sm\" tone=\"info\">New</Badge>",
          "imports": "import { Badge } from \"@sableui/react\""
        },
        {
          "label": "Metadata row",
          "code": "<Row gap={1}><Badge>12 projects</Badge><Badge appearance=\"outline\">Draft</Badge><Badge tone=\"info\" icon={<Icon name=\"info\" />}>Curated</Badge></Row>",
          "imports": "import { Badge, Icon, Row } from \"@sableui/react\""
        },
        {
          "label": "Semantic state",
          "code": "<Row gap={1}><Badge tone=\"success\">Synced</Badge><Badge tone=\"warning\">Review</Badge><Badge tone=\"destructive\">Blocked</Badge></Row>",
          "imports": "import { Badge, Row } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Banner",
      "status": "stable",
      "group": "Status",
      "register": "page",
      "path": "components/banner",
      "summary": "Full-width, page-level announcement bar. A tone (neutral, info, success, warning, the decorative 1, destructive) × an appearance (soft tint or loud solid fill), and an optional leading scope label. Centers its message, or — with a trailing action — switches to a leading-text + trailing-button layout. Optionally sticky and dismissible.",
      "keywords": [
        "banner",
        "announcement",
        "alert",
        "status",
        "message",
        "warning",
        "success",
        "offline",
        "sticky"
      ],
      "usage": {
        "description": "Use Banner for page-level or app-level messages that affect the current experience: outages, maintenance, success confirmations, policy notices, or major warnings. Prefer Toast for transient feedback from a specific action, and prefer InlineStatus for local row or form state.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use soft appearance for contextual notices and solid appearance for urgent, blocking, or system-wide states."
          },
          {
            "guidance": "do",
            "description": "Set live='polite' or live='assertive' only when the banner appears or changes dynamically."
          },
          {
            "guidance": "do",
            "description": "Include one clear action when the user can resolve or inspect the state."
          },
          {
            "guidance": "dont",
            "description": "Use multiple stacked solid banners unless the page is genuinely blocked by multiple independent states."
          },
          {
            "guidance": "dont",
            "description": "Use Banner for field-level validation, row status, or small local hints; use Field, InlineStatus, or Badge instead.",
            "instead": [
              "InlineStatus",
              "Badge"
            ]
          },
          {
            "guidance": "dont",
            "description": "Use Banner inside a dialog, a form, or a section to qualify the content around it — that is Note. Banner is a full-width announcement strip for page- or app-level state, so in a modal it reads as a slab heavier than the fields it warns about, and its soft appearance has no border and no tone-colored icon: the severity survives only as a faint wash.",
            "instead": [
              "Note"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "Message",
            "required": true,
            "description": "The short announcement text. It should explain the state in plain language."
          },
          {
            "name": "Action",
            "required": false,
            "description": "Optional trailing action that changes the layout from centered copy to text plus action."
          },
          {
            "name": "Dismiss",
            "required": false,
            "description": "Optional close control for notices the user can safely hide."
          }
        ]
      },
      "related": {
        "components": [
          "Note",
          "AppShell",
          "Toast",
          "InlineStatus",
          "EmptyState",
          "Button"
        ],
        "patterns": [
          "DashboardPage"
        ]
      },
      "props": [
        {
          "name": "tone",
          "type": "\"neutral\" | \"info\" | \"success\" | \"warning\" | \"1\" | \"destructive\"",
          "default": "\"neutral\"",
          "description": "Neutral surface or a tone that encodes the announcement's intent (info / success / warning / the decorative 1 / destructive)."
        },
        {
          "name": "appearance",
          "type": "\"soft\" | \"solid\"",
          "default": "\"soft\"",
          "description": "\"soft\" is a quiet tinted fill; \"solid\" is the full tone with its paired ink — for loud, can't-miss states (offline, chain-down, RPC errors)."
        },
        {
          "name": "label",
          "type": "ReactNode",
          "description": "A short scope label (\"Preview\", \"Staging\", a project name) in a leading chip — a Badge that reads on soft and solid fills."
        },
        {
          "name": "action",
          "type": "ReactNode",
          "description": "A trailing action (e.g. a Button). Switches the bar to leading text + trailing action instead of centered text."
        },
        {
          "name": "sticky",
          "type": "boolean",
          "default": "false",
          "description": "Stick the banner to the top of its scroll container (sticky top-0, z-30)."
        },
        {
          "name": "live",
          "type": "\"off\" | \"polite\" | \"assertive\"",
          "default": "\"off\"",
          "description": "ARIA live-region politeness for banners shown/updated at runtime (offline, RPC-down, \"N new posts\"). \"polite\" → role=status; \"assertive\" → role=alert. \"off\" keeps a static labelled region."
        },
        {
          "name": "dismissible",
          "type": "boolean",
          "default": "false",
          "description": "Render a trailing close button that hides the banner when clicked."
        },
        {
          "name": "onDismiss",
          "type": "() => void",
          "description": "Called after the banner is dismissed."
        },
        {
          "name": "dismissLabel",
          "type": "string",
          "default": "\"Dismiss\"",
          "description": "Accessible name of the dismiss button. A static banner's region is named \"Announcement\"; pass aria-label to rename it."
        }
      ],
      "variants": {
        "tone": [
          "neutral",
          "info",
          "success",
          "warning",
          "1",
          "destructive"
        ],
        "appearance": [
          "soft",
          "solid"
        ]
      },
      "tokensUsed": [
        "secondary",
        "secondary-foreground",
        "foreground",
        "background",
        "tone-info",
        "tone-info-foreground",
        "success",
        "success-foreground",
        "tone-warning",
        "tone-warning-foreground",
        "tone-1",
        "tone-1-foreground",
        "destructive",
        "destructive-foreground",
        "destructive-mark",
        "success-mark",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark"
      ],
      "a11y": [
        "Static banners render as a labelled region (role=region); set `live` to announce dynamic status bars (role=status / role=alert) when they appear or change.",
        "The dismiss control is Button (on-color-ghost, icon-xs) named by dismissLabel, with a 44px touch target under a coarse pointer; it takes the bar's own ink, so its glyph and focus ring stay legible on soft and solid fills alike.",
        "Solid fills pair each tone with its theme-adaptive ink token, so text stays legible in light and dark."
      ],
      "examples": [
        {
          "label": "Tones",
          "code": "<Banner tone=\"info\">Maintenance window tonight at 02:00 UTC.</Banner>",
          "imports": "import { Banner } from \"@sableui/react\""
        },
        {
          "label": "Solid (loud)",
          "code": "<Banner tone=\"destructive\" appearance=\"solid\" live=\"assertive\">Payments are down. Checkout and upgrades are temporarily disabled.</Banner>",
          "imports": "import { Banner } from \"@sableui/react\""
        },
        {
          "label": "Success",
          "code": "<Banner tone=\"success\" live=\"polite\">Credits authorized for Studio.</Banner>",
          "imports": "import { Banner } from \"@sableui/react\""
        },
        {
          "label": "Action",
          "code": "<Banner sticky action={<Button variant=\"outline\" size=\"sm\">Refresh</Button>}>12 new posts</Banner>",
          "imports": "import { Banner, Button } from \"@sableui/react\""
        },
        {
          "label": "Dismissible",
          "code": "<Banner tone=\"warning\" dismissible>Your session expires soon.</Banner>",
          "imports": "import { Banner } from \"@sableui/react\""
        },
        {
          "label": "Recoverable warning",
          "code": "<Banner tone=\"warning\" action={<Button variant=\"outline\" size=\"sm\">Reconnect</Button>}>Calendar sync paused.</Banner>",
          "imports": "import { Banner, Button } from \"@sableui/react\""
        },
        {
          "label": "App-shell outage",
          "code": "<AppShell banners={<Banner tone=\"destructive\" appearance=\"solid\" live=\"assertive\">Uploads are temporarily unavailable.</Banner>}><Region max=\"feed\"><EmptyState title=\"Uploads paused\" description=\"Existing posts are still visible while the service recovers.\" /></Region></AppShell>",
          "imports": "import { AppShell, Banner, EmptyState, Region } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "BarChart",
      "status": "beta",
      "group": "Charts",
      "register": "page",
      "path": "components/bar-chart",
      "summary": "Bars comparing amounts across categories: grouped, stacked or stacked to 100%, vertical columns or horizontal bars, with value labels, per-category colours and a separate tone for negative values. Bars rise from the baseline in sequence as the chart scrolls into view.",
      "keywords": [
        "chart",
        "bar",
        "column",
        "histogram",
        "compare",
        "stacked",
        "grouped",
        "horizontal",
        "analytics",
        "dashboard"
      ],
      "usage": {
        "description": "Use BarChart to compare amounts across categories — the default chart for \"how much of each\". Go horizontal (`orientation=\"horizontal\"`) when category names are long or there are many of them; group series side by side to compare them, stack them to show a total. For parts of one whole, a stacked bar or PieChart; for a trend, AreaChart or LineChart.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Sort categories by value unless they have a natural order (months, steps)."
          },
          {
            "guidance": "do",
            "description": "Use negativeTone for diverging data (profit and loss), so a loss reads apart from a gain."
          },
          {
            "guidance": "dont",
            "description": "Group more than three series side by side — the bars get too thin to compare; stack them or split the chart."
          },
          {
            "guidance": "dont",
            "description": "Use it for data-heavy views — streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
          }
        ]
      },
      "related": {
        "components": [
          "AreaChart",
          "PieChart",
          "SegmentedBar",
          "Card"
        ]
      },
      "props": [
        {
          "name": "data",
          "type": "Record<string, unknown>[]",
          "description": "The rows, in order along the category axis."
        },
        {
          "name": "index",
          "type": "string",
          "description": "The datum field naming each row's category (a month, a day, a channel)."
        },
        {
          "name": "series",
          "type": "{ key: string; label: string; tone?: ChartTone; color?: string; icon?: string }[]",
          "description": "The measures to plot: the datum field, its name in the legend/tooltip/table, and its colour (a tone by role, or any CSS colour). Omitted, series take the chart palette in order: --chart-1 … --chart-8, validated for colour-blind separation in light and dark; a theme may override the set."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
        },
        {
          "name": "className",
          "type": "string",
          "default": "\"h-60\"",
          "description": "Sizes the chart (plot + legend). Set a height: `h-72`, `aspect-video h-auto`."
        },
        {
          "name": "valueFormatter",
          "type": "(value: number) => string",
          "description": "Format values everywhere (axis, labels, tooltip, table) — units like \"$12,480\". Default: compact on the axis, full elsewhere."
        },
        {
          "name": "indexFormatter",
          "type": "(value: string) => string",
          "description": "Shorten category labels on the axis (\"January\" → \"Jan\"); the tooltip keeps the full value."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for default number and date formatting."
        },
        {
          "name": "tooltip",
          "type": "boolean | { indicator?: \"dot\" | \"line\" | \"dashed\" | \"none\"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean; order?: \"series\" | \"reverse\" }",
          "default": "true",
          "description": "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row, the row order. A vertical stack lists its rows top to bottom; order: \"series\" keeps the series order."
        },
        {
          "name": "legend",
          "type": "boolean",
          "default": "true when there is more than one series",
          "description": "Show the legend under the chart."
        },
        {
          "name": "grid",
          "type": "boolean",
          "default": "true (false for horizontal bars)",
          "description": "Hairline gridlines along the value axis."
        },
        {
          "name": "xAxis",
          "type": "boolean",
          "default": "true for columns; false for horizontal bars",
          "description": "The horizontal axis."
        },
        {
          "name": "yAxis",
          "type": "boolean",
          "default": "false for columns; true for horizontal bars",
          "description": "The vertical axis."
        },
        {
          "name": "yAxisSide",
          "type": "\"left\" | \"right\"",
          "default": "\"left\"",
          "description": "Which edge the value axis sits on, on a vertical chart."
        },
        {
          "name": "yAxisWidth",
          "type": "number",
          "description": "The vertical axis's label width, in px. Left unset it follows the longest label, so the plot slides sideways when new data changes the labels; set it where a chart swaps data in place, such as tabs."
        },
        {
          "name": "categoryTicks",
          "type": "number",
          "description": "At most this many category labels. They already thin to fit, from the latest back; this asks for fewer."
        },
        {
          "name": "domain",
          "type": "\"auto\" | [number, number]",
          "description": "A [min, max] pair fixes the value axis's range, and values past it stop at the plot's edge. \"auto\" is ignored: a bar's length is its value, so bars always start at zero."
        },
        {
          "name": "referenceLines",
          "type": "ChartReferenceLine[]",
          "description": "Mark positions on the plot, each { category } or { value }, with an optional label and tone: a Today line, a target."
        },
        {
          "name": "axisFormatter",
          "type": "(value: number) => string",
          "description": "Format values on the axis alone, when it needs less than valueFormatter prints: $50K beside $41,746.08."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The arrival (bars rising in sequence) and the data-change morph are the flourish; the hover dim and gliding cursor are the feedback `subtle` keeps."
        },
        {
          "name": "animate",
          "type": "boolean",
          "default": "true",
          "description": "Play the arrival once the chart scrolls into view. Reduced motion shows the finished chart. `animate={false}` is `motion=\"subtle\"`.",
          "deprecated": "motion=\"subtle\" (what animate={false} now maps to: no arrival, hover kept) or motion=\"off\""
        },
        {
          "name": "activeIndex",
          "type": "number | null",
          "description": "The highlighted row (controlled); `null` for none."
        },
        {
          "name": "defaultActiveIndex",
          "type": "number | null",
          "description": "The row highlighted at first — a tooltip already open before anyone hovers."
        },
        {
          "name": "onActiveIndexChange",
          "type": "(index: number | null) => void",
          "description": "Called as the pointer or keyboard moves between rows."
        },
        {
          "name": "orientation",
          "type": "\"vertical\" | \"horizontal\"",
          "default": "\"vertical\"",
          "description": "`vertical` columns rise from the bottom; `horizontal` bars run from the left, for long category names."
        },
        {
          "name": "stacked",
          "type": "boolean | \"expand\"",
          "default": "false",
          "description": "Stack the series in one bar, or `\"expand\"` to show each category as 100%. Unstacked series sit side by side."
        },
        {
          "name": "labels",
          "type": "boolean | \"inside\"",
          "default": "false",
          "description": "Print each bar's value at its end, or (`\"inside\"`, horizontal) the category name inside the bar as well."
        },
        {
          "name": "colorBy",
          "type": "\"series\" | \"index\"",
          "default": "\"series\"",
          "description": "Colour by series, or give each category its own tone (one series)."
        },
        {
          "name": "negativeTone",
          "type": "\"1\" | \"2\" | \"3\" | \"info\" | \"warning\" | \"primary\" | \"neutral\" | \"success\" | \"destructive\"",
          "description": "Colour negative values with this tone."
        },
        {
          "name": "radius",
          "type": "number",
          "default": "4",
          "description": "Corner radius of each bar's far end, in px. Stacks round only the outer segment."
        },
        {
          "name": "barWidth",
          "type": "number",
          "default": "24",
          "description": "Maximum thickness of a bar, in px: the band's leftover is air, not a fatter bar. Raise it for a bolder presentation look."
        }
      ],
      "tokensUsed": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "primary",
        "muted-foreground",
        "border",
        "popover",
        "popover-foreground",
        "foreground",
        "background",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Bar",
          "why": "Once on screen, bars rise from the baseline in sequence on the emphasized easing (scale from the zero line) and their labels fade in. On the motion tokens; reduced motion shows the finished chart. The arrival is expressive: it plays at the full motion level only, so `motion=\"subtle\"` (or a subtle app policy) shows the finished chart while hover feedback stays."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Cursor + tooltip",
          "why": "The hovered category gets a band behind it and the other bars dim at once — a lagging highlight reads as a slow chart. The dim mixes each bar toward the surface instead of fading it, so gridlines never strike through a dimmed column and stacked segments stay solid. Essential: `subtle` keeps it."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Bar",
          "why": "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place. Expressive, like the arrival: under `subtle` new data swaps in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "BarChart",
          "why": "A chart has no indeterminate state; show a Skeleton while the data loads."
        }
      ],
      "a11y": [
        "The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
        "With a tooltip, the chart is one tab stop (role=group, aria-roledescription=\"chart\"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.",
        "Colour is never the only key: series are named in the legend, tooltip and table."
      ],
      "examples": [
        {
          "label": "Grouped series",
          "code": "<BarChart\n\tlabel=\"Visitors by device\"\n\tdata={visitors}\n\tindex=\"month\"\n\tseries={[\n\t\t{ key: \"desktop\", label: \"Desktop\" },\n\t\t{ key: \"mobile\", label: \"Mobile\" },\n\t]}\n\tindexFormatter={(m) => m.slice(0, 3)}\n/>",
          "imports": "import { BarChart } from \"@sableui/react\""
        },
        {
          "label": "Horizontal, labelled inside",
          "code": "const browsers = [\n\t{ browser: \"Chrome\", visitors: 275 },\n\t{ browser: \"Safari\", visitors: 200 },\n\t{ browser: \"Firefox\", visitors: 187 },\n\t{ browser: \"Edge\", visitors: 173 },\n]\n\n<BarChart\n\tlabel=\"Visitors by browser\"\n\tdata={browsers}\n\tindex=\"browser\"\n\tseries={[{ key: \"visitors\", label: \"Visitors\" }]}\n\torientation=\"horizontal\"\n\tlabels=\"inside\"\n\tyAxis={false}\n\tgrid={false}\n/>",
          "imports": "import { BarChart } from \"@sableui/react\""
        },
        {
          "label": "Profit and loss",
          "code": "<BarChart\n\tlabel=\"Net revenue by month\"\n\tdata={[\n\t\t{ month: \"Jan\", net: 186 },\n\t\t{ month: \"Feb\", net: -95 },\n\t\t{ month: \"Mar\", net: 137 },\n\t\t{ month: \"Apr\", net: -60 },\n\t]}\n\tindex=\"month\"\n\tseries={[{ key: \"net\", label: \"Net\", tone: \"success\" }]}\n\tnegativeTone=\"destructive\"\n\tlabels\n/>",
          "imports": "import { BarChart } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "BottomNav",
      "status": "stable",
      "group": "Navigation",
      "register": "page",
      "path": "components/bottom-nav",
      "summary": "Mobile bottom tab bar (fixed, hidden at lg), with home-indicator safe-area padding and evenly distributed BottomNavItem tabs. Items are router-agnostic via `render`.",
      "keywords": [
        "bottom nav",
        "mobile nav",
        "tabs",
        "app navigation"
      ],
      "usage": {
        "description": "Use BottomNav for a small set of top-level mobile destinations that should remain reachable with one thumb. Mount it through `<AppShell bottomNav={…}>` so the content area reserves matching bottom space; it hides at lg, where the Sidebar takes over.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Limit the nav to the primary destinations users switch between often."
          },
          {
            "guidance": "do",
            "description": "Give every item a clear label (it is the accessible name), and turn on showLabel when the icons alone are not obvious."
          },
          {
            "guidance": "dont",
            "description": "Do not use BottomNav for desktop navigation, dense menus, or page-local actions."
          },
          {
            "guidance": "dont",
            "description": "Do not omit the safe-area padding by overriding its padding-bottom. On a device with a home indicator the last row of targets ends up under the gesture area, where taps dismiss the app instead."
          }
        ],
        "anatomy": [
          {
            "name": "BottomNav",
            "required": true,
            "description": "The fixed or anchored navigation container."
          },
          {
            "name": "BottomNavItem",
            "required": true,
            "description": "One destination with label, icon, and active state."
          }
        ]
      },
      "related": {
        "components": [
          "Sidebar",
          "SideNav",
          "AppHeader"
        ]
      },
      "props": [],
      "subcomponents": [
        {
          "name": "BottomNavItem",
          "type": "{ label: string; icon?: ReactNode; active?: boolean; badge?: ReactNode; showLabel?: boolean; render?: useRender.RenderProp } + button props",
          "description": "A single tab, placed as a child of BottomNav. `label` is the accessible name (aria-label) and optional visible label; `icon` is the glyph node (consumer swaps fill weight for the active state); `active` marks the current route (active ink + aria-current); `badge` overlays a corner dot/count on the icon; `showLabel` shows the label text beneath the icon — defaults to false (icon-only); turn it on when the icons alone are not self-evident; `render` renders as another element, e.g. render={<Link to=\"/x\" />}."
        }
      ],
      "tokensUsed": [
        "background",
        "border",
        "muted-foreground",
        "foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Fixed app chrome, present from the first paint of every screen. Animating it in on navigation would make each route change look like the app restarting."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "BottomNavItem",
          "why": "The ink steps up on hover and the focus ring eases in, so a pointer or a keyboard on a tablet gets the same answer as every other control in the app."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "BottomNavItem",
          "why": "On a phone there is no hover to say a tap landed, and a route can take a beat to paint. The settle on press is the receipt; without it people tap the tab a second time."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "BottomNavItem",
          "why": "Changing tab eases the active ink out of one item and into the next. It is a cross-fade, not a travelling indicator: each item owns its colour, so there is no single mark to glide."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Navigation has no working state of its own. A slow route shows its pending state in the page it is loading, not in the tab bar."
        }
      ],
      "a11y": [
        "BottomNav renders a <nav> landmark.",
        "Each tab is a 44px minimum touch target with an aria-label.",
        "Active tab carries aria-current=\"page\"."
      ],
      "examples": [
        {
          "label": "Tab bar",
          "code": "<BottomNav><BottomNavItem icon={<Icon name=\"home\" />} label=\"Home\" active render={<Link to=\"/\" />} /><BottomNavItem icon={<Icon name=\"bell\" />} label=\"Notifications\" badge={<NotificationBadge dot />} render={<Link to=\"/notifications\" />} /></BottomNav>",
          "imports": "import { BottomNav, BottomNavItem, Icon, NotificationBadge } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "When NOT to use it",
          "code": "// BottomNav is for 3–5 PEER destinations on a small viewport — the mobile\n// counterpart to SideNav, not an action bar.\n\n// ✗ Actions. A bottom bar of verbs (Save / Share / Delete) is a toolbar; it\n//   competes with the OS gesture area and has no \"current\" state to show.\n// ✗ More than five items. Past that, labels truncate and targets shrink below\n//   the 44px floor — use a \"More\" destination that opens a Sheet.\n// ✗ Nested navigation. BottomNav switches top-level sections only; drilling in\n//   happens inside the section, with Breadcrumbs or a back affordance.\n\n<AppShell bottomNav={<BottomNav>\n  <BottomNavItem label=\"Home\" icon={<Icon name=\"home\" />} active />\n  <BottomNavItem label=\"Search\" icon={<Icon name=\"search\" />} />\n  <BottomNavItem label=\"Account\" icon={<Icon name=\"user\" />} />\n</BottomNav>}>\n  <Region max=\"feed\">Route content</Region>\n</AppShell>",
          "imports": "import { AppShell, BottomNav, BottomNavItem, Icon, Region } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Breadcrumbs",
      "status": "stable",
      "group": "Navigation",
      "register": "either",
      "path": "components/breadcrumbs",
      "summary": "Navigation trail showing the path to the current page. A labelled <nav> wraps an inline <ol> of crumbs — interactive ancestor links, separators, and a non-interactive current page. No Base UI.",
      "keywords": [
        "breadcrumbs",
        "hierarchy",
        "path",
        "navigation"
      ],
      "usage": {
        "description": "Use Breadcrumbs to show the user's location inside a hierarchy and provide lightweight parent navigation.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use breadcrumbs when users can arrive deep in a nested structure."
          },
          {
            "guidance": "do",
            "description": "Keep the current page as text so it reads as location, not another link."
          },
          {
            "guidance": "dont",
            "description": "Do not use breadcrumbs as a substitute for primary navigation or step progress."
          },
          {
            "guidance": "dont",
            "description": "Do not make the last crumb a link. It points at the page you are already on, and screen readers announce it as a destination; render it as the current page with aria-current."
          }
        ],
        "anatomy": [
          {
            "name": "BreadcrumbItem",
            "required": true,
            "description": "A single step in the path."
          },
          {
            "name": "BreadcrumbLink",
            "required": false,
            "description": "A linked ancestor destination."
          },
          {
            "name": "BreadcrumbPage",
            "required": true,
            "description": "The current non-linked page."
          },
          {
            "name": "BreadcrumbSeparator",
            "required": false,
            "description": "The visual separator between steps."
          }
        ]
      },
      "related": {
        "components": [
          "SideNav",
          "PageHeader"
        ]
      },
      "props": [
        {
          "name": "Breadcrumbs",
          "type": "ComponentPropsWithRef<'nav'>",
          "default": "—",
          "description": "The trail root. Renders <nav aria-label=\"Breadcrumb\"> around a flex <ol>; pass aria-label to translate the landmark name. Pass the crumb parts as children."
        }
      ],
      "subcomponents": [
        {
          "name": "BreadcrumbItem",
          "type": "ComponentPropsWithRef<'li'>",
          "description": "A single crumb slot (<li>) holding a link or the current page."
        },
        {
          "name": "BreadcrumbLink",
          "type": "ComponentPropsWithRef<'a'> & { render?: useRender.RenderProp }",
          "description": "An interactive ancestor crumb (<a>). Muted by default, brightens to foreground on hover/focus. render composes another element with the crumb's styling, e.g. a router link: render={<Link to=\"/library\" />}, so navigating stays in the app."
        },
        {
          "name": "BreadcrumbPage",
          "type": "ComponentPropsWithRef<'span'>",
          "description": "The current-page crumb (<span aria-current=\"page\">). Non-interactive, full-contrast."
        },
        {
          "name": "BreadcrumbSeparator",
          "type": "ComponentPropsWithRef<'li'> + { children? }",
          "description": "Decorative divider (<li aria-hidden>) between crumbs. Defaults to a chevron-right icon; pass children to swap the glyph."
        }
      ],
      "tokensUsed": [
        "muted-foreground",
        "foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The trail is page furniture, rendered with the page header. An entrance would replay on every navigation, which is exactly when the reader looks at it to get their bearings."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "BreadcrumbLink",
          "why": "Ancestors are muted until hovered or focused. Easing the ink makes the trail read as links answering the pointer; a hard snap across a row of small text looks like flicker."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "A breadcrumb has no state of its own. The current page changes by navigation, which replaces the trail; animating between two trails would imply the path itself moved."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "It never works in the background. A route that is still loading says so in the page, not in its address."
        }
      ],
      "a11y": [
        "The <nav> carries aria-label=\"Breadcrumb\" so assistive tech announces the landmark.",
        "Crumbs sit in an ordered list (<ol>) to convey hierarchy and position.",
        "The current page uses aria-current=\"page\" and is rendered as plain text, not a link.",
        "Separators are aria-hidden so the chevron glyph is not announced."
      ],
      "examples": [
        {
          "label": "Three-level trail",
          "code": "<Breadcrumbs><BreadcrumbItem><BreadcrumbLink href=\"/\">Home</BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator /><BreadcrumbItem><BreadcrumbLink href=\"/library\">Library</BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator /><BreadcrumbItem><BreadcrumbPage>Reports</BreadcrumbPage></BreadcrumbItem></Breadcrumbs>",
          "imports": "import { BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, Breadcrumbs, BreadcrumbSeparator } from \"@sableui/react\""
        },
        {
          "label": "Custom separator",
          "code": "<Breadcrumbs><BreadcrumbItem><BreadcrumbLink href=\"/\">Home</BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator>/</BreadcrumbSeparator><BreadcrumbItem><BreadcrumbPage>Settings</BreadcrumbPage></BreadcrumbItem></Breadcrumbs>",
          "imports": "import { BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, Breadcrumbs, BreadcrumbSeparator } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Browser",
      "status": "stable",
      "group": "Media & mockups",
      "register": "page",
      "path": "components/browser",
      "summary": "A generic, current browser window: one compact toolbar (window controls, back/forward/reload, a centered address field) around page content.",
      "keywords": [
        "browser",
        "mockup",
        "preview",
        "website"
      ],
      "usage": {
        "description": "Use Browser to frame a website or product surface preview when the browser chrome is part of the story.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for documentation, product examples, and visual previews where the page context matters."
          },
          {
            "guidance": "do",
            "description": "Keep the framed content simple enough to remain legible at the rendered size."
          },
          {
            "guidance": "dont",
            "description": "Do not use Browser for real navigation, real forms, or arbitrary card decoration."
          },
          {
            "guidance": "dont",
            "description": "Do not put a real, working URL in the address pill. It reads as a link, is not one, and invites a click that does nothing."
          }
        ]
      },
      "related": {
        "components": [
          "Phone",
          "Card"
        ]
      },
      "props": [
        {
          "name": "url",
          "type": "string",
          "description": "Address shown in the centered address pill. Omit for a blank pill."
        },
        {
          "name": "elevation",
          "type": "\"raised\" | \"hero\"",
          "default": "\"raised\"",
          "description": "raised: the soft resting shadow, for a window among other content. hero: lifted well off the page, for a product shot staged as a landing page's centrepiece (one per page). Use this instead of a shadow-* className."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "Page content rendered inside the content region."
        }
      ],
      "tokensUsed": [
        "card",
        "background",
        "border",
        "muted",
        "muted-foreground"
      ],
      "a11y": [
        "Purely presentational chrome; the framed content carries its own semantics.",
        "The toolbar is drawn, not interactive, and hidden from assistive technology; the address is decorative text."
      ],
      "examples": [
        {
          "label": "Framing a page",
          "code": "<Browser url=\"studio.example/explore\"><div className=\"p-8\"><PageHeader title=\"Explore\" description=\"Trending posts from every chain.\" /></div></Browser>",
          "imports": "import { Browser, PageHeader } from \"@sableui/react\""
        },
        {
          "label": "Mockup, not chrome",
          "code": "// Browser is DECORATIVE framing for a screenshot or a demo — it belongs on a\n// marketing page, never around your actual app.\n\n<Region max=\"wide\">\n  <Browser url=\"studio.example\">\n    <img src=\"/screenshots/editor.png\" alt=\"The editor\" />\n  </Browser>\n</Region>\n\n// ✗ Wrapping live UI in it. The frame implies \"this is a picture of software\";\n//   putting real controls inside makes users hunt for a browser that isn't there.\n// ✗ Using it to fake a URL bar for credibility. Show the real product.",
          "imports": "import { Browser, Region } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Bubble",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/bubble",
      "summary": "The surface a message's content sits on: four treatments, an align-aware tail, a readable measure cap, and an optional row of reaction pills.",
      "keywords": [
        "chat bubble",
        "message bubble",
        "speech bubble",
        "reactions",
        "conversation",
        "messaging",
        "ai chat"
      ],
      "usage": {
        "description": "The tinted (or untinted) surface a turn's content sits on. Kept separate from Message because the row's layout and the content's surface change independently — an assistant's markdown answer wants no surface at all in exactly the same row a one-line reply wants a bubble.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use `tint` for the reader's own messages and `outline` for the other person, in every conversation: between people and with an assistant alike, so the two read as one product. An assistant's long answer is `plain`. `muted` and `primary` are the heavier pair, for a thread on a busy or dark surface where the light pair would not hold."
          },
          {
            "guidance": "do",
            "description": "Reach for `variant=\"plain\"` for long-form assistant output — rendered markdown, code blocks, tables. A tinted box around three paragraphs reads as a quote block rather than as a turn, and `plain` drops the measure cap with the surface."
          },
          {
            "guidance": "do",
            "description": "Pass the same `align` you gave the enclosing Message, so the tail lands on the speaker's side."
          },
          {
            "guidance": "do",
            "description": "Set `tail={false}` on the continuation bubbles in a grouped run — the tail marks where a speaker starts, and repeating it on every line makes a block of one person's messages look like four separate turns."
          },
          {
            "guidance": "do",
            "description": "Let the register size it. Inside `<Density value=\"compact\">` a Bubble sets itself in the workspace prose tier automatically — a docked agent panel needs no per-call-site sizing, and hardcoding one defeats the mechanism."
          },
          {
            "guidance": "dont",
            "description": "Do not remove the measure cap to fill a wide window. ~42rem is a reading measure; a bubble spanning a 1600px viewport is a paragraph at 140 characters per line."
          },
          {
            "guidance": "dont",
            "description": "Do not put the timestamp or the author name inside the bubble. Those are Message's `header` / `footer`, which stay outside the surface and so still work under `variant=\"plain\"`."
          },
          {
            "guidance": "dont",
            "description": "Do not use a Bubble for a system note or a streaming status. Those are `Marker`, which is deliberately quieter than the message tier."
          },
          {
            "guidance": "dont",
            "description": "Do not render reactions as static text. `BubbleReaction` is a toggle and reports `aria-pressed`, which is how a screen-reader user knows whether pressing it adds or removes their own reaction."
          }
        ],
        "anatomy": [
          {
            "name": "Bubble",
            "required": true,
            "description": "The surface itself. Holds the variant, the side, and the tail."
          },
          {
            "name": "BubbleReactions",
            "required": false,
            "description": "The row of reaction pills. Under the bubble it sits at the message column's small gap, so it reads as belonging to that message; as the bubble's last child it sits inside, under the text, and the pills become soft chips."
          },
          {
            "name": "BubbleReaction",
            "required": false,
            "description": "One reaction pill — emoji, count (hidden at 1), and pressed state. Celebrates when it becomes the reader's own."
          },
          {
            "name": "BubbleReactionAdd",
            "required": false,
            "description": "The add-reaction pill at the end of the row: opens a ReactionPicker above it."
          }
        ]
      },
      "related": {
        "components": [
          "Message",
          "MessageScroller",
          "Marker",
          "Attachment",
          "ReactionPicker"
        ]
      },
      "props": [
        {
          "name": "variant",
          "type": "\"muted\" | \"primary\" | \"tint\" | \"outline\" | \"plain\"",
          "default": "\"muted\"",
          "description": "Surface treatment. The usual pair: `tint` for the reader's own messages (a wash of the brand colour over the thread's surface) and `outline` for the other person. `plain` for long-form assistant output that should not sit in a box (also drops the measure cap and padding). `muted` (other party) and `primary` (own) are the heavier pair, for a busy or dark surface."
        },
        {
          "name": "align",
          "type": "\"start\" | \"end\"",
          "default": "\"start\"",
          "description": "Which side of the conversation the bubble is on — puts the tail on the speaker's side. Match it to the enclosing Message."
        },
        {
          "name": "tail",
          "type": "boolean",
          "default": "true",
          "description": "Draw the tail: a small ear off the speaker-side top corner, which goes square to meet it. The same 5px in every theme's radius language, flat through fully pilled. The bubble keeps the ear's space either way, so turning it off for the continuation bubbles in a grouped run keeps the run aligned."
        },
        {
          "name": "...div props",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "Spread onto the surface element."
        }
      ],
      "subcomponents": [
        {
          "name": "BubbleReactions",
          "type": "{ align?: \"start\" | \"end\" } & ComponentPropsWithRef<\"div\">",
          "description": "Row container for reaction pills. Match `align` to the Bubble so the row hangs off the same edge."
        },
        {
          "name": "BubbleReaction",
          "type": "{ emoji: ReactNode; label?: string; count?: number; active?: boolean; avatars?: ReactNode; motion?: MotionLevel } & ComponentPropsWithRef<\"button\">",
          "description": "One reaction pill. A toggle, not a label: `active` drives `aria-pressed` as well as the styling, `label` names it (\"Party, 3\"), and `count` is hidden at 1 because the pill already says \"one\". When it turns on — pressed, or newly added already on — the emoji blooms, copies of it burst out and the count rolls; pills the page loads with stay still. `avatars` takes the Avatars of the people who reacted: with up to three the pill shows their faces in place of the count, past three the count (`count` defaults to their number). Inside a Bubble the pill is a soft chip a faint step off the bubble, tinted with primary when it is the reader's own."
        },
        {
          "name": "BubbleReactionAdd",
          "type": "{ reactions?: Reaction[]; selected?: string[]; onSelect?: (emoji: string) => void; label?: string; motion?: MotionLevel } & ComponentPropsWithRef<\"button\">",
          "description": "The add-reaction pill: a smiley that opens a ReactionPicker above it. Choosing an emoji closes the picker and calls `onSelect`; add the emoji to the row and its new pill celebrates on arrival."
        }
      ],
      "variants": {
        "variant": [
          "muted",
          "primary",
          "tint",
          "outline",
          "plain"
        ],
        "align": [
          "start",
          "end"
        ],
        "tail": [
          "true",
          "false"
        ]
      },
      "tokensUsed": [
        "muted",
        "foreground",
        "primary",
        "primary-foreground",
        "border",
        "card",
        "card-foreground",
        "accent",
        "accent-foreground",
        "muted-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Bubble",
          "why": "A bubble arrives with its Message row, which owns how a new message enters the transcript. A reaction pill that the reader just added arrives with its own celebration (below)."
        },
        {
          "slot": "response",
          "recipe": "motion-bloom",
          "part": "BubbleReaction",
          "why": "Reacting is the reader's choice, so it is answered like a like: the emoji grows from nothing past its size and settles, while copies of it spray outward and fade (Burst with the emoji as its particle, the way chat apps answer a reaction). Plays when a pill turns on and when a pill mounts already on into a row that has rendered — never for the pills a page loads with. Pills inherit Pill's motion-interactive and motion-press."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "BubbleReaction",
          "why": "The count rolls with NumberTicker as people react. Turning a reaction off is quiet: the tint eases out and the count rolls back, with no burst. Under `subtle` or reduced motion the bloom and the spray are dropped and the tint and count alone answer."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Bubble",
          "why": "A bubble is static content; a message still being written is StreamingText or a Marker, not a state of the surface."
        }
      ],
      "a11y": [
        "The surface is a plain container with no imposed role — a bubble is presentation, and announcing one as a region would put a landmark around every line of a conversation.",
        "Reaction pills are real buttons reporting `aria-pressed`, so the reader's own reaction is state rather than colour alone. Give each a `label`: it is named \"Party, 3\", with the emoji and its burst hidden from AT. The add-reaction pill is named \"Add reaction\" and opens a toolbar picker.",
        "`whitespace-pre-wrap` and `break-words` keep pasted logs, long URLs, and hard-wrapped text inside the surface instead of overflowing the conversation.",
        "Every variant meets AA against its own surface, including `primary`, which pairs the primary fill with its paired foreground token rather than a hardcoded white."
      ],
      "examples": [
        {
          "label": "Two sides",
          "code": "<>\n\t<Message messageId=\"m1\"><Bubble variant=\"outline\">Did the deploy finish?</Bubble></Message>\n\t<Message messageId=\"m2\" align=\"end\"><Bubble variant=\"tint\" align=\"end\">Green across the board.</Bubble></Message>\n</>",
          "imports": "import { Bubble, Message } from \"@sableui/react\""
        },
        {
          "label": "Long-form assistant output",
          "code": "<Message messageId=\"a1\" avatar={<AgentAvatar size=\"sm\" />}>\n\t<Bubble variant=\"plain\" className=\"space-y-3\">\n\t\t<p className=\"text-body-md text-foreground\">Three things changed in this release:</p>\n\t\t<CodeBlock code={diff} filename=\"CHANGELOG.md\" />\n\t</Bubble>\n</Message>",
          "imports": "import { AgentAvatar, Bubble, CodeBlock, Message } from \"@sableui/react\""
        },
        {
          "label": "With reactions",
          "code": "<Message messageId=\"m3\">\n\t<Bubble>Shipped 0.45.0.</Bubble>\n\t<BubbleReactions>\n\t\t<BubbleReaction emoji=\"🎉\" label=\"Party\" count={3} active onClick={() => toggle(\"🎉\")} />\n\t\t<BubbleReaction emoji=\"👀\" label=\"Eyes\" count={1} onClick={() => toggle(\"👀\")} />\n\t\t<BubbleReactionAdd selected={mine} onSelect={toggle} />\n\t</BubbleReactions>\n</Message>",
          "imports": "import { Bubble, BubbleReaction, BubbleReactionAdd, BubbleReactions, Message } from \"@sableui/react\""
        },
        {
          "label": "A grouped run drops the repeated tail",
          "code": "<>\n\t<Message messageId=\"m1\" align=\"end\"><Bubble variant=\"tint\" align=\"end\">One more thing.</Bubble></Message>\n\t<Message messageId=\"m2\" align=\"end\" grouped><Bubble variant=\"tint\" align=\"end\" tail={false}>The staging cert expires Friday.</Bubble></Message>\n</>",
          "imports": "import { Bubble, Message } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Button",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/button",
      "summary": "Pill-shaped action primitive (theme-driven radius via --button-radius, defaults to full). Neutral tiers (primary/secondary/ghost/outline), plus destructive and link, and three on-color tiers (on-color/on-color-outline/on-color-ghost) that paint with the surrounding ink so a button reads on any tone or brand fill. Optional loading state shows a spinner and disables the button.",
      "keywords": [
        "button",
        "action",
        "cta",
        "submit",
        "save",
        "cancel",
        "destructive",
        "loading",
        "link",
        "icon button",
        "on color",
        "inverse",
        "band",
        "brand fill",
        "tone fill",
        "bleed",
        "optical alignment",
        "align label to edge",
        "negative margin",
        "view all"
      ],
      "usage": {
        "description": "Use Button when the user commits an action, submits a form, opens UI, or confirms a decision. Use the visual tier to communicate priority: one primary action per local decision area, then secondary, ghost, outline, or link for lower-emphasis choices.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use a single primary button in a view or dense panel so the action hierarchy stays obvious."
          },
          {
            "guidance": "do",
            "description": "For a copy control, pair an icon Button with `useCopy(text, { timeout? })`. It takes the text when the hook is called and returns `{ copy, copied }`; `copy()` takes no argument, so pass the value the button copies to the hook, not to `copy`. Text that costs something to produce (a file to fetch) goes in as a function, `useCopy(() => fetch(url).then((r) => r.text()))`, called only on click. Keep both glyphs mounted in a `motion-icon-swap` cell so the copy mark visibly becomes a check (a `copied ? \"check\" : \"copy\"` swap snaps between frames and is easy to miss), and say \"Copied\" in a polite `role=\"status\"` region: the glyph change is silent to a screen reader."
          },
          {
            "guidance": "do",
            "description": "Write labels as actions, such as \"Save changes\" or \"Delete draft\", instead of vague labels like \"OK\"."
          },
          {
            "guidance": "do",
            "description": "Use loading with loadingLabel for async work so the action cannot double-fire and the state is announced."
          },
          {
            "guidance": "do",
            "description": "Put icons in iconStart / iconEnd rather than as children, so the button applies its optical padding. Start icons say what the action is (plus, share); end icons say where it goes (chevron-right, external)."
          },
          {
            "guidance": "do",
            "description": "Set bleed on a ghost or link button that sits at the start or end of a row, so its LABEL lines up with the content edge the row shares (\"View all\" over a grid, \"Add task\" under a list, \"Resend code\" at a card footer's end). The box moves out by exactly its own padding; the hit area and hover fill stay full size and run past the edge. SectionHeader, PageHeader (back and actions) and CardAction already do this for their outermost ghost/link child — don't add it there, and use bleed=\"none\" to opt one out."
          },
          {
            "guidance": "dont",
            "description": "Pull a ghost button onto an edge with -ms-3 / -me-3 classNames. That number is one size's padding: it is wrong at xs, md and cta, wrong on a side carrying an icon, and wrong once a preset retunes the spacing. bleed reads the button's own padding var. And don't bleed a filled or outlined button — its visible edge is what aligns, so bleed is a no-op there."
          },
          {
            "guidance": "dont",
            "description": "Use destructive for reversible or low-risk actions; reserve it for operations with real loss or danger."
          },
          {
            "guidance": "dont",
            "description": "Use a button for plain navigation. Compose with render={<a />} when the element should behave like a link."
          },
          {
            "guidance": "dont",
            "description": "Use secondary on a tinted surface — inside a Note, a soft Banner, or any tone fill. `secondary` is a near-background surface token (in some themes within 2% of the page), so on a tint it reads as a hole punched in the fill rather than as a control sitting on it. On a soft tint use outline or ghost; on a full-strength fill use the on-color tiers."
          },
          {
            "guidance": "do",
            "description": "On a coloured fill — a solid Banner, a bg-tone-* or bg-primary band, an inverse (bg-foreground) section, a brand panel — use variant=\"on-color\" for the main action and on-color-outline / on-color-ghost for the rest. They paint with the band's inherited ink (currentColor), so the surface must set its paired ink (text-tone-info-foreground, text-primary-foreground, text-background…), which it already should. Name the fill once on the surface, e.g. [--on-color-fill:var(--tone-info)], and the solid button's label takes the fill colour; unnamed, it falls back to black or white against the ink. Both clear 4.5:1 in every shipped theme and mode."
          },
          {
            "guidance": "dont",
            "description": "Use the on-color tiers on the page, a Card, a Note, or a soft tint — there the ink is the page foreground and the normal tiers already fit. And don't restyle a normal variant with bg-*/text-* classNames to make it read on a band; that hard-codes colours per theme and skips the contrast and focus handling on-color carries."
          }
        ],
        "anatomy": [
          {
            "name": "Container",
            "required": true,
            "description": "The rounded hit target that carries the visual tier, focus ring, disabled state, and loading affordance."
          },
          {
            "name": "Label",
            "required": true,
            "description": "Visible action text and the default accessible name. Icon-only buttons still need an aria-label."
          },
          {
            "name": "Leading icon",
            "required": false,
            "description": "An optional semantic Icon that reinforces the label without replacing it."
          },
          {
            "name": "Spinner",
            "required": false,
            "description": "Displayed during loading and paired with aria-busy plus disabled activation."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "OverflowMenu",
          "Icon",
          "Banner"
        ],
        "patterns": [
          "SettingsPage",
          "AuthPage",
          "DashboardPage"
        ]
      },
      "props": [
        {
          "name": "variant",
          "type": "\"primary\" | \"secondary\" | \"ghost\" | \"outline\" | \"destructive\" | \"link\" | \"floating\" | \"field\" | \"on-color\" | \"on-color-outline\" | \"on-color-ghost\"",
          "default": "\"primary\"",
          "description": "Visual emphasis tier. One primary per screen. The on-color tiers are for buttons ON a coloured fill: they paint with the inherited text colour (the fill's ink) — on-color is solid (ink background, fill-coloured label via the optional --on-color-fill var, else black/white), on-color-outline and on-color-ghost are transparent with an ink label. Never use them on page or card surfaces. floating is for a control that sits OVER content (carousel arrows, a marquee pause, a jump-to-latest over a conversation): its own edge, lift and translucent popover fill, so it reads on arbitrary content beneath. field is for a button docked in a workspace panel among xs fields: the inset panel-field fill and the field's corner, so a picker trigger or an add action reads as one of the row's controls; pair it with size xs or icon-xs."
        },
        {
          "name": "size",
          "type": "\"xs\" | \"sm\" | \"md\" | \"cta\" | \"icon\" | \"icon-sm\" | \"icon-xs\"",
          "default": "\"md\"",
          "description": "Reads the density ladder, so every value differs by register: page 28/32/40/44, workspace 24/28/32/36. xs and icon-xs were added in 0.31.0 for the workspace control floor and are the sizes tool chrome wants; md is the default everywhere. icon/icon-sm/icon-xs are square."
        },
        {
          "name": "render",
          "type": "ReactElement | (props, state) => ReactElement",
          "description": "Compose with another element/component through the Base UI render prop."
        },
        {
          "name": "loading",
          "type": "boolean",
          "default": "false",
          "description": "Show a Spinner while an action is in flight and refuse presses. The spinner takes the iconStart slot when there is one; otherwise it lays over the label, which fades out in place, so the button keeps its width. Sets aria-busy and aria-disabled, never the native disabled: disabling the focused button sent focus to <body>, so a sheet the action opened had nowhere to return it."
        },
        {
          "name": "onClick",
          "type": "(event: MouseEvent<HTMLButtonElement>) => unknown",
          "description": "May return a promise: the button shows `loading` until it settles and ignores further presses meanwhile, from the first click on. Prefer it to a `busy` flag in state, which takes effect a render late (three fast clicks ran three times)."
        },
        {
          "name": "badge",
          "type": "ReactNode",
          "description": "A corner indicator (usually <NotificationBadge dot /> or a count) overlaid on the top-end corner of the glyph. For icon-only sizes; never hand-position a badge over a Button with absolute offsets."
        },
        {
          "name": "loadingLabel",
          "type": "ReactNode",
          "description": "Optional text shown in place of children while loading, with the spinner beside it. The width follows the new text, so prefer no loadingLabel where the row must not move."
        },
        {
          "name": "iconStart",
          "type": "ReactNode",
          "description": "Icon before the label. The button takes one 2px step off its start padding so icon + label read as centred. Replaced by the spinner while loading."
        },
        {
          "name": "iconEnd",
          "type": "ReactNode",
          "description": "Icon after the label (disclosure, external link, next). Same optical correction on the end side."
        },
        {
          "name": "bleed",
          "type": "\"start\" | \"end\" | \"both\" | \"none\"",
          "description": "Optical alignment for a borderless button (ghost, link, on-color-ghost): a negative inline margin of exactly its own padding on that side — --button-px, or the icon side's optical padding when an icon sits there; an icon-only size bleeds by its inset to the glyph — so the label (or glyph) lands on the content edge. Hit area and hover/focus fill keep their full size. Logical sides, so it mirrors in RTL. A no-op on variants with a visible edge (primary, secondary, outline, destructive, floating, field, on-color, on-color-outline): a filled button aligns its edge, not its label. Unset, a borderless button renders data-bleed=\"auto\" and SectionHeader, PageHeader and CardAction bleed it when it is their outermost child; none opts out."
        }
      ],
      "variants": {
        "variant": [
          "primary",
          "secondary",
          "ghost",
          "outline",
          "destructive",
          "link",
          "floating",
          "field",
          "on-color",
          "on-color-outline",
          "on-color-ghost"
        ],
        "size": [
          "xs",
          "sm",
          "md",
          "cta",
          "icon",
          "icon-sm",
          "icon-xs"
        ]
      },
      "tokensUsed": [
        "primary",
        "primary-foreground",
        "secondary",
        "secondary-foreground",
        "accent",
        "accent-foreground",
        "input",
        "destructive",
        "destructive-foreground",
        "ring",
        "panel-field",
        "panel-field-hover",
        "panel-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A button belongs to the layout it ships in. Whatever staged that region owns the entrance; a button that fades in on its own is a button that is briefly un-clickable for no stated reason."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "Hover, focus ring and disabled fade all ease on one declaration. This is the reference case for the whole recipe: it lists scale and translate alongside the colours specifically so motion-press can add a transform without a second, conflicting transition-property."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Root",
          "why": "The 0.97 settle on pointer-down is the only confirmation the press registered before the action's own result arrives — which on a slow network is the difference between waiting and clicking again. It skips disabled elements, so a dead button stays visibly dead."
        },
        {
          "slot": "transition",
          "recipe": "motion-appear",
          "part": "Spinner",
          "why": "Going busy is the one state change a button has. The spinner fades in where it mounts — in the icon slot, or laid over a plain label that fades out beneath it and keeps its place — so the width never changes and the row does not shift under the pointer that just pressed it. The label fades back when the work settles. A toggling control is a Switch or a Toggle; those carry their own transition."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Pending work is passed in via `loading`, which renders a Spinner — the activity motion lives there rather than being duplicated here."
        }
      ],
      "a11y": [
        "Renders a native <button> by default (keyboard + role free).",
        "Focus-visible ring uses the --ring token at 50% opacity.",
        "Use render={<a/>} for link semantics rather than onClick navigation.",
        "On-color tiers replace the --ring focus ring with one drawn in the band's ink past a transparent 2px gap, so focus stays visible on any fill (ink-on-fill is the theme's own tested pair).",
        "On-color contrast is measured in button.test.tsx for every shipped theme and mode on each tone, primary, destructive, success, highlight and inverse fill: solid label at rest and hover, and outline/ghost label on the hover wash, all at least 4.5:1.",
        "bleed moves only the box, never the hit target: the full padded area stays clickable and the focus ring still draws around the whole button, past the content edge.",
        "loading sets aria-busy and disables activation (disabled on a native button, aria-disabled on a render element) so the action can't double-fire."
      ],
      "examples": [
        {
          "label": "Primary",
          "code": "<Button>Save changes</Button>",
          "imports": "import { Button } from \"@sableui/react\""
        },
        {
          "label": "Secondary + ghost",
          "code": "<Row gap={1}><Button variant=\"secondary\">Cancel</Button><Button variant=\"ghost\">Skip</Button></Row>",
          "imports": "import { Button, Row } from \"@sableui/react\""
        },
        {
          "label": "Loading",
          "code": "<Button loading loadingLabel=\"Saving…\">Save</Button>",
          "imports": "import { Button } from \"@sableui/react\""
        },
        {
          "label": "Main action with options",
          "code": "<Row gap={2}><Button onClick={deploy}>Deploy</Button><Menu><MenuTrigger render={<Button variant=\"secondary\" size=\"icon\" aria-label=\"Deploy options\"><Icon name=\"chevron-down\" /></Button>} /><MenuContent align=\"end\"><MenuItem>Deploy to preview</MenuItem><MenuItem>Deploy to production</MenuItem></MenuContent></Menu></Row>",
          "imports": "import { Button, Icon, Menu, MenuContent, MenuItem, MenuTrigger, Row } from \"@sableui/react\""
        },
        {
          "label": "Copy to clipboard",
          "code": "const { copy, copied } = useCopy(address)\n<Row gap={1}><Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Copy address\" onClick={copy}><span aria-hidden=\"true\" className=\"motion-icon-swap\"><span data-active={!copied} className=\"inline-flex\"><Icon name=\"copy\" /></span><span data-active={copied} className=\"inline-flex\"><Icon name=\"check\" /></span></span></Button><span role=\"status\" className=\"sr-only\">{copied ? \"Copied\" : \"\"}</span></Row>",
          "imports": "import { Button, Icon, Row, useCopy } from \"@sableui/react\""
        },
        {
          "label": "As link",
          "code": "<Button render={<a href=\"/explore\" />}>Explore</Button>",
          "imports": "import { Button } from \"@sableui/react\""
        },
        {
          "label": "Primary + secondary decision row",
          "code": "<Row gap={1}><Button>Publish</Button><Button variant=\"secondary\">Save draft</Button><Button variant=\"ghost\">Cancel</Button></Row>",
          "imports": "import { Button, Row } from \"@sableui/react\""
        },
        {
          "label": "Destructive with confirmation copy",
          "code": "<Row gap={1}><Button variant=\"secondary\">Cancel</Button><Button variant=\"destructive\">Delete project</Button></Row>",
          "imports": "import { Button, Row } from \"@sableui/react\""
        },
        {
          "label": "Leading icon",
          "code": "<Button iconStart={<Icon name=\"plus\" />}>New project</Button>",
          "imports": "import { Button, Icon } from \"@sableui/react\""
        },
        {
          "label": "Trailing icon",
          "code": "<Button variant=\"secondary\" iconEnd={<Icon name=\"chevron-right\" />}>Continue</Button>",
          "imports": "import { Button, Icon } from \"@sableui/react\""
        },
        {
          "label": "Both icons",
          "code": "<Button variant=\"outline\" iconStart={<Icon name=\"file\" />} iconEnd={<Icon name=\"chevron-down\" />}>Export</Button>",
          "imports": "import { Button, Icon } from \"@sableui/react\""
        },
        {
          "label": "Icon-only",
          "code": "<Button size=\"icon\" variant=\"ghost\" aria-label=\"Share\"><Icon name=\"share\" /></Button>",
          "imports": "import { Button, Icon } from \"@sableui/react\""
        },
        {
          "label": "Optically aligned to the row's edges",
          "code": "<Stack gap={1.5}>\n  <Row justify=\"between\">\n    <span className=\"text-title-md\">Tasks</span>\n    <Button variant=\"ghost\" size=\"sm\" bleed=\"end\">View all</Button>\n  </Row>\n  <span className=\"text-body-sm text-muted-foreground\">Ship the release notes</span>\n  <Button variant=\"ghost\" size=\"sm\" bleed=\"start\" iconStart={<Icon name=\"plus\" />} className=\"self-start\">Add task</Button>\n</Stack>",
          "imports": "import { Button, Icon, Row, Stack } from \"@sableui/react\""
        },
        {
          "label": "Icon button with an unread badge",
          "code": "<Button size=\"icon\" variant=\"ghost\" aria-label=\"Notifications\" badge={<NotificationBadge dot />}><Icon name=\"bell\" /></Button>",
          "imports": "import { Button, Icon, NotificationBadge } from \"@sableui/react\""
        },
        {
          "label": "Field button in a panel row",
          "code": "<PanelSection title=\"Text\">\n  <PropertyRow label=\"Font\">\n    <Button variant=\"field\" size=\"xs\" className=\"w-full justify-between\" iconEnd={<Icon name=\"chevron-down\" />}>Figtree</Button>\n  </PropertyRow>\n</PanelSection>",
          "imports": "import { Button, Icon, PanelSection, PropertyRow } from \"@sableui/react\""
        },
        {
          "label": "On a coloured band",
          "code": "<div className=\"flex gap-3 bg-tone-info p-6 text-tone-info-foreground [--on-color-fill:var(--tone-info)]\"><Button variant=\"on-color\">Join the beta</Button><Button variant=\"on-color-outline\">Read the notes</Button></div>",
          "imports": "import { Button } from \"@sableui/react\""
        },
        {
          "label": "Action in a solid Banner",
          "code": "<Banner tone=\"warning\" appearance=\"solid\" action={<Button variant=\"on-color\" size=\"sm\">Reconnect</Button>}>Calendar sync paused.</Banner>",
          "imports": "import { Banner, Button } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ButtonGroup",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/button-group",
      "summary": "Buttons joined into one control: a split button (an action beside the chevron that opens its menu) or a short run of related actions. The children stay ordinary Buttons; the group squares their inner corners, collapses bordered seams into one hairline, and draws a seam between filled ones.",
      "keywords": [
        "split button",
        "button group",
        "segmented actions",
        "dropdown button",
        "joined buttons",
        "toolbar"
      ],
      "usage": {
        "description": "Use ButtonGroup when one action has close alternatives (Copy page, with Open in… behind a chevron) or a few actions belong together as one object (zoom out, reset, zoom in). Use ToggleGroup for a choice that stays selected, and Tabs to switch views.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give the children one height: `size=\"sm\"` with `size=\"icon-sm\"`, `md` with `icon`. The group aligns them but cannot reconcile two heights into one edge."
          },
          {
            "guidance": "do",
            "description": "For a split button, put the main action first and a Menu whose trigger is the chevron Button second, with an aria-label on the trigger (\"More page actions\")."
          },
          {
            "guidance": "do",
            "description": "Name the group with aria-label when the buttons alone do not say what they act on."
          },
          {
            "guidance": "dont",
            "description": "Do not round or border the children yourself to make them meet; that is the group's job, and an override breaks under a theme's button shape."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a selection that stays on. That is ToggleGroup, which carries the pressed state.",
            "instead": [
              "ToggleGroup"
            ]
          }
        ]
      },
      "related": {
        "components": [
          "Button",
          "Menu",
          "Toggle"
        ]
      },
      "props": [
        {
          "name": "role",
          "type": "string",
          "default": "\"group\"",
          "description": "Group semantics, so a screen reader announces the buttons as one set. Pass `toolbar` when it carries arrow-key navigation of your own."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Layout classes for the group (margins, alignment). The children's look comes from their own variants."
        },
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "All native <div> attributes, including aria-label."
        }
      ],
      "tokensUsed": [],
      "a11y": [
        "Renders role=\"group\", so assistive tech announces the buttons as one set; name it with aria-label.",
        "Each child keeps its own focus stop and label; a focused child is raised above its neighbour so its ring is drawn whole.",
        "An icon-only chevron that opens a menu needs its own aria-label, such as \"More page actions\"."
      ],
      "examples": [
        {
          "label": "Split button with a menu",
          "code": "<ButtonGroup aria-label=\"Page actions\"><Button variant=\"outline\" size=\"sm\" iconStart={<Icon name=\"copy\" />} onClick={copy}>Copy page</Button><Menu><MenuTrigger render={<Button variant=\"outline\" size=\"icon-sm\" aria-label=\"More page actions\" />}><Icon name=\"chevron-down\" /></MenuTrigger><MenuContent align=\"end\"><MenuItem icon={<Icon name=\"file\" />} description=\"View this page as plain text\">View as Markdown</MenuItem></MenuContent></Menu></ButtonGroup>",
          "imports": "import { Button, ButtonGroup, Icon, Menu, MenuContent, MenuItem, MenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "Related actions",
          "code": "<ButtonGroup aria-label=\"Zoom\"><Button variant=\"secondary\" size=\"icon-sm\" aria-label=\"Zoom out\"><Icon name=\"minus\" /></Button><Button variant=\"secondary\" size=\"sm\">100%</Button><Button variant=\"secondary\" size=\"icon-sm\" aria-label=\"Zoom in\"><Icon name=\"plus\" /></Button></ButtonGroup>",
          "imports": "import { Button, ButtonGroup, Icon } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Calendar",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/calendar",
      "summary": "Date picker grid wrapping react-day-picker v9, themed entirely with semantic tokens (no external stylesheet). Supports single, multiple, and range selection; nav chevrons render through the injected icon set.",
      "keywords": [
        "calendar",
        "date grid",
        "month",
        "schedule"
      ],
      "usage": {
        "description": "Use Calendar to browse or choose dates in a month grid, especially when relative date position matters.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it when users need to compare weekdays, ranges, or nearby dates."
          },
          {
            "guidance": "do",
            "description": "Provide selected, disabled, and today states when date choice is interactive."
          },
          {
            "guidance": "dont",
            "description": "Do not use Calendar when a compact DatePicker (with granularity=\"minute\" for a time) would be faster."
          },
          {
            "guidance": "dont",
            "description": "Do not use it as the only way to enter a date. A grid is slow for a date far from today and unusable for someone who knows the value — always pair it with a text input."
          }
        ]
      },
      "related": {
        "components": [
          "DatePicker"
        ]
      },
      "props": [
        {
          "name": "mode",
          "type": "\"single\" | \"multiple\" | \"range\"",
          "description": "Selection behavior. Pair with the matching selected/onSelect shape (Date, Date[], or DateRange)."
        },
        {
          "name": "selected",
          "type": "Date | Date[] | DateRange | undefined",
          "description": "The controlled selection. Shape follows mode."
        },
        {
          "name": "onSelect",
          "type": "(value, triggerDate, modifiers, event) => void",
          "description": "Fires when a day is chosen. The first argument's type follows mode."
        },
        {
          "name": "defaultMonth",
          "type": "Date",
          "description": "The month shown on first render (uncontrolled navigation)."
        },
        {
          "name": "month",
          "type": "Date",
          "description": "Controlled displayed month; pair with onMonthChange."
        },
        {
          "name": "numberOfMonths",
          "type": "number",
          "default": "1",
          "description": "How many month grids to render. They sit side by side where the space holds them and wrap below one another where it does not, judged on the calendar's own room (a narrow popover on a wide screen stacks them), not the viewport."
        },
        {
          "name": "disabled",
          "type": "Matcher | Matcher[]",
          "description": "Days matching this are dimmed and non-selectable (e.g. { before: new Date() })."
        },
        {
          "name": "showOutsideDays",
          "type": "boolean",
          "default": "true",
          "description": "Render leading/trailing days from adjacent months, dimmed."
        },
        {
          "name": "bare",
          "type": "boolean",
          "default": "false",
          "description": "Drop the card frame (border, fill, padding) so the grid sits flush inside a surface that already has one, such as a Popover. DatePicker renders its Calendar this way."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` inherits the app's policy, `subtle` keeps feedback and drops the month slide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merged onto the bordered card container that wraps the grid."
        },
        {
          "name": "classNames",
          "type": "Partial<ClassNames>",
          "description": "Per-part class overrides merged over the themed defaults. Themed slots: months, month, nav, button_previous, button_next, month_caption, caption_label, month_grid, weekdays, weekday, week, day, day_button, range_start, range_middle, range_end, selected, today, outside, disabled, hidden. Selection/state slots (selected/today/range_*/outside/disabled) style the day CELL; the inner day button is targeted via the [&>button] descendant."
        },
        {
          "name": "components",
          "type": "Partial<CustomComponents>",
          "description": "Render overrides for RDP parts. Chevron is supplied by default and merged with yours."
        }
      ],
      "variants": {
        "mode": [
          "single",
          "multiple",
          "range"
        ]
      },
      "tokensUsed": [
        "card",
        "card-foreground",
        "border",
        "primary",
        "primary-foreground",
        "accent",
        "accent-foreground",
        "muted-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Inline, it arrives with its form; in a DatePicker the Popover carries the entrance. A grid that animated in by itself would put a second motion on the same opening."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Day",
          "why": "Days ease their hover wash, and the month arrows are ghost Buttons on Button's own recipe. Across a seven-column grid the pointer crosses many cells at once, and an eased wash reads as a cursor travelling rather than a grid flashing."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Day",
          "why": "Picking a day eases the primary fill onto it and off the previous one, so a click reads as the selection moving rather than two cells flipping. A range's band is painted on the cells, which carry the same recipe, so the band eases along with its endpoints as the range grows."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Days are resident data; nothing in the grid loads. Availability fetched per month belongs to the surface around the calendar."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Month",
          "why": "Paging months slides the outgoing grid toward the edge it is leaving by and brings the new one in from the other, over a short travel with a fade (react-day-picker's `animate` mode on Sable keyframes in styles.css), so forward and back read as direction rather than a grid swapping in one frame. RDP adds a single class per part, which a recipe utility cannot be; mirrored in RTL. Expressive: Calendar turns `animate` on only at full motion, and an explicit `animate` prop still wins."
        }
      ],
      "a11y": [
        "react-day-picker manages the roving-tabindex grid, arrow-key navigation, and ARIA roles/labels for the calendar.",
        "Selected days use bg-primary/text-primary-foreground for AA contrast; today is marked with a dot under the number (not a ring, which is reserved for keyboard focus) rather than color alone.",
        "Disabled and outside days are dimmed and removed from the tab order.",
        "Nav chevrons resolve through the injected IconProvider; ensure chevron-left and chevron-right are registered in the icon set."
      ],
      "examples": [
        {
          "label": "Single date",
          "code": "const [date, setDate] = useState<Date>()\n<Calendar mode=\"single\" selected={date} onSelect={setDate} />",
          "imports": "import { Calendar } from \"@sableui/react\""
        },
        {
          "label": "Range",
          "code": "const [range, setRange] = useState<DateRange>()\n<Calendar mode=\"range\" selected={range} onSelect={setRange} numberOfMonths={2} />",
          "imports": "import { Calendar, type DateRange } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Card",
      "status": "stable",
      "group": "Containers",
      "register": "page",
      "path": "components/card",
      "summary": "Raised surface container (rounded-lg) with optional Header/Title/Description/Action/Content/Footer parts. A density knob trades the part padding (comfortable vs compact) for denser section panels. `render` makes the whole card one link or button, with a hover, a full-card focus ring and motion.",
      "keywords": [
        "card",
        "surface",
        "panel",
        "container",
        "tile",
        "section",
        "header",
        "footer",
        "settings",
        "link card",
        "clickable card",
        "nav card"
      ],
      "usage": {
        "description": "Use Card for a discrete thing with its own boundary, such as one product, one notification, one metric, or one setting cluster. Do not use Card as the default way to group every page section; whitespace, headings, Stack, Section, and dividers often create cleaner hierarchy.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use Card when the item could be reordered, removed, selected, or compared independently."
          },
          {
            "guidance": "do",
            "description": "Keep sibling cards on the same density and padding rhythm so lists and grids scan cleanly."
          },
          {
            "guidance": "do",
            "description": "Use CardHeader, CardContent, and CardFooter when the card has a stable title/body/action structure."
          },
          {
            "guidance": "do",
            "description": "Make the whole card one link (`render={<a href=\"…\" />}`) when the card IS a single destination — a nav tile, a gallery item, a news teaser — and nothing inside it is interactive. All of the card text becomes the accessible name of the link, so keep it short: a title and a line."
          },
          {
            "guidance": "dont",
            "description": "Make a card a link when it holds its own buttons, menus, switches or links. Interactive content nested in a link is invalid HTML and announces twice; keep the card a plain surface and put the link on its title or in CardFooter instead."
          },
          {
            "guidance": "dont",
            "description": "Wrap every settings section or form group in a card; use headings, Stack, or the SettingsPage pattern instead."
          },
          {
            "guidance": "dont",
            "description": "Nest cards inside cards. Flatten the hierarchy or use dividers and spacing inside one card."
          }
        ],
        "anatomy": [
          {
            "name": "Container",
            "required": true,
            "description": "The raised or flat surface that creates the item boundary."
          },
          {
            "name": "Header",
            "required": false,
            "description": "Optional title, description, and aligned action area for the card's identity."
          },
          {
            "name": "Content",
            "required": true,
            "description": "The body region. It should contain the information or controls that belong to this one item."
          },
          {
            "name": "Footer",
            "required": false,
            "description": "Optional action or metadata row, usually lower-emphasis than the header."
          }
        ]
      },
      "related": {
        "components": [
          "Region",
          "Stack",
          "Separator",
          "Button",
          "Badge"
        ],
        "patterns": [
          "DashboardPage",
          "SettingsPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "variant",
          "type": "\"default\" | \"flat\" | \"featured\"",
          "default": "\"default\"",
          "description": "\"default\" raises with bg-card + border + soft shadow; \"flat\" is transparent, for a card inside a section that already frames it. A flat card made a link or button shows its shape only on hover (the muted fill), so over a photo with square bottom corners it reads as a cropped image at rest: give a linked media card the default variant. \"featured\" is the raised surface with a primary edge, for the one option a set recommends (the featured plan among tiers) — never ring-* or outline-* classes on a default card."
        },
        {
          "name": "density",
          "type": "\"comfortable\" | \"compact\"",
          "default": "\"comfortable\"",
          "description": "Padding of the Header/Content/Footer parts: comfortable = p-6 (default), compact = p-4 for denser section panels (pair compact with the flat variant for a settings / form section panel). Threaded to the parts via the inherited --card-p custom property. Card sets --card-p via inline style, which beats a plain (non-!important) stylesheet override of the same property on the same element — use this prop rather than a className override; if an external override is unavoidable, it needs !important."
        },
        {
          "name": "render",
          "type": "useRender.RenderProp",
          "description": "Replace the rendered element through the Base UI render prop — most often `render={<a href=\"/x\" />}` (or a router Link) to make the whole card one link. When the rendered element is a link (a[href]) or a button, the card gains a hover state (stronger border and shadow; a muted fill when flat), a full-card focus-visible ring and motion-interactive easing. Any other element (article, li) stays a static surface. Children can answer the hover with `group-hover/card:`."
        }
      ],
      "subcomponents": [
        {
          "name": "CardHeader",
          "type": "ComponentPropsWithRef<\"div\"> & { divided?: boolean }",
          "description": "Top section holding CardTitle/CardDescription (and optionally CardAction). Padding follows the density knob. `divided` closes it with a hairline and full bottom padding, for a header that stays put over a part that scrolls or runs to the edges (a chat transcript) — never a hand-written inset shadow or border-b."
        },
        {
          "name": "CardTitle",
          "type": "ComponentPropsWithRef<\"div\"> & { render?: useRender.RenderProp }",
          "description": "The card's name (text-title-lg). A div by default; pass `render={<h2 />}` (or h3…) to make it a heading in the page outline, at the level the card's position calls for. Blocks render it as h2 (h3 under a heading of their own); a figure in the title slot (a balance, a stat) stays a div."
        },
        {
          "name": "CardDescription",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "Muted supporting line under the title."
        },
        {
          "name": "CardAction",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "Header-aligned top-right action slot (e.g. an overflow menu, switch, or close button). Place inside CardHeader, which becomes a 2-column grid when present and collapses to a single column otherwise. A ghost or link Button that ends the slot bleeds by its own padding at the end, so a \"View all\" label or a \"⋯\" glyph sits on the card's content edge; filled buttons keep their edge there."
        },
        {
          "name": "CardContent",
          "type": "ComponentPropsWithRef<\"div\"> & { flush?: boolean }",
          "description": "The body region. Padding follows the density knob on all sides — does not assume a preceding CardHeader, so it is safe to use standalone (e.g. no CardHeader in the card). When paired with CardHeader, the seam stays tight because CardHeader zeroes its own bottom padding. `flush` runs it edge to edge for a table: the Table insets its first and last columns by exactly the card padding, so it lines up with the header — never hand-set pl-6/pr-6 on columns."
        },
        {
          "name": "CardList",
          "type": "ComponentPropsWithRef<\"div\"> & { divided?: boolean }",
          "description": "Rows that run edge to edge in the card (Entity rows, most often), divided by hairlines. Insets each row to the card's own padding, so a list card lines up with every other card at any density, with no hand-tuned px-* on the rows. Under a CardHeader it opens with a hairline and a gap; alone it fills the card. `divided={false}` drops the hairlines for a quiet list of a few rows: the rows are spaced by padding alone, a CardListLabel sets a group off with space, and the footer below draws no rule."
        },
        {
          "name": "CardListLabel",
          "type": "ComponentPropsWithRef<\"div\"> & { render?: useRender.RenderProp }",
          "description": "The name of a group of rows in a CardList (\"Signed-in devices\", \"Sources\"), on the rows' text edge and close above them. Pass `render={<h3 />}` to make it a heading. In a `divided={false}` list, a label after the first row sets its group off with space. Never a hand-padded heading between rows."
        },
        {
          "name": "CardFooter",
          "type": "ComponentPropsWithRef<\"div\"> & { actions?: boolean }",
          "description": "Bottom row for actions/meta. Padding follows the density knob. `actions` marks it as the card's action row (buttons only): in a sheet (IosSheet, a bottom SheetContent) it becomes a full-width stack pinned to the bottom, primary on top; on a page nothing changes."
        }
      ],
      "variants": {
        "variant": [
          "default",
          "flat",
          "featured"
        ],
        "density": [
          "comfortable",
          "compact"
        ]
      },
      "tokensUsed": [
        "card",
        "card-foreground",
        "border",
        "border-strong",
        "muted",
        "muted-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Container",
          "why": "A card is part of the layout it ships in; whatever stages that region owns the entrance. A card that fades in on its own delays reading the thing it holds."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Container",
          "why": "Only when the card is rendered as a link or button. The border, shadow and ring ease in so the pointer reads as landing on one target, not as the grid flickering. No motion-press: a 0.97 settle on a surface this large reads as the layout lurching. A static card has no response, so it gets no transition."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Container",
          "why": "A card has no states of its own to move between. Selection is CheckboxCard or RadioCard; disclosure is Collapsible or Accordion."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Container",
          "why": "A card does not work on anything. Loading content inside it is a Skeleton's job."
        }
      ],
      "a11y": [
        "Purely presentational by default; add headings/landmarks in content as needed.",
        "Rendered as a link or button, the whole card is one target: its full text is the accessible name, and the focus ring wraps the whole card. Nothing interactive may sit inside it — nested links or buttons inside a link are invalid and unreachable for keyboard users in some browsers.",
        "A Card is a container, not a landmark and not a heading. If its title is the only heading in the region, render it as a real heading element with a title tier — a visually-styled div gives screen-reader heading navigation nothing to find."
      ],
      "examples": [
        {
          "label": "With parts",
          "code": "<Card><CardHeader><CardTitle>Studio plan</CardTitle><CardDescription>Up to 10 seats.</CardDescription></CardHeader><CardContent><p className=\"text-body-md\">Every seat gets unlimited projects and shared reports.</p></CardContent></Card>",
          "imports": "import { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@sableui/react\""
        },
        {
          "label": "With a header action",
          "code": "<Card><CardHeader><CardTitle>Seats</CardTitle><CardAction><Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"More\"><Icon name=\"ellipsis\" /></Button></CardAction></CardHeader><CardContent><p className=\"text-body-md text-muted-foreground\">24 of 100 seats in use.</p></CardContent></Card>",
          "imports": "import { Button, Card, CardAction, CardContent, CardHeader, CardTitle, Icon } from \"@sableui/react\""
        },
        {
          "label": "Compact section panel",
          "code": "<Card variant=\"flat\" density=\"compact\"><CardHeader><CardTitle>Notifications</CardTitle></CardHeader><CardContent><p className=\"text-body-sm text-muted-foreground\">Push and email are enabled.</p></CardContent></Card>",
          "imports": "import { Card, CardContent, CardHeader, CardTitle } from \"@sableui/react\""
        },
        {
          "label": "Product card with actions",
          "code": "<Card><CardHeader><CardTitle>Midnight Archive</CardTitle><CardDescription>Template · 24 pages</CardDescription><CardAction><Badge tone=\"1\">New</Badge></CardAction></CardHeader><CardContent><p className=\"text-body-sm text-muted-foreground\">A project template with a brief, a timeline and a review board.</p></CardContent><CardFooter><Button size=\"sm\">Use template</Button><Button size=\"sm\" variant=\"ghost\">Preview</Button></CardFooter></Card>",
          "imports": "import { Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from \"@sableui/react\""
        },
        {
          "label": "Whole card as a link",
          "code": "<Card render={<a href=\"/components\" />}><CardContent className=\"flex items-center justify-between gap-4\"><div className=\"min-w-0\"><CardTitle>Components</CardTitle><CardDescription>Every building block, with live examples.</CardDescription></div><Icon name=\"chevron-right\" className=\"text-sm text-muted-foreground motion-interactive group-hover/card:translate-x-0.5 group-hover/card:text-foreground\" /></CardContent></Card>",
          "imports": "import { Card, CardContent, CardDescription, CardTitle, Icon } from \"@sableui/react\""
        },
        {
          "label": "Metric card",
          "code": "<Card density=\"compact\"><CardHeader><CardTitle>Revenue</CardTitle><CardDescription>Last 30 days</CardDescription></CardHeader><CardContent><p className=\"text-heading-3\">$12,840</p><p className=\"text-body-sm text-success\">+12.8% from previous period</p></CardContent></Card>",
          "imports": "import { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@sableui/react\""
        },
        {
          "label": "Featured option",
          "code": "<Card variant=\"featured\"><CardHeader><CardTitle render={<h3 />}>Studio</CardTitle><CardDescription>For growing teams.</CardDescription><CardAction><Badge tone=\"1\" size=\"sm\">Most popular</Badge></CardAction></CardHeader><CardContent><p className=\"text-heading-2\">$16</p></CardContent></Card>",
          "imports": "import { Badge, Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@sableui/react\""
        },
        {
          "label": "Divided header over a scrolling body",
          "code": "<Card className=\"flex h-96 flex-col overflow-hidden\"><CardHeader divided><CardTitle render={<h2 />}>Assistant</CardTitle><CardDescription>Answers from your docs</CardDescription></CardHeader><CardContent className=\"min-h-0 flex-1 overflow-y-auto scrollbar-quiet\"><p className=\"text-body-md\">The transcript scrolls under a header that stays put.</p></CardContent></Card>",
          "imports": "import { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@sableui/react\""
        },
        {
          "label": "List card",
          "code": "<Card><CardHeader><CardTitle>Members</CardTitle><CardDescription>3 people can edit this space.</CardDescription></CardHeader><CardList>{people.map((p) => <Entity key={p.id} interactive onSelect={() => open(p)} leading={<Avatar fallback={p.initials} alt={p.name} />} title={p.name} subtitle={p.role} />)}</CardList></Card>",
          "imports": "import { Avatar, Card, CardDescription, CardHeader, CardList, CardTitle, Entity } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "CardStack",
      "status": "stable",
      "group": "Containers",
      "register": "either",
      "path": "components/card-stack",
      "summary": "A compact collection of overlapping cards, opened by pressing the front card or a separate button. Expanded cards return to normal flow; back-card controls are inert while collapsed. Opening and closing is one eased movement: the height and every card travel together.",
      "keywords": [
        "card stack",
        "collection",
        "fan",
        "stacked cards",
        "browse collection"
      ],
      "usage": {
        "description": "Use for a small collection someone can inspect together: documents, photographs or project summaries. Supply the cards; CardStack owns overlap and expansion without a second overlay or gesture dependency.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use trigger=\"stack\" for presentational cards. Pressing the front card expands or collapses the collection without a separate control."
          },
          {
            "guidance": "do",
            "description": "Give label a collection name and expandLabel a concrete action, including the item count when useful."
          },
          {
            "guidance": "do",
            "description": "Keep the collection small. Use stable child keys so expanding does not reset state inside a card."
          },
          {
            "guidance": "dont",
            "description": "Do not put an essential action exclusively on a covered card. The visible expansion control must reach it by keyboard and touch."
          },
          {
            "guidance": "dont",
            "description": "Do not use the front card as a trigger when it contains links, inputs or other controls. Keep the separate button trigger for interactive cards."
          },
          {
            "guidance": "dont",
            "description": "Do not use this for a long feed or a multi-page gallery; use a Grid or Carousel instead.",
            "instead": [
              "Carousel"
            ]
          }
        ]
      },
      "related": {
        "components": [
          "Card",
          "Carousel",
          "Collapsible"
        ]
      },
      "props": [
        {
          "name": "label",
          "type": "string",
          "description": "Accessible collection name."
        },
        {
          "name": "expanded",
          "type": "boolean",
          "description": "Controlled expansion."
        },
        {
          "name": "defaultExpanded",
          "type": "boolean",
          "default": "false",
          "description": "Initial uncontrolled expansion."
        },
        {
          "name": "onExpandedChange",
          "type": "(expanded: boolean) => void",
          "description": "Called by the expansion control."
        },
        {
          "name": "trigger",
          "type": "\"button\" | \"stack\"",
          "default": "\"button\"",
          "description": "A separate button, or the front card itself. Use stack only when the front card contains no interactive controls."
        },
        {
          "name": "expandLabel",
          "type": "string",
          "default": "\"Browse collection\"",
          "description": "Expansion action. Visible on the button trigger; an accessible description on the stack trigger, whose name comes from its visible content."
        },
        {
          "name": "collapseLabel",
          "type": "string",
          "default": "\"Collapse collection\"",
          "description": "Collapse action. Visible on the button trigger; an accessible description on the stack trigger."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "description": "Only turns motion down. Expansion remains available at every level."
        }
      ],
      "tokensUsed": [],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Collection",
          "why": "The collection starts at rest, without a page-load stagger."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Collection and cards",
          "why": "Height and each card's position ease together on --motion-duration-slow and --motion-ease-standard (WAAPI, read from the tokens), so the cards never hang outside the box or snap into place. Expressive: subtle and off change layout at once. A toggle mid-way starts from what is on screen."
        },
        {
          "slot": "transition",
          "recipe": "motion-stack-card",
          "part": "Cards",
          "why": "The fan straightens and returns on the same duration and curve as the travel; expanded cards read normally."
        }
      ],
      "a11y": [
        "The trigger exposes aria-expanded and aria-controls. A stack trigger keeps its visible card content as its accessible name; its description names the expansion or collapse action.",
        "Base UI owns Enter/Space activation on the stack trigger, which retains focus through expansion and collapse.",
        "Covered cards are inert and aria-hidden until expanded. Expansion is explicit on touch and keyboard; hover is never required."
      ],
      "examples": [
        {
          "label": "Project collection",
          "code": "<CardStack label=\"Projects\" trigger=\"stack\" expandLabel=\"Show 2 projects\"><Card><CardContent>Research</CardContent></Card><Card><CardContent>Design</CardContent></Card></CardStack>",
          "imports": "import { Card, CardContent, CardStack } from \"@sableui/react\""
        },
        {
          "label": "Controlled and still",
          "code": "const [open, setOpen] = useState(true)\n<CardStack label=\"Documents\" expanded={open} onExpandedChange={setOpen} motion=\"off\"><Card><CardContent>Brief</CardContent></Card><Card><CardContent>Notes</CardContent></Card></CardStack>",
          "imports": "import { Card, CardContent, CardStack } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "CaretMenu",
      "status": "beta",
      "group": "Overlays",
      "register": "either",
      "path": "components/caret-menu",
      "summary": "Suggestions at the caret of a text field, for @mentions and /slash commands. `useCaretTrigger` watches a Textarea, Input or ChatComposer (through `fieldRef`) for a trigger character and reports the query; CaretMenu draws the list beside the trigger and drives it from the field's keys, so focus never leaves the field. The value stays plain text: a mention is inserted as `@Sam Rivera`, a command runs and clears its `/query`.",
      "keywords": [
        "mention",
        "mentions",
        "at mention",
        "slash command",
        "slash commands",
        "autocomplete",
        "typeahead",
        "suggestions",
        "emoji picker",
        "hashtag",
        "trigger"
      ],
      "usage": {
        "description": "Use CaretMenu with `useCaretTrigger` when typing a character in running text should offer choices: `@` for people, `/` for commands, `#` for channels, `:` for emoji. The app owns the items (filter or fetch them from `trigger.match.query`) and what choosing one does; Sable owns detecting the trigger, placing the list at the caret, the keys and the accessibility. Use Combobox when the whole field is a search for one value, and CommandMenu for a global palette.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Attach the hook's `fieldRef` to the field: `ref` on Textarea or Input, `fieldRef` on ChatComposer. On ChatComposer, Enter picks the highlighted suggestion instead of sending, because CaretMenu takes the Enter first."
          },
          {
            "guidance": "do",
            "description": "Insert a mention with a trailing space, `trigger.replace(`@${person.name} `)`, so the reader keeps typing; run a slash command and then `trigger.replace(\"\")` to clear `/query` from the field."
          },
          {
            "guidance": "do",
            "description": "For `@` names with spaces set `allowSpaces: true` on that trigger; for `/` commands set `atStart: true` so `and/or` mid-sentence stays text."
          },
          {
            "guidance": "do",
            "description": "Fetch remote suggestions from `trigger.match?.query` yourself, debounced, and pass `status` while loading or when nothing matches (\"Searching…\", \"No one matches\"). The status row is also what the list announces."
          },
          {
            "guidance": "dont",
            "description": "Do not expect chips inside the field. A textarea holds text, so a mention is text. Rendering tokens in the field needs a rich-text editor, which Sable does not own (`sable docs extending-a-component`)."
          },
          {
            "guidance": "dont",
            "description": "Do not move focus into the list or wrap the field in a Popover. Focus stays in the field; the list is pointed at with aria-activedescendant."
          }
        ],
        "anatomy": [
          {
            "name": "useCaretTrigger",
            "required": true,
            "description": "The hook on the field: trigger detection, the query, the caret anchor, replace() and dismiss()."
          },
          {
            "name": "CaretMenu",
            "required": true,
            "description": "The list at the caret, its keys, and its announcements."
          },
          {
            "name": "CaretMenuItem",
            "required": true,
            "description": "One suggestion row, with optional icon and description."
          }
        ]
      },
      "related": {
        "components": [
          "ChatComposer",
          "Textarea",
          "Input",
          "Combobox",
          "CommandMenu",
          "Menu"
        ]
      },
      "props": [
        {
          "name": "trigger",
          "type": "UseCaretTriggerResult",
          "description": "The result of `useCaretTrigger({ triggers })`, whose `fieldRef` is attached to the field. Each trigger is `{ char, atStart?, allowSpaces?, maxQueryLength? }`; the result carries `match` (`{ trigger, query, start, end }` or null), `replace(text)`, `dismiss()` and `getAnchorRect()`."
        },
        {
          "name": "label",
          "type": "string",
          "description": "The list's accessible name, e.g. \"People\" or \"Commands\"."
        },
        {
          "name": "status",
          "type": "ReactNode",
          "description": "A row under the items for what the list is doing: loading, nothing found, an error. Announced politely in place of the suggestion count. With no items and no status the list stays shut."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "CaretMenuItems, already filtered for the query."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Layout classes for the popup, such as a width."
        }
      ],
      "subcomponents": [
        {
          "name": "CaretMenuItem",
          "type": "div props + onSelect: () => void + disabled?: boolean + icon?: ReactNode + description?: ReactNode",
          "description": "One suggestion, styled as a Menu row. `onSelect` runs on Enter, Tab or click; `icon` and `description` work as on MenuItem. A disabled row shows but the arrow keys skip it."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border-floating",
        "accent",
        "accent-foreground",
        "muted-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "root",
          "why": "Scales in from the caret's side, so the list reads as coming from the character just typed. It leaves instantly: it answers a keystroke and should be gone by the next one."
        }
      ],
      "a11y": [
        "Focus stays in the field. The field carries aria-autocomplete=\"list\", aria-controls (the listbox) and aria-activedescendant (the highlighted option), so a screen reader follows the arrow keys without focus moving.",
        "An <input> becomes role=\"combobox\" with aria-expanded. A <textarea> keeps its textbox role (combobox would drop multiline), and since a textbox cannot carry aria-expanded, opening is announced through a polite status, mounted from the start: \"3 suggestions\", or the `status` text.",
        "↑/↓ move the highlight and wrap; Enter or Tab choose it; Escape closes the list without reaching an enclosing Dialog or Sheet. Shift+Enter is left alone, so a line break still breaks the line.",
        "Rows keep focus in the field on pointer down, so a click does not blur it and close the list first.",
        "Triggers follow a word boundary (`ana@example.com` and `and/or` stay text), wait for IME composition to end, and stay closed after Escape until the caret leaves that trigger."
      ],
      "examples": [
        {
          "label": "Mentions and slash commands in a ChatComposer",
          "code": "const trigger = useCaretTrigger({ triggers: [{ char: \"@\", allowSpaces: true }, { char: \"/\", atStart: true }] })\nconst q = trigger.match?.query.toLowerCase() ?? \"\"\nconst commands = trigger.match?.trigger.char === \"/\"\n\n<ChatComposer fieldRef={trigger.fieldRef} onSend={send} />\n<CaretMenu trigger={trigger} label={commands ? \"Commands\" : \"People\"} status={!commands && people.length === 0 ? \"No one matches\" : undefined}>\n\t{commands\n\t\t? slashCommands.filter((c) => c.name.startsWith(q)).map((c) => (\n\t\t\t<CaretMenuItem key={c.name} description={c.hint} onSelect={() => { c.run(); trigger.replace(\"\") }}>/{c.name}</CaretMenuItem>\n\t\t))\n\t\t: people.filter((p) => p.name.toLowerCase().includes(q)).map((p) => (\n\t\t\t<CaretMenuItem key={p.id} icon={<Avatar size=\"sm\" src={p.avatar} fallback={p.initials} />} onSelect={() => trigger.replace(`@${p.name} `)}>{p.name}</CaretMenuItem>\n\t\t))}\n</CaretMenu>",
          "imports": "import { Avatar, CaretMenu, CaretMenuItem, ChatComposer, useCaretTrigger } from \"@sableui/react\""
        },
        {
          "label": "On a Textarea, with remote results",
          "code": "const trigger = useCaretTrigger({ triggers: [{ char: \"#\" }] })\n// Fetch from trigger.match?.query yourself, debounced; pass the state as status.\n<Textarea ref={trigger.fieldRef} aria-label=\"Note\" />\n<CaretMenu trigger={trigger} label=\"Channels\" status={loading ? \"Searching…\" : channels.length === 0 ? \"No channels match\" : undefined}>\n\t{channels.map((c) => <CaretMenuItem key={c.id} onSelect={() => trigger.replace(`#${c.name} `)}>#{c.name}</CaretMenuItem>)}\n</CaretMenu>",
          "imports": "import { CaretMenu, CaretMenuItem, Textarea, useCaretTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Carousel",
      "status": "stable",
      "group": "Media & mockups",
      "register": "page",
      "path": "components/carousel",
      "summary": "Generic, accessible, zero-dependency slide carousel. Transform track with measured slide pitch — multiple slides per view, infinite loop (cloned ends), pointer drag-to-swipe with snap, autoplay (with a pause control + hover/focus/reduced-motion pausing), arrows, dots, counter, and keyboard. Motion is token-driven.",
      "keywords": [
        "carousel",
        "gallery",
        "slides",
        "horizontal"
      ],
      "usage": {
        "description": "Use Carousel for a curated, finite sequence of media or cards that benefits from horizontal browsing.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use obvious previous and next controls and make the current position understandable."
          },
          {
            "guidance": "do",
            "description": "Keep slide content independent so users do not need every slide to complete a task."
          },
          {
            "guidance": "dont",
            "description": "Do not hide critical information or primary conversion actions only inside later slides."
          },
          {
            "guidance": "dont",
            "description": "Do not autoplay without a visible pause control. Motion that cannot be stopped fails WCAG 2.2.2 and makes the surrounding text hard to read."
          }
        ]
      },
      "related": {
        "components": [
          "Scroller",
          "Dialog"
        ]
      },
      "props": [
        {
          "name": "children",
          "type": "ReactNode",
          "description": "Each top-level child becomes one slide."
        },
        {
          "name": "slidesToShow",
          "type": "number | { base?: number; sm?: number; md?: number; lg?: number; xl?: number }",
          "default": "1",
          "description": "Slides visible per view. A number, or a smallest-first width set (sm 640, md 768, lg 1024, xl 1280px) measured on the carousel's OWN width, not the viewport, so a carousel in a narrow column shows fewer slides than one across the page; a missing key inherits from the next smaller defined one, and base (default 1) is also the server-render value."
        },
        {
          "name": "gap",
          "type": "string",
          "default": "\"0px\"",
          "description": "Gap between slides (any CSS length). Use the spacing scale — e.g. \"calc(var(--spacing) * 4)\" — so density moves it."
        },
        {
          "name": "loop",
          "type": "boolean",
          "default": "false",
          "description": "Infinite loop via cloned ends (needs count > slidesToShow)."
        },
        {
          "name": "autoplay",
          "type": "number",
          "default": "0",
          "description": "Auto-advance interval in ms (0 = off). Pauses on hover/focus/reduced-motion and exposes a play/pause control."
        },
        {
          "name": "arrows",
          "type": "boolean",
          "default": "true",
          "description": "Prev/next arrow buttons."
        },
        {
          "name": "dots",
          "type": "boolean",
          "default": "true",
          "description": "Pagination dots."
        },
        {
          "name": "counter",
          "type": "boolean",
          "default": "false",
          "description": "An N / M slide counter."
        },
        {
          "name": "draggable",
          "type": "boolean",
          "default": "true",
          "description": "Pointer drag-to-swipe."
        },
        {
          "name": "index",
          "type": "number",
          "description": "Controlled active index."
        },
        {
          "name": "defaultIndex",
          "type": "number",
          "default": "0",
          "description": "Initial index (uncontrolled)."
        },
        {
          "name": "onIndexChange",
          "type": "(index: number) => void",
          "description": "Notified when the active index changes."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Slides\"",
          "description": "Accessible label for the carousel region."
        },
        {
          "name": "previousLabel",
          "type": "string",
          "default": "\"Previous slide\"",
          "description": "The previous arrow's accessible name."
        },
        {
          "name": "nextLabel",
          "type": "string",
          "default": "\"Next slide\"",
          "description": "The next arrow's accessible name."
        },
        {
          "name": "slideLabel",
          "type": "(index: number, count: number) => string",
          "default": "(index, count) => `${index} of ${count}`",
          "description": "Each slide's accessible name, from its 1-based position."
        },
        {
          "name": "positionLabel",
          "type": "(index: number, count: number) => string",
          "default": "(index, count) => `Slide ${index} of ${count}`",
          "description": "What the polite live region announces after a move, from the 1-based position."
        },
        {
          "name": "dotsLabel",
          "type": "string",
          "default": "\"Choose slide\"",
          "description": "The dots group's accessible name."
        },
        {
          "name": "dotLabel",
          "type": "(index: number) => string",
          "default": "(index) => `Go to slide ${index}`",
          "description": "Each dot's accessible name, from its 1-based slide number."
        },
        {
          "name": "pauseLabel",
          "type": "string",
          "default": "\"Pause autoplay\"",
          "description": "The autoplay toggle's name while playing."
        },
        {
          "name": "playLabel",
          "type": "string",
          "default": "\"Start autoplay\"",
          "description": "The autoplay toggle's name while paused."
        },
        {
          "name": "slideClassName",
          "type": "string",
          "description": "Class for each slide wrapper (e.g. an aspect ratio)."
        },
        {
          "name": "arrowClassName",
          "type": "string",
          "description": "Class for both prev/next arrow buttons. Merged through cn(), so a radius or shadow utility replaces the default rounded-full shadow-md rather than stacking with it."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the glide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Under subtle the slides still travel and the active dot snaps; off also cuts between slides and pauses autoplay."
        }
      ],
      "tokensUsed": [
        "border",
        "ring",
        "popover",
        "popover-foreground",
        "foreground",
        "muted-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A carousel arrives with its section. Its content already moves on every advance; an entrance on top would make the first view feel like an advance nobody asked for."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Dot",
          "why": "The dot's 24px hit area eases its focus ring and the dot brightens under the pointer, which is how a 6px mark tells you it is a button."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Track",
          "why": "The slide track's translate is set inline from the measured slide pitch, on --motion-duration-slow and the emphasized easing, and switched off during a drag so the track follows the finger. A recipe cannot carry a measured, drag-interrupted offset. Essential: it is the answer to \"next\", so it plays under subtle."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "Dot",
          "why": "The active dot stretches to a bar while the one it left shrinks, on one timeline, so the row keeps its length and the mark reads as travelling with the slide. It used to change width unanimated and jumped while the slides beside it glided. Expressive: motion=\"subtle\" snaps it."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Autoplay's progress is the slides themselves advancing and the play/pause control; a separate timer animation would put a second clock beside the first."
        }
      ],
      "a11y": [
        "Region carries aria-roledescription='carousel'; each slide is a group with aria-roledescription='slide' and an 'N of M' label; clones are aria-hidden.",
        "Arrows and dots are real buttons (dots set aria-current); Left/Right arrow keys navigate when the viewport is focused. Every word it supplies (region, arrows, slide names, the announcement, dots, autoplay toggle) has a *Label prop.",
        "Inactive dots draw at 70% muted-foreground, which clears the 3:1 non-text floor on light and dark surfaces.",
        "A polite live region announces the active slide; it goes silent while auto-rotating (APG).",
        "Autoplay exposes a pause/play control and pauses on hover, focus, and under prefers-reduced-motion (which also makes transitions instant)."
      ],
      "examples": [
        {
          "label": "Looping media",
          "code": "<Carousel loop dots slideClassName=\"aspect-video\">{images.map((s) => <img key={s.id} src={s.url} alt={s.alt} className=\"size-full object-cover\" />)}</Carousel>",
          "imports": "import { Carousel } from \"@sableui/react\""
        },
        {
          "label": "Multiple per view",
          "code": "<Carousel slidesToShow={3} gap=\"calc(var(--spacing) * 4)\">{cards}</Carousel>",
          "imports": "import { Carousel } from \"@sableui/react\""
        },
        {
          "label": "Responsive per view",
          "code": "<Carousel slidesToShow={{ base: 1, sm: 2, lg: 3 }} gap=\"calc(var(--spacing) * 6)\" label=\"Templates\">{cards}</Carousel>",
          "imports": "import { Carousel } from \"@sableui/react\""
        },
        {
          "label": "Autoplay",
          "code": "<Carousel loop autoplay={4000} counter>{slides}</Carousel>",
          "imports": "import { Carousel } from \"@sableui/react\""
        },
        {
          "label": "Subtle motion",
          "code": "<Carousel loop motion=\"subtle\" label=\"Gallery\">{slides}</Carousel>",
          "imports": "import { Carousel } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ChatComposer",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/chat-composer",
      "summary": "The input half of a conversation: one surface holding attachments, an auto-growing field, and its controls. Enter sends, Shift+Enter breaks the line (sendOn=\"mod-enter\" swaps them for long-form replies; on touch, Return always breaks the line), and send becomes stop while a reply streams. allowEmpty sends attachments without text.",
      "keywords": [
        "chat input",
        "composer",
        "message input",
        "prompt input",
        "send message",
        "ai chat",
        "support chat",
        "textarea"
      ],
      "usage": {
        "description": "Pairs with MessageScroller to make a working chat. A single surface rather than an input with buttons parked beside it: attachments above, text in the middle, affordances along the bottom. Works controlled or uncontrolled — uncontrolled is the default because it is what the common case wants, and what lets a hook-free page shell ship a composer that actually types.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Wiring it to a streaming source? `sable docs building-a-chat` maps a turn lifecycle (submitted, streaming, done, stopped, error) onto `busy`, `onStop` and `disabled`, and says where each failure goes."
          },
          {
            "guidance": "do",
            "description": "Pass `busy` while a reply streams, and `onStop` alongside it. Interrupting a long generation is the most common thing a reader wants during one, and the control belongs where their cursor already is."
          },
          {
            "guidance": "do",
            "description": "Leave it uncontrolled unless you need the text elsewhere — a slash-command menu, a draft you persist. Uncontrolled clears itself on send; controlled does not."
          },
          {
            "guidance": "do",
            "description": "Render pending uploads as `<Attachment>` chips in `attachments`, so the file and the message it belongs to stay in one box."
          },
          {
            "guidance": "do",
            "description": "Pass `allowEmpty={files.length > 0}` when a file can go without a caption. Send enables on the attachment alone and `onSend` receives `\"\"`. Tie it to the pending files: a constant `allowEmpty` leaves send enabled with nothing to send."
          },
          {
            "guidance": "do",
            "description": "Put model pickers and tool toggles in `leading`, beside the attach button — they are composer state, not message content, and belong on the chrome row rather than in the field."
          },
          {
            "guidance": "dont",
            "description": "Do not clear a controlled composer for the user on send. Only the caller knows whether the send succeeded, and clearing on their behalf loses the message when it did not."
          },
          {
            "guidance": "dont",
            "description": "Do not add your own Enter-to-send handler on top. The built-in one already guards against firing mid-IME-composition, and on a touch device lets Return break the line (a soft keyboard has no Shift+Return), which are the lines hand-rolled chat inputs miss."
          },
          {
            "guidance": "do",
            "description": "Building a docked agent panel inside a tool? Wrap the whole conversation — scroller, messages and composer — in `<Density value=\"compact\">`. The entire set follows the workspace register from there: prose drops a tier, the rhythm tightens, and the controls come off the compact ladder. Do not hand-size it at the call site."
          },
          {
            "guidance": "dont",
            "description": "Do not use it as a general multi-line input inside a larger form. That is `Textarea`. A standalone reply box that sends multi-paragraph messages (email, support replies) is this one with sendOn=\"mod-enter\"."
          },
          {
            "guidance": "dont",
            "description": "Do not override the field's type utility to make it match your transcript. The field and `Bubble` both read the same tier already, which is what stops a message changing size the moment it is sent — overriding one breaks that pairing."
          },
          {
            "guidance": "dont",
            "description": "Do not remove the height cap to let the field grow without limit. A pasted essay would push the conversation off the screen; past the cap it scrolls."
          }
        ],
        "anatomy": [
          {
            "name": "Attachments",
            "required": false,
            "description": "Pending files as chips, above the field, inside the same surface."
          },
          {
            "name": "Field",
            "required": true,
            "description": "An auto-growing Textarea, stripped of its own border and ring — the surface carries both — capped before it eats the transcript."
          },
          {
            "name": "Controls",
            "required": true,
            "description": "Attach and any `leading` controls on the left; `actions` and the send/stop button on the right."
          },
          {
            "name": "Footer",
            "required": false,
            "description": "Helper text or a character counter below the controls."
          }
        ]
      },
      "related": {
        "components": [
          "MessageScroller",
          "Message",
          "Bubble",
          "Attachment",
          "Textarea"
        ],
        "patterns": [
          "ChatPanel"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "string",
          "description": "Controlled value. Omit for an uncontrolled composer that owns its own text."
        },
        {
          "name": "defaultValue",
          "type": "string",
          "default": "\"\"",
          "description": "Initial value when uncontrolled."
        },
        {
          "name": "onValueChange",
          "type": "(value: string) => void",
          "description": "Notified on every keystroke. Required when `value` is supplied."
        },
        {
          "name": "onSend",
          "type": "(value: string) => void",
          "description": "Called with the trimmed message. An uncontrolled composer clears itself afterwards; a controlled one is the caller's to clear. With `allowEmpty` the message can be `\"\"`."
        },
        {
          "name": "allowEmpty",
          "type": "boolean",
          "default": "false",
          "description": "Let the reader send with no text, because the app has something else to send (pending attachments). Pass it only while that is true, `allowEmpty={files.length > 0}`; `onSend` then receives `\"\"`."
        },
        {
          "name": "placeholder",
          "type": "string",
          "default": "\"Send a message…\"",
          "description": "Placeholder for the field."
        },
        {
          "name": "sendOn",
          "type": "\"enter\" | \"mod-enter\"",
          "default": "\"enter\"",
          "description": "Which key sends. enter for chat (Shift+Enter breaks the line). mod-enter for long-form replies such as an email or a support answer: Enter breaks the line and Cmd/Ctrl+Enter sends, so a paragraph break never mails a draft. Say so in footer (\"Cmd+Enter to send\"). On a touch device (pointer: coarse) enter behaves as mod-enter: a soft keyboard has no Shift+Return, so Return breaks the line and the send button sends."
        },
        {
          "name": "busy",
          "type": "boolean",
          "default": "false",
          "description": "A reply is streaming. Disables send, and swaps it for a stop control when `onStop` is supplied."
        },
        {
          "name": "onStop",
          "type": "() => void",
          "description": "Interrupt the in-flight reply. Supplying it turns send into stop while busy."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Block sending entirely — over a limit, disconnected, read-only thread. Distinct from `busy`, which is temporary and offers a way out (stop)."
        },
        {
          "name": "invalid",
          "type": "boolean",
          "default": "false",
          "description": "Mark the current text invalid. Colours the surface border and sets `aria-invalid` on the field."
        },
        {
          "name": "attachments",
          "type": "ReactNode",
          "description": "Attachment chips, shown above the field."
        },
        {
          "name": "leading",
          "type": "ReactNode",
          "description": "Controls on the left of the footer row — model picker, tool toggles."
        },
        {
          "name": "actions",
          "type": "ReactNode",
          "description": "Extra controls left of the send button."
        },
        {
          "name": "onAttach",
          "type": "() => void",
          "description": "Attach handler. Supplying it renders the built-in attach button."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Message\"",
          "description": "Accessible label for the field."
        },
        {
          "name": "sendLabel",
          "type": "string",
          "default": "\"Send message\"",
          "description": "Accessible label for the send button."
        },
        {
          "name": "stopLabel",
          "type": "string",
          "default": "\"Stop generating\"",
          "description": "Accessible label for the stop button."
        },
        {
          "name": "attachLabel",
          "type": "string",
          "default": "\"Add attachment\"",
          "description": "Accessible label for the built-in attach button (rendered when onAttach is set)."
        },
        {
          "name": "footer",
          "type": "ReactNode | ((state: { sendOn: \"enter\" | \"mod-enter\" }) => ReactNode)",
          "description": "Helper text or counter below the controls. For a keyboard hint pass a function: it receives the send key in effect (touch turns `enter` into `mod-enter`), and returning null removes the row, e.g. `footer={({ sendOn }) => sendOn === \"enter\" ? \"Enter to send\" : null}`."
        },
        {
          "name": "fieldRef",
          "type": "Ref<HTMLTextAreaElement>",
          "description": "Ref to the underlying textarea — for focusing after a send, or on mount, and the extension point for anything that listens to the field. Pass `useCaretTrigger`'s `fieldRef` here for mentions and slash commands (CaretMenu). An Enter another listener already handled (`preventDefault()`) does not send."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Under `subtle` the field snaps to its new height and the send/stop glyphs swap without the morph."
        },
        {
          "name": "...form props",
          "type": "Omit<ComponentPropsWithRef<\"form\">, \"onSubmit\" | \"defaultValue\">",
          "description": "Spread onto the form element. Use `onSend` rather than `onSubmit`."
        }
      ],
      "variants": {
        "invalid": [
          "true",
          "false"
        ]
      },
      "tokensUsed": [
        "field",
        "field-border",
        "ring",
        "destructive",
        "foreground",
        "muted-foreground",
        "primary",
        "primary-foreground",
        "secondary",
        "secondary-foreground",
        "accent",
        "accent-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The composer is the fixed foot of a thread, there before anything else is. An entrance would only delay the first keystroke."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The surface's focus ring and invalid border ease in, so focusing the field reads as the whole box waking up rather than a frame flicker."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Field",
          "why": "As a line breaks or a paste lands, the field eases to its new height (up to its cap) instead of jumping, so the transcript above is visibly pushed rather than teleported. `field-sizing` alone cannot ease — its height stays `auto` — so a small hook measures and pins a pixel height. Expressive and short (`fast`): the text itself lands at once, and `subtle` snaps the box."
        },
        {
          "slot": "transition",
          "recipe": "motion-icon-swap",
          "part": "Send button",
          "why": "Send turning into stop is the moment a reply starts, and stop turning back is the moment it is over. One button changes role in place — the fill eases, the arrow collapses into the square — so it reads as the same control changing what it does, not a different button appearing under the cursor."
        },
        {
          "slot": "activity",
          "recipe": "motion-spin",
          "part": "Send button",
          "why": "Busy with no stop handler, Button's own loading Spinner replaces the arrow, so a send in flight is not mistaken for a disabled one."
        }
      ],
      "a11y": [
        "A real `<form>`, so the send button is a submit button and the whole thing behaves as one control to assistive tech and to password managers alike.",
        "Enter never submits while an IME composition is open (`isComposing`), so a CJK reader confirming a candidate word does not mail a fragment of their first sentence.",
        "The focus ring is drawn on the surface via `focus-within`, not on the textarea, so the visible focus indicator matches the box a sighted user perceives as the input.",
        "Send is disabled — not merely styled down — until there is non-whitespace to send (or `allowEmpty` says an attachment is enough), so the affordance and the behaviour agree for keyboard users.",
        "On a touch device Return breaks the line and the send button sends; `aria-keyshortcuts` reports the shortcut actually in effect (⌘/Ctrl+Enter there, Enter on desktop).",
        "Icon-only attach, send and stop buttons all carry accessible labels, each overridable for localisation."
      ],
      "examples": [
        {
          "label": "Uncontrolled — the common case",
          "code": "<ChatComposer onSend={(text) => send(text)} onAttach={pickFile} />",
          "imports": "import { ChatComposer } from \"@sableui/react\""
        },
        {
          "label": "Streaming, with a stop control",
          "code": "<ChatComposer onSend={send} busy={isStreaming} onStop={stop} placeholder=\"Ask a follow-up…\" />",
          "imports": "import { ChatComposer } from \"@sableui/react\""
        },
        {
          "label": "Controlled, with pending attachments",
          "code": "<ChatComposer\n\tvalue={draft}\n\tonValueChange={setDraft}\n\tonSend={(text) => { post(text, files); setDraft(\"\") }}\n\tonAttach={pickFile}\n\tattachments={files.map((f) => (<Attachment key={f.id} variant=\"media\" name={f.name} thumbnail={f.url} actions={<Button variant=\"floating\" size=\"icon-xs\" aria-label=\"Remove\" onClick={() => drop(f.id)}><Icon name=\"xmark\" /></Button>} />))}\n\tfooter={`${draft.length} / 4000`}\n\tinvalid={draft.length > 4000}\n/>",
          "imports": "import { Attachment, Button, ChatComposer, Icon } from \"@sableui/react\""
        },
        {
          "label": "Attachments sent without text",
          "code": "<ChatComposer\n\tonSend={(text) => post(text, files)}\n\tallowEmpty={files.length > 0}\n\tonAttach={pickFile}\n\tattachments={files.map((f) => <Attachment key={f.id} name={f.name} meta={f.size} />)}\n/>",
          "imports": "import { Attachment, ChatComposer } from \"@sableui/react\""
        },
        {
          "label": "A working chat, end to end",
          "code": "<div className=\"flex h-128 flex-col gap-3\">\n\t<MessageScroller className=\"flex-1 min-h-0\">\n\t\t{messages.map((m) => (<Message key={m.id} messageId={m.id} align={m.mine ? \"end\" : \"start\"}><Bubble variant={m.mine ? \"primary\" : \"muted\"} align={m.mine ? \"end\" : \"start\"}>{m.body}</Bubble></Message>))}\n\t\t{streaming ? <Marker icon=\"spinner\" spin shimmer>Thinking…</Marker> : null}\n\t</MessageScroller>\n\t<ChatComposer onSend={send} busy={streaming} onStop={stop} />\n</div>",
          "imports": "import { Bubble, ChatComposer, Marker, Message, MessageScroller } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Checkbox",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/checkbox",
      "summary": "Square toggle (18px at rest, on the spacing scale) over Base UI's Checkbox. Checked/indeterminate/disabled states; controlled or uncontrolled; form-ready via the hidden native input.",
      "keywords": [
        "checkbox",
        "boolean",
        "multi select",
        "form control"
      ],
      "usage": {
        "description": "Use Checkbox for independent boolean choices or for selecting multiple options in a set.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use Checkbox when each option can be toggled independently."
          },
          {
            "guidance": "do",
            "description": "Attach a visible label that explains the consequence of checking the control."
          },
          {
            "guidance": "dont",
            "description": "Do not use Checkbox for mutually exclusive choices; use Radio or Select instead.",
            "instead": [
              "Radio",
              "Select"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it without a label or an aria-label. An 18px square with no accessible name is announced as just \"checkbox\", which tells a screen-reader user nothing about what they are agreeing to."
          },
          {
            "guidance": "dont",
            "description": "Do not phrase the label as a negative, such as \"Don't send read receipts\". Paired with an unchecked box it becomes a double negative the reader has to solve before they can answer. Label the state being turned on."
          }
        ]
      },
      "related": {
        "components": [
          "CheckboxCard",
          "Switch",
          "Radio"
        ]
      },
      "props": [
        {
          "name": "checked",
          "type": "boolean",
          "description": "Controlled checked state. Pair with onCheckedChange. Omit for uncontrolled."
        },
        {
          "name": "defaultChecked",
          "type": "boolean",
          "default": "false",
          "description": "Initial checked state for an uncontrolled checkbox."
        },
        {
          "name": "onCheckedChange",
          "type": "(checked: boolean, eventDetails) => void",
          "description": "Fires when the checkbox is ticked or unticked. Note: Base UI passes a second eventDetails arg — not the common (checked) => void, so a single-arg handler must widen its signature."
        },
        {
          "name": "indeterminate",
          "type": "boolean",
          "default": "false",
          "description": "Mixed state (neither checked nor unchecked). Renders a dash instead of the check. For a \"select all\" box inside a CheckboxGroup, use `parent` instead and the group sets this for you."
        },
        {
          "name": "parent",
          "type": "boolean",
          "default": "false",
          "description": "Makes this the \"select all\" box of a CheckboxGroup that has `allValues`. It checks or clears every child, and shows the dash when only some are checked. Only works inside a CheckboxGroup."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Ignores user interaction and dims the control."
        },
        {
          "name": "name",
          "type": "string",
          "description": "Field name for the hidden input on form submit."
        },
        {
          "name": "value",
          "type": "string",
          "description": "Value submitted with the form when checked. Inside a group-owned CheckboxGroup, it is the name the group's value array uses for this checkbox."
        },
        {
          "name": "render",
          "type": "ReactElement | (props, state) => ReactElement",
          "description": "Compose the root with another element through the Base UI render prop."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Under `subtle` the tick fades in instead of drawing itself."
        }
      ],
      "tokensUsed": [
        "card",
        "input",
        "primary",
        "primary-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the form it belongs to. Animating each box in turns a settings list into a title sequence."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Box",
          "why": "The box fills with the primary colour as it is checked; easing the fill keeps the mark and the box changing as one event rather than two frames apart."
        },
        {
          "slot": "transition",
          "recipe": "motion-tick",
          "part": "Mark",
          "why": "The check draws itself in from its leading stroke, so checking reads as the box being ticked rather than a glyph appearing. The dash wipes the same way. Unchecking only fades, so clearing a list is quick; under `subtle` checking fades too."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A checkbox commits instantly. A slow write belongs to the surrounding form's pending state, not the control."
        }
      ],
      "a11y": [
        "Base UI renders a hidden native <input type=checkbox> for keyboard, focus, and form semantics.",
        "Space toggles; focus-visible draws a 2px ring in the --ring token.",
        "indeterminate sets aria-checked=mixed automatically; a `parent` checkbox in a CheckboxGroup gets aria-checked=mixed and aria-controls for its children from the group.",
        "Label it with Field orientation=\"horizontal\": it wires the label's htmlFor to the checkbox, so the label text joins the click target, and adds the description and error plumbing."
      ],
      "examples": [
        {
          "label": "Default",
          "code": "<Checkbox defaultChecked />",
          "imports": "import { Checkbox } from \"@sableui/react\""
        },
        {
          "label": "Controlled",
          "code": "<Checkbox checked={value} onCheckedChange={setValue} />",
          "imports": "import { Checkbox } from \"@sableui/react\""
        },
        {
          "label": "Indeterminate",
          "code": "<Checkbox indeterminate />",
          "imports": "import { Checkbox } from \"@sableui/react\""
        },
        {
          "label": "Select all in a group",
          "code": "<CheckboxGroup allValues={[\"email\", \"sms\"]} defaultValue={[\"email\"]} className=\"gap-3\"><Field label=\"All channels\" orientation=\"horizontal\"><Checkbox parent /></Field><Field label=\"Email\" orientation=\"horizontal\" className=\"ps-7\"><Checkbox value=\"email\" /></Field><Field label=\"SMS\" orientation=\"horizontal\" className=\"ps-7\"><Checkbox value=\"sms\" /></Field></CheckboxGroup>",
          "imports": "import { Checkbox, CheckboxGroup, Field } from \"@sableui/react\""
        },
        {
          "label": "With label",
          "code": "<Field label=\"Remember me\" orientation=\"horizontal\"><Checkbox /></Field>",
          "imports": "import { Checkbox, Field } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "CheckboxCard",
      "status": "stable",
      "group": "Selection",
      "register": "page",
      "path": "components/checkbox-card",
      "summary": "A multi-select selection card — a card-sized Base UI Checkbox with a checkbox box, title, and optional description. The checkbox twin of RadioCard (same tone table). CheckboxGroup lays a column out and can own the selection: give each card a `value` and the group holds the checked values as an array, with an optional parent \"select all\" Checkbox.",
      "keywords": [
        "checkbox card",
        "select card",
        "multi select",
        "option card"
      ],
      "usage": {
        "description": "Use CheckboxCard when an option needs more visual weight, supporting text, or iconography than a plain checkbox row.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for a small number of options where details help users compare choices."
          },
          {
            "guidance": "do",
            "description": "Keep the checked state visible across the full card, not only inside the indicator."
          },
          {
            "guidance": "do",
            "description": "Let CheckboxGroup own the selection when the cards answer one question: give each card a `value` and read one array from `onValueChange` instead of wiring a toggle per card."
          },
          {
            "guidance": "do",
            "description": "Use a plain Checkbox with `parent` for \"select all\", and list every child value in the group's `allValues`. The group works out its checked and mixed states."
          },
          {
            "guidance": "dont",
            "description": "Do not use CheckboxCard for long lists; use Checkbox rows or a Combobox with `multiple` instead."
          },
          {
            "guidance": "dont",
            "description": "Do not put a link or a button inside the card. The whole card is the checkbox's label, so a nested interactive element is either unreachable or steals the click that should toggle it."
          }
        ],
        "anatomy": [
          {
            "name": "CheckboxCard",
            "required": true,
            "description": "One card-shaped checkbox option."
          },
          {
            "name": "CheckboxGroup",
            "required": false,
            "description": "A grouped set of related checkbox cards. Optionally owns the selected values and a parent \"select all\" checkbox."
          }
        ]
      },
      "related": {
        "components": [
          "Checkbox",
          "RadioCard"
        ]
      },
      "props": [
        {
          "name": "onCheckedChange",
          "type": "(checked: boolean, eventDetails) => void",
          "description": "Fires with the next checked state (Base UI passes eventDetails second). Pair with `checked` for a controlled card; omit both to let it manage its own state."
        },
        {
          "name": "title",
          "type": "ReactNode",
          "description": "The card's primary label (text-title-sm)."
        },
        {
          "name": "description",
          "type": "ReactNode",
          "description": "Optional supporting copy beneath the title (text-body-sm, muted)."
        },
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "Optional glyph (a solid <Icon>) in the tone colour. Its presence switches to the two-dimensional card RadioCard uses — icon top-left, checkbox top-right, copy below — so the two cards match in one form."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"3\" | \"2\" | \"1\" | \"info\" | \"warning\"",
          "default": "\"neutral\"",
          "description": "Semantic colour the checked state carries across the border, checkbox box, and icon."
        },
        {
          "name": "value",
          "type": "string",
          "description": "Names the card inside a group-owned CheckboxGroup: the card is checked when the group's value array includes it. Also the value submitted with a form. Inside a CheckboxGroup, `name` stands in for `value` when `value` is omitted."
        },
        {
          "name": "checked / onCheckedChange / defaultChecked / disabled",
          "type": "Base UI Checkbox.Root props",
          "description": "Standard checkbox state. Without a group-owned value, each card is independent — drive checked/onCheckedChange per item for multi-select."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Under `subtle` the tick fades in instead of drawing itself."
        }
      ],
      "subcomponents": [
        {
          "name": "CheckboxGroup",
          "type": "{ className?: string; children: ReactNode; value?: string[]; defaultValue?: string[]; onValueChange?: (value: string[]) => void; allValues?: string[]; disabled?: boolean }",
          "description": "Column wrapper (role=group) over Base UI's CheckboxGroup. With no group props it is layout only and each card stays independent. Pass value/defaultValue/onValueChange (string[]) and give each child a `value` to let the group own the selection — works for CheckboxCard and plain Checkbox children alike. Add allValues plus a `<Checkbox parent />` for a select-all box that turns mixed when only some are checked. `disabled` disables every child. onValueChange gets (value, eventDetails). Override the grid via className for multi-column layouts."
        }
      ],
      "variants": {
        "tone": [
          "neutral",
          "3",
          "2",
          "1",
          "info",
          "warning"
        ]
      },
      "tokensUsed": [
        "input",
        "card",
        "ring",
        "primary",
        "primary-foreground",
        "accent",
        "foreground",
        "muted-foreground",
        "tone-3",
        "tone-3-foreground",
        "tone-2",
        "tone-2-foreground",
        "tone-1",
        "tone-1-foreground",
        "tone-info",
        "tone-info-foreground",
        "tone-warning",
        "tone-warning-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the form it belongs to. Animating each box in turns a settings list into a title sequence."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Box",
          "why": "The box fills with the primary colour as it is checked; easing the fill keeps the mark and the box changing as one event rather than two frames apart."
        },
        {
          "slot": "transition",
          "recipe": "motion-tick",
          "part": "Mark",
          "why": "The check draws itself in from its leading stroke, so checking reads as the box being ticked rather than a glyph appearing. The dash wipes the same way. Unchecking only fades, so clearing a list is quick; under `subtle` checking fades too."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A checkbox commits instantly. A slow write belongs to the surrounding form's pending state, not the control."
        }
      ],
      "a11y": [
        "Base UI provides the checkbox role, aria-checked, hidden native input, keyboard toggle, and data-[checked]/data-disabled state.",
        "The whole card is the hit target; focus draws a 2px outline outside the card (not a ring, so the checked tone ring survives focus); Space toggles the focused card.",
        "Selection never relies on colour alone — the filled checkbox box + check mark and the card border all shift.",
        "A parent select-all Checkbox gets aria-checked=mixed and aria-controls pointing at its children from Base UI; give it a visible label."
      ],
      "examples": [
        {
          "label": "Group-owned selection",
          "code": "<CheckboxGroup value={selected} onValueChange={setSelected}>{REASONS.map((r) => (<CheckboxCard key={r} value={r} title={r} />))}</CheckboxGroup>",
          "imports": "import { CheckboxCard, CheckboxGroup } from \"@sableui/react\""
        },
        {
          "label": "Select all",
          "code": "<CheckboxGroup allValues={REASONS} value={selected} onValueChange={setSelected}><Field label=\"All reasons\" orientation=\"horizontal\"><Checkbox parent /></Field>{REASONS.map((r) => (<CheckboxCard key={r} value={r} title={r} />))}</CheckboxGroup>",
          "imports": "import { Checkbox, CheckboxCard, CheckboxGroup, Field } from \"@sableui/react\""
        },
        {
          "label": "A single independent card",
          "code": "<CheckboxCard title=\"Email me a receipt\" description=\"Sent when the payment settles\" checked={receipt} onCheckedChange={setReceipt} />",
          "imports": "import { CheckboxCard } from \"@sableui/react\""
        },
        {
          "label": "Toned with description",
          "code": "<CheckboxCard tone=\"1\" title=\"Reports\" description=\"Weekly usage reports by email\" defaultChecked />",
          "imports": "import { CheckboxCard } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Code",
      "status": "stable",
      "group": "Text & code",
      "register": "either",
      "path": "components/code",
      "summary": "Inline code. A styled `<code>` for code spans, keys, and identifiers inside running text — soft muted fill, monospace.",
      "keywords": [
        "code",
        "inline code",
        "token",
        "monospace"
      ],
      "usage": {
        "description": "Use Code for short inline identifiers, commands, tokens, props, and file names inside prose.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for brief technical literals that need to stand apart from body copy."
          },
          {
            "guidance": "do",
            "description": "Keep inline code short enough that it does not dominate the paragraph."
          },
          {
            "guidance": "dont",
            "description": "Do not use Code for multiline snippets; use CodeBlock instead."
          },
          {
            "guidance": "dont",
            "description": "Do not put a value the reader needs to copy inside it. Code has no copy affordance, so they will select it by hand and catch the surrounding punctuation; use CodeBlock with a prompt."
          }
        ]
      },
      "related": {
        "components": [
          "CodeBlock",
          "Kbd"
        ]
      },
      "props": [
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"code\">",
          "description": "All native `<code>` attributes (children, className, ref, …) pass through."
        }
      ],
      "tokensUsed": [
        "muted",
        "foreground"
      ],
      "a11y": [
        "Renders a semantic `<code>` element so assistive tech announces it as code.",
        "A `<code>` element is not announced distinctly by most screen readers — a code span in running prose is read as ordinary text. Where the exactness matters (a command to type verbatim, a case-sensitive identifier), say so in the sentence rather than relying on the styling to carry it."
      ],
      "examples": [
        {
          "label": "Inline",
          "code": "Run <Code>pnpm dev</Code> to start the server.",
          "imports": "import { Code } from \"@sableui/react\""
        },
        {
          "label": "Code vs CodeBlock",
          "code": "// Picking the wrong one is the usual mistake:\n//\n//   Code                   inline, inside a sentence       → `useState`\n//   CodeBlock              multi-line, read-only           → an example to study\n//   CodeBlock prompt=\"$\"   one line, meant to be COPIED    → an install command\n\nInstall with <Code>pnpm add @sableui/react</Code>          {/* ✗ they will want to copy it */}\n<CodeBlock prompt=\"$\" code=\"pnpm add @sableui/react\" />   {/* ✓ one line, with a copy button */}",
          "imports": "import { Code, CodeBlock } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "CodeBlock",
      "status": "stable",
      "group": "Text & code",
      "register": "either",
      "path": "components/code-block",
      "summary": "Multi-line code surface. Optional header bar carries a filename and a copy affordance; the body is a horizontally scrollable monospace pre. Syntax highlighting is opt-in: pass a highlighter per block or once via CodeHighlightProvider (the package ships none).",
      "keywords": [
        "code block",
        "snippet",
        "pre",
        "example"
      ],
      "usage": {
        "description": "Use CodeBlock for multiline code samples that users may read, inspect, or copy.",
        "anatomy": [
          {
            "name": "CodeBlock",
            "required": true,
            "description": "The surface: optional filename header, copy affordance, scrollable pre."
          },
          {
            "name": "CodeHighlightProvider",
            "required": false,
            "description": "Optional app-level wrapper that supplies one highlighter to every CodeBlock inside it."
          }
        ],
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give the snippet a filename, or a sentence of surrounding copy, when it helps readers and agents place it."
          },
          {
            "guidance": "do",
            "description": "Keep examples complete enough to teach the intended pattern."
          },
          {
            "guidance": "do",
            "description": "Wire highlighting once with CodeHighlightProvider and map token colors to semantic tone tokens (keywords → tone-1, strings → success, comments → muted-foreground), so code follows the theme instead of a fixed palette."
          },
          {
            "guidance": "dont",
            "description": "Do not put short inline identifiers in a CodeBlock; use Code for those."
          },
          {
            "guidance": "dont",
            "description": "Do not paste code with the indentation the surrounding file had. A block indented to sit inside your JSX shows the reader leading whitespace that is not part of the example."
          }
        ]
      },
      "related": {
        "components": [
          "Code"
        ]
      },
      "props": [
        {
          "name": "code",
          "type": "string",
          "description": "The code to display. Always what the copy button copies, whatever the highlighter renders."
        },
        {
          "name": "filename",
          "type": "string",
          "description": "Optional filename shown in the header bar."
        },
        {
          "name": "showCopy",
          "type": "boolean",
          "default": "true",
          "description": "Show the copy affordance — in the header bar with a filename, floating in the corner without one."
        },
        {
          "name": "highlight",
          "type": "((code: string) => ReactNode) | false",
          "description": "Highlighter for this block; overrides CodeHighlightProvider. false renders plain text inside a provider."
        },
        {
          "name": "prompt",
          "type": "string",
          "description": "A shell prompt (\"$\", \">\"). Makes it a one-line command: the prompt is dimmed and unselectable, the line truncates, and copy takes only code."
        },
        {
          "name": "wrap",
          "type": "boolean",
          "default": "false",
          "description": "Wrap long lines instead of scrolling them. For prose in a code face (a prompt to paste into an agent, a log line); code keeps scrolling, since wrapping breaks its indentation."
        },
        {
          "name": "copyLabel",
          "type": "string",
          "default": "\"Copy code\" (\"Copy command\" with prompt)",
          "description": "Accessible name of the copy button. Its 32px box keeps a 44px touch target under a coarse pointer."
        },
        {
          "name": "copiedLabel",
          "type": "string",
          "default": "\"Copied\"",
          "description": "Announced through a polite live region once the code is copied."
        }
      ],
      "subcomponents": [
        {
          "name": "CodeHighlightProvider",
          "type": "{ highlight: (code: string) => ReactNode; children: ReactNode }",
          "description": "Supplies one highlighter to every CodeBlock beneath it, so an app wires highlighting once. Map the highlighter's token colors to Sable tone tokens so code follows the theme."
        }
      ],
      "tokensUsed": [
        "border",
        "muted",
        "muted-foreground",
        "foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Code is reading content and arrives with the page or message it belongs to. An entrance of its own would delay the text someone came to copy."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Copy button",
          "why": "The copy button is a quiet ghost icon in the corner of a block. Its hover fill is what tells the pointer it is a control and not decoration."
        },
        {
          "slot": "transition",
          "recipe": "motion-icon-swap",
          "part": "Copy glyph",
          "why": "The copy mark turning into a check is the only proof the clipboard took the text. Snapped between frames it was easy to miss at the edge of a block; the swap reads as one mark being replaced."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Copying is instant. There is no in-between worth showing, and a spinner for a clipboard write would read as a slow one."
        }
      ],
      "a11y": [
        "Code renders inside a <pre><code> for correct semantics and screen-reader handling.",
        "Copy is the ghost icon Button with `useCopy`, which guards clipboard access for SSR safety.",
        "A successful copy is announced as \"Copied\" through a polite role=status region that is always mounted; the button keeps its label, which names what it does. Both glyphs are aria-hidden."
      ],
      "examples": [
        {
          "label": "With filename + copy",
          "code": "<CodeBlock filename=\"cn.ts\" code={\"import { clsx } from \\\"clsx\\\"\\nexport const cn = clsx\"} />",
          "imports": "import { CodeBlock } from \"@sableui/react\""
        },
        {
          "label": "With a highlighter for the whole app",
          "code": "<CodeHighlightProvider highlight={(code) => <span dangerouslySetInnerHTML={{ __html: highlightToHtml(code) }} />}><CodeBlock code={\"const a = 1\"} /></CodeHighlightProvider>",
          "imports": "import { CodeBlock, CodeHighlightProvider } from \"@sableui/react\""
        },
        {
          "label": "No header",
          "code": "<CodeBlock showCopy={false} code={\"type Size = \\\"sm\\\" | \\\"md\\\"\\nconst size: Size = \\\"md\\\"\"} />",
          "imports": "import { CodeBlock } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Collapsible",
      "status": "stable",
      "group": "Containers",
      "register": "either",
      "path": "components/collapsible",
      "summary": "Show/hide a panel of content over Base UI Collapsible — open/close state, ARIA expanded wiring, and the animated height transition. The minimal primitive behind Accordion: a trigger that toggles an overflow-clipped panel.",
      "keywords": [
        "collapsible",
        "disclosure",
        "expand",
        "collapse",
        "chevron",
        "caret",
        "rotate",
        "group header",
        "section toggle"
      ],
      "usage": {
        "description": "Use Collapsible for a single piece of optional content that can expand in place.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for local detail, advanced settings, or secondary context."
          },
          {
            "guidance": "do",
            "description": "Make the trigger label describe the hidden content, not the mechanism."
          },
          {
            "guidance": "dont",
            "description": "Do not use Collapsible for multi-section navigation; use Accordion or Tabs instead.",
            "instead": [
              "Accordion",
              "Tabs"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not animate it by transitioning height from auto. Use the motion-disclosure recipe, which transitions to the measured panel height — `auto` does not animate and the panel will snap."
          }
        ],
        "anatomy": [
          {
            "name": "CollapsibleTrigger",
            "required": true,
            "description": "The control that toggles the panel."
          },
          {
            "name": "CollapsiblePanel",
            "required": true,
            "description": "The content that expands or collapses."
          },
          {
            "name": "CollapsibleIndicator",
            "required": false,
            "description": "A visual affordance for open or closed state."
          }
        ]
      },
      "related": {
        "components": [
          "Accordion",
          "ShowMore"
        ]
      },
      "props": [
        {
          "name": "Collapsible (Root)",
          "type": "Base UI Collapsible.Root props (open, defaultOpen, onOpenChange, disabled)",
          "default": "—",
          "description": "Groups the trigger and panel and owns open state. Uncontrolled by default; pass `open` + `onOpenChange` to control it."
        },
        {
          "name": "defaultOpen",
          "type": "boolean",
          "default": "false",
          "description": "Whether the panel starts open in the uncontrolled case."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Disables the trigger and prevents toggling."
        }
      ],
      "subcomponents": [
        {
          "name": "CollapsibleTrigger",
          "type": "Base UI Collapsible.Trigger props + render",
          "description": "The button that toggles the panel. Compose with render={<Button variant=\"ghost\" … />}."
        },
        {
          "name": "CollapsiblePanel",
          "type": "Base UI Collapsible.Panel props + className (keepMounted, hiddenUntilFound)",
          "description": "The collapsible contents. Overflow-hidden; animates height via the --collapsible-panel-height var Base UI sets."
        },
        {
          "name": "CollapsibleIndicator",
          "type": "{ direction?: \"down\" | \"end\"; className? }",
          "description": "Auto-rotating disclosure chevron. Place it anywhere inside the trigger content; it reads the trigger's open state itself, no class to add. direction=\"down\" (default) flips 180° on open; direction=\"end\" points to the inline end while closed and turns down on open — the caret for a grouped list's section header or a tree row. Use it instead of rotating your own chevron with CSS, which snaps with no transition."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A collapsible is part of the page it sits in, present from first paint. Its trigger is what the reader notices, not an entrance."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "CollapsibleTrigger",
          "why": "The trigger is whatever the consumer renders (usually a Button), and that control brings its own response. Adding one here would double it."
        },
        {
          "slot": "transition",
          "recipe": "motion-disclosure",
          "part": "CollapsiblePanel",
          "why": "The height change ties the content that appears to the trigger that was pressed; snapped open, everything below jumps with nothing linking cause to effect."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "CollapsibleIndicator",
          "why": "The chevron turns with the panel rather than flipping in one frame: motion-interactive lists `rotate`, the property rotate-180 and rotate-0 write."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Nothing here is indeterminate; content that loads on open should put its own loader inside the panel."
        }
      ],
      "a11y": [
        "Base UI wires aria-expanded on the trigger and aria-controls/id between trigger and panel.",
        "Trigger is a real <button>; toggles on click and Enter/Space.",
        "Animate open/close via data-[starting-style]/data-[ending-style]; data-[panel-open] marks the open state.",
        "Set hiddenUntilFound on the panel to let in-page browser search expand it."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<Collapsible><CollapsibleTrigger render={<Button variant=\"ghost\">Details</Button>} /><CollapsiblePanel><p className=\"pt-3\">Hidden content revealed on toggle.</p></CollapsiblePanel></Collapsible>",
          "imports": "import { Button, Collapsible, CollapsiblePanel, CollapsibleTrigger } from \"@sableui/react\""
        },
        {
          "label": "Open by default",
          "code": "<Collapsible defaultOpen><CollapsibleTrigger render={<Button variant=\"ghost\">Summary</Button>} /><CollapsiblePanel><p className=\"pt-3\">Visible on first render.</p></CollapsiblePanel></Collapsible>",
          "imports": "import { Button, Collapsible, CollapsiblePanel, CollapsibleTrigger } from \"@sableui/react\""
        },
        {
          "label": "With rotating chevron",
          "code": "<Collapsible><CollapsibleTrigger render={<Button variant=\"ghost\">Details <CollapsibleIndicator /></Button>} /><CollapsiblePanel><p className=\"pt-3\">Revealed on toggle.</p></CollapsiblePanel></Collapsible>",
          "imports": "import { Button, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger } from \"@sableui/react\""
        },
        {
          "label": "Group header with a side caret",
          "code": "<Collapsible defaultOpen><CollapsibleTrigger render={<Button variant=\"ghost\" size=\"xs\"><CollapsibleIndicator direction=\"end\" />In progress <span className=\"text-ui-num text-muted-foreground\">5</span></Button>} /><CollapsiblePanel><ul className=\"text-ui-body\"><li>Refine product detail page</li><li>Build the ingredient library</li></ul></CollapsiblePanel></Collapsible>",
          "imports": "import { Button, Collapsible, CollapsibleIndicator, CollapsiblePanel, CollapsibleTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ColorField",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/color-field",
      "summary": "A colour swatch that opens a themed picker — saturation/value area, hue and alpha sliders, hex entry, presets, and transparent as a value rather than a separate toggle.",
      "keywords": [
        "color",
        "colour",
        "color picker",
        "swatch",
        "hex",
        "alpha",
        "transparency",
        "eyedropper",
        "property",
        "workspace"
      ],
      "usage": {
        "description": "Use ColorField wherever a colour is a property: a canvas background, an effect parameter, a stroke or fill. It is sized to the control ladder so it lines up inside a PropertyRow or PropertyPair. Deliberately not <input type=\"color\">, which opens the OS dialog — that ignores the theme entirely, cannot show a transparency checkerboard, has no alpha channel, hosts no eyedropper or presets, and renders at whatever size the platform picks, so it never aligns in a property grid.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use allowTransparent when \"no colour\" is a real value. It appears inside the picker as a value; a transparent switch sitting beside a colour control reads as two properties when it is one."
          },
          {
            "guidance": "do",
            "description": "Pass swatches when a surface has a house palette. Presets are how most colour choices actually get made, and they cost one row."
          },
          {
            "guidance": "do",
            "description": "Decide whether your persistence layer accepts 8-digit hex before enabling allowAlpha. The value format is the contract — see the tokens note."
          },
          {
            "guidance": "dont",
            "description": "Put a separate opacity slider next to a ColorField that already has allowAlpha. Two controls writing one channel is how they drift out of sync."
          },
          {
            "guidance": "dont",
            "description": "Re-derive hue from the committed value on every render. Grey has no hue, so dragging saturation to zero would snap the hue slider to red with no way back — ColorField keeps hue in its own state for exactly this reason."
          },
          {
            "guidance": "dont",
            "description": "Hand-roll a transparency checkerboard. Use the `checkerboard` utility with `--checkerboard-size` (~16px for an artboard, ~8px for a 24px swatch); two hand-rolled copies had already drifted before it existed. Its colours come from --panel / --panel-raised, so it is correct in both modes. It is deliberately not named bg-checkerboard: a custom bg-* utility lands in tailwind-merge's background group and silently evicts, or is evicted by, a real bg-* colour class."
          }
        ],
        "anatomy": [
          {
            "name": "Trigger",
            "required": true,
            "description": "A swatch at --control-xs with a hairline ring, on a checkerboard so a translucent or transparent value reads as such."
          },
          {
            "name": "Picker",
            "required": true,
            "description": "Saturation/value area over the current hue, a hue slider, an alpha slider when allowAlpha, and a hex field."
          },
          {
            "name": "Presets",
            "required": false,
            "description": "An optional swatch row, and the Transparent entry when allowTransparent."
          }
        ]
      },
      "related": {
        "components": [
          "PropertyRow",
          "PropertyPair",
          "ScrubField",
          "Input",
          "Popover"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "string",
          "description": "The current value: \"transparent\", \"#rrggbb\", or \"#rrggbbaa\"."
        },
        {
          "name": "onValueChange",
          "type": "(value: string) => void",
          "description": "Called with the new value on every commit, including mid-drag."
        },
        {
          "name": "allowTransparent",
          "type": "boolean",
          "default": "false",
          "description": "Offers \"transparent\" as a value inside the picker. Colour → transparent → colour restores the colour you had."
        },
        {
          "name": "allowAlpha",
          "type": "boolean",
          "default": "false",
          "description": "Enables the alpha slider, and therefore 8-digit hex output. Off by default because it widens the value format."
        },
        {
          "name": "swatches",
          "type": "Array<string | { value: string; label: string }>",
          "description": "Optional preset row. A bare hex is named by its hex; give a preset a label (\"Brand red\") when the hex says nothing to a listener."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Colour\"",
          "description": "Accessible name for the trigger; the current value is appended to it."
        },
        {
          "name": "name",
          "type": "string",
          "description": "Submits the colour with a form under this name, through a hidden input: \"#rrggbb\" (lowercase), \"#rrggbbaa\" when allowAlpha and translucent, or \"transparent\" — the same shapes onValueChange emits."
        },
        {
          "name": "form",
          "type": "string",
          "description": "Id of a form elsewhere on the page that the hidden input belongs to."
        },
        {
          "name": "readOnly",
          "type": "boolean",
          "default": "false",
          "description": "Shows the colour and keeps it focusable, but the picker does not open. The value still submits."
        },
        {
          "name": "required",
          "type": "boolean",
          "description": "Accepted so a Field marked required does not leak the attribute onto the button. A ColorField always holds a value, so there is nothing for it to block."
        },
        {
          "name": "transparentLabel",
          "type": "string",
          "default": "\"Transparent\"",
          "description": "The transparent value's name, in the trigger's accessible name and on its toggle."
        },
        {
          "name": "hexLabel",
          "type": "(label: string) => string",
          "default": "(label) => `${label} hex`",
          "description": "Accessible name of the hex input, given label."
        },
        {
          "name": "eyedropperLabel",
          "type": "string",
          "default": "\"Pick colour from screen\"",
          "description": "Accessible name of the eyedropper button."
        }
      ],
      "tokensUsed": [
        "panel",
        "panel-raised",
        "hairline",
        "hairline-strong",
        "ring",
        "popover"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "Popover",
          "why": "The picker grows out of the swatch it edits (PopoverContent's recipe, its origin on the anchor). In a property panel with a column of swatches, that origin is what tells you which colour you are now editing."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Swatch",
          "why": "Preset swatches lift slightly under the pointer. They are 20px chips of colour with no label, and the eased lift is what tells you which one a click will take."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Handles",
          "why": "The saturation, hue and alpha handles follow the pointer exactly. A handle that trailed the drag would misreport the colour under the cursor, and a swatch or a typed hex moving them is the value changing, which the field should show at once."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Picking is synchronous. The EyeDropper is the browser's own modal, with its own feedback."
        }
      ],
      "a11y": [
        "The trigger's accessible name includes the current value, so a screen reader announces the colour rather than just \"button\" — the swatch itself conveys nothing without sight.",
        "The Transparent entry is a toggle with aria-pressed, because it is a state of the value and not a navigation action.",
        "The hex field is the keyboard path to any colour. The saturation/value area and the sliders are pointer-driven and are NOT keyboard operable — a known gap, and the reason the hex field is never hidden.",
        "Preset swatches show a focus outline past their hairline, and are named by their label when given one, by their hex when not.",
        "Inside a Field, the id, aria-describedby and aria-invalid it clones land on the trigger, so the label, description and error belong to it.",
        "The eyedropper is only rendered where the EyeDropper API exists (Chromium), rather than shown and broken elsewhere."
      ],
      "examples": [
        {
          "label": "In a form, with named presets",
          "code": "<Field label=\"Brand colour\">\n  <ColorField\n    name=\"brand\"\n    value={brand}\n    onValueChange={setBrand}\n    swatches={[{ value: \"#e11d48\", label: \"Brand red\" }, { value: \"#0f172a\", label: \"Ink\" }]}\n  />\n</Field>",
          "imports": "import { ColorField, Field } from \"@sableui/react\""
        },
        {
          "label": "Canvas background",
          "code": "<PropertyRow label=\"Background\">\n  <ColorField value={background} onValueChange={setBackground} allowTransparent />\n</PropertyRow>",
          "imports": "import { ColorField, PropertyRow } from \"@sableui/react\""
        },
        {
          "label": "With alpha and a palette",
          "code": "<ColorField\n  value={tint}\n  onValueChange={setTint}\n  allowAlpha\n  swatches={[\"#f43f5e\", \"#facc15\", \"#22c55e\", \"#3b82f6\", \"#a855f7\"]}\n  label=\"Tint\"\n/>",
          "imports": "import { ColorField } from \"@sableui/react\""
        },
        {
          "label": "The value format is the contract",
          "code": "// ColorField only ever EMITS these three shapes:\n//   \"transparent\" | \"#rrggbb\" | \"#rrggbbaa\"\n// It accepts #rgb and #rgba on paste but never produces them, so a consumer's\n// parser has three cases to handle rather than five.\n//\n// Alpha is omitted when fully opaque — \"#3b82f6\", never \"#3b82f6ff\" — so a\n// parser written before alpha support keeps reading opaque colours correctly.\n// Only enable allowAlpha once your parser and your persisted format accept the\n// 8-digit form, or a document saved by a newer build degrades on an older one.\n\nimport { parseHex, isTransparent } from \"@sableui/react\"\n\nconst parsed = isTransparent(value) ? null : parseHex(value) // null = not a colour",
          "imports": "import { isTransparent, parseHex } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Combobox",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/combobox",
      "summary": "Autocomplete over Base UI Combobox — type-to-filter, roving focus, ARIA combobox/listbox wiring, collision-aware positioning, Esc/outside dismissal. A search input (with chevron trigger) plus a portal-rendered popup of filterable items.",
      "keywords": [
        "combobox",
        "autocomplete",
        "typeahead",
        "search select",
        "filter",
        "suggestions",
        "picker"
      ],
      "usage": {
        "description": "Use Combobox when users choose from a list that benefits from typing, filtering, or autocomplete — one value, or several with `multiple` and ComboboxChips (tags, collaborators, categories). Use Select for short finite sets, a Checkbox group when every choice should stay visible, and CommandMenu for global actions.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pass items so internal filtering, empty state, and accessibility wiring have the full option set."
          },
          {
            "guidance": "do",
            "description": "Use ComboboxEmpty with helpful copy for zero matches."
          },
          {
            "guidance": "do",
            "description": "For results from a server, pass `filter={null}` so Base UI shows the items as the server returned them, fetch from `onInputValueChange`, and make ComboboxEmpty say which state it is in (searching, no results, type to search). Object items take `itemToStringLabel`."
          },
          {
            "guidance": "do",
            "description": "Wrap in Field when the combobox is part of a form."
          },
          {
            "guidance": "dont",
            "description": "Use Combobox for tiny option sets where Select or Radio would be easier to scan.",
            "instead": [
              "Select",
              "Radio"
            ]
          },
          {
            "guidance": "do",
            "description": "Reach for ComboboxVirtualList past roughly a thousand rows, and leave filtering to the root. It reads the filtered list through useFilteredItems(), so the rendered rows and the rows Base UI navigates cannot drift apart."
          },
          {
            "guidance": "do",
            "description": "Use `multiple` with ComboboxChips for several values from a filterable set, and keep chip labels short so the field does not turn into a paragraph."
          },
          {
            "guidance": "dont",
            "description": "Use Combobox as a command launcher. Use CommandMenu for actions and navigation.",
            "instead": [
              "CommandMenu"
            ]
          },
          {
            "guidance": "dont",
            "description": "Take filtering over with filteredItems in order to virtualize. Base UI ignores filteredItems while the untouched field still holds the selected item's label, so the list you render and the list it indexes diverge — and the symptom is clicking one row and getting another."
          }
        ],
        "anatomy": [
          {
            "name": "Root",
            "required": true,
            "description": "Owns selected value, input value, filtering, and open state."
          },
          {
            "name": "Input",
            "required": true,
            "description": "The searchable text field and trigger."
          },
          {
            "name": "Chips",
            "required": false,
            "description": "The field for `multiple`, used in place of Input: one removable chip per selected item plus the text input, in one wrapping shell."
          },
          {
            "name": "Content",
            "required": true,
            "description": "The positioned popup surface."
          },
          {
            "name": "List",
            "required": true,
            "description": "The listbox inside the popup. Takes a render function that receives each filtered item."
          },
          {
            "name": "Item",
            "required": true,
            "description": "A selectable suggestion row."
          },
          {
            "name": "Empty",
            "required": false,
            "description": "Fallback shown when filtering returns no items."
          }
        ]
      },
      "related": {
        "components": [
          "Select",
          "Checkbox",
          "CommandMenu",
          "Field",
          "SearchInput",
          "Badge"
        ],
        "patterns": [
          "SettingsPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "Combobox (Root)",
          "type": "Base UI Combobox.Root props (items, value, defaultValue, onValueChange, inputValue, onInputValueChange, open, onOpenChange, multiple, autoHighlight, filter, disabled)",
          "default": "—",
          "description": "Groups all parts and owns selection + filter state. Pass `items` (flat array or groups) to enable internal filtering and ComboboxEmpty."
        },
        {
          "name": "items",
          "type": "readonly any[] | readonly ComboboxItemGroup[]",
          "default": "—",
          "description": "The pool of options, flat or grouped ({ value, items }). Drives type-to-filter and is required for ComboboxEmpty to render its fallback."
        },
        {
          "name": "multiple",
          "type": "boolean",
          "default": "false",
          "description": "Select several items instead of one. `value` / `defaultValue` / `onValueChange` become arrays, choosing an item toggles its membership, and the popup stays open between picks. Pair it with ComboboxChips in place of ComboboxInput; every other part is unchanged."
        },
        {
          "name": "filter",
          "type": "null | ((item, query, itemToString?) => boolean)",
          "default": "Base UI's locale-aware contains",
          "description": "How items match the query. `null` turns matching off, for items a server already filtered: pair it with `onInputValueChange` to fetch."
        },
        {
          "name": "highlightMatches",
          "type": "boolean",
          "default": "true",
          "description": "Paints the typed text wherever it appears in a row's label, on the `highlight` / `highlight-foreground` pair, through the CSS Custom Highlight API — no `<mark>` in the row, and the accessible name is unchanged. Only typed text counts: a field still holding the selected item's label lists everything and lights nothing. A literal, case-insensitive match within the label; a `filter` that matches differently leaves rows it kept unpainted. `false` turns it off."
        },
        {
          "name": "onInputValueChange",
          "type": "(inputValue: string, eventDetails) => void",
          "default": "—",
          "description": "Fires as the reader types. The place to fetch results for a server-backed combobox."
        },
        {
          "name": "itemToStringLabel",
          "type": "(item) => string",
          "default": "item.label for { value, label } items",
          "description": "The text an object item shows in the input once chosen, and is matched by. Needed for object items without a `label` field."
        },
        {
          "name": "virtualized",
          "type": "boolean",
          "default": "false",
          "description": "Tells Base UI the DOM holds only part of the list. Required when using ComboboxVirtualList."
        }
      ],
      "subcomponents": [
        {
          "name": "ComboboxInput",
          "type": "Base UI Combobox.Input props (minus the native `size` attribute) + size?: \"md\" | \"sm\" | \"xs\" + toggleLabel?: string + className",
          "description": "The search field, styled like Input, wrapped with an InputGroup + chevron Trigger that toggles the popup. The chevron flips while the popup is open (data-[popup-open] on the toggle); `toggleLabel` (default \"Toggle suggestions\") names it. `size` is the field ladder shared with Input, SelectTrigger, SearchInput, NumberField and DatePicker: `md` the form field, `sm` the toolbar field one rung down beside an `sm` Select. `size=\"xs\"` is the property-grid rung and mirrors SelectTrigger's `xs` exactly — same height, radius and inset surface — so a combobox and a select in one panel are the same shape holding different content (a font-family picker directly above a font-weight select is the case it exists for). Note the type: the native numeric `size` attribute is omitted rather than shadowed, because intersecting a string union onto it resolves to `never` and breaks every call site."
        },
        {
          "name": "ComboboxChips",
          "type": "Base UI Combobox.Input props (minus the native `size` attribute) + size?: \"md\" | \"sm\" | \"xs\" + chipLabel?: (item) => string + removeLabel?: (label) => string + toggleLabel?: string + className",
          "description": "The field for a `multiple` combobox, used in place of ComboboxInput. Each selected item renders as a soft `sm` Badge with a ghost `icon-xs` Button that removes it (named by `removeLabel(label)`, default \"Remove {label}\"), followed by the text input; the shell wraps and grows as chips are added. `chipLabel` turns an item into its chip text — defaults to the item for strings/numbers and its `label` field for objects. Keyboard is Base UI's: Backspace in an empty field removes the last chip, ←/→ move between chips, Backspace/Delete removes the highlighted one. `size` takes the same rungs as ComboboxInput."
        },
        {
          "name": "ComboboxContent",
          "type": "Base UI Popup props + { side?: Side; align?: Align; sideOffset?: number; scroll?: boolean; className?: string }",
          "description": "Portal + Positioner + Popup — it does not render a list, so put a ComboboxList (or ComboboxVirtualList) inside it. Width matches the input via --anchor-width. side is which side of the input the popup renders against (auto-flips on collision), align its alignment along that side, sideOffset the gap in px. Defaults to side='bottom', align='start', sideOffset=6, scroll=true. Pass scroll={false} when a ComboboxVirtualList inside owns the scrolling."
        },
        {
          "name": "ComboboxList",
          "type": "Base UI Combobox.List props (children: ReactNode | (item, index) => ReactNode)",
          "description": "The listbox. Required inside ComboboxContent: pass a render function and it is called once per filtered item (or per group when `items` is grouped), so the rendered rows always match Base UI's filtering."
        },
        {
          "name": "ComboboxVirtualList",
          "type": "{ itemHeight: number; groupLabelHeight?: number; overscan?: number; children: (item, { index }) => ReactNode; renderGroupLabel?; className?; itemClassName? }",
          "description": "A windowed list: only the rows on screen exist. Fixed row heights (nothing is measured, so late-arriving content changes how a row looks and never where the rows are). Filtering stays Base UI's — the component reads the filtered list through useFilteredItems() — and groups keep their role=group wrapper and label association. Needs virtualized on the root and scroll={false} on ComboboxContent."
        },
        {
          "name": "ComboboxItem",
          "type": "Base UI Combobox.Item props + className (value, disabled, index, onClick)",
          "description": "A suggestion row. Highlights via data-[highlighted]; shows a trailing check (ItemIndicator) when it matches the selected value."
        },
        {
          "name": "ComboboxEmpty",
          "type": "Base UI Combobox.Empty props + className",
          "description": "Fallback shown when the filtered list is empty. Requires the `items` prop on the root."
        },
        {
          "name": "ComboboxGroup",
          "type": "Base UI Combobox.Group props + className",
          "description": "Groups related items under an accessible label auto-associated with the group."
        },
        {
          "name": "ComboboxGroupLabel",
          "type": "Base UI Combobox.GroupLabel props + className",
          "description": "The label for a ComboboxGroup. Auto-associated with the group it sits in."
        },
        {
          "name": "ComboboxValue",
          "type": "Base UI Combobox.Value props",
          "description": "Base UI's Value, unstyled: renders the selected value (or, with a function child, whatever you derive from it). ComboboxChips uses it internally; reach for it to show the selection somewhere other than the field."
        },
        {
          "name": "ComboboxClear",
          "type": "Base UI Combobox.Clear props",
          "description": "Base UI's Clear, unstyled: a button that empties the selection and the input. Render it through a ghost icon Button (render={<Button variant=\"ghost\" size=\"icon-xs\" />}) with an aria-label, beside the field."
        },
        {
          "name": "ComboboxItemIndicator",
          "type": "Base UI Combobox.ItemIndicator props",
          "description": "Base UI's ItemIndicator, unstyled: shows its children only while the item is selected. ComboboxItem already draws a check with it; use it directly only in a custom item layout."
        }
      ],
      "tokensUsed": [
        "highlight",
        "highlight-foreground",
        "field-border",
        "field",
        "foreground",
        "muted-foreground",
        "ring",
        "destructive",
        "popover",
        "popover-foreground",
        "border",
        "accent",
        "accent-foreground",
        "primary",
        "secondary",
        "secondary-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "ComboboxContent",
          "why": "The list grows from the field it filters, its origin on Base UI's anchor. With several comboboxes in a form, that is what attaches the open list to the one being typed in."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "ComboboxItem",
          "why": "A row's ink eases as the pointer or the arrow keys reach it, so moving through a long filtered list reads as continuous movement rather than rows blinking."
        },
        {
          "slot": "response",
          "recipe": "custom",
          "part": "Highlight",
          "why": "One highlight travels to the active row (lib/highlight-glide: a measured translate on the motion tokens) instead of each row painting its own fill. When the list re-filters under the caret, the highlight sliding to the new match is what shows the keyboard target moved."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Toggle",
          "why": "The chevron toggle at the field's edge eases its ink on hover; the change is what tells you it is a separate target from the text box."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Toggle",
          "why": "The chevron turns 180° as the list opens and closes (motion-interactive lists `rotate`), in step with the popup, so it reads as one control changing direction."
        },
        {
          "slot": "transition",
          "recipe": "motion-pop",
          "part": "ComboboxContent",
          "why": "Closing shrinks back toward the field, returning the eye to the input that now holds the value."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Combobox ships no loading part. A list fetched as you type shows a Spinner (motion-spin) in ComboboxEmpty or the content — where the results will land — and only the caller knows a fetch is in flight."
        }
      ],
      "a11y": [
        "Base UI provides role=combobox/listbox/option, roving tabindex, arrow-key navigation, and type-to-filter.",
        "Esc and outside-press dismiss; focus returns to the input on close.",
        "The chevron Trigger carries an aria-label and toggles the suggestions popup.",
        "ComboboxEmpty announces filter results politely; keep it mounted (do not conditionally render it).",
        "Animate open/close via data-[starting-style]/data-[ending-style] attributes.",
        "With `multiple`, the listbox is multi-selectable and each chip's remove button is labelled by `removeLabel` (default `Remove {label}`); Backspace in an empty field removes the last chip and ←/→ move between chips, so every chip is reachable without a pointer.",
        "ComboboxVirtualList gives every rendered row aria-setsize (the full filtered count) and aria-posinset, so a screen reader is told the size of the list rather than the size of the window.",
        "A highlight that lands on a row the window has not rendered is scrolled into view by the root, which forwards it to the list; Base UI's own scrollIntoView only reaches rows that exist."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<Combobox items={fruits}><ComboboxInput placeholder=\"Search fruit…\" /><ComboboxContent><ComboboxEmpty>No matches.</ComboboxEmpty><ComboboxList>{(item) => (<ComboboxItem key={item} value={item}>{item}</ComboboxItem>)}</ComboboxList></ComboboxContent></Combobox>",
          "imports": "import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList } from \"@sableui/react\""
        },
        {
          "label": "Controlled value",
          "code": "<Combobox items={fruits} value={value} onValueChange={setValue}><ComboboxInput /><ComboboxContent><ComboboxList>{(item) => (<ComboboxItem key={item} value={item}>{item}</ComboboxItem>)}</ComboboxList></ComboboxContent></Combobox>",
          "imports": "import { Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList } from \"@sableui/react\""
        },
        {
          "label": "Multiple selection",
          "code": "<Combobox multiple items={tags} value={value} onValueChange={setValue}><ComboboxChips placeholder=\"Add tags…\" /><ComboboxContent><ComboboxEmpty>No matching tags.</ComboboxEmpty><ComboboxList>{(item) => (<ComboboxItem key={item} value={item}>{item}</ComboboxItem>)}</ComboboxList></ComboboxContent></Combobox>",
          "imports": "import { Combobox, ComboboxChips, ComboboxContent, ComboboxEmpty, ComboboxItem, ComboboxList } from \"@sableui/react\""
        },
        {
          "label": "Async search (server results)",
          "code": "<Combobox items={results} filter={null} itemToStringLabel={(person) => person.name} value={person} onValueChange={setPerson} onInputValueChange={setQuery}><ComboboxInput placeholder=\"Search people…\" /><ComboboxContent><ComboboxEmpty>{searching ? \"Searching…\" : query ? \"No one matches.\" : \"Type a name to search.\"}</ComboboxEmpty><ComboboxList>{(item) => (<ComboboxItem key={item.id} value={item}>{item.name}</ComboboxItem>)}</ComboboxList></ComboboxContent></Combobox>",
          "imports": "import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList } from \"@sableui/react\""
        },
        {
          "label": "Virtualized (long list)",
          "code": "<Combobox virtualized items={districts} value={district} onValueChange={setDistrict}><ComboboxInput placeholder=\"Search districts…\" /><ComboboxContent scroll={false}><ComboboxEmpty>No district matches.</ComboboxEmpty><ComboboxVirtualList itemHeight={32}>{(item) => item.label}</ComboboxVirtualList></ComboboxContent></Combobox>",
          "imports": "import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxVirtualList } from \"@sableui/react\""
        },
        {
          "label": "Inside Field",
          "code": "<Field label=\"Creator\" description=\"Search by display name.\"><Combobox items={creators} value={creator} onValueChange={setCreator}><ComboboxInput placeholder=\"Search creators\" /><ComboboxContent><ComboboxEmpty>No creators found.</ComboboxEmpty><ComboboxList>{(item) => (<ComboboxItem key={item.id} value={item}>{item.name}</ComboboxItem>)}</ComboboxList></ComboboxContent></Combobox></Field>",
          "imports": "import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, Field } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "CommandMenu",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/command-menu",
      "summary": "A command palette (Cmd+K) built on our Dialog: a top-aligned wide surface with a search input and a scrollable, JS-filtered list of grouped commands. CommandMenuPanel renders the same palette in place, on a card in the page.",
      "keywords": [
        "command",
        "command menu",
        "palette",
        "launcher",
        "cmd k",
        "search",
        "quick action",
        "spotlight",
        "navigation",
        "search trigger",
        "header search",
        "keyboard shortcut",
        "inline command menu",
        "embedded palette",
        "settings search"
      ],
      "usage": {
        "description": "Use CommandMenu for global or contextual keyboard-driven actions: navigation, creation, quick settings, or searchable commands. It should feel curated and fast; use Select, Menu, or Combobox for ordinary inline choices.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Open the palette from a header search with CommandMenuTrigger: a button wearing SearchInput's field shell, with the ⌘K / Ctrl K hint and the page-wide shortcut built in. A palette with no visible trigger still takes useCommandMenuShortcut rather than a hand-written keydown listener."
          },
          {
            "guidance": "dont",
            "description": "Hand-style a <button> to look like a search field, or put a SearchInput in the header that opens a dialog when focused. The first drifts from the field it imitates; the second is a text box you cannot type in. A header search that opens the palette is CommandMenuTrigger.",
            "instead": [
              "CommandMenuTrigger"
            ]
          },
          {
            "guidance": "do",
            "description": "Group items by task area, such as Navigation, Create, or Settings, so users can scan before typing."
          },
          {
            "guidance": "do",
            "description": "Keep command labels action-oriented and unique enough to search."
          },
          {
            "guidance": "do",
            "description": "Provide useful bootstrap items so the menu is valuable before the user types."
          },
          {
            "guidance": "dont",
            "description": "Use CommandMenu as a replacement for every dropdown. Simple choices belong in Select, Menu, or Tabs.",
            "instead": [
              "Select",
              "Menu",
              "Tabs"
            ]
          },
          {
            "guidance": "do",
            "description": "Pass a filter when the palette searches more than one source. Ranking (exact prefix over substring over subsequence) is the caller's to own, and the returned order is kept verbatim — including group order, which follows each group's first surviving row."
          },
          {
            "guidance": "do",
            "description": "List a command the user cannot currently run as disabled with the reason in hint, rather than filtering it away. A palette that hides what you cannot do teaches you nothing about why."
          },
          {
            "guidance": "do",
            "description": "Resize the list with listClassName rather than reaching past className into the palette's DOM. className is the dialog surface; listClassName is the Scroller that actually scrolls."
          },
          {
            "guidance": "do",
            "description": "Use CommandMenuPanel when the palette lives in the page: a sidebar launcher, a settings search, a demo. It takes the same items, filter, query and children, and keeps the same keyboard model; it is a static card, so it does not trap focus or take it on mount, and Esc clears the query instead of closing anything."
          },
          {
            "guidance": "dont",
            "description": "Hand-build a palette mock from a search glyph, a row of buttons and a highlight. That is CommandMenuPanel, and the hand-built one has no combobox, no filtering and no keyboard model.",
            "instead": [
              "CommandMenuPanel"
            ]
          },
          {
            "guidance": "dont",
            "description": "Dump every app route and action into one uncurated list. Keep the palette opinionated."
          },
          {
            "guidance": "dont",
            "description": "Rebuild the combobox over Dialog to get consumer-owned ranking. query/onQueryChange and filter are that seam; the keyboard model, activedescendant wiring, and result-count live region come with them."
          }
        ],
        "anatomy": [
          {
            "name": "Trigger",
            "required": false,
            "description": "CommandMenuTrigger — the search-field-shaped button in a header that opens the palette on click or on ⌘K / Ctrl+K. It sits outside CommandMenu; wire its onOpen to the palette's open state."
          },
          {
            "name": "Dialog surface",
            "required": true,
            "description": "The modal shell that traps focus and positions the launcher. CommandMenuPanel replaces it with a static card in the page (border, card fill, no shadow)."
          },
          {
            "name": "Search input",
            "required": true,
            "description": "The combobox input that filters commands while focus remains in the field."
          },
          {
            "name": "Groups",
            "required": false,
            "description": "Labelled command sections that keep results scannable."
          },
          {
            "name": "Items",
            "required": true,
            "description": "Keyboard-selectable command rows that run onSelect and close the palette."
          }
        ]
      },
      "related": {
        "components": [
          "Dialog",
          "SearchInput",
          "Kbd",
          "Menu",
          "Select",
          "Combobox"
        ],
        "patterns": [
          "DashboardPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "scope",
          "type": "ReactNode",
          "description": "A scope chip in the header, between the search glyph and the input — \"In: Backdrop\". A scope belongs beside the field rather than in its value: put it in the value and the user deletes prose to widen their search, and your filter parses it back out. Pair with inputProps.onKeyDown handling Backspace on an empty query, or the only way out of a scope is the mouse."
        },
        {
          "name": "inputProps",
          "type": "Omit<ComponentProps<'input'>, 'role' | 'value' | 'onChange' | aria-*>",
          "description": "Extra props for the search input. `onKeyDown` runs BEFORE the palette's own handling and opts out of a key by calling preventDefault() — which is what makes a scope chip Backspace-dismissable. Running first is deliberate: Backspace happens not to be a key the palette claims today, so a plain passthrough would work until the palette grows a 'Backspace clears the query' affordance, at which point the consumer's behaviour breaks silently. The combobox wiring (role, aria relationships, controlled value) is not overridable; aria-label and className compose."
        },
        {
          "name": "open",
          "type": "boolean",
          "description": "Controlled open state of the palette."
        },
        {
          "name": "onOpenChange",
          "type": "(open: boolean) => void",
          "description": "Called on open/close (select, Esc, outside click)."
        },
        {
          "name": "items",
          "type": "CommandItem[]",
          "description": "Data-driven commands ({ group, label, onSelect, id?, icon?, detail?, stacked?, hint?, disabled? }). stacked puts detail on its own line under the label, for results only their detail tells apart (two tickets with one subject); beside a long label an inline detail truncates first. Ignored when children are provided. id is optional identity: filter is handed these same objects, so it is how a caller that ranks over its own richer model maps the array back onto it — and it becomes the row's DOM id (namespaced to the palette) and React key, so two rows may share a label."
        },
        {
          "name": "query",
          "type": "string",
          "description": "Controlled query. Leave undefined to let the palette own it; either way it resets on close (a controlled caller gets onQueryChange(''))."
        },
        {
          "name": "onQueryChange",
          "type": "(query: string) => void",
          "description": "Called on every query change. Required to control query, optional otherwise."
        },
        {
          "name": "filter",
          "type": "((items: CommandItem[], query: string) => CommandItem[]) | null",
          "default": "case-insensitive substring match on label",
          "description": "Replaces or disables the built-in match. A function ranks and filters items itself and its order is kept verbatim; null renders items exactly as given. Either also stops declarative CommandMenuItem children self-filtering. The query arrives raw — trimming and case are policy, and this is the prop that hands policy over."
        },
        {
          "name": "highlightMatches",
          "type": "boolean",
          "default": "true",
          "description": "Paints the query wherever it appears in a row's label (not its detail or hint), on the `highlight` / `highlight-foreground` pair, through the CSS Custom Highlight API — no `<mark>` in the row, and the accessible name is unchanged. A literal, case-insensitive match, so under a fuzzy `filter` a row that matched as a subsequence keeps an unpainted label. `false` turns it off. Applies to CommandMenuPanel too."
        },
        {
          "name": "listClassName",
          "type": "string",
          "description": "Classes for the scrolling list. className lands on the dialog surface, so this is the seam for the list's own height cap — listClassName=\"max-h-[60vh]\". The list is a Scroller, so the cap lands on the element that scrolls and the edge fades come free."
        },
        {
          "name": "placeholder",
          "type": "string",
          "default": "\"Type a command or search…\"",
          "description": "Placeholder for the search input."
        },
        {
          "name": "emptyMessage",
          "type": "string",
          "default": "\"No results found.\"",
          "description": "Copy shown when the query matches nothing."
        },
        {
          "name": "searchLabel",
          "type": "string",
          "default": "\"Command search\"",
          "description": "Accessible name of the search field. inputProps[\"aria-label\"] still wins when both are set."
        },
        {
          "name": "clearLabel",
          "type": "string",
          "default": "\"Clear search\"",
          "description": "Accessible name of the clear button shown while there is a query."
        },
        {
          "name": "resultCountLabel",
          "type": "(count: number) => string",
          "default": "(count) => count === 0 ? \"No results\" : `${count} result${count === 1 ? \"\" : \"s\"}`",
          "description": "What the polite live region announces after the list changes. Translate the whole phrase, plural included."
        },
        {
          "name": "title",
          "type": "string",
          "default": "\"Command menu\"",
          "description": "Accessible name for the palette dialog (visually hidden)."
        },
        {
          "name": "description",
          "type": "string",
          "default": "\"Search for a command and press Enter to run it.\"",
          "description": "Accessible description for the palette dialog (visually hidden)."
        },
        {
          "name": "finalFocus",
          "type": "RefObject<HTMLElement> | ((closeType) => HTMLElement | false) | false",
          "description": "Where focus goes when the palette closes. The Dialog default returns it to the trigger — the CommandMenuTrigger, when there is one. A palette opened by the keystroke alone has none, so pass a resolver to restore whatever had focus, or false to restore nothing."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "Declarative commands via CommandMenuGroup / CommandMenuItem. Takes precedence over items."
        }
      ],
      "subcomponents": [
        {
          "name": "CommandMenuTrigger",
          "type": "{ onOpen?: () => void; placeholder?: string; shortcut?: string | false; size?: \"sm\" | \"md\"; disabled?: boolean }",
          "description": "The search field in a header that is really a button. Wears SearchInput's shell (the field fill and outline, leading magnifier, muted placeholder) on the control ladder, with a trailing Kbd: ⌘K on macOS, Ctrl K elsewhere. onOpen runs on click and on the shortcut, which it listens for page-wide (useCommandMenuShortcut). shortcut is the key (default \"k\"); false drops both the hint and the listener. size is sm in a header beside small buttons, md (default) beside Input and SearchInput. It sits outside CommandMenu, so the Dialog returns focus to it on close."
        },
        {
          "name": "useCommandMenuShortcut",
          "type": "(onShortcut: (event: KeyboardEvent) => void, key?: string | false) => void",
          "description": "The page-wide ⌘K / Ctrl+K listener CommandMenuTrigger installs, for a palette with no visible trigger. Ignored while focus is in a text field, textarea, select or contenteditable (Ctrl+K belongs to the field there) except the palette's own input, so the callback may toggle. It calls preventDefault() on a match and skips an event already prevented, so two listeners on one page fire once. key defaults to \"k\"; false turns it off. Removed on unmount."
        },
        {
          "name": "CommandMenuPanel",
          "type": "{ items?: CommandItem[]; query?: string; onQueryChange?: (query: string) => void; filter?: CommandFilter; listClassName?: string; placeholder?: string; emptyMessage?: string; title?: string; scope?: ReactNode; inputProps?: ComponentProps<'input'>; elevation?: 'resting' | 'raised'; className?: string; children?: ReactNode }",
          "description": "The palette rendered in place: the same search header, filtered and grouped listbox, keyboard model and result-count live region, on a static card (border-border, bg-card, no shadow) instead of in a Dialog. `elevation=\"raised\"` adds the card's soft resting shadow, for a palette shown as a card among cards; never a shadow-* className, and a palette that should float goes in a Popover. Takes every CommandMenu prop except open, onOpenChange, finalFocus and description; className lands on the card, title names the listbox. Focus is not trapped and the input does not take focus on mount (inputProps.autoFocus opts in). Esc clears the query, and passes through once it is empty, so a Popover around the panel still closes. A chosen row runs its onSelect and the panel stays as it was. The page-wide shortcut does not fire from its input."
        },
        {
          "name": "CommandMenuGroup",
          "type": "{ label: string; children }",
          "description": "A labelled group of command rows."
        },
        {
          "name": "CommandMenuItem",
          "type": "{ onSelect?: () => void; icon?: string; detail?: ReactNode; stacked?: boolean; hint?: ReactNode; disabled?: boolean; id?: string; children }",
          "description": "A selectable row. Self-filters by its text (unless the root was given a filter), runs onSelect, then closes the palette. detail is secondary text after the label, or under it with stacked; hint is the end-aligned trailing slot — a shortcut, a count, or a disabled row's reason. A disabled row stays listed, stays announced, and stays reachable by arrow key so its reason can be read, but is inert to Enter and to a click."
        }
      ],
      "tokensUsed": [
        "highlight",
        "highlight-foreground",
        "card",
        "card-foreground",
        "border",
        "foreground",
        "muted-foreground",
        "accent",
        "accent-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "Dialog",
          "why": "The palette opens on DialogContent's recipe over a fading backdrop. It is summoned by a keystroke from nowhere on screen, and the short scale-in is what says a layer arrived rather than the page changing. The inline CommandMenuPanel has no entrance: it is part of the page."
        },
        {
          "slot": "arrival",
          "recipe": "motion-appear",
          "part": "Clear button",
          "why": "The clear button mounts on the first keystroke, beside the caret the eye is already on. Fading in, it reads as the field offering a way back instead of a control blinking into the header. Removal is instant, so an emptied query does not wait on its X."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "CommandItem",
          "why": "The active row follows both the arrow keys and the pointer, and its fill eases between rows, so scanning results while typing reads as one highlight moving rather than rows flashing in turn."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "CommandMenuTrigger",
          "why": "The search-shaped trigger eases its ink on hover like the field shell it imitates, so it reads as the field it opens."
        },
        {
          "slot": "transition",
          "recipe": "motion-pop",
          "part": "Dialog",
          "why": "Closing on Enter or Esc shrinks the palette away fast and returns focus where it came from; the exit is the confirmation that the command ran or was dismissed."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "List",
          "why": "Results are filtered synchronously from the items passed in. Async results are the caller's to mark with a Spinner (motion-spin) in the list, where the person is already looking."
        }
      ],
      "a11y": [
        "CommandMenuTrigger is a real <button> named by its visible placeholder, with aria-haspopup=dialog and aria-keyshortcuts (Meta+K on macOS, Control+K elsewhere). Its Kbd hint is aria-hidden, so the shortcut is announced once rather than read as part of the name.",
        "The shortcut never fires from inside a text field, textarea, select or contenteditable (Ctrl+K is delete-to-end-of-line in macOS text views), except the palette's own input.",
        "CommandMenuPanel is the same combobox and listbox in the page, with no dialog: it does not trap or steal focus, and Esc clears a non-empty query (stopping there) instead of dismissing. With an empty query Esc is left alone for whatever contains the panel.",
        "Built on Base UI Dialog, so focus trap, scroll lock, and Esc/outside dismissal come for free; the dialog carries a visually-hidden title + description so it is announced.",
        "Follows the ARIA combobox pattern: the search input is role=combobox (aria-autocomplete=list) that owns the role=listbox popup via aria-controls.",
        "ArrowDown/ArrowUp/Home/End and PageUp/PageDown move a virtual aria-activedescendant highlight while focus stays in the input; Enter runs the highlighted command. Arrow keys wrap; page jumps clamp.",
        "Groups expose role=group labelled by their heading; items are role=option and never enter the tab order.",
        "A polite role=status live region announces the result count as the query narrows, so the size of the list is available without reading it.",
        "A disabled row carries aria-disabled and is skipped when seeding the highlight, but stays in the arrow-key walk so its reason can be reached and read.",
        "The component keeps ownership of aria-activedescendant even when a caller claims a key through inputProps.onKeyDown. Skipping a move is coherent (they took responsibility for that key), but nothing may leave the active id naming a row that is not painted as active — so the opt-out returns before any highlight change rather than after it.",
        "Exactly one row is ever painted as active: the pointer takes the highlight over (moving onto a row makes it the aria-activedescendant) rather than adding a hover fill of its own, so what looks highlighted is always what Enter will run."
      ],
      "examples": [
        {
          "label": "Data-driven",
          "code": "<CommandMenu open={open} onOpenChange={setOpen} items={[{ group: 'Navigation', label: 'Go to feed', icon: 'home', onSelect: () => {} }, { group: 'Actions', label: 'New post', onSelect: () => {} }]} />",
          "imports": "import { CommandMenu } from \"@sableui/react\""
        },
        {
          "label": "Declarative",
          "code": "<CommandMenu open={open} onOpenChange={setOpen}><CommandMenuGroup label='Navigation'><CommandMenuItem icon='home' onSelect={() => {}}>Go to feed</CommandMenuItem></CommandMenuGroup></CommandMenu>",
          "imports": "import { CommandMenu, CommandMenuGroup, CommandMenuItem } from \"@sableui/react\""
        },
        {
          "label": "Grouped launcher",
          "code": "<CommandMenu open={open} onOpenChange={setOpen}><CommandMenuGroup label=\"Create\"><CommandMenuItem icon=\"plus\" onSelect={() => createPost()}>New post</CommandMenuItem><CommandMenuItem icon=\"sparkles\" onSelect={() => createProject()}>New project</CommandMenuItem></CommandMenuGroup><CommandMenuGroup label=\"Navigation\"><CommandMenuItem icon=\"home\" onSelect={() => navigate(\"/\")}>Home</CommandMenuItem><CommandMenuItem icon=\"gear\" onSelect={() => navigate(\"/settings\")}>Settings</CommandMenuItem></CommandMenuGroup></CommandMenu>",
          "imports": "import { CommandMenu, CommandMenuGroup, CommandMenuItem } from \"@sableui/react\""
        },
        {
          "label": "Consumer-owned ranking",
          "code": "<CommandMenu open={open} onOpenChange={setOpen} query={query} onQueryChange={setQuery} filter={(items, q) => rank(items, q)} items={items} />",
          "imports": "import { CommandMenu } from \"@sableui/react\""
        },
        {
          "label": "Listed but unavailable",
          "code": "<CommandMenu open={open} onOpenChange={setOpen} items={[{ group: 'Layers', label: 'Align left', disabled: true, hint: 'Select another layer to align to', onSelect: () => {} }]} />",
          "imports": "import { CommandMenu } from \"@sableui/react\""
        },
        {
          "label": "Inline panel",
          "code": "<CommandMenuPanel className=\"w-80\" items={[{ group: 'Create', label: 'New project', icon: 'plus', hint: <Kbd>N</Kbd>, onSelect: () => {} }, { group: 'Settings', label: 'Open settings', icon: 'gear', onSelect: () => {} }]} />",
          "imports": "import { CommandMenuPanel, Kbd } from \"@sableui/react\""
        },
        {
          "label": "Header search trigger",
          "code": "<CommandMenuTrigger size=\"sm\" placeholder=\"Search docs\" onOpen={() => setOpen(true)} className=\"w-56\" />\n<CommandMenu open={open} onOpenChange={setOpen} items={items} />",
          "imports": "import { CommandMenu, CommandMenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "Keyboard shortcut with no visible trigger",
          "code": "useCommandMenuShortcut(() => setOpen((value) => !value))\n<CommandMenu open={open} onOpenChange={setOpen} items={items} />",
          "imports": "import { CommandMenu, useCommandMenuShortcut } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ConfirmButton",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/confirm-button",
      "summary": "An inline two-step confirm for a low-stakes destructive or irreversible action: the first press arms it (\"Delete\" → \"Confirm delete?\", destructive), a second press within a few seconds runs it, and leaving it disarms it.",
      "keywords": [
        "confirm",
        "confirmation",
        "two-step",
        "press again",
        "click again",
        "arm",
        "delete",
        "remove",
        "destructive",
        "inline confirm",
        "hold to confirm"
      ],
      "usage": {
        "description": "Use ConfirmButton when an action deserves one beat of second thought but not a modal: deleting a draft, removing a row, revoking one token, clearing a list that can be rebuilt. The question appears on the button the user is already pressing, so confirming costs one more press in the same place and backing out costs nothing.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep the idle label a plain verb (\"Delete\", \"Remove\", \"Revoke\") and let the confirm label ask about it (\"Confirm delete?\" by default, or `confirmLabel`). The user should read the consequence on the very control they are about to press again."
          },
          {
            "guidance": "do",
            "description": "Leave room for it to grow. The button eases wider to fit the question, so give it space at the end of a row or in a table's action column rather than wedging it between fixed-width neighbours."
          },
          {
            "guidance": "do",
            "description": "Return the promise from `onConfirm` when the action is async. The button stays armed with a spinner until it settles and refuses further presses, so a slow network cannot run it twice."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for high-stakes or wide-reaching actions — deleting a project, an account, anything other people depend on. Those need the consequence spelled out and a typed or deliberate confirmation; use DestructiveActionModal.",
            "instead": [
              "DestructiveActionModal"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it where an undo is possible. If the action can be reversed, run it on the first press and offer Undo in a Toast — no question at all is faster than a good question.",
            "instead": [
              "Toast"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a non-destructive primary action (\"Save\", \"Send\"). Asking twice for something harmless teaches people to press twice without reading, which is what defeats the confirm when it matters; use Button.",
            "instead": [
              "Button"
            ]
          }
        ]
      },
      "related": {
        "components": [
          "Button",
          "DestructiveActionModal",
          "Toast",
          "OverflowMenu"
        ]
      },
      "props": [
        {
          "name": "children",
          "type": "ReactNode",
          "description": "The idle label — the action, e.g. \"Delete\"."
        },
        {
          "name": "confirmLabel",
          "type": "ReactNode",
          "default": "\"Confirm <label>?\"",
          "description": "The label while armed. Defaults to \"Confirm delete?\" for a text label \"Delete\" (first letter lowered) and \"Confirm?\" otherwise. Pass it to localise."
        },
        {
          "name": "onConfirm",
          "type": "() => unknown",
          "description": "Runs on the second press while armed. Return a promise to hold the button armed with a spinner until it settles."
        },
        {
          "name": "timeout",
          "type": "number",
          "default": "3000",
          "description": "How long it waits for the second press, in ms. A decision time, so it is not scaled by motion settings."
        },
        {
          "name": "variant",
          "type": "ButtonVariant",
          "default": "\"secondary\"",
          "description": "The idle look — any Button variant."
        },
        {
          "name": "confirmVariant",
          "type": "ButtonVariant",
          "default": "\"destructive\"",
          "description": "The armed look — any Button variant."
        },
        {
          "name": "size",
          "type": "\"xs\" | \"sm\" | \"md\" | \"cta\"",
          "default": "\"md\"",
          "description": "A labelled Button size. Icon-only sizes are excluded: the label is the interaction."
        },
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "A leading icon kept through both states, e.g. `<Icon name=\"trash\" />`."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Disables it; disabling while armed also disarms."
        },
        {
          "name": "confirmHint",
          "type": "string",
          "default": "\"Press again to confirm.\"",
          "description": "Read to assistive tech after the armed label when it arms. Override to localise."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The width easing and the draining countdown are the flourish; the label cross-fade and colour change stay."
        }
      ],
      "variants": {
        "variant": [
          "primary",
          "secondary",
          "ghost",
          "outline",
          "destructive",
          "link",
          "floating",
          "field",
          "on-color",
          "on-color-outline",
          "on-color-ghost"
        ],
        "confirmVariant": [
          "destructive",
          "primary",
          "secondary",
          "outline"
        ],
        "size": [
          "xs",
          "sm",
          "md",
          "cta"
        ]
      },
      "tokensUsed": [
        "secondary",
        "secondary-foreground",
        "destructive",
        "destructive-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It is a button in a row of actions, and arrives with that row. Its moment is the arming, not the mount."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Root",
          "why": "Inherited from Button with motion-interactive. The press settle confirms the first press landed even before the label has finished changing — which is what stops a second, accidental press."
        },
        {
          "slot": "transition",
          "recipe": "motion-size",
          "part": "Root",
          "why": "Arming changes the label, so the button's width changes. Easing it makes the button visibly grow into the question and its neighbours travel, instead of the row jumping under the pointer that is about to press again. useAutoSize measures the content and writes a px width for motion-size to ease between (a content-sized box is width:auto before and after, which cannot transition). The labels cross-fade in one cell so there is never a frame with both or neither."
        },
        {
          "slot": "activity",
          "recipe": "custom",
          "part": "Countdown",
          "why": "While armed, a thin line drains along the foot of the button over the timeout — the only way to see that the question expires. A transition on scale, timed by the `timeout` prop and multiplied by the motion scale and expressive factor, so under reduced motion or `subtle` it is absent rather than frozen full."
        }
      ],
      "a11y": [
        "A native <button> through Button. Focus stays on it through both presses; Enter and Space confirm exactly as a click does.",
        "Only the current label is in the accessible name — the other is aria-hidden — so the name changes to the question while armed.",
        "Arming is also announced through a polite role=status region outside the button (\"Confirm delete? Press again to confirm.\"), because a focused button's name change is not read by every screen reader.",
        "Escape disarms and is consumed, so it does not also close the dialog or popover around it. Focus leaving, a press elsewhere, or the timeout disarm it too.",
        "A second press within 300ms of arming is ignored: a double-click is a habit, not a decision.",
        "Under reduced motion the label still changes and the colour still turns; only the width easing and countdown are dropped."
      ],
      "examples": [
        {
          "label": "Delete a row",
          "code": "<ConfirmButton icon={<Icon name=\"trash\" />} onConfirm={() => removeRow(id)}>Delete</ConfirmButton>",
          "imports": "import { ConfirmButton, Icon } from \"@sableui/react\""
        },
        {
          "label": "Custom question, longer wait",
          "code": "<ConfirmButton variant=\"ghost\" size=\"sm\" confirmLabel=\"Revoke this key?\" timeout={5000} onConfirm={revokeKey}>Revoke</ConfirmButton>",
          "imports": "import { ConfirmButton } from \"@sableui/react\""
        },
        {
          "label": "Async confirm",
          "code": "<ConfirmButton onConfirm={() => api.deleteDraft(draft.id)}>Discard draft</ConfirmButton>",
          "imports": "import { ConfirmButton } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ContextCard",
      "status": "stable",
      "group": "Overlays",
      "register": "page",
      "path": "components/context-card",
      "summary": "Hover/focus-triggered rich preview card over Base UI PreviewCard. Reveals contextual content (a profile, a project summary) from an inline anchor; 20rem-wide surface with delayed open and collision-aware positioning.",
      "keywords": [
        "context card",
        "rich tooltip",
        "hover card",
        "preview"
      ],
      "usage": {
        "description": "Use ContextCard to show richer contextual content near a trigger without taking users out of flow.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for previews, summaries, or supporting context tied to a specific element."
          },
          {
            "guidance": "do",
            "description": "Keep the card read-only and make the trigger the action: it is a real link to the full profile or item. Keyboard users cannot reach a button inside the card, because moving focus off the trigger closes it. If the preview needs an action (Follow, Add), use a Popover instead."
          },
          {
            "guidance": "dont",
            "description": "Do not put critical decisions, long forms, or required workflow steps inside ContextCard."
          },
          {
            "guidance": "dont",
            "description": "Do not open it on click. It is a hover/focus preview; making it click-triggered gives you a Popover with no dismiss affordance and no way to reach the content it previews.",
            "instead": [
              "Popover"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "ContextCardTrigger",
            "required": true,
            "description": "The element that anchors the card."
          },
          {
            "name": "ContextCardContent",
            "required": true,
            "description": "The contextual surface shown near the trigger."
          },
          {
            "name": "ContextCardArrow",
            "required": false,
            "description": "An optional arrow connecting card and trigger."
          }
        ]
      },
      "related": {
        "components": [
          "Popover",
          "Tooltip"
        ]
      },
      "props": [
        {
          "name": "ContextCard (Root)",
          "type": "Base UI PreviewCard.Root props (open, defaultOpen, onOpenChange)",
          "description": "Groups the trigger and content. Uncontrolled by default; opens on hover/focus of the trigger."
        }
      ],
      "subcomponents": [
        {
          "name": "ContextCardTrigger",
          "type": "Base UI Trigger props + render + delay | closeDelay",
          "description": "The inline anchor (renders an <a>). Use render={<a href='…'/>} to compose with a link. delay defaults to 600ms, closeDelay to 300ms."
        },
        {
          "name": "ContextCardContent",
          "type": "Base UI Popup props + side | align | sideOffset + className",
          "description": "Portals + positions + paints the popup; surface is a fixed 20rem-wide card. side is which side of the trigger to render against (auto-flips on collision), align the alignment along it, sideOffset the gap in px. Defaults to side=\"bottom\", align=\"center\", sideOffset=8."
        },
        {
          "name": "ContextCardArrow",
          "type": "Base UI Arrow props + className",
          "description": "Optional pointer connecting the popup to its trigger. Place inside ContextCardContent."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "muted-foreground",
        "accent"
      ],
      "a11y": [
        "Opens on hover and on keyboard focus of the trigger, after a short delay; dismisses on Esc, outside press, and blur.",
        "The trigger renders an <a> by default — compose render={<a href='…'/>} so it stays a real, navigable link.",
        "Base UI wires the popup's ARIA association with the trigger; the card holds non-interactive context, not focusable controls.",
        "Animate via data-[starting-style]/data-[ending-style] opacity attributes on the popup."
      ],
      "examples": [
        {
          "label": "Profile preview",
          "code": "<ContextCard><ContextCardTrigger render={<a href='/u/ada' className='text-title-sm underline-offset-2 hover:underline'>@ada</a>} /><ContextCardContent><Entity className='[--entity-px:0] [--entity-py:0]' leading={<Avatar fallback='AL' size='lg' />} title='Ada Lovelace' subtitle='@ada' /><p className='mt-3 text-body-sm text-muted-foreground'>Product designer. Building tools for small teams.</p></ContextCardContent></ContextCard>",
          "imports": "import { Avatar, ContextCard, ContextCardContent, ContextCardTrigger, Entity } from \"@sableui/react\""
        },
        {
          "label": "With stat row",
          "code": "<ContextCard><ContextCardTrigger render={<a href='/u/nyx' className='text-title-sm underline-offset-2 hover:underline'>@nyx</a>} /><ContextCardContent><Entity className='[--entity-px:0] [--entity-py:0]' leading={<Avatar fallback='NY' size='lg' />} title='Nyx' subtitle='@nyx' /><div className='@container mt-4 border-t border-border pt-3'><dl className='sable-list-dl sable-list-dl-2'><dt>Posts</dt><dd>128</dd><dt>Followers</dt><dd>4.2k</dd></dl></div></ContextCardContent></ContextCard>",
          "imports": "import { Avatar, ContextCard, ContextCardContent, ContextCardTrigger, Entity } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ContextMenu",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/context-menu",
      "summary": "Right-click menu over Base UI ContextMenu — opens on the native contextmenu event or long press and positions at the pointer. Every part below the trigger is Menu's own part under a ContextMenu name (items with icon, description and shortcut; link items; submenus; radio and checkbox rows; groups), so the two menus cannot drift.",
      "keywords": [
        "context menu",
        "right click",
        "overflow",
        "menu"
      ],
      "usage": {
        "description": "Use ContextMenu for actions that are specific to the object or area the user invoked.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for secondary object actions such as rename, duplicate, move, or delete."
          },
          {
            "guidance": "do",
            "description": "Group destructive or uncommon actions away from frequent safe actions."
          },
          {
            "guidance": "dont",
            "description": "Do not make ContextMenu the only way to access a primary or required action."
          },
          {
            "guidance": "dont",
            "description": "Do not rely on it for touch. There is no right-click on a touchscreen — the long-press fallback is discoverable by nobody, so anything in here needs a visible route too."
          }
        ],
        "anatomy": [
          {
            "name": "ContextMenuTrigger",
            "required": true,
            "description": "The target area or element that opens the menu."
          },
          {
            "name": "ContextMenuContent",
            "required": true,
            "description": "The menu surface."
          },
          {
            "name": "ContextMenuItem",
            "required": true,
            "description": "One actionable command."
          },
          {
            "name": "ContextMenuSeparator",
            "required": false,
            "description": "A divider between command groups."
          },
          {
            "name": "ContextMenuGroup",
            "required": false,
            "description": "A semantic group of related commands."
          },
          {
            "name": "ContextMenuGroupLabel",
            "required": false,
            "description": "An optional label for a command group."
          },
          {
            "name": "ContextMenuSubmenu",
            "required": false,
            "description": "A nested menu: a ContextMenuSubmenuTrigger row plus its own ContextMenuContent."
          },
          {
            "name": "ContextMenuRadioGroup",
            "required": false,
            "description": "A single-choice set of ContextMenuRadioItem rows."
          },
          {
            "name": "ContextMenuCheckboxItem",
            "required": false,
            "description": "A row that toggles a setting on and off."
          },
          {
            "name": "ContextMenuLinkItem",
            "required": false,
            "description": "A row that navigates: a real link."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "OverflowMenu"
        ]
      },
      "props": [
        {
          "name": "ContextMenu (Root)",
          "type": "Base UI ContextMenu.Root props (open, defaultOpen, onOpenChange, orientation, loopFocus)",
          "default": "—",
          "description": "Groups all parts and controls open state. Renders no element. Uncontrolled by default."
        }
      ],
      "subcomponents": [
        {
          "name": "ContextMenuTrigger",
          "type": "Base UI ContextMenu.Trigger props + className + render",
          "description": "The right-clickable area that opens the menu on contextmenu (right click) or long press. Renders a <div>."
        },
        {
          "name": "ContextMenuContent",
          "type": "MenuContent props: Base UI Popup props + side?: 'top' | 'right' | 'bottom' | 'left' | 'inline-start' | 'inline-end' + align?: 'start' | 'center' | 'end' + sideOffset?: number + className?: string",
          "description": "MenuContent (Portal + Positioner + Popup). Positions at the pointer; also the surface of a ContextMenuSubmenu (side=\"inline-end\"). side is which side of the anchor the popup renders against (auto-flips on collision), align its alignment along that side, sideOffset the gap in px. Defaults to side='bottom', align='start', sideOffset=6."
        },
        {
          "name": "ContextMenuItem",
          "type": "MenuItem props: Base UI Item props + variant?: \"default\" | \"destructive\" + icon?: ReactNode + description?: ReactNode + shortcut?: ReactNode + className (disabled, closeOnClick, onClick)",
          "description": "MenuItem itself. An interactive row; `icon` leads it, and beside a `description` (a second, muted line) the icon sits in a small tile. Lays out as a flex row, so a leading Icon sits inline before the label. Highlights via data-[highlighted]; dims via data-[disabled], and disabled items are skipped by keyboard focus. variant=\"destructive\" marks a destructive command (Delete, Remove) and keeps its destructive ink while highlighted; never fake it with a text-destructive class, which the highlight repaints. `shortcut` ends the row with the command's key, muted and end-aligned, as on MenuItem."
        },
        {
          "name": "ContextMenuLinkItem",
          "type": "MenuLinkItem props: Base UI LinkItem props (href, target) + icon? + description? + newTabLabel?: string + className",
          "description": "MenuLinkItem itself: a row that is a real <a>. With target=\"_blank\" it gets rel=noopener noreferrer, a trailing ↗, and a visually hidden newTabLabel (default \"(opens in new tab)\") so a screen reader announces the new tab."
        },
        {
          "name": "ContextMenuSubmenu",
          "type": "Base UI SubmenuRoot props",
          "description": "MenuSubmenu itself. Wraps a ContextMenuSubmenuTrigger and a ContextMenuContent with side=\"inline-end\"."
        },
        {
          "name": "ContextMenuSubmenuTrigger",
          "type": "MenuSubmenuTrigger props: Base UI SubmenuTrigger props + value?: ReactNode + icon?: ReactNode + className",
          "description": "MenuSubmenuTrigger itself: a row with a trailing chevron and, optionally, the current value before it."
        },
        {
          "name": "ContextMenuRadioGroup",
          "type": "Base UI RadioGroup props (value, defaultValue, onValueChange)",
          "description": "MenuRadioGroup itself: a single-choice group."
        },
        {
          "name": "ContextMenuRadioItem",
          "type": "MenuRadioItem props: Base UI RadioItem props (value) + indicatorSide?: \"start\" | \"end\" + className",
          "description": "MenuRadioItem itself: one option, with its check in a reserved column so labels never shift."
        },
        {
          "name": "ContextMenuCheckboxItem",
          "type": "MenuCheckboxItem props: Base UI CheckboxItem props (checked, defaultChecked, onCheckedChange) + shortcut? + className",
          "description": "MenuCheckboxItem itself: a toggling row; the menu stays open when it is clicked."
        },
        {
          "name": "ContextMenuSeparator",
          "type": "Base UI Separator props + className",
          "description": "Hairline rule between item runs."
        },
        {
          "name": "ContextMenuGroup",
          "type": "Base UI ContextMenu.Group props + className",
          "description": "Groups related items under an accessible label auto-associated with the group."
        },
        {
          "name": "ContextMenuGroupLabel",
          "type": "Base UI ContextMenu.GroupLabel props + className",
          "description": "The label for a ContextMenuGroup. Auto-associated with the group it sits in."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "accent",
        "accent-foreground",
        "muted-foreground"
      ],
      "a11y": [
        "Base UI provides role=menu/menuitem, roving tabindex, arrow-key navigation, and typeahead.",
        "Opens on right click (contextmenu) or long press; Esc and outside-press dismiss and restore focus.",
        "Animate open/close via data-[starting-style]/data-[ending-style] attributes.",
        "ContextMenuGroupLabel is auto-associated with its ContextMenuGroup for screen readers.",
        "Radio and checkbox rows expose menuitemradio / menuitemcheckbox with aria-checked; a submenu trigger opens with ArrowRight (ArrowLeft in RTL) and closes back to its row.",
        "An external ContextMenuLinkItem announces that it opens a new tab through its newTabLabel."
      ],
      "examples": [
        {
          "label": "Icons, a submenu and view options",
          "code": "<ContextMenu>\n\t<ContextMenuTrigger className=\"rounded-md border border-dashed border-border p-8 text-center text-body-sm text-muted-foreground\">Right-click the file</ContextMenuTrigger>\n\t<ContextMenuContent>\n\t\t<ContextMenuItem icon={<Icon name=\"edit\" />} shortcut=\"F2\">Rename</ContextMenuItem>\n\t\t<ContextMenuItem icon={<Icon name=\"copy\" />}>Duplicate</ContextMenuItem>\n\t\t<ContextMenuSubmenu>\n\t\t\t<ContextMenuSubmenuTrigger icon={<Icon name=\"folder\" />} value=\"Desktop\">Move to</ContextMenuSubmenuTrigger>\n\t\t\t<ContextMenuContent side=\"inline-end\">\n\t\t\t\t<ContextMenuItem>Desktop</ContextMenuItem>\n\t\t\t\t<ContextMenuItem>Documents</ContextMenuItem>\n\t\t\t</ContextMenuContent>\n\t\t</ContextMenuSubmenu>\n\t\t<ContextMenuSeparator />\n\t\t<ContextMenuGroup>\n\t\t\t<ContextMenuGroupLabel>View</ContextMenuGroupLabel>\n\t\t\t<ContextMenuCheckboxItem defaultChecked>Show extension</ContextMenuCheckboxItem>\n\t\t\t<ContextMenuRadioGroup defaultValue=\"name\">\n\t\t\t\t<ContextMenuRadioItem value=\"name\">Sort by name</ContextMenuRadioItem>\n\t\t\t\t<ContextMenuRadioItem value=\"date\">Sort by date</ContextMenuRadioItem>\n\t\t\t</ContextMenuRadioGroup>\n\t\t</ContextMenuGroup>\n\t\t<ContextMenuSeparator />\n\t\t<ContextMenuLinkItem href=\"https://example.com/help\" target=\"_blank\">Help</ContextMenuLinkItem>\n\t\t<ContextMenuItem variant=\"destructive\" icon={<Icon name=\"trash\" />}>Delete</ContextMenuItem>\n\t</ContextMenuContent>\n</ContextMenu>",
          "imports": "import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuLinkItem, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSubmenu, ContextMenuSubmenuTrigger, ContextMenuTrigger, Icon } from \"@sableui/react\""
        },
        {
          "label": "Basic",
          "code": "<ContextMenu><ContextMenuTrigger className=\"rounded-md border border-dashed border-border p-8 text-center text-body-sm text-muted-foreground\">Right-click here</ContextMenuTrigger><ContextMenuContent><ContextMenuItem shortcut=\"Ctrl X\">Cut</ContextMenuItem><ContextMenuItem shortcut=\"Ctrl C\">Copy</ContextMenuItem><ContextMenuItem shortcut=\"Ctrl V\">Paste</ContextMenuItem><ContextMenuSeparator /><ContextMenuItem variant=\"destructive\">Delete</ContextMenuItem></ContextMenuContent></ContextMenu>",
          "imports": "import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "Grouped",
          "code": "<ContextMenu><ContextMenuTrigger className=\"rounded-md border border-dashed border-border p-8\">Right-click here</ContextMenuTrigger><ContextMenuContent><ContextMenuGroup><ContextMenuGroupLabel>Layout</ContextMenuGroupLabel><ContextMenuItem>Move up</ContextMenuItem><ContextMenuItem>Move down</ContextMenuItem></ContextMenuGroup><ContextMenuSeparator /><ContextMenuItem>Duplicate</ContextMenuItem></ContextMenuContent></ContextMenu>",
          "imports": "import { ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "DataTable",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/data-table",
      "summary": "A data-driven table over the Table primitives — a columns def + data array with built-in sorting (click a sortable header to cycle asc → desc → none; locale-aware string order; controlled with sort + onSortChange), optional row click / selection, rows grouped under collapsible header rows (groupBy), and an empty state. For server data or paging, control the sort, set manualSorting, and pair with Pagination.",
      "keywords": [
        "data table",
        "table",
        "sortable",
        "columns",
        "rows",
        "empty state",
        "pagination",
        "list",
        "grouped",
        "group by",
        "sections",
        "issue list",
        "issue tracker",
        "status groups",
        "collapsible groups"
      ],
      "usage": {
        "description": "Use DataTable when a data array and column definition should render a sortable, semantic table with optional row actions and an empty state. Use the lower-level Table parts for hand-authored markup or highly custom row layouts.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Put a table that fills a card in <CardContent flush>. The table runs edge to edge and its first and last columns inset to the card padding on their own; do not hand-set pl-6 / pr-6 on columns."
          },
          {
            "guidance": "do",
            "description": "Provide stable rowKey values for dynamic data so selection and sorting do not jump."
          },
          {
            "guidance": "do",
            "description": "Use sortable only on columns where ordering is obvious and useful."
          },
          {
            "guidance": "do",
            "description": "For server-side sorting and paging, control the sort (sort + onSortChange), set manualSorting, and pass the page the server returned with Pagination beside it. Without manualSorting a sortable header reorders only the rows on the current page."
          },
          {
            "guidance": "do",
            "description": "Group rows by status for an issue tracker (or by owner, by day) with groupBy + groups on ONE DataTable: every group shares the header and the column widths, each header row carries the group's count and an add action, and sorting applies within each group. Do not stack one DataTable per group inside Collapsibles; the header repeats and the columns stop lining up."
          },
          {
            "guidance": "do",
            "description": "Move to TanStack Table, rendered with Sable's Table parts, once the table needs server-side sorting or filtering, column visibility or resizing, nested or aggregated grouping, or virtualised rows. DataTable stays dependency-free and does not grow into a data grid; `sable docs tables-with-tanstack` maps one onto the other."
          },
          {
            "guidance": "dont",
            "description": "Make every row clickable and also fill it with competing buttons. Choose a clear row interaction model."
          },
          {
            "guidance": "dont",
            "description": "Use DataTable for heterogeneous cards or timeline content. A list or card layout will scan better."
          }
        ],
        "anatomy": [
          {
            "name": "Columns",
            "required": true,
            "description": "Definitions for headers, cell renderers, sorting, alignment, and classes."
          },
          {
            "name": "Rows",
            "required": true,
            "description": "The data array rendered through the column definitions."
          },
          {
            "name": "Empty state",
            "required": false,
            "description": "Content spanning all columns when the row array is empty."
          },
          {
            "name": "Group header row",
            "required": false,
            "description": "With groupBy: one row per group heading its own tbody (a th with scope=rowgroup across every column) holding the disclosure toggle, the group's icon, label and count, and an optional trailing action."
          },
          {
            "name": "Caption",
            "required": false,
            "description": "Accessible table caption rendered by the underlying Table."
          }
        ]
      },
      "related": {
        "components": [
          "Table",
          "Pagination",
          "EmptyState",
          "Badge"
        ],
        "patterns": [
          "DashboardPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "columns",
          "type": "DataTableColumn<Row>[]",
          "description": "Column defs: { key, header, cell?, sortValue?, sortable?, align?, className? }. cell defaults to row[key]; sortValue defaults to row[key]. When cell renders a formatted string (e.g. a date), pass sortValue returning the underlying value (e.g. date.getTime()) so the column sorts by the real value, not the rendered text."
        },
        {
          "name": "data",
          "type": "Row[]",
          "description": "The rows to render."
        },
        {
          "name": "rowKey",
          "type": "(row, index) => string | number",
          "default": "index in data",
          "description": "Stable key per row, used for the React key and for selection. index is always the row's place in data, never its sorted or grouped position."
        },
        {
          "name": "onRowClick",
          "type": "(row) => void",
          "description": "Row click handler — makes rows pointer-interactive."
        },
        {
          "name": "isRowSelected",
          "type": "(row) => boolean",
          "description": "Mark a row visually selected (data-selected), e.g. the one open in a detail pane. Derive it from a stable id (row.id === selectedId), not the row index, so selection survives re-sorts. For checking several rows, use selectedKeys."
        },
        {
          "name": "selectedKeys",
          "type": "ReadonlySet<string | number>",
          "description": "The checked rows, by rowKey, for bulk actions. With onSelectedKeysChange it adds a checkbox column (each box named by rowSelectionLabel) and a select-all box in the header that acts on the rows shown and goes mixed when some are checked. Checked rows get the selected fill. Controlled: when the rows shown change (a filter, another view), set the keys to keep, usually none. Needs rowKey."
        },
        {
          "name": "onSelectedKeysChange",
          "type": "(keys: Set<string | number>) => void",
          "description": "Called with the new set of checked keys. Its presence turns selection on. A click on a box never fires onRowClick."
        },
        {
          "name": "rowSelectionLabel",
          "type": "(row) => string",
          "default": "() => \"Select row\"",
          "description": "A row checkbox's accessible name. Name the row, e.g. (t) => `Select ${t.subject}`, so a screen reader can tell the boxes apart."
        },
        {
          "name": "selectAllLabel",
          "type": "(count: number) => string",
          "default": "(count) => `Select all ${count} shown`",
          "description": "The select-all checkbox's accessible name; say what it acts on (\"Select all 7 tickets shown\")."
        },
        {
          "name": "defaultSort",
          "type": "DataTableSort ({ key: string; direction: \"asc\" | \"desc\" })",
          "description": "Initial sort column + direction, uncontrolled."
        },
        {
          "name": "sort",
          "type": "DataTableSort | null",
          "description": "The sort, controlled; null for unsorted. A header click calls onSortChange with the next step of asc → desc → none and changes nothing by itself."
        },
        {
          "name": "onSortChange",
          "type": "(sort: DataTableSort | null) => void",
          "description": "Called with the next sort when a sortable header is clicked, controlled or not. Fetch the next page from here for server-sorted data."
        },
        {
          "name": "manualSorting",
          "type": "boolean",
          "default": "false",
          "description": "Skip the local sort: data already arrives in sort order (a server sorts and pages). Headers still show aria-sort and report clicks."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "the reader's locale",
          "description": "BCP 47 locale strings are compared in. Comparison is case-insensitive, ignores accents, and orders digits by value (\"file2\" before \"file10\"); dates and numbers compare by value; ties keep the order of data."
        },
        {
          "name": "empty",
          "type": "ReactNode",
          "default": "\"No results.\"",
          "description": "Rendered spanning all columns when data is empty. Pass an EmptyState for the full treatment (icon, title, next step)."
        },
        {
          "name": "caption",
          "type": "ReactNode",
          "description": "Bottom table caption."
        },
        {
          "name": "groupBy",
          "type": "(row) => string",
          "description": "Group the rows under header rows by the key this returns (a status, an owner, a day). One header serves every group, so the columns line up across them; sorting applies within each group."
        },
        {
          "name": "groups",
          "type": "{ key: string; label?: ReactNode; icon?: ReactNode; action?: ReactNode; defaultExpanded?: boolean }[]",
          "description": "Order and presentation of the groups, by key: the header row's label (defaults to the key), a leading icon such as a status mark, a trailing action such as an icon Button that adds a row to the group, and whether it starts open (default true). Groups groupBy returns that are not listed follow, in the order their first row appears in data. A listed group with no rows is not shown."
        },
        {
          "name": "collapsible",
          "type": "boolean",
          "default": "true",
          "description": "Whether each group's header row is a toggle that opens and closes the group. A closed group keeps its header row and count; its rows are hidden and select-all skips them."
        },
        {
          "name": "expandedGroups",
          "type": "ReadonlySet<string>",
          "description": "The open groups, by key (controlled). Without it each group starts at its defaultExpanded and the table holds the state."
        },
        {
          "name": "onExpandedGroupsChange",
          "type": "(keys: Set<string>) => void",
          "description": "Called with the new set of open group keys when a group header is toggled."
        },
        {
          "name": "ref / ...props",
          "type": "ComponentPropsWithRef<\"table\">",
          "description": "Remaining DOM props (aria-label, id, data-*) and the ref land on the <table>."
        }
      ],
      "tokensUsed": [
        "muted-foreground",
        "foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Rows render with the page or the query that produced them. Staggering rows in delays reading a table someone opened to scan."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Row",
          "why": "Body rows ease to a muted wash under the pointer (TableRow's recipe), which keeps the eye on the right line across a wide row of numbers. Sortable headers are TableHead's sortable part (a ghost Button) and answer on Button's recipe."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Sort chevron",
          "why": "One chevron turns to show direction instead of two glyphs swapping, so ascending to descending reads as the same column reversing. Its opacity rises from the resting 60% as the column becomes the sort."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Row",
          "why": "A checked row's fill eases in across its cells, so selecting by checkbox reads as the row being picked rather than a band stamped over it."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Group chevron",
          "why": "A group's chevron turns from pointing along the reading direction (closed) to down (open), so the group reads as folding rather than a glyph being swapped."
        },
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Group rows",
          "why": "Opening a group shows its rows at once: table rows cannot animate their height without leaving the table layout, and the rows are the content the reader asked for."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "DataTable has no loading state. While data is fetched, render Skeleton rows (motion-shimmer) in its place — only the caller knows a fetch is in flight."
        }
      ],
      "a11y": [
        "Sorted columns set aria-sort=ascending/descending on the header cell.",
        "Sortable headers are real <button>s with a focus-visible ring, keyboard-operable.",
        "Inherits the Table's scrollable frame and semantic <table>/<th>/<td> structure.",
        "Grouped, each group is its own <tbody> (a rowgroup) headed by a <th scope=\"rowgroup\"> spanning the columns, so group headers are never read as data rows; the toggle is a real button with aria-expanded and aria-controls naming that tbody."
      ],
      "examples": [
        {
          "label": "Checkbox selection with a bulk-action bar",
          "code": "const [selected, setSelected] = useState<Set<string | number>>(new Set())\n\n<Stack gap={2}>\n\t{/* Mounted from the start, so a screen reader hears each change. */}\n\t<span role=\"status\" className=\"sr-only\">{selected.size ? `${selected.size} of ${tickets.length} selected` : \"\"}</span>\n\t{selected.size ? (\n\t\t<Toolbar aria-label=\"Bulk actions\">\n\t\t\t<span className=\"text-label-md\">{selected.size} of {tickets.length} selected</span>\n\t\t\t<Button size=\"sm\" variant=\"secondary\" onClick={() => resolve(selected)}>Resolve</Button>\n\t\t</Toolbar>\n\t) : null}\n\t<DataTable\n\t\tdata={tickets}\n\t\trowKey={(t) => t.id}\n\t\tcolumns={columns}\n\t\tselectedKeys={selected}\n\t\tonSelectedKeysChange={setSelected}\n\t\trowSelectionLabel={(t) => `Select ${t.subject}`}\n\t\tselectAllLabel={(n) => `Select all ${n} tickets shown`}\n\t/>\n</Stack>",
          "imports": "import { Button, DataTable, Stack, Toolbar } from \"@sableui/react\""
        },
        {
          "label": "Sortable columns",
          "code": "<DataTable data={users} columns={[{ key: \"name\", header: \"Name\", sortable: true }, { key: \"role\", header: \"Role\" }, { key: \"joined\", header: \"Joined\", sortable: true, sortValue: (u) => u.joinedAt, cell: (u) => formatDate(u.joinedAt) }]} />",
          "imports": "import { DataTable } from \"@sableui/react\""
        },
        {
          "label": "Server-sorted and paged",
          "code": "const [sort, setSort] = useState<DataTableSort | null>({ key: \"joined\", direction: \"desc\" })\nconst [page, setPage] = useState(1)\n// The server returns this page already in `sort` order; the table does not reorder it.\nconst { rows, pageCount } = useUsers({ sort, page })\n\n<Stack gap={3}>\n\t<DataTable\n\t\tdata={rows}\n\t\trowKey={(u) => u.id}\n\t\tsort={sort}\n\t\tonSortChange={(next) => {\n\t\t\tsetSort(next)\n\t\t\tsetPage(1)\n\t\t}}\n\t\tmanualSorting\n\t\tcolumns={[{ key: \"name\", header: \"Name\", sortable: true }, { key: \"joined\", header: \"Joined\", sortable: true, cell: (u) => formatDate(u.joined) }]}\n\t/>\n\t<Pagination page={page} total={pageCount} onPageChange={setPage} />\n</Stack>",
          "imports": "import { DataTable, Pagination, Stack, type DataTableSort } from \"@sableui/react\""
        },
        {
          "label": "Clickable rows",
          "code": "<DataTable data={posts} columns={cols} onRowClick={(p) => navigate(`/post/${p.id}`)} rowKey={(p) => p.id} />",
          "imports": "import { DataTable } from \"@sableui/react\""
        },
        {
          "label": "Rich status column",
          "code": "<DataTable data={deployments} rowKey={(row) => row.id} columns={[{ key: \"name\", header: \"Name\", sortable: true }, { key: \"status\", header: \"Status\", cell: (row) => <Badge appearance=\"plain\" tone={row.status === \"failed\" ? \"destructive\" : row.status === \"building\" ? \"warning\" : \"success\"} dot>{row.statusLabel}</Badge> }, { key: \"owner\", header: \"Owner\", cell: (row) => <Entity className=\"[--entity-px:0] [--entity-py:0]\" leading={<Avatar src={row.owner.avatar} alt={row.owner.name} fallback={row.owner.initials} size=\"sm\" />} title={row.owner.name} /> }]} />",
          "imports": "import { Avatar, Badge, DataTable, Entity } from \"@sableui/react\""
        },
        {
          "label": "In a card, edge to edge",
          "code": "<Card><CardHeader><CardTitle>Deployments</CardTitle></CardHeader><CardContent flush><DataTable data={deployments} rowKey={(row) => row.id} columns={[{ key: \"project\", header: \"Project\", sortable: true }, { key: \"duration\", header: \"Duration\", align: \"end\" }]} /></CardContent></Card>",
          "imports": "import { Card, CardContent, CardHeader, CardTitle, DataTable } from \"@sableui/react\""
        },
        {
          "label": "Issues grouped by status",
          "code": "const STATUSES = [\n\t{ key: \"in-progress\", label: \"In progress\", icon: <StatusDot tone=\"warning\" /> },\n\t{ key: \"in-review\", label: \"In review\", icon: <StatusDot tone=\"purple\" /> },\n\t{ key: \"todo\", label: \"Todo\", icon: <StatusDot /> },\n\t{ key: \"done\", label: \"Done\", icon: <StatusDot tone=\"success\" />, defaultExpanded: false },\n]\n\n<DataTable\n\tdata={issues}\n\trowKey={(t) => t.id}\n\tgroupBy={(t) => t.status}\n\tgroups={STATUSES.map((s) => ({ ...s, action: <Button variant=\"ghost\" size=\"icon-xs\" aria-label={`Add issue to ${s.label}`} onClick={() => create(s.key)}><Icon name=\"plus\" /></Button> }))}\n\tonRowClick={(t) => setSelectedId(t.id)}\n\tisRowSelected={(t) => t.id === selectedId}\n\tcolumns={[\n\t\t{ key: \"id\", header: \"ID\", className: \"w-20\", cell: (t) => <span className=\"text-mono-caption text-muted-foreground\">{t.id}</span> },\n\t\t{ key: \"title\", header: \"Issue\", sortable: true },\n\t\t{ key: \"due\", header: \"Due\", sortable: true, sortValue: (t) => t.due.getTime(), cell: (t) => formatDate(t.due) },\n\t]}\n/>",
          "imports": "import { Button, DataTable, Icon, StatusDot } from \"@sableui/react\""
        },
        {
          "label": "Empty state",
          "code": "<DataTable data={[]} columns={[{ key: \"name\", header: \"Name\" }, { key: \"status\", header: \"Status\" }]} empty={<EmptyState icon={<Icon name=\"search\" />} title=\"No deployments\" description=\"Try a different filter or create a deployment.\" action={<Button>Create deployment</Button>} />} />",
          "imports": "import { Button, DataTable, EmptyState, Icon } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "DatePicker",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/date-picker",
      "summary": "Date, date-range, date-and-time or time picker: a field-shaped trigger (the Input / SelectTrigger shell) opens a Popover holding Sable's Calendar. With granularity=\"day\" selecting a day fires onValueChange and closes; granularity=\"minute\" adds an hour + minute row of Selects and keeps the time-of-day when the day changes; granularity=\"time\" is that row alone; mode=\"range\" picks a start and an end day. With a name it submits its value in a form.",
      "keywords": [
        "date picker",
        "due date",
        "property row",
        "inspector",
        "calendar",
        "date input",
        "date time picker",
        "date range picker",
        "range",
        "time picker",
        "time field",
        "time",
        "schedule",
        "form"
      ],
      "usage": {
        "description": "Use DatePicker when users need to choose one date — or, with granularity=\"minute\", one date and time; with granularity=\"time\", a time of day; with mode=\"range\", a start and an end day — from a compact control.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it in forms where a typed date alone would be error-prone."
          },
          {
            "guidance": "do",
            "description": "Show clear selected and disabled states when date rules apply."
          },
          {
            "guidance": "do",
            "description": "Set granularity=\"minute\" when a time matters, with a minuteStep that matches the real precision (15 for meetings, 5 for scheduled posts)."
          },
          {
            "guidance": "do",
            "description": "Use mode=\"range\" for a stay, a report period or a leave request — one control holding both ends — rather than two DatePickers whose order the user has to police."
          },
          {
            "guidance": "do",
            "description": "Give it a name inside a form: it submits yyyy-MM-dd (a day), yyyy-MM-ddTHH:mm (a minute), HH:mm (a time) or yyyy-MM-dd/yyyy-MM-dd (a range), the formats a server already parses from native date inputs. Wrap it in <Field required> and an empty picker blocks the submit."
          },
          {
            "guidance": "dont",
            "description": "Do not show a time without saying which zone it is in. A meeting time with no zone is wrong for everyone not in yours — wrap the picker in a Field whose description names the zone."
          },
          {
            "guidance": "dont",
            "description": "Do not leave the format ambiguous. `03/04` is two different dates depending on the reader's locale — the trigger shows a formatted date precisely so the interpretation is not guessed."
          }
        ]
      },
      "related": {
        "components": [
          "Calendar",
          "Field"
        ]
      },
      "props": [
        {
          "name": "mode",
          "type": "\"single\" | \"range\"",
          "default": "\"single\"",
          "description": "One date, or a { from, to } range. In range mode the first pick sets the start, the second the end (in either order) and closes the popover; the value changes once, on the second pick, so dismissing after one pick keeps the range that was there; value, defaultValue and onValueChange take a DateRange (exported), and granularity is always \"day\"."
        },
        {
          "name": "value",
          "type": "Date | DateRange",
          "description": "The selected date (controlled), or the { from, to } range under mode=\"range\" (to is unset while only the start is picked). When absent, the trigger shows a muted placeholder."
        },
        {
          "name": "defaultValue",
          "type": "Date | DateRange",
          "description": "Initial value when uncontrolled (no `value` prop)."
        },
        {
          "name": "onValueChange",
          "type": "((date: Date | undefined) => void) | ((range: DateRange | undefined) => void)",
          "description": "Fired when the day is chosen or cleared, and under granularity=\"minute\" / \"time\" when the hour or minute changes. With granularity=\"day\" it also closes the popover. In range mode it fires on both picks: with only from after the first, with both after the second."
        },
        {
          "name": "onChange",
          "type": "(date: Date | undefined) => void",
          "description": "Deprecated alias for onValueChange, kept for backwards compatibility. Both fire when set; prefer onValueChange.",
          "deprecated": "onValueChange"
        },
        {
          "name": "granularity",
          "type": "\"day\" | \"minute\" | \"time\"",
          "default": "\"day\"",
          "description": "What the picker chooses. \"minute\" adds an hour + minute row and keeps the popover open so day and time can be set in any order. \"time\" is the hour + minute row alone, with no calendar: the value is a Date that keeps its day (today when there was none)."
        },
        {
          "name": "minuteStep",
          "type": "number",
          "default": "5",
          "description": "Minute increment for the time row (granularity=\"minute\" or \"time\")."
        },
        {
          "name": "defaultTime",
          "type": "string",
          "default": "\"00:00\"",
          "description": "Time-of-day shown and applied while nothing is selected yet, as 24h \"HH:mm\" — the first day pick lands on this time instead of midnight (granularity=\"minute\" or \"time\")."
        },
        {
          "name": "placeholder",
          "type": "string",
          "default": "\"Pick a date\" (\"Pick date & time\" for minute, \"Pick a time\" for time, \"Pick a date range\" in range mode)",
          "description": "Trigger label shown when no date is selected."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "description": "Disable the trigger and block selection."
        },
        {
          "name": "readOnly",
          "type": "boolean",
          "description": "Show the value without letting it change: the popover does not open, and the submitted value is not validated."
        },
        {
          "name": "name",
          "type": "string",
          "description": "Name of the submitted value. A visually hidden input carries it into FormData: yyyy-MM-dd for a day, yyyy-MM-ddTHH:mm (local, the datetime-local format) for a minute, HH:mm for a time, and an ISO 8601 interval yyyy-MM-dd/yyyy-MM-dd for a range (empty until both ends are picked). Empty when nothing is selected. It reaches native FormData and onSubmit, not Form's onFormSubmit values object, which lists Base UI controls only."
        },
        {
          "name": "form",
          "type": "string",
          "description": "The id of the <form> the value belongs to, when the picker sits outside it."
        },
        {
          "name": "required",
          "type": "boolean",
          "description": "A value is needed before the form submits: the trigger is aria-required, and a native or Sable Form submit is blocked while empty, with focus moved to the trigger. A wrapping <Field required> sets it."
        },
        {
          "name": "minDate",
          "type": "Date",
          "description": "Earliest selectable day (inclusive). Earlier days are disabled and navigation is bounded."
        },
        {
          "name": "maxDate",
          "type": "Date",
          "description": "Latest selectable day (inclusive). Later days are disabled and navigation is bounded."
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | \"xs\"",
          "default": "\"md\"",
          "description": "The trigger's rung. md is the form field beside Input and Select. sm is md one rung down, the same raised field: a date filter in a toolbar beside an sm SelectTrigger and sm buttons. xs is the property-grid rung (24px in a workspace): an inset panel-field well with no border, the same shape as SelectTrigger size=\"xs\" and ScrubField on the neighbouring rows of an inspector — use it for a due date in a PropertyRow instead of a native date input."
        },
        {
          "name": "locale",
          "type": "Locale (date-fns)",
          "description": "The date-fns locale for the calendar (month and weekday names, first day of the week) and for the trigger's label, so both speak one language. Without it both are English (en-US), identical on the server and the client. import { de } from \"date-fns/locale\"."
        },
        {
          "name": "formatOptions",
          "type": "Intl.DateTimeFormatOptions",
          "description": "How the trigger writes the chosen date, as Intl.DateTimeFormat options in locale (en-US without one) — { month: \"short\", day: \"numeric\" } for \"Oct 23\" where the rest of a list writes dates that way. Omitted: \"Oct 23, 2026\" (with \"at 14:30\" under granularity=\"minute\")."
        },
        {
          "name": "timeLabel",
          "type": "string",
          "default": "\"Time\"",
          "description": "Accessible name of the time row's group."
        },
        {
          "name": "hourLabel",
          "type": "string",
          "default": "\"Hour\"",
          "description": "Accessible name of the hour Select."
        },
        {
          "name": "minuteLabel",
          "type": "string",
          "default": "\"Minute\"",
          "description": "Accessible name of the minute Select."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Extra classes merged onto the trigger."
        },
        {
          "name": "ref / id / aria-* / …",
          "type": "button attributes",
          "description": "ref and every other button attribute are forwarded to the trigger, so a wrapping Field ties its label to the picker and announces its description and error, and a ref can focus it. Pass the aria attributes yourself only when labelling the picker without a Field."
        }
      ],
      "tokensUsed": [
        "primary",
        "primary-foreground",
        "accent",
        "accent-foreground",
        "foreground",
        "muted-foreground",
        "popover",
        "popover-foreground",
        "border",
        "field-border",
        "field",
        "ring"
      ],
      "a11y": [
        "Trigger opens on click/Enter/Space; the popover traps focus and restores it to the trigger on close (Base UI Popover).",
        "The calendar grid (react-day-picker) provides a roving tabindex, arrow-key day navigation, and aria-selected on the chosen day.",
        "Navigation chevrons render through the Icon adapter and inherit the calendar's button labels.",
        "Esc and outside press dismiss the popover.",
        "In a form the value rides a visually hidden, aria-hidden input with tabIndex -1 (not type=hidden, which constraint validation skips). When a required, empty picker blocks a submit the browser focuses that input, which hands focus straight to the trigger.",
        "With granularity=\"minute\" the hour and minute Selects are full Base UI listboxes (typeahead, ARIA) labelled \"Hour\" and \"Minute\" (hourLabel / minuteLabel) inside a group named \"Time\" (timeLabel); selecting a day keeps the chosen time-of-day, so day and time can be set in any order."
      ],
      "examples": [
        {
          "label": "In an inspector row",
          "code": "<PanelSection title=\"Properties\">\n\t<PropertyRow label=\"Due date\">\n\t\t<DatePicker size=\"xs\" aria-label=\"Due date\" value={due} onValueChange={setDue} formatOptions={{ month: \"short\", day: \"numeric\" }} />\n\t</PropertyRow>\n</PanelSection>",
          "imports": "import { DatePicker, PanelSection, PropertyRow } from \"@sableui/react\""
        },
        {
          "label": "Controlled",
          "code": "const [date, setDate] = useState<Date>()\n<DatePicker value={date} onValueChange={setDate} />",
          "imports": "import { DatePicker } from \"@sableui/react\""
        },
        {
          "label": "Custom placeholder",
          "code": "<DatePicker placeholder=\"Schedule for…\" value={date} onValueChange={setDate} />",
          "imports": "import { DatePicker } from \"@sableui/react\""
        },
        {
          "label": "Date and time",
          "code": "const [start, setStart] = useState<Date>()\n<DatePicker granularity=\"minute\" value={start} onValueChange={setStart} minDate={new Date()} defaultTime=\"09:00\" minuteStep={15} />",
          "imports": "import { DatePicker } from \"@sableui/react\""
        },
        {
          "label": "Date range",
          "code": "const [stay, setStay] = useState<DateRange>()\n<DatePicker mode=\"range\" value={stay} onValueChange={setStay} minDate={new Date()} placeholder=\"Check-in – check-out\" />",
          "imports": "import { DatePicker, type DateRange } from \"@sableui/react\""
        },
        {
          "label": "In a form",
          "code": "<Form onSubmit={(event) => { event.preventDefault(); save(new FormData(event.currentTarget)) }}>\n\t<Field label=\"Check-in\" required>\n\t\t<DatePicker name=\"checkin\" minDate={new Date()} />\n\t</Field>\n\t<Field label=\"Opens at\">\n\t\t<DatePicker name=\"opens\" granularity=\"time\" minuteStep={15} defaultTime=\"09:00\" />\n\t</Field>\n\t<Button type=\"submit\">Book</Button>\n</Form>",
          "imports": "import { Button, DatePicker, Field, Form } from \"@sableui/react\""
        },
        {
          "label": "Localised (de from date-fns/locale)",
          "code": "<DatePicker locale={de} value={date} onValueChange={setDate} placeholder=\"Datum wählen\" />",
          "imports": "import { DatePicker } from \"@sableui/react\""
        },
        {
          "label": "Disabled",
          "code": "<DatePicker disabled />",
          "imports": "import { DatePicker } from \"@sableui/react\""
        },
        {
          "label": "Bounded (no past dates)",
          "code": "<DatePicker value={date} onValueChange={setDate} minDate={new Date()} />",
          "imports": "import { DatePicker } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "DateTile",
      "status": "stable",
      "composition": "a <time> element with the type tiers, on a surface utility",
      "group": "Data display",
      "register": "page",
      "path": "components/date-tile",
      "summary": "A calendar-page date: the short month on a primary band over the day number, in a <time> element. The leading visual of an event, booking or deadline row.",
      "keywords": [
        "date",
        "calendar",
        "event",
        "day",
        "month",
        "schedule",
        "booking",
        "tile"
      ],
      "usage": {
        "description": "Use DateTile as the leading visual when the date is what a reader scans a list or card by — events, bookings, deadlines, releases. It sits beside a title and a time line, usually in an Entity's `leading` slot or a flex row in a CardContent. For a date inside a sentence or a row's metadata, use text or RelativeTime instead.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pair the tile with a title and the full time or range in text beside it; the tile only names the day."
          },
          {
            "guidance": "do",
            "description": "Keep every row of a list on DateTile so the dates line up as one column."
          },
          {
            "guidance": "dont",
            "description": "Use it for timestamps (\"2 hours ago\", \"Oct 14, 10:02\") — that is RelativeTime or plain metadata text."
          },
          {
            "guidance": "dont",
            "description": "Stretch it to its neighbour's height or restyle the band per row; the tile is a fixed shape so a column of them reads as one calendar."
          }
        ],
        "anatomy": [
          {
            "name": "Band",
            "required": true,
            "description": "The short month name on the primary colour."
          },
          {
            "name": "Day",
            "required": true,
            "description": "The day of the month, on the muted surface."
          }
        ]
      },
      "related": {
        "components": [
          "Entity",
          "Card",
          "RelativeTime",
          "Calendar"
        ]
      },
      "props": [
        {
          "name": "date",
          "type": "Date",
          "description": "The day to show, read in local time. Rendered as `<time dateTime=\"YYYY-MM-DD\">`."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for the month name."
        }
      ],
      "tokensUsed": [
        "muted",
        "primary",
        "primary-foreground",
        "foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "part": "Tile",
          "recipe": "none",
          "why": "A static label; it appears with whatever row or card holds it."
        },
        {
          "slot": "response",
          "part": "Tile",
          "recipe": "none",
          "why": "Not interactive."
        },
        {
          "slot": "transition",
          "part": "Tile",
          "recipe": "none",
          "why": "It has no states to move between."
        },
        {
          "slot": "activity",
          "part": "Tile",
          "recipe": "none",
          "why": "Nothing runs in the background."
        }
      ],
      "a11y": [
        "Renders a <time> with a machine-readable `dateTime`, so the day is announced as text (\"Oct 14\") and parsable as a date.",
        "The tile names only the day — state the weekday, time or range in the text beside it, where it is read in order."
      ],
      "examples": [
        {
          "label": "Event row",
          "code": "<Row gap={4} align=\"start\">\n\t<DateTile date={new Date(2026, 9, 14)} />\n\t<Stack gap={1}>\n\t\t<span className=\"text-title-lg\">Design review</span>\n\t\t<span className=\"text-body-sm text-muted-foreground\">Tuesday, 2:00 – 2:45 PM</span>\n\t</Stack>\n</Row>",
          "imports": "import { DateTile, Row, Stack } from \"@sableui/react\""
        },
        {
          "label": "In an Entity list",
          "code": "<CardList>\n\t<Entity leading={<DateTile date={new Date(2026, 9, 14)} />} title=\"Design review\" subtitle=\"Tuesday, 2:00 PM\" />\n\t<Entity leading={<DateTile date={new Date(2026, 9, 21)} />} title=\"Launch\" subtitle=\"Tuesday, all day\" />\n</CardList>",
          "imports": "import { CardList, DateTile, Entity } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "DestructiveActionModal",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/destructive-action-modal",
      "summary": "Confirmation modal for irreversible actions, built on AlertDialog (role=alertdialog; a backdrop click does not dismiss). Pairs a secondary Cancel with a destructive confirm; awaits an async onConfirm (spinner + stays open on failure) or takes an external pending flag; optional body slot and type-to-confirm guard for high-stakes deletions.",
      "keywords": [
        "destructive",
        "modal",
        "confirmation",
        "danger"
      ],
      "usage": {
        "description": "Use DestructiveActionModal to confirm irreversible or high-risk actions before they run.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Name the affected object and the consequence of the action in plain language."
          },
          {
            "guidance": "do",
            "description": "Make the destructive action visually distinct from the cancel path."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for routine low-risk actions where undo or inline confirmation would be faster."
          },
          {
            "guidance": "dont",
            "description": "Do not put the destructive action where Cancel usually sits, or make it the default focus. A confirmation dialog exists to add friction; autofocusing Delete removes the friction it was added for."
          }
        ]
      },
      "related": {
        "components": [
          "Dialog",
          "Button",
          "Banner"
        ]
      },
      "props": [
        {
          "name": "open",
          "type": "boolean",
          "description": "Controlled open state."
        },
        {
          "name": "onOpenChange",
          "type": "(open: boolean) => void",
          "description": "Called when the open state should change (Esc, Cancel, or confirm). A backdrop click does not dismiss."
        },
        {
          "name": "title",
          "type": "ReactNode",
          "description": "Modal heading — names the irreversible action."
        },
        {
          "name": "description",
          "type": "ReactNode",
          "description": "Optional supporting copy explaining the consequence."
        },
        {
          "name": "confirmLabel",
          "type": "string",
          "default": "\"Delete\"",
          "description": "Label for the destructive confirm button."
        },
        {
          "name": "cancelLabel",
          "type": "string",
          "default": "\"Cancel\"",
          "description": "Label for the dismissing secondary button."
        },
        {
          "name": "onConfirm",
          "type": "() => void | Promise<void>",
          "description": "Called when the user confirms. If it returns a Promise the modal shows an in-flight spinner, closes on resolve, and stays open on reject; if void it closes immediately (unless pending is controlled)."
        },
        {
          "name": "pending",
          "type": "boolean",
          "description": "Externally-driven in-flight state. Overrides the internal await tracking; the parent owns closing (the modal stays open on a synchronous confirm)."
        },
        {
          "name": "confirmingLabel",
          "type": "string",
          "default": "confirmLabel",
          "description": "Confirm-button label shown while the action is in flight."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "Body content rendered between the description and the type-to-confirm Input / footer — e.g. a warning <Note>."
        },
        {
          "name": "confirmText",
          "type": "string",
          "description": "When set, renders an Input the user must type matching to enable the destructive confirm button."
        }
      ],
      "tokensUsed": [
        "card",
        "card-foreground",
        "border",
        "muted-foreground",
        "foreground",
        "input",
        "destructive",
        "destructive-foreground",
        "secondary",
        "secondary-foreground"
      ],
      "a11y": [
        "Built on AlertDialog (Base UI): role=\"alertdialog\", focus trapping, scroll lock, and aria-modal. Esc dismisses; a click on the backdrop does not, so a stray click can't throw away the decision.",
        "Focus opens on Cancel — the safe action — even when a type-to-confirm Input comes first, so a reflexive Enter never fires the destructive action.",
        "The title labels the modal; the description describes it.",
        "The type-to-confirm Input is wired to its label via htmlFor; the destructive Button is disabled (not just hidden) until the text matches.",
        "While a confirm is in flight (awaited onConfirm or pending), both buttons disable, the confirm Button sets aria-busy, and Esc dismissal is blocked so the action can't be interrupted or double-fired."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<DestructiveActionModal open={open} onOpenChange={setOpen} title='Delete post?' description='This permanently removes the post. This cannot be undone.' onConfirm={handleDelete} />",
          "imports": "import { DestructiveActionModal } from \"@sableui/react\""
        },
        {
          "label": "Async confirm (awaited spinner)",
          "code": "<DestructiveActionModal open={open} onOpenChange={setOpen} title='Block user?' description='They can no longer interact with you.' confirmLabel='Block' confirmingLabel='Blocking…' onConfirm={() => blockUser(id)} />",
          "imports": "import { DestructiveActionModal } from \"@sableui/react\""
        },
        {
          "label": "Body slot + type-to-confirm",
          "code": "<DestructiveActionModal open={open} onOpenChange={setOpen} title='Delete this post?' confirmText='gold rush' confirmLabel='Delete forever' onConfirm={handleDelete}><Note tone='warning'>People you shared this post with lose access to it.</Note></DestructiveActionModal>",
          "imports": "import { DestructiveActionModal, Note } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Dialog",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/dialog",
      "summary": "Modal surface over Base UI Dialog (focus trap, scroll lock, Esc/outside dismissal). Centered on desktop; max-width 500px. size=\"fullscreen\" is the full-bleed media viewer (image, video, Carousel) over a near-opaque scrim.",
      "keywords": [
        "dialog",
        "modal",
        "overlay",
        "confirmation",
        "alert",
        "form",
        "focus trap",
        "sheet",
        "lightbox",
        "fullscreen",
        "image viewer",
        "media overlay",
        "gallery"
      ],
      "usage": {
        "description": "Use Dialog for focused decisions, short modal forms, confirmations, and content that temporarily blocks the underlying page. Prefer Sheet for side-panel workflows, Popover for lightweight anchored content, and inline sections for content that should remain part of the page.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Always include DialogTitle and usually DialogDescription so the modal has an accessible name and context."
          },
          {
            "guidance": "do",
            "description": "Keep the footer actions explicit: a safe escape path plus the primary or destructive action."
          },
          {
            "guidance": "do",
            "description": "Use showCloseButton for dismissible informational dialogs; keep destructive confirmations action-led."
          },
          {
            "guidance": "do",
            "description": "In a destructive confirmation, state the consequence in DialogDescription (\"This is permanent.\") and reserve the destructive button variant for actions that cannot be undone."
          },
          {
            "guidance": "dont",
            "description": "Put large multipage workflows in a centered dialog. Use Sheet or a page route when the task needs space.",
            "instead": [
              "Sheet"
            ]
          },
          {
            "guidance": "do",
            "description": "Use size=\"fullscreen\" when an image, video, or gallery needs a larger view than the layout can give it. Give the popup an accessible name (aria-label on DialogContent, or a visually hidden DialogTitle) and alt text on the media."
          },
          {
            "guidance": "dont",
            "description": "Use size=\"fullscreen\" for forms, confirmations, or anything that isn't media. A dialog that happens to need room is a Sheet or a page; the fullscreen affordances (dark scrim, corner close, centred content) all assume something to look at.",
            "instead": [
              "Sheet"
            ]
          },
          {
            "guidance": "dont",
            "description": "Hide the close button at size=\"fullscreen\" without another visible way out. A full-bleed viewer that only Esc dismisses is a dead end for anyone who doesn't know the key."
          },
          {
            "guidance": "dont",
            "description": "Open a dialog for passive status updates. Use Toast, Banner, or InlineStatus instead.",
            "instead": [
              "Toast",
              "Banner",
              "InlineStatus"
            ]
          },
          {
            "guidance": "do",
            "description": "Open a dialog from your own button with controlled open/onOpenChange when the trigger is not a DialogTrigger (a menu item, a row action, a keyboard shortcut). Focus returns on close to whatever held it when the dialog opened, with no finalFocus wiring; pass finalFocus only to send it somewhere else."
          },
          {
            "guidance": "do",
            "description": "Set keepMounted on DialogContent for a draft the user may come back to (a compose form, a long comment, a half-filled request). Closing by Esc or a stray click then hides the dialog instead of unmounting it, so the fields are still filled when it reopens. Clear the draft yourself on submit or discard."
          },
          {
            "guidance": "dont",
            "description": "Set keepMounted by default. A dialog that should open fresh (a confirmation, a create form after a successful save) would show stale input, and live content (polling, video) keeps running while hidden."
          },
          {
            "guidance": "do",
            "description": "Use the AlertDialog family for a confirmation that must be answered (discard changes, leave without saving). It looks identical but is role=\"alertdialog\" and a backdrop click does not dismiss it — only Cancel, Esc, or the action. For irreversible deletes, use DestructiveActionModal, which is built on it."
          }
        ],
        "anatomy": [
          {
            "name": "Trigger",
            "required": false,
            "description": "The element that opens the dialog when using the composed trigger pattern."
          },
          {
            "name": "Overlay",
            "required": true,
            "description": "The dimming backdrop behind the modal content."
          },
          {
            "name": "Content",
            "required": true,
            "description": "The modal surface that receives focus trap, labelled-by, and described-by wiring."
          },
          {
            "name": "Header",
            "required": true,
            "description": "Title and optional description that explain the decision or task."
          },
          {
            "name": "Footer",
            "required": false,
            "description": "Action row for cancel, confirm, submit, or destructive choices."
          }
        ]
      },
      "related": {
        "components": [
          "Sheet",
          "Popover",
          "Toast",
          "Button",
          "Form",
          "Note",
          "Carousel",
          "Video"
        ],
        "patterns": [
          "SettingsPage",
          "AuthPage"
        ]
      },
      "props": [
        {
          "name": "Dialog (Root)",
          "type": "Base UI Dialog.Root props (open, defaultOpen, onOpenChange, modal)",
          "description": "Controls open state. Uncontrolled by default. Records the element that holds focus when the dialog opens (through a DialogTrigger, or your own button flipping a controlled open) and returns focus there on close."
        },
        {
          "name": "open",
          "type": "boolean",
          "description": "Controlled open state. Pair with onOpenChange — for a dialog opened from your own button instead of a DialogTrigger."
        },
        {
          "name": "defaultOpen",
          "type": "boolean",
          "default": "false",
          "description": "Initial open state when uncontrolled."
        },
        {
          "name": "onOpenChange",
          "type": "(open: boolean, eventDetails) => void",
          "description": "Called when the dialog asks to open or close (a trigger, Esc, an outside click, DialogClose)."
        }
      ],
      "subcomponents": [
        {
          "name": "DialogContent",
          "type": "Base UI Popup props (initialFocus, finalFocus) + size?: \"default\" | \"fullscreen\" + showCloseButton?: boolean + closeLabel?: string + scroll?: boolean + keepMounted?: boolean + className",
          "description": "Backdrop + popup; portals to <body>. Composes DialogOverlay by default. size=\"fullscreen\" is the media viewer: a near-opaque scrim (bg-overlay/95), an edge-to-edge popup that centres its children with no card chrome, motion-fade instead of motion-pop, and a safe-area-aware floating close button (Button variant=\"floating\"); at that size showCloseButton defaults to true and scroll to false, and the media fits itself with max-h-full max-w-full object-contain. At the default size, showCloseButton (defaults to false) renders a built-in close (X) button in the top-end corner, and the header leaves room for it (Icon name=\"xmark\"). closeLabel (default \"Close\") is that button's accessible name at either size; its hit area grows to 44px under a coarse pointer without moving it. The popup caps at the viewport height less a 1rem margin and wraps its children in a scrolling region, so a tall dialog scrolls instead of overflowing a viewport whose own scroll is locked; pass scroll={false} when the dialog owns its internal layout (a pinned header over a scrolling body) and supplies its own min-h-0 scroll region. keepMounted (default false) keeps the content mounted and hidden while closed, so a draft survives close and reopen. finalFocus defaults to the element focused when the dialog opened, trigger or not; an explicit finalFocus (a ref, a function, or false) wins."
        },
        {
          "name": "DialogOverlay",
          "type": "Base UI Backdrop props + size?: \"default\" | \"fullscreen\" + className",
          "description": "The styleable scrim/backdrop — bg-overlay/(--scrim-alpha) by default (50% light, 72% dark, so it dims a near-black page as visibly as a white one), near-opaque bg-overlay/95 at size=\"fullscreen\". Composed into DialogContent (at the matching size) by default; exported for manual styling."
        },
        {
          "name": "DialogTrigger",
          "type": "Base UI Dialog.Trigger props (render)",
          "description": "Element that opens the dialog. Compose via render prop."
        },
        {
          "name": "DialogClose",
          "type": "Base UI Dialog.Close props (render)",
          "description": "Element that dismisses the dialog. Compose via render prop."
        },
        {
          "name": "DialogHeader",
          "type": "ComponentProps<\"div\">",
          "description": "Top section holding DialogTitle/DialogDescription."
        },
        {
          "name": "DialogTitle",
          "type": "Base UI Dialog.Title props + className",
          "description": "The dialog's accessible name — wires aria-labelledby on the popup."
        },
        {
          "name": "DialogDescription",
          "type": "Base UI Dialog.Description props + className",
          "description": "Muted supporting line; wires aria-describedby."
        },
        {
          "name": "DialogFooter",
          "type": "ComponentProps<\"div\">",
          "description": "Bottom action row (right-aligned buttons)."
        },
        {
          "name": "AlertDialog (Root)",
          "type": "Base UI AlertDialog.Root props (open, defaultOpen, onOpenChange)",
          "description": "Root for a confirmation that needs an answer. Always modal; the popup is role=\"alertdialog\" and a click outside does not dismiss — only an AlertDialogClose, an action that sets open to false, or Esc. Returns focus on close to the element focused when it opened, exactly as Dialog does."
        },
        {
          "name": "AlertDialogTrigger",
          "type": "Base UI AlertDialog.Trigger props (render)",
          "description": "Opens the alert dialog."
        },
        {
          "name": "AlertDialogContent / AlertDialogOverlay / AlertDialogTitle / AlertDialogDescription / AlertDialogHeader / AlertDialogFooter / AlertDialogClose",
          "type": "Same props as the matching Dialog part",
          "description": "The Dialog parts under AlertDialog names — Base UI shares the popup, backdrop, title, description and close parts between the two, so the surface is identical. Pass initialFocus to AlertDialogContent (a ref to the Cancel button) to open focus on the safe action."
        }
      ],
      "variants": {
        "size": [
          "default",
          "lg",
          "fullscreen"
        ]
      },
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "muted-foreground",
        "overlay",
        "overlay-foreground",
        "accent",
        "accent-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-fade",
          "part": "DialogOverlay",
          "why": "The scrim is what tells the reader the page behind is no longer live. Appearing at full opacity in one frame reads as a page navigation — the surrounding context vanishes instead of receding."
        },
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "DialogContent",
          "why": "The panel scales up as the scrim darkens, so the two read as one event. Overlay and panel arriving on separate timings is the most common way a modal feels cheap."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "DialogClose",
          "why": "The close affordance is a small icon in a corner and is often the only control a reader looks for. Its hover state has to be findable, not just present."
        },
        {
          "slot": "transition",
          "recipe": "motion-pop",
          "part": "DialogContent",
          "why": "Exit runs the same recipe in reverse so dismissal is legibly the inverse of opening. A modal that fades out having scaled in leaves the reader unsure whether it closed or navigated away."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "DialogContent",
          "why": "The dialog is a container. Work happening inside it is the content's to report — a dialog-level indicator would claim the whole surface is busy when usually one field is."
        }
      ],
      "a11y": [
        "Base UI provides focus trapping, scroll lock, aria-modal, and labelled-by wiring (DialogTitle).",
        "Content taller than the viewport scrolls inside the dialog (thin scrollbar, contained overscroll) rather than overflowing off screen — the page behind is scroll-locked, so anything past the edge would be unreachable.",
        "On close, focus returns to the element that held it when the dialog opened, whether a DialogTrigger opened it or your own button set a controlled open. It is captured before the content mounts, so an autoFocus field inside cannot displace it. If that element has left the page, Base UI's default (the trigger, if any) applies; an explicit finalFocus on the content always wins. AlertDialog and Sheet behave the same.",
        "keepMounted hides closed content with the hidden attribute, so a kept draft is out of the accessibility tree and the tab order until the dialog reopens.",
        "Esc and click-outside dismiss by default. AlertDialog keeps Esc but ignores click-outside, and its popup is role=\"alertdialog\".",
        "Animate via data-[starting-style]/data-[ending-style] attributes.",
        "size=\"fullscreen\" has no title chrome, so name the popup yourself: aria-label on DialogContent (or a visually hidden DialogTitle), plus alt text on the media — the zoomed image is a separate image to assistive technology. Its built-in close button carries aria-label=\"Close\" and clears the safe-area insets (notch, home indicator)."
      ],
      "examples": [
        {
          "label": "Fullscreen media",
          "code": "<Dialog><DialogTrigger render={<Button variant=\"secondary\">View full size</Button>} /><DialogContent size=\"fullscreen\" aria-label=\"Studio, 2026\"><img src={url} alt=\"Studio, 2026\" className=\"max-h-full max-w-full object-contain p-8\" /></DialogContent></Dialog>",
          "imports": "import { Button, Dialog, DialogContent, DialogTrigger } from \"@sableui/react\""
        },
        {
          "label": "Fullscreen gallery",
          "code": "<Dialog><DialogTrigger render={<Button>Open gallery</Button>} /><DialogContent size=\"fullscreen\" aria-label=\"Gallery\"><Carousel loop dots counter label=\"Gallery\" className=\"w-full max-w-4xl px-8\">{images.map((src) => <img key={src} src={src} alt=\"\" className=\"size-full object-contain\" />)}</Carousel></DialogContent></Dialog>",
          "imports": "import { Button, Carousel, Dialog, DialogContent, DialogTrigger } from \"@sableui/react\""
        },
        {
          "label": "Basic",
          "code": "<Dialog><DialogTrigger render={<Button>Open</Button>} /><DialogContent><DialogHeader><DialogTitle>Plan details</DialogTitle><DialogDescription>Up to 10 seats, billed monthly per seat.</DialogDescription></DialogHeader><DialogFooter><DialogClose render={<Button variant=\"secondary\">Close</Button>} /><DialogClose render={<Button>Upgrade</Button>} /></DialogFooter></DialogContent></Dialog>",
          "imports": "import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from \"@sableui/react\""
        },
        {
          "label": "Settings form",
          "code": "<Dialog><DialogTrigger render={<Button variant=\"secondary\">Rename collection</Button>} /><DialogContent showCloseButton><DialogHeader><DialogTitle>Rename collection</DialogTitle><DialogDescription>Update the display name shown to collectors.</DialogDescription></DialogHeader><Form><Field label=\"Collection name\"><Input defaultValue=\"Midnight Archive\" /></Field><DialogFooter><DialogClose render={<Button variant=\"secondary\">Cancel</Button>} /><Button type=\"submit\">Save changes</Button></DialogFooter></Form></DialogContent></Dialog>",
          "imports": "import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Field, Form, Input } from \"@sableui/react\""
        },
        {
          "label": "Opened from your own button, keeping a draft",
          "code": "const [open, setOpen] = useState(false)\n\n<Button variant=\"secondary\" onClick={() => setOpen(true)}>New message</Button>\n<Dialog open={open} onOpenChange={setOpen}>\n\t<DialogContent keepMounted showCloseButton>\n\t\t<DialogHeader>\n\t\t\t<DialogTitle>New message</DialogTitle>\n\t\t\t<DialogDescription>Close it any time. Your draft is here when you come back.</DialogDescription>\n\t\t</DialogHeader>\n\t\t<Field label=\"Message\"><Textarea /></Field>\n\t\t<DialogFooter>\n\t\t\t<DialogClose render={<Button variant=\"secondary\">Close</Button>} />\n\t\t\t<Button onClick={() => setOpen(false)}>Send</Button>\n\t\t</DialogFooter>\n\t</DialogContent>\n</Dialog>",
          "imports": "import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Field, Textarea } from \"@sableui/react\""
        },
        {
          "label": "Destructive confirmation",
          "code": "<AlertDialog><AlertDialogTrigger render={<Button variant=\"destructive\">Delete project</Button>} /><AlertDialogContent><AlertDialogHeader><AlertDialogTitle>Delete project?</AlertDialogTitle><AlertDialogDescription>This removes the project and cannot be undone.</AlertDialogDescription></AlertDialogHeader><AlertDialogFooter><AlertDialogClose render={<Button variant=\"secondary\">Cancel</Button>} /><Button variant=\"destructive\" onClick={deleteProject}>Delete project</Button></AlertDialogFooter></AlertDialogContent></AlertDialog>",
          "imports": "import { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, Button } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "DisclosurePicker",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/disclosure-picker",
      "summary": "A property row that names the current value and opens its list in place, beneath the row, instead of in a popup — for a tool panel or settings column where the choice is made while looking at what it changes. Built on Collapsible; the list is a listbox — arrow keys move, Enter or a click picks, applies and closes — and an optional search field filters long lists.",
      "keywords": [
        "disclosure picker",
        "inline picker",
        "in-place select",
        "expanding list",
        "property row",
        "font picker",
        "preset picker",
        "inspector",
        "picker row"
      ],
      "usage": {
        "description": "Use DisclosurePicker for one-of-many choices in a docked panel or inspector where a popup would cover the preview the choice is about: the row shows the current value (in its own face, with a tile, as the content warrants), and the list opens beneath it, pushing the panel down. Use Select for a form field or anywhere a popup is fine; use Combobox when people type to find an option among hundreds; use RadioGroup or RadioCard when every option should stay visible. Nothing applies while arrowing through the list — only Enter, Space or a click picks — so it suits choices with a cost (a confirm, a font load, a reset); where each option should apply as focus lands on it, that is a radio group (ThemeSelector, RadioGroup).",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Enable search (`search` on DisclosurePickerPanel) only for long lists — roughly a dozen options or more, i.e. once the list scrolls. A short list (a handful of presets) reads faster with no field to skip past; the panel then has no search row and no gap."
          },
          {
            "guidance": "do",
            "description": "Show the value as the thing it is: a font row renders the family in its own face, a theme row leads with a ThemePreview tile in `media`. The row is a preview of the choice, not a label for it."
          },
          {
            "guidance": "do",
            "description": "Use `size=\"xs\"` in a property grid (a compact Density / PanelSection), where it sits on the inset panel-field fill beside ScrubField and an xs SelectTrigger. Keep `md` in a settings column or a simple panel."
          },
          {
            "guidance": "do",
            "description": "When several rows share a panel, control `open` from the parent so only one list is open at a time — two open lists push each other and the preview out of view."
          },
          {
            "guidance": "do",
            "description": "Use it for a choice with a cost — one that opens a confirm, loads something, or resets other settings. Arrow keys only move focus; onValueChange fires once, on Enter, Space or a click, and only when the pick differs from `value`."
          },
          {
            "guidance": "do",
            "description": "Give options a leading visual with `media` (a ThemePreview tile, a swatch) instead of nesting another component's list: ThemeSelector's radio list applies each theme as the arrow keys land on it, which defeats commit-on-Enter. A list the picker cannot express (a Tree) can still close the row with `useDisclosurePicker().close()`."
          },
          {
            "guidance": "do",
            "description": "Render DisclosurePickerEmpty in place of the list when a search matches nothing, not inside it — a listbox holds only options."
          },
          {
            "guidance": "dont",
            "description": "Use it in a page-register form. A form field that pushes the form down on open reads as a layout jump; that is Select's job.",
            "instead": [
              "Select"
            ]
          },
          {
            "guidance": "dont",
            "description": "Rebuild the row from a Collapsible with hand-copied classes. The disclosure, the well, the hover step, the xs field shell, focus return and scroll-into-view all live here; two hand copies of this row in one panel is how it came to exist."
          },
          {
            "guidance": "dont",
            "description": "Turn search on for a short list just because the other rows have it. A search field over six options is a control with nothing to do."
          }
        ],
        "anatomy": [
          {
            "name": "DisclosurePicker",
            "required": true,
            "description": "Root. Owns open state, size, focus return and scroll-into-view."
          },
          {
            "name": "DisclosurePickerTrigger",
            "required": true,
            "description": "The row: optional `label` caption, optional `media`, the value, and a chevron that flips when open."
          },
          {
            "name": "DisclosurePickerPanel",
            "required": true,
            "description": "What opens beneath the row: the opt-in search field, then the list."
          },
          {
            "name": "DisclosurePickerList",
            "required": false,
            "description": "A listbox of options that scrolls past 16rem. Arrow keys move; Enter, Space or a click picks."
          },
          {
            "name": "DisclosurePickerOption",
            "required": false,
            "description": "One option row, with optional leading media and trailing note. Chosen, it lifts out of the well; focused, it takes the ring."
          },
          {
            "name": "DisclosurePickerEmpty",
            "required": false,
            "description": "The no-match line, rendered in place of the list when a search filters everything out."
          }
        ]
      },
      "related": {
        "components": [
          "Collapsible",
          "Select",
          "Combobox",
          "SearchInput",
          "RadioGroup",
          "ThemeSelector",
          "FontPicker",
          "PropertyRow"
        ]
      },
      "props": [
        {
          "name": "open",
          "type": "boolean",
          "description": "Controlled open state. Pair with onOpenChange."
        },
        {
          "name": "defaultOpen",
          "type": "boolean",
          "default": "false",
          "description": "Uncontrolled initial open state."
        },
        {
          "name": "onOpenChange",
          "type": "(open: boolean) => void",
          "description": "Called with the next open state — from the trigger, a pick, or Escape."
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | \"xs\"",
          "default": "\"md\"",
          "description": "md is a --control-md row (40px comfortable) in a settings column, its own well when closed. sm is the same row one rung down (--control-sm), for a toolbar beside sm Selects and buttons. xs is the property-grid rung: a --control-xs row on the inset panel-field fill with ui-tier type. Height, padding, radius, type and surface move together."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merged onto the root (layout only — the look comes from size)."
        },
        {
          "name": "name",
          "type": "string",
          "description": "Submits `value` with a form under this name, through a visually hidden input that stays mounted while the row is closed (the list that holds the value does not). The submitted string is the chosen option's value, exactly as given."
        },
        {
          "name": "value",
          "type": "string",
          "description": "The value submitted under `name` — pass the same value the list holds."
        },
        {
          "name": "form",
          "type": "string",
          "description": "Id of a form elsewhere on the page that the value belongs to."
        },
        {
          "name": "required",
          "type": "boolean",
          "description": "Blocks native form submission while `value` is empty; the browser's message focuses the row."
        },
        {
          "name": "id / aria-describedby / aria-invalid",
          "type": "string / string / boolean",
          "description": "Land on the trigger, the labelable control, not the root — so a wrapping Field's label names the row and its description and error are announced with it."
        }
      ],
      "subcomponents": [
        {
          "name": "DisclosurePickerTrigger",
          "type": "{ label?: ReactNode; media?: ReactNode; children?: ReactNode } + Base UI Collapsible.Trigger props",
          "description": "The row. `label` is a muted leading caption on a fixed column so stacked rows align; `media` a leading visual (a ThemePreview tile); children the value, truncated on one line. ArrowDown opens it, and steps into the list once open."
        },
        {
          "name": "DisclosurePickerPanel",
          "type": "{ search?: { value: string; onValueChange(value: string): void; placeholder?: string; label?: string } } + Collapsible.Panel props",
          "description": "Opens beneath the row. `search` opts in to a SearchInput above the list (off by default); it is controlled because the consumer filters, and it is cleared when the row closes. Escape clears a query first, then closes; ArrowDown in the field steps into the list."
        },
        {
          "name": "DisclosurePickerList",
          "type": "{ value: string; onValueChange(value: string): void; aria-label?: string } + div props",
          "description": "A listbox. ArrowUp/ArrowDown, Home/End and type-ahead move focus without applying anything (ArrowUp from the first option returns to the search field); Enter, Space or a click picks the focused option — onValueChange fires once, only when it differs from `value` — and closes the row. Escape closes without a pick."
        },
        {
          "name": "DisclosurePickerOption",
          "type": "{ value: string; children?: ReactNode; media?: ReactNode; note?: ReactNode; disabled?: boolean; textValue?: string; onRemove?: () => void; removeLabel?: string }",
          "description": "One option row. `media` is a leading visual (a ThemePreview tile); `note` a muted trailing annotation — options without one show a check when chosen. `disabled` skips it for the keyboard and refuses the pick; `textValue` is what type-ahead matches when the name is not plain text. `onRemove` makes the option removable — for entries the person added (an imported preset, a saved font): a trash glyph at the row's end on hover or focus (always on touch), and Delete or Backspace on the focused row; removing never picks, and focus moves to a neighbour first. `removeLabel` is the glyph's tooltip."
        },
        {
          "name": "DisclosurePickerEmpty",
          "type": "{ children?: ReactNode }",
          "description": "The no-match line, rendered in place of the list."
        },
        {
          "name": "useDisclosurePicker",
          "type": "() => { open: boolean; close(): void; size: \"md\" | \"sm\" | \"xs\" }",
          "description": "For a list the picker does not own (a Tree) that should close the row when something is picked."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "popover",
        "hairline",
        "panel-field",
        "panel-field-hover",
        "ring",
        "accent"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "root",
          "why": "A property row is present from first paint; animating it in would stage chrome the user is already scanning."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "DisclosurePickerTrigger",
          "why": "The row reads as a value, not a button; the hover step is what says it opens before it is clicked."
        },
        {
          "slot": "transition",
          "recipe": "motion-disclosure",
          "part": "DisclosurePickerPanel",
          "why": "The list pushes the panel down; growing its height ties the movement below to this row rather than to a layout jump."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "Nothing is indeterminate: the options are resident. A list that loads should show its own loader inside the panel."
        }
      ],
      "a11y": [
        "The trigger is a real <button>; Base UI wires aria-expanded and aria-controls to the panel. Its accessible name is its text (caption + value) unless an aria-label is given.",
        "The list is role=\"listbox\" with role=\"option\" rows; aria-selected marks the committed value, not the focused row, so a screen reader hears both where focus is and what is chosen. Selection does not follow focus: ArrowUp/ArrowDown, Home/End and type-ahead move focus (roving tabindex — one tab stop, so Tab leaves the list in one step) and apply nothing; Enter, Space or a click picks, applies and closes. Disabled options carry aria-disabled and are skipped.",
        "Why a listbox and not a radio group: a radio group's checked state follows focus, so every arrow press would be a pick — wrong for a choice that opens a confirm, loads a font or resets settings. Base UI ships no standalone listbox (Select is popup-only, Combobox's inline list is focus-in-the-input, Composite is internal), so the keyboard model lives here.",
        "Opening from the keyboard (Enter, Space, ArrowDown) moves focus into the panel: the search field when there is one, otherwise the chosen option (or the first). A pointer open focuses the search field on a fine pointer only, so touch does not raise the on-screen keyboard.",
        "Escape closes the row without changing the value (clearing a query first) and returns focus to the trigger; a pick does the same. Focus is not pulled back when it has already moved on, e.g. to a confirm dialog the pick opened.",
        "A removable option (onRemove) announces aria-keyshortcuts=\"Delete\"; Delete or Backspace removes it and focus moves to the next option (or the previous). The trash glyph is a pointer target only (aria-hidden, not focusable): an option's children are presentational, so a nested button would be unreachable by assistive tech anyway.",
        "Inside a Field, the id, aria-describedby and aria-invalid it clones go to the trigger, so the label names the row. With `name`, the submitted value lives in a visually hidden input that is out of the tab order and aria-hidden; when `required` fails, the browser hands focus to the trigger.",
        "The panel animates with motion-disclosure, which is static under prefers-reduced-motion or MotionProvider off; the scroll that keeps the row in view is instant, never smooth."
      ],
      "examples": [
        {
          "label": "In a form",
          "code": "<Field label=\"Text size\" required>\n  <DisclosurePicker name=\"text-size\" value={textSize}>\n    <DisclosurePickerTrigger>{textSize}</DisclosurePickerTrigger>\n    <DisclosurePickerPanel>\n      <DisclosurePickerList aria-label=\"Text size\" value={textSize} onValueChange={setTextSize}>\n        <DisclosurePickerOption value=\"Small\">Small</DisclosurePickerOption>\n        <DisclosurePickerOption value=\"Medium\">Medium</DisclosurePickerOption>\n        <DisclosurePickerOption value=\"Large\">Large</DisclosurePickerOption>\n      </DisclosurePickerList>\n    </DisclosurePickerPanel>\n  </DisclosurePicker>\n</Field>",
          "imports": "import { DisclosurePicker, DisclosurePickerList, DisclosurePickerOption, DisclosurePickerPanel, DisclosurePickerTrigger, Field } from \"@sableui/react\""
        },
        {
          "label": "A short list — no search",
          "code": "const [preset, setPreset] = useState(\"comfortable\")\nconst [open, setOpen] = useState(false)\n<DisclosurePicker open={open} onOpenChange={setOpen} className=\"w-72\">\n  <DisclosurePickerTrigger label=\"Density\">{preset === \"compact\" ? \"Compact\" : \"Comfortable\"}</DisclosurePickerTrigger>\n  <DisclosurePickerPanel>\n    <DisclosurePickerList aria-label=\"Density\" value={preset} onValueChange={setPreset}>\n      <DisclosurePickerOption value=\"comfortable\">Comfortable</DisclosurePickerOption>\n      <DisclosurePickerOption value=\"compact\">Compact</DisclosurePickerOption>\n    </DisclosurePickerList>\n  </DisclosurePickerPanel>\n</DisclosurePicker>",
          "imports": "import { DisclosurePicker, DisclosurePickerList, DisclosurePickerOption, DisclosurePickerPanel, DisclosurePickerTrigger } from \"@sableui/react\""
        },
        {
          "label": "A long list — search opted in",
          "code": "const COUNTRIES = [\"Argentina\", \"Australia\", \"Austria\", \"Belgium\", \"Brazil\", \"Canada\", \"Chile\", \"Denmark\", \"Finland\", \"France\", \"Germany\", \"Ireland\", \"Italy\", \"Japan\", \"Mexico\", \"Norway\", \"Portugal\", \"Spain\", \"Sweden\"]\nconst [country, setCountry] = useState(\"Canada\")\nconst [query, setQuery] = useState(\"\")\nconst shown = COUNTRIES.filter((name) => name.toLowerCase().includes(query.trim().toLowerCase()))\n<DisclosurePicker className=\"w-72\">\n  <DisclosurePickerTrigger label=\"Country\">{country}</DisclosurePickerTrigger>\n  <DisclosurePickerPanel search={{ value: query, onValueChange: setQuery, placeholder: `Search ${COUNTRIES.length} countries` }}>\n    {shown.length > 0 ? (\n      <DisclosurePickerList aria-label=\"Country\" value={country} onValueChange={setCountry}>\n        {shown.map((name) => (\n          <DisclosurePickerOption key={name} value={name}>{name}</DisclosurePickerOption>\n        ))}\n      </DisclosurePickerList>\n    ) : (\n      <DisclosurePickerEmpty>No countries match “{query}”.</DisclosurePickerEmpty>\n    )}\n  </DisclosurePickerPanel>\n</DisclosurePicker>",
          "imports": "import { DisclosurePicker, DisclosurePickerEmpty, DisclosurePickerList, DisclosurePickerOption, DisclosurePickerPanel, DisclosurePickerTrigger } from \"@sableui/react\""
        },
        {
          "label": "A theme picker — media tiles, commit on Enter",
          "code": "const { themeId, setThemeId, themes, mode } = useSableTheme()\nconst current = themes.find((theme) => theme.id === themeId)\n<DisclosurePicker>\n  <DisclosurePickerTrigger aria-label={`Theme: ${current?.label}`} media={current ? <ThemePreview theme={current} mode={mode} size=\"sm\" /> : null}>\n    {current?.label}\n  </DisclosurePickerTrigger>\n  <DisclosurePickerPanel>\n    <DisclosurePickerList aria-label=\"Theme\" value={themeId} onValueChange={setThemeId}>\n      {themes.map((theme) => (\n        <DisclosurePickerOption key={theme.id} value={theme.id} media={<ThemePreview theme={theme} mode={mode} size=\"sm\" />}>\n          {theme.label}\n        </DisclosurePickerOption>\n      ))}\n    </DisclosurePickerList>\n  </DisclosurePickerPanel>\n</DisclosurePicker>",
          "imports": "import { DisclosurePicker, DisclosurePickerList, DisclosurePickerOption, DisclosurePickerPanel, DisclosurePickerTrigger, ThemePreview, useSableTheme } from \"@sableui/react\""
        },
        {
          "label": "Property-grid rung",
          "code": "const [blend, setBlend] = useState(\"normal\")\n<Density value=\"compact\" className=\"w-64\">\n  <DisclosurePicker size=\"xs\">\n    <DisclosurePickerTrigger label=\"Blend\">{blend}</DisclosurePickerTrigger>\n    <DisclosurePickerPanel>\n      <DisclosurePickerList aria-label=\"Blend mode\" value={blend} onValueChange={setBlend}>\n        <DisclosurePickerOption value=\"normal\">normal</DisclosurePickerOption>\n        <DisclosurePickerOption value=\"multiply\">multiply</DisclosurePickerOption>\n        <DisclosurePickerOption value=\"screen\">screen</DisclosurePickerOption>\n      </DisclosurePickerList>\n    </DisclosurePickerPanel>\n  </DisclosurePicker>\n</Density>",
          "imports": "import { Density, DisclosurePicker, DisclosurePickerList, DisclosurePickerOption, DisclosurePickerPanel, DisclosurePickerTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "EmptyState",
      "status": "stable",
      "group": "Status",
      "register": "page",
      "path": "components/empty-state",
      "summary": "The centered empty / error block: optional icon or error code, title, description and an action. tone=\"destructive\" makes it an announced error, size=\"lg\" a page-level state, surface=\"card\" a self-contained card.",
      "keywords": [
        "empty",
        "zero state",
        "blank slate",
        "no results",
        "placeholder",
        "onboarding",
        "no data"
      ],
      "usage": {
        "description": "Use EmptyState when a content area has no items, no search results, or no first-time setup yet. The title should name the empty condition and the description/action should give the user a next step.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Explain what is empty in plain language, such as \"No posts yet\" or \"No matching customers\"."
          },
          {
            "guidance": "do",
            "description": "Offer one next step when the user can recover, create, clear filters, or start setup."
          },
          {
            "guidance": "do",
            "description": "Keep the icon decorative and make the title carry the meaning."
          },
          {
            "guidance": "do",
            "description": "For a search or filter result, name the query back to the user and offer the way out, such as \"No results for 'quarterly'\" with a Clear filters action. An empty result that does not say what was searched leaves the user unsure whether the query or the data was wrong."
          },
          {
            "guidance": "dont",
            "description": "Use generic copy like \"No data\"; it gives users and agents no useful path forward."
          },
          {
            "guidance": "dont",
            "description": "Park anything the user needs permanently here, such as setup instructions, billing notices, or keyboard shortcuts. An empty state is the one surface guaranteed to disappear the moment content exists, so information that matters after the first item is lost exactly when the user has learned enough to want it."
          },
          {
            "guidance": "dont",
            "description": "Use it for a field's validation error — that is Field error messaging. Reserve tone=\"destructive\" for a view or block that failed to load."
          }
        ],
        "anatomy": [
          {
            "name": "Icon",
            "required": false,
            "description": "A decorative cue that reinforces the empty condition."
          },
          {
            "name": "Title",
            "required": true,
            "description": "The short message naming what is empty."
          },
          {
            "name": "Description",
            "required": false,
            "description": "Supporting copy that explains why the state exists or what to try next."
          },
          {
            "name": "Action",
            "required": false,
            "description": "One clear button or link that moves the user forward."
          }
        ]
      },
      "related": {
        "components": [
          "Button",
          "Icon",
          "Card",
          "Banner",
          "DataTable"
        ],
        "patterns": [
          "FeedPage",
          "ListDetailPage",
          "DashboardPage"
        ]
      },
      "props": [
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "Optional glyph above the title — an `<Icon />` takes the muted ink at 3xl; an image or illustration renders as given."
        },
        {
          "name": "title",
          "type": "ReactNode",
          "description": "The headline. Short and direct."
        },
        {
          "name": "description",
          "type": "ReactNode",
          "description": "Optional supporting line beneath the title."
        },
        {
          "name": "action",
          "type": "ReactNode",
          "description": "Optional action below the copy — typically a `<Button />`."
        },
        {
          "name": "code",
          "type": "ReactNode",
          "description": "A large figure above the title, such as an error code (404)."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"destructive\"",
          "default": "\"neutral\"",
          "description": "destructive is an error state: a destructive icon (a warning by default) and role=\"alert\" so it is announced."
        },
        {
          "name": "size",
          "type": "\"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "lg is page-level: the title is an h2 and the block takes more room. md sits in a panel, list or card."
        },
        {
          "name": "surface",
          "type": "\"none\" | \"card\"",
          "default": "\"none\"",
          "description": "card draws it as a Card, for an error or empty block standing on its own in a page."
        }
      ],
      "variants": {
        "tone": [
          "neutral",
          "destructive"
        ],
        "size": [
          "md",
          "lg"
        ],
        "surface": [
          "none",
          "card"
        ]
      },
      "tokensUsed": [
        "muted",
        "muted-foreground",
        "foreground",
        "destructive"
      ],
      "a11y": [
        "Decorative icons should not carry meaning the title doesn't already convey.",
        "Pair with an actionable next step so the zero-state is a path forward, not a dead end."
      ],
      "examples": [
        {
          "label": "With icon and action",
          "code": "<EmptyState icon={<Icon name=\"info\" />} title=\"No posts yet\" description=\"Create your first.\" action={<Button>New post</Button>} />",
          "imports": "import { Button, EmptyState, Icon } from \"@sableui/react\""
        },
        {
          "label": "No search results",
          "code": "<EmptyState icon={<Icon name=\"search\" />} title=\"No matching posts\" description=\"Try a different keyword or clear your filters.\" action={<Button variant=\"secondary\">Clear filters</Button>} />",
          "imports": "import { Button, EmptyState, Icon } from \"@sableui/react\""
        },
        {
          "label": "First-run setup",
          "code": "<EmptyState surface=\"card\" icon={<Icon name=\"sparkles\" />} title=\"Start your first project\" description=\"Create a project, import one from a file, or invite collaborators.\" action={<Row gap={1}><Button>Create project</Button><Button variant=\"ghost\">Import</Button></Row>} />",
          "imports": "import { Button, EmptyState, Icon, Row } from \"@sableui/react\""
        },
        {
          "label": "Page-level error",
          "code": "<EmptyState tone=\"destructive\" size=\"lg\" code=\"404\" title=\"Page not found\" description=\"The page you are looking for has moved or never existed.\" action={<Button>Go home</Button>} />",
          "imports": "import { Button, EmptyState } from \"@sableui/react\""
        },
        {
          "label": "Error card",
          "code": "<EmptyState tone=\"destructive\" surface=\"card\" title=\"Could not load this project\" description=\"Check your connection and try again.\" action={<Button variant=\"secondary\">Retry</Button>} />",
          "imports": "import { Button, EmptyState } from \"@sableui/react\""
        },
        {
          "label": "Empty table body",
          "code": "<DataTable data={[]} columns={[{ key: \"name\", header: \"Customer\" }, { key: \"status\", header: \"Status\" }]} empty={<EmptyState title=\"No customers yet\" description=\"Customers appear here after the first order.\" />} />",
          "imports": "import { DataTable, EmptyState } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Entity",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/entity",
      "summary": "A list-row record: leading visual + title/subtitle column + trailing action, with truncating text. Presentational by default (no hover); `interactive` rows gain the hover highlight, focus ring, and keyboard activation, and `selected` marks the current one. Compact/comfortable density.",
      "keywords": [
        "entity",
        "identity",
        "object",
        "avatar row"
      ],
      "usage": {
        "description": "Use Entity to show a compact identity block for a person, organization, file, project, or other object.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use a clear title and one or two useful metadata lines."
          },
          {
            "guidance": "do",
            "description": "Pair with Avatar or Badge (dot for a status) when identity needs state or type."
          },
          {
            "guidance": "do",
            "description": "For a list, stack Entity rows directly in a column; each row owns its padding. For a list in a card, put the rows in CardList, which insets them to the card's own padding and divides them, so the rows line up with the card's header instead of being tuned by hand with px-* classes."
          },
          {
            "guidance": "dont",
            "description": "Do not use Entity for long descriptions, editable fields, or full card content."
          },
          {
            "guidance": "dont",
            "description": "Do not wrap an Entity in your own <a> or router Link to make it navigate. The trailing action would nest inside the link, which is invalid and unreachable by keyboard. Pass interactive with render={<Link to=\"…\" />} instead: the row's target becomes the link and the action stays outside it."
          }
        ]
      },
      "related": {
        "components": [
          "Avatar",
          "Badge"
        ]
      },
      "props": [
        {
          "name": "leading",
          "type": "ReactNode",
          "description": "Leading visual — typically an Avatar or an Icon."
        },
        {
          "name": "title",
          "type": "ReactNode",
          "description": "Primary line (text-title-sm, truncated). Required."
        },
        {
          "name": "subtitle",
          "type": "ReactNode",
          "description": "Secondary line (text-body-sm muted, truncated)."
        },
        {
          "name": "subtitleWrap",
          "type": "boolean",
          "default": "false",
          "description": "Let the subtitle wrap instead of truncating, when it is a description rather than a label."
        },
        {
          "name": "action",
          "type": "ReactNode",
          "description": "Trailing slot — typically a ghost icon Button or a StatusDot."
        },
        {
          "name": "interactive",
          "type": "boolean",
          "default": "false",
          "description": "Make the whole row a target: the leading visual and text become a native <button> (or the element render gives, such as a router link) whose hit area stretches over the row (focus ring, Enter/Space). The action stays outside it. Pair with onSelect, or with render for a row that navigates."
        },
        {
          "name": "onSelect",
          "type": "() => void",
          "description": "Activation handler for an interactive row (fired on click and Enter/Space). Optional when render makes the row a link."
        },
        {
          "name": "render",
          "type": "useRender.RenderProp",
          "description": "Interactive rows only: render the row's target as another element, typically the router's link (render={<Link to=\"/people/42\" />}) so a list–detail row navigates. Defaults to a <button>. The trailing action stays outside the link."
        },
        {
          "name": "selected",
          "type": "boolean",
          "default": "false",
          "description": "Interactive rows only: the current row of a selectable list (the record open in a list–detail view). Sets aria-current on the row's target (\"page\" when render makes it a link, \"true\" for a button) and paints the selected fill, a step off the surface the row sits on, which holds on hover."
        },
        {
          "name": "density",
          "type": "\"compact\" | \"comfortable\"",
          "default": "\"compact\"",
          "description": "Row padding: compact (12px × 10px, the default) or comfortable (16px × 12px), on the spacing scale. The insets read --entity-px / --entity-py first, which CardList sets from the card's own padding so rows in a card line up with its header."
        }
      ],
      "variants": {
        "density": [
          "compact",
          "comfortable"
        ]
      },
      "tokensUsed": [
        "accent",
        "accent-foreground",
        "foreground",
        "muted-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Rows arrive with the list they belong to. Entering one at a time is a stagger, and a stagger on a list someone opened to scan is a delay."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "Only the interactive row reacts: its hover fill, a step off the surface it sits on, eases in. A static row never fakes clickability, and an interactive one answers the pointer without flicker as it moves down a list."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "`selected` eases the fill onto the current row of a list–detail view, so opening another record reads as the selection moving rather than two rows flashing."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A record row has nothing of its own to wait for. A row whose action is pending puts a loading Button in `action`."
        }
      ],
      "a11y": [
        "Default rows are presentational layout; semantics come from the content you place in title/subtitle/action.",
        "interactive rows render a real <button> around the leading visual and text, with its ::after stretched over the whole row — native focus, a focus-visible ring, and Enter/Space. The action slot sits outside that button and above the overlay, so a Button there stays valid HTML and keeps its own clicks.",
        "Give any interactive action an accessible label (e.g. aria-label on a ghost icon Button).",
        "A selected row announces aria-current on its target (\"true\" on a button, \"page\" on a link, detected from an <a> or a render element with href or to), so the current record is spoken, not only shown by its fill."
      ],
      "examples": [
        {
          "label": "Person row",
          "code": "<Entity leading={<Avatar fallback=\"AM\" />} title=\"Alex Morgan\" subtitle=\"@alex\" action={<Button variant=\"ghost\" size=\"icon\" aria-label=\"More\"><Icon name=\"ellipsis\" /></Button>} />",
          "imports": "import { Avatar, Button, Entity, Icon } from \"@sableui/react\""
        },
        {
          "label": "Row that navigates",
          "code": "<Entity interactive selected={active} render={<a href=\"/people/alex\" />} leading={<Avatar fallback=\"AM\" />} title=\"Alex Morgan\" subtitle=\"@alex\" action={<Button variant=\"ghost\" size=\"icon\" aria-label=\"More\"><Icon name=\"ellipsis\" /></Button>} />",
          "imports": "import { Avatar, Button, Entity, Icon } from \"@sableui/react\""
        },
        {
          "label": "Interactive (selectable) row",
          "code": "<Entity interactive onSelect={() => selectUser(user)} leading={<Avatar fallback=\"AM\" />} title=\"Alex Morgan\" subtitle=\"@alex\" />",
          "imports": "import { Avatar, Entity } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Feedback",
      "status": "stable",
      "composition": "Popover, Textarea, ToggleGroup, Button",
      "group": "Overlays",
      "register": "page",
      "path": "components/feedback",
      "summary": "A compact feedback popover. Composes Popover + Textarea + Button + Toggle into a rating row plus a message field; submitting reports the rating + message, shows a brief drawn-check thanks, and closes the popover.",
      "keywords": [
        "feedback",
        "sentiment",
        "rating",
        "prompt"
      ],
      "usage": {
        "description": "Use Feedback to collect lightweight sentiment, usefulness, or quality signals from users.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Ask for feedback at a moment when the user has enough context to answer."
          },
          {
            "guidance": "do",
            "description": "Keep the prompt short and optional unless feedback is required by the workflow."
          },
          {
            "guidance": "dont",
            "description": "Do not use Feedback for errors, alerts, or required support forms."
          },
          {
            "guidance": "dont",
            "description": "Do not require the message field. Most feedback is a rating with no comment, and forcing prose is how a feedback control stops being used."
          }
        ]
      },
      "related": {
        "components": [
          "Toast",
          "Banner",
          "Form"
        ]
      },
      "props": [
        {
          "name": "label",
          "type": "string",
          "default": "\"Feedback\"",
          "description": "Trigger button text."
        },
        {
          "name": "heading",
          "type": "string",
          "default": "\"Send feedback\"",
          "description": "Heading shown above the rating row."
        },
        {
          "name": "placeholder",
          "type": "string",
          "default": "\"What can we improve?\"",
          "description": "Placeholder for the message field."
        },
        {
          "name": "submitLabel",
          "type": "string",
          "default": "\"Send\"",
          "description": "Submit button text."
        },
        {
          "name": "ratingLabel",
          "type": "string",
          "default": "\"Rating\"",
          "description": "Accessible name of the row of rating toggles. Each toggle is named by its rating's value."
        },
        {
          "name": "ratings",
          "type": "FeedbackRating[]",
          "default": "🙁 / 😐 / 🙂",
          "description": "The rating options shown as a row of toggles. Each is { value, label }."
        },
        {
          "name": "onSubmit",
          "type": "(data: { rating?: string; message: string }) => void",
          "description": "Called with the selected rating + message when the form is submitted. The thanks shows right away; send the report in the background."
        },
        {
          "name": "successMessage",
          "type": "string",
          "default": "\"Thanks for the feedback.\"",
          "description": "The line shown, and read out, for about 1.2s after sending, before the popover closes on its own."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The drawn check is the flourish; the thanks line and its dwell stay."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "input",
        "card",
        "foreground",
        "muted-foreground",
        "accent",
        "accent-foreground",
        "ring",
        "success",
        "success-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "Popover",
          "why": "The form opens from its trigger, so the eye goes from the button it pressed to the field it should type in. Popover owns the recipe."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Rating toggles",
          "why": "The rating row is a choice among a few similar marks. The eased selected fill is what makes the pick read as made, not just hovered."
        },
        {
          "slot": "response",
          "recipe": "motion-bloom",
          "part": "Chosen rating mark",
          "why": "The mark itself answers the pick: it blooms past its size and settles, so choosing reads as a small decision landing rather than a fill changing. Only the chosen mark, only on choosing — nothing blooms when the form opens or a pick is let go. Expressive: under subtle the fill alone answers."
        },
        {
          "slot": "transition",
          "recipe": "motion-tick",
          "part": "Thanks",
          "why": "Sending is the one moment the person needs to know their words arrived. The form fades out in place and a check draws itself in over it, then the popover closes. Without it the popover just vanished, which looks the same as the form being dismissed or the message lost."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "The thanks shows as soon as the form is sent; delivery is the app's background work. A spinner for a one-line report would make a quick, optional gesture feel heavy."
        }
      ],
      "a11y": [
        "Trigger opens the popover on press; Base UI manages focus into the form and restores it to the trigger on close.",
        "The rating row is a Base UI ToggleGroup with arrow-key roving focus; each toggle carries an aria-label.",
        "The form is named by its heading (aria-labelledby), so it is announced as \"Send feedback\" rather than an unnamed form.",
        "The message field carries an aria-label matching its placeholder.",
        "Submit is disabled until there is a rating or a non-whitespace message. Either alone is a complete answer.",
        "On send, focus moves to the thanks line (tabIndex=-1), which reads it out, and the form becomes inert so focus cannot land in invisible fields. The line is not also a live region, which read it twice. When the popover closes, Base UI returns focus to the trigger.",
        "The thanks dwell (about 1.2s) is a reading time, not motion, so it is the same under reduced motion."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<Feedback onSubmit={({ rating, message }) => console.log(rating, message)} />",
          "imports": "import { Feedback } from \"@sableui/react\""
        },
        {
          "label": "Custom labels",
          "code": "<Feedback label=\"Tell us\" submitLabel=\"Send it\" placeholder=\"Describe the issue…\" />",
          "imports": "import { Feedback } from \"@sableui/react\""
        },
        {
          "label": "Custom thanks",
          "code": "<Feedback successMessage=\"Got it — thank you.\" onSubmit={({ rating, message }) => report(rating, message)} />",
          "imports": "import { Feedback } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Fieldset",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/fieldset",
      "summary": "Form section panel (Card-like bordered surface) over Base UI Fieldset, with Legend/Description/Content/Footer parts; `variant=\"plain\"` is the bare group, for a radio group's shared name.",
      "keywords": [
        "fieldset",
        "form group",
        "legend",
        "fields"
      ],
      "usage": {
        "description": "Use Fieldset to group related controls under a shared label or explanation.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for grouped form sections such as contact details, preferences, or permissions."
          },
          {
            "guidance": "do",
            "description": "Keep the legend meaningful so assistive tech and agents understand the group purpose."
          },
          {
            "guidance": "dont",
            "description": "Do not use Fieldset as a generic spacing wrapper outside forms."
          },
          {
            "guidance": "do",
            "description": "Use `variant=\"plain\"` to name a radio group or a run of checkboxes inside a form or card that is already framed: the legend reads as a field label and nothing draws a second box. Do not strip the card variant with classes instead."
          },
          {
            "guidance": "dont",
            "description": "Do not use a Legend that is really a heading. A legend names the group's question for assistive technology; using it as a section title puts a question mark where the outline should be."
          }
        ],
        "anatomy": [
          {
            "name": "Fieldset",
            "required": true,
            "description": "The bordered group: a native <fieldset> whose disabled state reaches every control inside it."
          },
          {
            "name": "Legend",
            "required": true,
            "description": "FieldsetLegend: the question the group's controls answer, announced before each of them."
          },
          {
            "name": "Description",
            "required": false,
            "description": "FieldsetDescription: muted copy under the legend."
          },
          {
            "name": "Content",
            "required": true,
            "description": "FieldsetContent: the stacked body, one Field per control."
          },
          {
            "name": "Footer",
            "required": false,
            "description": "FieldsetFooter: the group's actions on a muted wash."
          }
        ]
      },
      "related": {
        "components": [
          "Form",
          "Label"
        ]
      },
      "props": [
        {
          "name": "variant",
          "type": "\"card\" | \"plain\"",
          "default": "\"card\"",
          "description": "`card` is a bordered, raised section with padded parts. `plain` is the grouping alone (no border, surface or inset) with the legend in the field-label style: the shared name a radio group needs, inside a form that is already framed."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "description": "Disables the whole group. Renders <fieldset disabled> (native control disabling) and surfaces data-[disabled] for dimming."
        },
        {
          "name": "render",
          "type": "ReactElement | function",
          "description": "Base UI render prop to replace or compose the underlying element."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merged onto each part via cn() for one-off overrides."
        }
      ],
      "subcomponents": [
        {
          "name": "FieldsetLegend",
          "type": "ComponentPropsWithRef<typeof Fieldset.Legend>",
          "description": "The group's name — the question its controls answer. Base UI renders it as a <div> wired to the <fieldset> through aria-labelledby, so a screen reader announces it before each control in the group. This is the whole reason to reach for Fieldset."
        },
        {
          "name": "FieldsetDescription",
          "type": "ComponentPropsWithRef<\"p\">",
          "description": "Muted supporting copy under the legend."
        },
        {
          "name": "FieldsetContent",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "The stacked body holding one Field per control."
        },
        {
          "name": "FieldsetFooter",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "Optional right-aligned action bar on a muted wash."
        }
      ],
      "tokensUsed": [
        "card",
        "card-foreground",
        "border",
        "foreground",
        "muted-foreground",
        "muted"
      ],
      "a11y": [
        "Base.Root renders a native <fieldset>; Base.Legend renders an auto-associated label, so screen readers announce the group name.",
        "disabled propagates as native <fieldset disabled>, disabling all contained controls.",
        "Wrap each control inside FieldsetContent in a Field, which wires its own label, description and error to the control."
      ],
      "examples": [
        {
          "label": "A grouped question",
          "code": "<Fieldset>\n\t<FieldsetLegend>Notify me about</FieldsetLegend>\n\t<FieldsetDescription>Pick what reaches your inbox.</FieldsetDescription>\n\t<FieldsetContent>\n\t\t<Field label=\"Mentions\" orientation=\"horizontal\"><Checkbox defaultChecked /></Field>\n\t\t<Field label=\"Replies\" orientation=\"horizontal\"><Checkbox /></Field>\n\t\t<Field label=\"Direct messages\" orientation=\"horizontal\"><Checkbox /></Field>\n\t</FieldsetContent>\n\t<FieldsetFooter>\n\t\t<Button>Save preferences</Button>\n\t</FieldsetFooter>\n</Fieldset>",
          "imports": "import { Button, Checkbox, Field, Fieldset, FieldsetContent, FieldsetDescription, FieldsetFooter, FieldsetLegend } from \"@sableui/react\""
        },
        {
          "label": "Why a fieldset, and when it is wrong",
          "code": "// Fieldset groups inputs that are ONE question with multiple parts, and gives\n// the group a single accessible name — which is the part you cannot do with a\n// div and a heading.\n\n<Fieldset>\n  <FieldsetLegend>Digest frequency</FieldsetLegend>\n  <FieldsetContent>\n    <RadioGroup defaultValue=\"weekly\">\n      <Field label=\"Daily\" orientation=\"horizontal\"><Radio value=\"daily\" /></Field>\n      <Field label=\"Weekly\" orientation=\"horizontal\"><Radio value=\"weekly\" /></Field>\n    </RadioGroup>\n  </FieldsetContent>\n</Fieldset>\n\n// ✓ Required for radio groups: without a fieldset the options have no shared\n//   name, so a screen reader announces \"Weekly, radio\" with no question.\n// ✗ Not for visual grouping of unrelated fields. Use PanelSection on a panel or\n//   a Card section on a page; a legend that is really a heading lies to\n//   assistive technology about the form's structure.",
          "imports": "import { Field, Fieldset, FieldsetContent, FieldsetLegend, Radio, RadioGroup } from \"@sableui/react\""
        },
        {
          "label": "A radio group's name, without a second box",
          "code": "<Card>\n  <CardContent>\n    <Fieldset variant=\"plain\">\n      <FieldsetLegend>Delivery</FieldsetLegend>\n      <RadioGroup defaultValue=\"standard\">\n        <RadioCard value=\"standard\" title=\"Standard\" description=\"3–5 working days\" trailing=\"Free\" />\n        <RadioCard value=\"express\" title=\"Express\" description=\"Next working day\" trailing=\"$12.00\" />\n      </RadioGroup>\n    </Fieldset>\n  </CardContent>\n</Card>",
          "imports": "import { Card, CardContent, Fieldset, FieldsetLegend, RadioCard, RadioGroup } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "FileDropzone",
      "status": "stable",
      "group": "Forms",
      "register": "page",
      "path": "components/file-dropzone",
      "summary": "Drag-and-drop target and file picker in one keyboard-operable button. Checks accept, maxSize and maxFiles on every selection, announces each rejection with how to fix it, and hands accepted files to you to list as Attachments.",
      "keywords": [
        "file upload",
        "dropzone",
        "drag and drop",
        "file picker",
        "upload",
        "attach file",
        "file input",
        "import"
      ],
      "usage": {
        "description": "Use FileDropzone where adding files is the main job of a section — an upload step, an import screen, a document request. It gives the drag gesture a visible target and the same action a button for everyone who does not drag. It holds no list: render accepted files as Attachments beneath it, where progress, retry and remove belong.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "State the constraints in `description` (\"PNG or PDF, up to 10 MB\") and give `acceptLabel` the same words, so a rejection repeats the rule the user already read."
          },
          {
            "guidance": "do",
            "description": "Pair it with a list of Attachment rows that you own. Once files are added, switch to `size=\"sm\"` so the target stays available without pushing the list below the fold."
          },
          {
            "guidance": "do",
            "description": "Cap the total by passing `maxFiles={limit - files.length}`; the dropzone only sees one selection at a time. When none remain, set `disabled` and say why in `description` (\"Remove one to add another\")."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for an incidental attach action inside a composer or a toolbar. A paperclip Button that opens the picker is the right weight there; ChatComposer already has one."
          },
          {
            "guidance": "dont",
            "description": "Do not rely on `accept` alone to protect the server. The dropzone's checks are for the user's benefit; validate type and size again where the file is received."
          },
          {
            "guidance": "dont",
            "description": "Do not silently drop rejected files. The zone announces each one, but if you also discard files later (a server-side limit), say so on the Attachment with `status=\"error\"` and a fix."
          }
        ],
        "anatomy": [
          {
            "name": "Zone",
            "required": true,
            "description": "A full-width button with a dashed border. Click, Enter or Space opens the picker; it is also the drop target."
          },
          {
            "name": "Icon",
            "required": false,
            "description": "A decorative mark that lifts while a file is dragged over the zone."
          },
          {
            "name": "Label and description",
            "required": true,
            "description": "The call to action and the constraints. Together they form the button's accessible name."
          },
          {
            "name": "Status",
            "required": true,
            "description": "A role=status region, present from the first render, that lists each rejected file and how to fix it."
          }
        ]
      },
      "related": {
        "components": [
          "Attachment",
          "Input",
          "Button",
          "Progress"
        ]
      },
      "props": [
        {
          "name": "accept",
          "type": "string",
          "description": "Native accept syntax — `.pdf`, `application/pdf`, `image/*`, comma-separated. Enforced on drop and on pick."
        },
        {
          "name": "maxSize",
          "type": "number",
          "description": "Largest accepted file, in bytes."
        },
        {
          "name": "multiple",
          "type": "boolean",
          "default": "false",
          "description": "Accept more than one file per selection."
        },
        {
          "name": "maxFiles",
          "type": "number",
          "description": "Most files accepted from one selection when `multiple`. Pass the remaining capacity to cap a total."
        },
        {
          "name": "onFilesAccepted",
          "type": "(files: File[]) => void",
          "description": "Files that passed every check, in selection order."
        },
        {
          "name": "onFilesRejected",
          "type": "(rejections: FileRejection[]) => void",
          "description": "Files that failed, each with `code` (file-invalid-type, file-too-large, too-many-files) and the announced `message`."
        },
        {
          "name": "label",
          "type": "ReactNode",
          "default": "\"Drop a file here or browse\"",
          "description": "The visible call to action. Pluralised automatically when `multiple`."
        },
        {
          "name": "description",
          "type": "ReactNode",
          "description": "The constraints in words, shown under the label."
        },
        {
          "name": "acceptLabel",
          "type": "string",
          "description": "How the accepted types complete \"Use … instead\" in an error (\"PNG or PDF\", \"an image or PDF\"). Without it a type error can only say \"Choose a different file\"."
        },
        {
          "name": "formatError",
          "type": "(rejection) => string",
          "description": "Replace the rejection copy, e.g. to localize it."
        },
        {
          "name": "icon",
          "type": "string",
          "default": "\"arrow-up\"",
          "description": "Semantic icon name."
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\"",
          "default": "\"md\"",
          "description": "`md` is the empty-section target; `sm` is a single-row strip above an existing list."
        },
        {
          "name": "disabled / required / id / aria-invalid",
          "type": "—",
          "description": "Standard form-control props. `id` lands on the button, so `<Field>` labels it; `aria-invalid` draws the destructive border."
        }
      ],
      "variants": {
        "size": [
          "md",
          "sm"
        ]
      },
      "tokensUsed": [
        "card",
        "foreground",
        "muted",
        "muted-foreground",
        "border-strong",
        "primary",
        "primary-foreground",
        "accent",
        "accent-foreground",
        "ring",
        "destructive"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Zone",
          "why": "The zone is the section's content, present from the start. An entrance would only delay the drop target someone is already dragging toward."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Zone",
          "why": "Hover strengthens the border to primary, which confirms the whole dashed area — not just the word \"browse\" — is the click target."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Icon",
          "why": "When a file crosses into the zone the icon fills and lifts and the surface tints. That is the only signal that releasing here will work; without it users drop on the page and the browser opens the file instead."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Zone",
          "why": "The zone hands files off immediately and never uploads. Transfer progress belongs on each Attachment, where it can be per-file and retryable."
        }
      ],
      "a11y": [
        "The zone is a native button: Enter or Space opens the system picker, so dragging is never the only way in.",
        "Rejections render into a role=status region that exists from the first render, and the button's aria-describedby points at it while it has content, so the reason is still read when focus returns.",
        "Every error names the file and says how to fix it (\"Choose a smaller file\"), rather than only what failed.",
        "The underlying file input is visually hidden and removed from the tab order; the button is the single focus stop."
      ],
      "examples": [
        {
          "label": "Images and PDFs",
          "code": "<FileDropzone accept=\"image/*,.pdf\" acceptLabel=\"an image or PDF\" maxSize={10 * 1024 * 1024} multiple description=\"Images or PDFs, up to 10 MB each\" onFilesAccepted={(files) => console.log(files)} />",
          "imports": "import { FileDropzone } from \"@sableui/react\""
        },
        {
          "label": "With an Attachment list",
          "code": "<div className=\"flex flex-col gap-3\">\n\t<FileDropzone size=\"sm\" multiple description=\"Up to 5 files\" onFilesAccepted={(files) => console.log(files)} />\n\t<Attachment name=\"contract.pdf\" meta=\"2.4 MB · PDF\" />\n\t<Attachment name=\"site-photo.jpg\" meta=\"Uploading…\" status=\"uploading\" progress={42} />\n</div>",
          "imports": "import { Attachment, FileDropzone } from \"@sableui/react\""
        },
        {
          "label": "In a field",
          "code": "<Field label=\"Proof of address\" description=\"A bill or statement from the last 3 months.\"><FileDropzone accept=\".pdf\" acceptLabel=\"a PDF\" maxSize={5 * 1024 * 1024} description=\"PDF, up to 5 MB\" /></Field>",
          "imports": "import { Field, FileDropzone } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "FontPicker",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/font-picker",
      "summary": "A DisclosurePicker for a typeface: the row names the chosen family in its own face and opens in place into a searchable list of families, each drawn in itself. The app supplies the families and loads the faces; Sable bundles no catalog.",
      "keywords": [
        "font picker",
        "typeface",
        "font family",
        "font selector",
        "typography",
        "google fonts",
        "inspector",
        "customizer"
      ],
      "usage": {
        "description": "Use FontPicker wherever someone chooses a typeface for a role (body, headings, code) in a panel that shows the result: a theme editor, a document inspector, a brand customizer. It is a DisclosurePicker, so the list opens beneath the row rather than over the preview; arrow keys walk the families (each drawn in its own face) without applying or loading anything, and Enter, Space or a click picks one, loads it and closes the row.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pass `loadFont` and load faces lazily: `\"preview\"` fires for every family when the list opens (load just the glyphs of its name — Google Fonts' `text=` parameter makes a 20-font list cost a few KB), `\"use\"` for the chosen one (load its real weights). Make it idempotent and define it once, outside render."
          },
          {
            "guidance": "do",
            "description": "Put non-font choices — \"Preset (Figtree)\", \"Same as body\" — in `options`, with a short `valueLabel` for the row. They list first and render in the app's face, so they never read as a family."
          },
          {
            "guidance": "do",
            "description": "Give each row a role `label` (\"Body\", \"Headings\", \"Mono\") and stack them; the caption column aligns. Control `open` from the parent so only one list is open at a time."
          },
          {
            "guidance": "dont",
            "description": "Leave search on for a short curated list — under a dozen families, pass `searchable={false}`. Search is on by default because font lists are usually long."
          },
          {
            "guidance": "dont",
            "description": "Use a Select of family names for this. A popup covers the text it changes, and a family name set in the app's face says nothing about the face."
          }
        ]
      },
      "related": {
        "components": [
          "DisclosurePicker",
          "ThemeSelector",
          "Select",
          "Combobox"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "string",
          "description": "The chosen family, or the value of one of `options`."
        },
        {
          "name": "onValueChange",
          "type": "(value: string) => void",
          "description": "Called once a family (or option) is picked — Enter, Space or a click — and only when it differs from `value`; the row then closes. Arrow keys and type-ahead only move focus; Escape closes without a pick."
        },
        {
          "name": "fonts",
          "type": "readonly { family: string; note?: string; stack?: string }[]",
          "description": "The families to offer, in order. `note` is a muted annotation (searched too); `stack` the CSS font-family to draw it in (default `\"<family>\"`)."
        },
        {
          "name": "options",
          "type": "readonly { value: string; label: string; valueLabel?: string }[]",
          "default": "[]",
          "description": "Non-font choices listed above the fonts, in the app's face. `valueLabel` is what the row shows while it is chosen."
        },
        {
          "name": "label",
          "type": "ReactNode",
          "description": "The row's leading caption — the role the font plays."
        },
        {
          "name": "listLabel",
          "type": "string",
          "default": "\"Font\"",
          "description": "Accessible name of the list."
        },
        {
          "name": "searchable",
          "type": "boolean",
          "default": "true",
          "description": "A search field above the list, filtering by family and note. Pass false for a short curated list (under a dozen)."
        },
        {
          "name": "searchLabel",
          "type": "string",
          "default": "\"Search fonts\"",
          "description": "Accessible name of the search field."
        },
        {
          "name": "searchPlaceholder",
          "type": "(count: number) => string",
          "default": "(count) => `Search ${count} fonts`",
          "description": "The search field's placeholder, given how many fonts are listed."
        },
        {
          "name": "emptyLabel",
          "type": "(query: string) => string",
          "default": "(query) => `No fonts match “${query}”.`",
          "description": "What the list says when a search matches nothing."
        },
        {
          "name": "loadFont",
          "type": "(font, purpose: \"preview\" | \"use\") => void",
          "description": "Loads a face on demand: \"preview\" for every family when the list opens, \"use\" for the chosen one once it is picked (never while the list is only being walked). Receives your own font objects. Idempotent."
        },
        {
          "name": "open",
          "type": "boolean",
          "description": "Controlled open state, as DisclosurePicker. Control it to keep one of several rows open at a time."
        },
        {
          "name": "defaultOpen",
          "type": "boolean",
          "default": "false",
          "description": "Uncontrolled initial open state."
        },
        {
          "name": "onOpenChange",
          "type": "(open: boolean) => void",
          "description": "Called with the next open state."
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | \"xs\"",
          "default": "\"md\"",
          "description": "md for a settings column; sm one rung down for a toolbar; xs for the property-grid rung (see DisclosurePicker)."
        },
        {
          "name": "name / form / required",
          "type": "string / string / boolean",
          "description": "Submit the chosen family (or option value) with a form under `name`, exactly as `value` holds it, through DisclosurePicker's hidden input — present while the row is closed. `required` blocks submission while `value` is empty."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "popover",
        "hairline",
        "panel-field",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "root",
          "why": "A property row is present from first paint."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Trigger",
          "why": "Inherited from DisclosurePicker: the hover step says the value row opens."
        },
        {
          "slot": "transition",
          "recipe": "motion-disclosure",
          "part": "Panel",
          "why": "Inherited from DisclosurePicker: the list grows in place, tying the panel's movement to this row."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "Faces load in the background and swap in when ready; the names are legible in the fallback meanwhile, so there is nothing to wait on."
        }
      ],
      "a11y": [
        "Inherits DisclosurePicker: a button trigger with aria-expanded/controls whose name is the caption plus the family; a listbox named by `listLabel`, aria-selected on the chosen family.",
        "Keyboard open focuses the search field; ArrowDown steps from it into the list (ArrowUp from the first option steps back); arrows, Home/End and type-ahead move without applying; Enter or Space picks and closes; Escape clears the query, then closes without a pick and returns focus to the row.",
        "Each family is set in its own face, but its name is still plain text, so a screen reader reads the name, not the glyphs."
      ],
      "examples": [
        {
          "label": "Body font with lazy loading",
          "code": "const FONTS = [\n  { family: \"Inter\", note: \"Neutral, dense UI\" },\n  { family: \"Figtree\", note: \"Friendly geometric\" },\n  { family: \"Fraunces\", note: \"Soft, wonky serif\", stack: '\"Fraunces\", serif' },\n]\n// Your loader; Sable never fetches fonts itself.\nconst loadFont = (font: { family: string }, purpose: \"preview\" | \"use\") => {\n  const id = `font-${purpose}-${font.family}`\n  if (document.getElementById(id)) return\n  const link = Object.assign(document.createElement(\"link\"), { id, rel: \"stylesheet\" })\n  const family = font.family.replace(/ /g, \"+\")\n  link.href = purpose === \"preview\"\n    ? `https://fonts.googleapis.com/css2?family=${family}&text=${encodeURIComponent(font.family)}`\n    : `https://fonts.googleapis.com/css2?family=${family}:wght@400..700&display=swap`\n  document.head.appendChild(link)\n}\nconst [family, setFamily] = useState(\"Inter\")\n<FontPicker label=\"Body\" listLabel=\"Body font\" value={family} onValueChange={setFamily} fonts={FONTS} loadFont={loadFont} searchable={false} />",
          "imports": "import { FontPicker } from \"@sableui/react\""
        },
        {
          "label": "With a preset option, one row of several",
          "code": "const [open, setOpen] = useState<string | null>(null)\nconst [body, setBody] = useState(\"theme\")\n<FontPicker\n  label=\"Body\"\n  listLabel=\"Body font\"\n  value={body}\n  onValueChange={setBody}\n  options={[{ value: \"theme\", label: \"Preset (Figtree)\", valueLabel: \"Figtree\" }]}\n  fonts={[{ family: \"Inter\" }, { family: \"Figtree\" }, { family: \"Geist\" }]}\n  open={open === \"body\"}\n  onOpenChange={(next) => setOpen(next ? \"body\" : null)}\n/>",
          "imports": "import { FontPicker } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Form",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/form",
      "summary": "A styled <form> plus Field — the form orchestration layer, built on Base UI Form and Field. Field wires a label, control, helper text, and error message together with correct a11y (htmlFor, aria-labelledby, aria-describedby, aria-invalid, required) automatically, around any Sable control. Validation-library-agnostic: pass each Field an error string, or let Form check native constraints and Field validate functions on submit.",
      "keywords": [
        "form",
        "field",
        "label",
        "validation",
        "error",
        "required",
        "settings",
        "input"
      ],
      "usage": {
        "description": "Use Form and Field as the default wrapper for Sable form controls. Field owns the label, description, required state, and error wiring so agents do not hand-roll inconsistent label/input relationships.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Wrap each control in Field unless a specialized component already owns its label and error semantics."
          },
          {
            "guidance": "do",
            "description": "Use Field error for validation messages so aria-invalid and aria-describedby are wired together."
          },
          {
            "guidance": "do",
            "description": "For built-in checks, put required / type=\"email\" / minLength on the control (or a validate function on Field) inside a Form: on submit the message appears under the field and the first invalid control is focused. Pass server errors to Form errors, keyed by Field name."
          },
          {
            "guidance": "do",
            "description": "Use horizontal Field orientation only for one-line boolean controls like Checkbox, Switch, or Radio."
          },
          {
            "guidance": "dont",
            "description": "Use placeholder text as the only label. A visible label should identify the field."
          },
          {
            "guidance": "dont",
            "description": "Wrap multiple controls in one Field. Field expects a single child control and wires that one control (an Input or Textarea nested in a wrapper is still found through context)."
          }
        ],
        "anatomy": [
          {
            "name": "Form",
            "required": true,
            "description": "The native form element (Base UI Form) with vertical field spacing; validates its Fields on submit."
          },
          {
            "name": "Field",
            "required": true,
            "description": "The label/control/helper/error wrapper for one control."
          },
          {
            "name": "Control",
            "required": true,
            "description": "The single Sable control. Base UI-backed controls register with Field through context; the child is also cloned with the same wiring."
          },
          {
            "name": "Error",
            "required": false,
            "description": "Validation copy associated with the control: the error prop when set, otherwise the Base UI validation message (native constraint, validate function, or Form errors)."
          }
        ]
      },
      "related": {
        "components": [
          "Input",
          "Textarea",
          "Select",
          "Checkbox",
          "Switch",
          "Button"
        ],
        "patterns": [
          "SettingsPage",
          "AuthPage"
        ]
      },
      "props": [
        {
          "name": "Form",
          "type": "{ validationMode?: \"onSubmit\" | \"onBlur\" | \"onChange\"; errors?: Record<string, string | string[]>; onFormSubmit?: (values, details) => void; actionsRef?: RefObject<Form.Actions> } + ComponentPropsWithRef<\"form\">",
          "description": "A <form> laid out as a vertical column with comfortable field spacing (override with className, e.g. gap-4). On submit it validates every Field (native constraints plus Field validate), shows each message under its field, focuses the first invalid control, and only then calls onSubmit. validationMode defaults to \"onSubmit\" (then live re-validation on change). errors shows external (e.g. server) messages keyed by Field name and clears one when its field is edited. onFormSubmit receives the named Field values and prevents the native submit. A control outside any Field is still checked by the browser before onSubmit runs. Validating in your own code (react-hook-form, a schema, state)? Pass noValidate: onSubmit always runs and each Field shows the error you set; without it an empty required Field stops the submit before your handler can set that error. Either way, once onSubmit returns (or the promise it returns settles), the first control a Field marks invalid takes focus."
        },
        {
          "name": "labelTrailing",
          "type": "ReactNode",
          "description": "On Field, vertical: something at the end of the label's row, such as a balance, a Max button or a \"Forgot password?\" link. It sits outside the label, so a control in it does not take the label's click."
        },
        {
          "name": "onSubmit",
          "type": "(event: FormEvent<HTMLFormElement>) => unknown",
          "description": "The native submit handler. It may return a promise. When it returns, or its promise settles, the first control a Field marks invalid takes focus, so errors your own code sets get the same treatment as Sable's validation."
        },
        {
          "name": "validationMode",
          "type": "\"onSubmit\" | \"onBlur\" | \"onChange\"",
          "default": "\"onSubmit\"",
          "description": "When Fields validate. After the first submit, fields re-check as the user edits. A Field's own validationMode wins."
        },
        {
          "name": "errors",
          "type": "Record<string, string | string[]>",
          "description": "External (e.g. server) messages keyed by Field name, shown under that field. Each clears when its field is edited."
        },
        {
          "name": "onFormSubmit",
          "type": "(values: Record<string, unknown>, details) => void",
          "description": "Called with the named Field values after validation passes; prevents the native submit."
        },
        {
          "name": "noValidate",
          "type": "boolean",
          "default": "false",
          "description": "Your code owns validation: nothing is checked before onSubmit (neither the Fields nor the browser), so it always runs and each Field shows the error you pass. required Fields keep their asterisk and aria-required. validationMode, errors, onFormSubmit and actionsRef do nothing with it."
        },
        {
          "name": "actionsRef",
          "type": "RefObject<{ validate(name?: string): void }>",
          "description": "Imperative handle to validate every field, or one by name."
        }
      ],
      "subcomponents": [
        {
          "name": "Field",
          "type": "{ label?: ReactNode; description?: ReactNode; error?: ReactNode; required?: boolean; messages?: Partial<Record<\"valueMissing\" | \"typeMismatch\" | \"patternMismatch\" | \"tooShort\" | \"tooLong\" | \"rangeUnderflow\" | \"rangeOverflow\" | \"stepMismatch\" | \"badInput\", ReactNode>>; disabled?: boolean; name?: string; validate?: (value, formValues) => string | string[] | null | Promise<…>; validationMode?: \"onSubmit\" | \"onBlur\" | \"onChange\"; validationDebounceTime?: number; orientation?: \"vertical\" | \"horizontal\"; trailing?: ReactNode; className?: string; children: ReactElement } + other div props on the root",
          "description": "Wraps a single control element (e.g. <Input />) on Base UI Field and wires label (htmlFor + aria-labelledby), helper text and error (aria-describedby), aria-invalid, and required onto it automatically. Base UI-backed controls (Input, Textarea, Select, Combobox, NumberField, Checkbox, Switch, Slider, OtpField…) register through context; the child is also cloned so plain elements keep the same wiring. error renders a destructive message and takes precedence; without it the slot shows the field's messages entry for the native constraint that failed (messages={{ valueMissing: \"Enter a subject.\" }}), else Base UI's validation message (the browser's wording for a native constraint, validate, or Form errors). required adds the native attribute plus a visual asterisk (defaults to false). disabled disables the control and dims the label. name keys the field in Form errors / onFormSubmit. validationMode overrides the Form's. orientation defaults to \"vertical\" (label → control); \"horizontal\" places control then label inline for a single checkbox / switch / radio — the control centres on the label's first line (it stays there when the label wraps) and description/error sit in the label's column. trailing puts something at the end of the control's row: vertically, beside the control (a promo code's Apply button, the control taking the rest); horizontally, at the end of the label's first line (a facet count). Other props (data-*, id, aria-*) land on the root. The root, label, description, error and control carry data-invalid / data-valid, data-touched, data-dirty, data-filled, data-focused and data-disabled for state styling."
        }
      ],
      "tokensUsed": [
        "muted-foreground",
        "destructive"
      ],
      "a11y": [
        "Field auto-wires label htmlFor ↔ control id, aria-describedby (description + error), and aria-invalid — so the label, helper, and error are all announced for the control.",
        "required adds the native `required` attribute (not just a visual asterisk); the asterisk is aria-hidden.",
        "Error text is associated via aria-describedby and reinforced by the destructive color, not color alone.",
        "Inside Form, a failed submit focuses the first invalid control and shows its message inline instead of a browser bubble."
      ],
      "examples": [
        {
          "label": "Text field",
          "code": "<Field label=\"Email\" description=\"We'll never share it.\" required><Input type=\"email\" /></Field>",
          "imports": "import { Field, Input } from \"@sableui/react\""
        },
        {
          "label": "Field with an error",
          "code": "<Field label=\"Password\" error=\"Must be at least 8 characters.\"><Input type=\"password\" /></Field>",
          "imports": "import { Field, Input } from \"@sableui/react\""
        },
        {
          "label": "An input with its action",
          "code": "<Field label=\"Promo code\" error={promoError} trailing={<Button variant=\"secondary\" onClick={applyPromo}>Apply</Button>}><Input name=\"promo\" autoCapitalize=\"characters\" /></Field>",
          "imports": "import { Button, Field, Input } from \"@sableui/react\""
        },
        {
          "label": "Your own wording for a missing value",
          "code": "<Form onSubmit={handleSubmit}><Field label=\"Subject\" required messages={{ valueMissing: \"Enter a subject.\" }}><Input name=\"subject\" /></Field><Button type=\"submit\">Send</Button></Form>",
          "imports": "import { Button, Field, Form, Input } from \"@sableui/react\""
        },
        {
          "label": "Validation in your own code",
          "code": "<Form noValidate onSubmit={handleSubmit}><Field label=\"Subject\" required error={errors.subject}><Input name=\"subject\" /></Field><Button type=\"submit\">Send</Button></Form>",
          "imports": "import { Button, Field, Form, Input } from \"@sableui/react\""
        },
        {
          "label": "Validated on submit",
          "code": "<Form onSubmit={handleSubmit}><Field label=\"Handle\" required validate={(value) => String(value).length < 3 ? \"At least 3 characters.\" : null}><Input name=\"handle\" /></Field><Button type=\"submit\">Claim</Button></Form>",
          "imports": "import { Button, Field, Form, Input } from \"@sableui/react\""
        },
        {
          "label": "Server errors",
          "code": "<Form errors={serverErrors}><Field label=\"Email\" name=\"email\"><Input type=\"email\" /></Field></Form>",
          "imports": "import { Field, Form, Input } from \"@sableui/react\""
        },
        {
          "label": "Form",
          "code": "<Form onSubmit={handleSubmit}><Field label=\"Name\"><Input /></Field><Field label=\"Subscribe\" orientation=\"horizontal\"><Checkbox /></Field><Button type=\"submit\">Save</Button></Form>",
          "imports": "import { Button, Checkbox, Field, Form, Input } from \"@sableui/react\""
        },
        {
          "label": "Settings form",
          "code": "<Form onSubmit={handleSubmit}><Field label=\"Display name\" description=\"Shown on your profile.\"><Input defaultValue=\"Nova Reed\" /></Field><Field label=\"Visibility\"><Select defaultValue=\"public\"><SelectTrigger /><SelectContent><SelectItem value=\"public\">Public</SelectItem><SelectItem value=\"private\">Private</SelectItem></SelectContent></Select></Field><Button type=\"submit\">Save changes</Button></Form>",
          "imports": "import { Button, Field, Form, Input, Select, SelectContent, SelectItem, SelectTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "GlidingHighlight",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/gliding-highlight",
      "summary": "One highlight that travels to the active item, instead of each item toggling its own background. Measured, not assumed, so rows of unequal height stay exact.",
      "keywords": [
        "highlight",
        "active",
        "selection",
        "indicator",
        "menu",
        "list",
        "glide",
        "slide",
        "thumb",
        "hover"
      ],
      "usage": {
        "description": "Use GlidingHighlight for a set of items where one is active at a time and the pointer or arrow keys move between them — a menu, an option list, a command palette, a segmented control. It replaces per-item `hover:bg-*` with a single element that moves.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pass `hovered ?? selected`. The fallback is what makes the pointer leaving a menu return the highlight to the current choice instead of dropping it, so the reader's place is never lost."
          },
          {
            "guidance": "do",
            "description": "Reach for it wherever a list is keyboard-navigable. The gain is largest for arrow keys: a background that teleports between rows makes the eye re-find the highlight at every step, where one that moves can be tracked while it travels — which is what keeps a long list readable in motion rather than only at rest."
          },
          {
            "guidance": "do",
            "description": "Keep selection semantics on the items — `aria-selected`, `aria-current`, `data-selected`. The highlight is `aria-hidden` decoration over whatever the children already announce."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for items that are not mutually exclusive. A travelling highlight says 'one of these, and it is this one'; over a multi-select list it contradicts the checkboxes beside it, and only one of the two can be right."
          },
          {
            "guidance": "dont",
            "description": "Do not put non-item chrome among the direct children — a group heading, a separator, a footer hint. Every direct child is a measurable row, so `active` counts them, and the highlight lands one row off from the index the caller is reasoning about. Wrap the items in their own GlidingHighlight, or move the chrome outside."
          },
          {
            "guidance": "dont",
            "description": "Do not drive it from a scroll position or a timer. It is an affordance for a set with a discrete active member; a highlight that moves without an item becoming active reads as the interface selecting things on its own."
          }
        ],
        "anatomy": [
          {
            "name": "Container",
            "required": true,
            "description": "Positioning context for the highlight. Each direct child is measured as one item."
          },
          {
            "name": "Highlight",
            "required": true,
            "description": "The travelling element. `aria-hidden`, absolutely positioned, invisible until something is active."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "Select",
          "Combobox",
          "CommandMenu",
          "SideNav"
        ]
      },
      "props": [
        {
          "name": "active",
          "type": "number | null",
          "description": "Index of the item the highlight sits behind, or `null` for none. Pass `hovered ?? selected`."
        },
        {
          "name": "orientation",
          "type": "\"vertical\" | \"horizontal\"",
          "description": "Deprecated and ignored: the highlight measures both axes, so a horizontal row needs no flag.",
          "deprecated": "nothing — omit it"
        },
        {
          "name": "onPointerLeave",
          "type": "PointerEventHandler (and every other div prop)",
          "description": "The container is a plain div, so its props pass through. For a hover-following list, reset the hovered index here so the highlight returns to the selected row when the pointer leaves."
        },
        {
          "name": "highlightClassName",
          "type": "string",
          "description": "Class for the travelling highlight itself, for changing its fill or radius. The radius defaults to `sable-frame-inner`, so inside a `sable-frame` container it nests concentrically; in any other rounded, inset container pass `rounded-concentric-<outer>/<inset>` here and on the rows. The container's own `className` styles the list."
        }
      ],
      "tokensUsed": [
        "accent"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Highlight",
          "why": "It deliberately does not animate in. Fading it up at rest position — usually row 0 — makes a menu look like it opened with the first item pre-selected, which is a claim about state that is not true. It stays invisible until something is genuinely active."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Container",
          "why": "The container is not the control; the items are, and they own their own pointer states. This draws the result."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Highlight",
          "why": "The travel IS the component — a highlight that jumps is just a background toggle with extra machinery. Position, size and opacity ride one declaration so a tall row's height cannot catch up after its position has, which would read as the highlight stretching into place rather than moving."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Highlight",
          "why": "Nothing here is indeterminate. A list still loading its options shows a Skeleton in place of the rows."
        }
      ],
      "a11y": [
        "The highlight is `aria-hidden` and carries no semantics — it renders selection, it does not declare it. Keep `aria-selected` / `aria-current` on the items themselves.",
        "Pointer-free by construction (`pointer-events-none`), so it can never intercept a click meant for the item beneath it.",
        "Works with roving-tabindex and `aria-activedescendant` lists alike: it reads an index the caller already owns, and does not manage focus.",
        "Under reduced motion or with MotionProvider off, the highlight moves instantly rather than gliding — the active item is still shown, which is the part that carries meaning."
      ],
      "examples": [
        {
          "label": "A hoverable menu, returning home on leave",
          "code": "<GlidingHighlight active={hovered ?? selected} className=\"sable-frame sable-surface sable-surface-popover sable-frame-popover\" onPointerLeave={() => setHovered(null)}>{items.map((item, i) => (<button key={item.id} type=\"button\" className=\"sable-frame-inner px-2 py-1.5 text-start\" onPointerEnter={() => setHovered(i)} onClick={() => setSelected(i)}>{item.label}</button>))}</GlidingHighlight>",
          "imports": "import { GlidingHighlight } from \"@sableui/react\""
        },
        {
          "label": "Horizontal, as a segmented control",
          "code": "<GlidingHighlight active={tab} className=\"sable-well flex gap-1 rounded-md p-1\" highlightClassName=\"rounded-concentric-md/1\">{tabs.map((t, i) => (<button key={t} type=\"button\" className=\"rounded-concentric-md/1 px-3 py-1\" onClick={() => setTab(i)}>{t}</button>))}</GlidingHighlight>",
          "imports": "import { GlidingHighlight } from \"@sableui/react\""
        },
        {
          "label": "Keyboard navigation — the case it exists for",
          "code": "<GlidingHighlight active={cursor} onKeyDown={(e) => { if (e.key === \"ArrowDown\") setCursor((c) => (c + 1) % rows.length) }}>{rows.map((r) => (<div key={r.id} role=\"option\" aria-selected={false}>{r.label}</div>))}</GlidingHighlight>",
          "imports": "import { GlidingHighlight } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "GradientArt",
      "status": "beta",
      "group": "Media & mockups",
      "register": "either",
      "path": "components/gradient-art",
      "summary": "Placeholder artwork painted by a static WebGL shader from the preset's own art direction (the --art-* tokens: palette, ground, warp, softness, grain) — Ember burns, Prism airbrushes, Meridian is grainy monochrome — with a CSS gradient underneath for prerendered pages and browsers without WebGL2.",
      "keywords": [
        "gradient",
        "mesh gradient",
        "grain",
        "shader",
        "artwork",
        "placeholder image",
        "cover",
        "banner",
        "avatar fallback",
        "generative"
      ],
      "usage": {
        "description": "Use GradientArt where a real image belongs but none exists yet, or where the image is decoration: a product cover before upload, a profile banner, an album tile, an avatar with no photo. It reads the theme's own tokens, so it follows every preset, mode and live edit; `seed` fixes each item's composition so a list of covers or avatars stays individually recognisable. `intensity=\"soft\"` paints the same art as a pastel wash — the iridescent aura AI products use as a card or modal header band, and as a stage for floating chips and logo tiles.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pass a stable `seed` per item — the name for an avatar, the title for a cover. Each item then keeps the same art across renders, reloads and themes, which is what lets someone recognise it."
          },
          {
            "guidance": "do",
            "description": "Size it with layout classes (`aspect-[4/3]`, `h-20`, `size-10 rounded-full`) and put any glyph or initials inside as children; they render above the art."
          },
          {
            "guidance": "do",
            "description": "Keep the default `mesh` for covers and tiles, and use `linear` at avatar and icon sizes, where a mesh has no room and turns to mud. Reach for `grain` where a printed, tactile surface suits — a banner, a hero card — and keep one variant per surface type so art reads as a system."
          },
          {
            "guidance": "do",
            "description": "Use `intensity=\"soft\"` as a stage: a card or modal header band, the art on an integration or pricing card, a field behind floating prompt chips or rounded logo tiles. Make the tiles and chips floating surfaces (`bg-popover` with `border-border-floating` and a shadow, or a `floating` Button) so they lift off the wash; soft stays light in dark mode too, so the same composition holds in both."
          },
          {
            "guidance": "dont",
            "description": "Do not put text straight on soft art with `text-overlay-foreground` ink. Soft is a light ground in every mode, so overlay ink washes out on it; put the content on a Card or a chip over the art, or use the default vivid intensity for a short overlay label."
          },
          {
            "guidance": "dont",
            "description": "Do not put body text over it. The art spans the palette's lightest and most saturated tones, so no single ink is guaranteed to clear contrast across it; reserve overlays for a short label on a scrim, or an avatar's initials on `linear` art, where the name is carried by `alt`."
          },
          {
            "guidance": "dont",
            "description": "Do not pass colours, and reach for `tones` rarely. The art follows the preset's --art-* tokens on purpose; to change how a product's art looks, set the --theme-art-* hooks in its theme or preset, so every cover, banner and avatar changes together."
          },
          {
            "guidance": "dont",
            "description": "Do not use it as a page or hero background. It paints at the element's pixel size, so a full-viewport instance costs a large frame on every theme change; it is sized for covers, banners and tiles."
          }
        ]
      },
      "related": {
        "components": [
          "Avatar",
          "Card",
          "AspectBox"
        ]
      },
      "props": [
        {
          "name": "variant",
          "type": "\"mesh\" | \"grain\" | \"linear\"",
          "default": "\"mesh\"",
          "description": "mesh: soft spots of colour pulled together by gentle waves. grain: glowing light over deep corners with a printed texture. linear: two vivid neighbouring colours in a plain CSS gradient, for avatar and icon sizes; it loads no shader, and takes overlay ink for short initials."
        },
        {
          "name": "tones",
          "type": "(\"info\" | \"3\" | \"2\" | \"1\" | \"warning\")[]",
          "description": "Paint these `--tone-*` colours instead of the preset's art palette. Leave unset to follow the preset's art direction."
        },
        {
          "name": "seed",
          "type": "string | number",
          "description": "Fixes the composition: the same seed paints the same art in every theme. Pass a stable id."
        },
        {
          "name": "intensity",
          "type": "\"vivid\" | \"soft\"",
          "default": "\"vivid\"",
          "description": "vivid: the preset's art at full strength. soft: every colour and the ground lifted to a light pastel of itself (high lightness, half chroma) — a wash for header bands and for staging chips and logo tiles, light in both modes."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "Rendered above the art — initials, a glyph, a short label."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Size and shape: aspect, height, rounding."
        }
      ],
      "variants": {
        "variant": [
          "mesh",
          "grain",
          "linear"
        ],
        "intensity": [
          "vivid",
          "soft"
        ]
      },
      "tokensUsed": [
        "art-1",
        "art-2",
        "art-3",
        "art-4",
        "art-5",
        "art-6",
        "art-ground",
        "art-warp",
        "art-softness",
        "art-grain",
        "primary",
        "tone-info",
        "tone-3",
        "tone-2",
        "tone-1",
        "tone-warning"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-interactive",
          "part": "canvas",
          "why": "The shader frame fades in over the CSS gradient it replaces, so the swap from fallback to shader reads as the art settling rather than a flash."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "root",
          "why": "Artwork, not a control: it does not react to the pointer."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "canvas",
          "why": "A theme change repaints the frame in place on the next animation frame; there are no states to move between."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "Static by design: nothing animates between paints, so it costs nothing while idle and respects reduced motion without a branch."
        }
      ],
      "a11y": [
        "Decorative by default: the canvas is aria-hidden. When the art stands for something (an avatar), label the element that contains it, not the art.",
        "Children render above the art in the normal reading order, so initials or a label are announced as usual."
      ],
      "examples": [
        {
          "label": "Product cover",
          "code": "<GradientArt seed=\"Untitled (gold rush)\" className=\"aspect-[4/3] rounded-lg\" />",
          "imports": "import { GradientArt } from \"@sableui/react\""
        },
        {
          "label": "Grain banner",
          "code": "<GradientArt variant=\"grain\" seed=\"juno\" tones={[\"info\", \"1\"]} className=\"h-20 rounded-md\" />",
          "imports": "import { GradientArt } from \"@sableui/react\""
        },
        {
          "label": "Avatar with initials",
          "code": "<GradientArt variant=\"linear\" seed=\"Mara Okafor\" className=\"grid size-10 place-items-center rounded-full text-label-md text-overlay-foreground\">MO</GradientArt>",
          "imports": "import { GradientArt } from \"@sableui/react\""
        },
        {
          "label": "Soft header band with logo tiles",
          "code": "<Card className=\"w-full max-w-sm\">\n\t<GradientArt intensity=\"soft\" seed=\"Integrations\" className=\"flex h-32 items-center justify-center gap-3 rounded-t-lg\">\n\t\t{[\"mail\", \"calendar\", \"chart\"].map((name) => (\n\t\t\t<span key={name} className=\"grid size-12 place-items-center rounded-lg border border-border-floating bg-popover text-popover-foreground shadow-md\">\n\t\t\t\t<Icon name={name} className=\"text-xl\" />\n\t\t\t</span>\n\t\t))}\n\t</GradientArt>\n\t<CardHeader>\n\t\t<CardTitle>Connect your tools</CardTitle>\n\t\t<CardDescription>Bring mail, calendar and analytics into one place.</CardDescription>\n\t</CardHeader>\n\t<CardFooter>\n\t\t<Button>Connect</Button>\n\t</CardFooter>\n</Card>",
          "imports": "import { Button, Card, CardDescription, CardFooter, CardHeader, CardTitle, GradientArt, Icon } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "IconTile",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/icon-tile",
      "summary": "One icon on a small square tile: the mark beside a feature's title, a file type in a result row, a category in a list. Sizes and corners follow the square Avatar; the fill is the surface's well, the muted surface, or a palette family.",
      "keywords": [
        "icon tile",
        "icon box",
        "icon square",
        "feature icon",
        "file icon",
        "leading icon",
        "glyph tile",
        "icon badge"
      ],
      "usage": {
        "description": "Use IconTile wherever an icon needs a shape of its own: a feature card's mark, the leading slot of a row whose item is a thing rather than a person (a document, a file, an integration), a category in a settings list. It is decorative by default, because a title beside it says what it is.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pair it with a visible title. Pass `label` only when the tile stands alone and the icon carries meaning nothing else states."
          },
          {
            "guidance": "do",
            "description": "Match the tile to the row: `size=\"sm\"` (32px) beside a sm Avatar in an Entity row, `md` (40px) on a feature card, `lg` (48px) as a card's lead mark. Use `appearance=\"muted\"` in a list, the default `well` on a card."
          },
          {
            "guidance": "dont",
            "description": "Hand-build the tile: a `grid size-10 place-items-center rounded-md bg-muted` span around an Icon. The sizes, corners and icon scale drift from each other and from Avatar the moment there are two."
          },
          {
            "guidance": "dont",
            "description": "Use it for a person, a logo or initials. That is an Avatar (shape=\"square\" for a workspace or a project).",
            "instead": [
              "Avatar"
            ]
          },
          {
            "guidance": "dont",
            "description": "Use it as a status mark beside text; that is a StatusDot or a Badge with a dot.",
            "instead": [
              "StatusDot",
              "Badge"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "Tile",
            "required": true,
            "description": "The square, sized from the Avatar ladder, filled by appearance or tone."
          },
          {
            "name": "Icon",
            "required": true,
            "description": "One semantic icon, scaled to about half the tile."
          }
        ]
      },
      "related": {
        "components": [
          "Avatar",
          "Icon",
          "Entity",
          "Card",
          "StatusDot"
        ],
        "patterns": [
          "LandingPage"
        ]
      },
      "props": [
        {
          "name": "icon",
          "type": "string",
          "description": "The semantic icon name, as `<Icon name>` takes it."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "32 / 40 / 48px, with the square Avatar's corner at each size. The icon scales with it."
        },
        {
          "name": "appearance",
          "type": "\"well\" | \"muted\"",
          "default": "\"well\"",
          "description": "well: the relative recess of the surface it sits on (sable-well), so it reads on a card, a section or a popover. muted: the flat muted surface with muted ink, quieter, for a row."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\"",
          "default": "\"neutral\"",
          "description": "A palette family's wash and deep ink in place of the appearance's fill — for a category colour, never a status."
        },
        {
          "name": "label",
          "type": "string",
          "description": "The accessible name, when nothing beside the tile says what it is. Omitted, the tile is aria-hidden."
        }
      ],
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ],
        "appearance": [
          "well",
          "muted"
        ]
      },
      "tokensUsed": [
        "muted",
        "muted-foreground",
        "foreground",
        "palette-wash",
        "palette-text"
      ],
      "a11y": [
        "Decorative by default (aria-hidden): the title beside it names the thing.",
        "With `label` it is role=img with that name, for a tile that stands alone.",
        "A palette tone's wash and ink are the pair a soft Badge uses, held to contrast in every theme."
      ],
      "examples": [
        {
          "label": "Feature card",
          "code": "<Card className=\"max-w-xs\"><CardContent className=\"flex flex-col gap-3\"><IconTile icon=\"layout\" /><h3 className=\"pt-2 text-title-lg\">Pages, not just parts</h3><p className=\"text-body-sm text-muted-foreground\">Shells to copy and adapt.</p></CardContent></Card>",
          "imports": "import { Card, CardContent, IconTile } from \"@sableui/react\""
        },
        {
          "label": "Row lead",
          "code": "<Entity leading={<IconTile icon=\"file\" size=\"sm\" appearance=\"muted\" />} title=\"Q4 roadmap\" subtitle=\"Edited 2 hours ago\" />",
          "imports": "import { Entity, IconTile } from \"@sableui/react\""
        },
        {
          "label": "Sizes and tones",
          "code": "<Row gap={3}><IconTile icon=\"star\" size=\"sm\" /><IconTile icon=\"star\" /><IconTile icon=\"star\" size=\"lg\" /><IconTile icon=\"tag\" tone=\"teal\" /><IconTile icon=\"music\" tone=\"purple\" /></Row>",
          "imports": "import { IconTile, Row } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "InlineStatus",
      "status": "stable",
      "group": "Status",
      "register": "either",
      "path": "components/inline-status",
      "summary": "A borderless single-line status message — a leading semantic icon + one line of text over the canonical tone scale (neutral/info/success/warning/destructive). The non-boxed sibling of Note for inline affirmations, errors, and progress; pass a custom icon (e.g. a Spinner) for a pending row.",
      "keywords": [
        "inline status",
        "state",
        "message",
        "availability"
      ],
      "usage": {
        "description": "Use InlineStatus for short state messages placed near the thing they describe.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it beside inputs, rows, actions, or settings that need local status."
          },
          {
            "guidance": "do",
            "description": "Keep the message brief and pair color with text."
          },
          {
            "guidance": "dont",
            "description": "Do not use InlineStatus for global announcements or page-level alerts.",
            "instead": [
              "Banner"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use tone as the only signal. Colour alone fails for colour-blind users — the leading icon is what carries the meaning, so never hide it."
          }
        ]
      },
      "related": {
        "components": [
          "StatusDot",
          "Badge",
          "Banner",
          "Note"
        ]
      },
      "props": [
        {
          "name": "tone",
          "type": "\"neutral\" | \"info\" | \"success\" | \"warning\" | \"destructive\"",
          "default": "\"neutral\"",
          "description": "Severity tone — drives the leading icon (name + color) and the text color. The shared status-tone vocabulary (STATUS_TONES)."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\"",
          "default": "\"sm\"",
          "description": "Text size: sm (text-body-sm) or md (text-body-md). sm is the default for inline placement under a control; md matches surrounding body copy."
        },
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "Override the leading glyph (e.g. a <Spinner />); otherwise the tone selects it."
        }
      ],
      "variants": {
        "tone": [
          "neutral",
          "info",
          "success",
          "warning",
          "destructive"
        ],
        "size": [
          "sm",
          "md"
        ]
      },
      "tokensUsed": [
        "tone-info",
        "success",
        "tone-warning",
        "destructive",
        "muted-foreground"
      ],
      "a11y": [
        "Color reinforces, never replaces, meaning — the leading icon and the message text carry the status.",
        "For a live status (e.g. a form submit result), render it in an aria-live region or pair it with the field's error wiring so the change is announced."
      ],
      "examples": [
        {
          "label": "Tones",
          "code": "<Stack gap={1}><InlineStatus tone=\"success\">Top-up confirmed.</InlineStatus><InlineStatus tone=\"destructive\">Insufficient balance.</InlineStatus></Stack>",
          "imports": "import { InlineStatus, Stack } from \"@sableui/react\""
        },
        {
          "label": "Pending (custom icon)",
          "code": "<InlineStatus tone=\"neutral\" icon={<Spinner size=\"sm\" />}>Preparing transaction…</InlineStatus>",
          "imports": "import { InlineStatus, Spinner } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Input",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/input",
      "summary": "Styled native text input. Soft-square (rounded-sm), the theme's field surface (outlined or filled), 2px focus ring; aria-invalid raises the destructive error treatment.",
      "keywords": [
        "input",
        "text input",
        "field",
        "form",
        "email",
        "search",
        "file",
        "invalid",
        "validation"
      ],
      "usage": {
        "description": "Use Input for short freeform text, search, email, password, file, and native input types. In forms, wrap Input in Field so label, description, required state, and validation messaging stay accessible and consistent.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pair every Input with a visible label through Field or an explicit label/htmlFor connection."
          },
          {
            "guidance": "do",
            "description": "Use type, inputMode, autoComplete, and placeholder as progressive hints, not as the only label."
          },
          {
            "guidance": "do",
            "description": "Set aria-invalid or use Field error copy when validation fails."
          },
          {
            "guidance": "do",
            "description": "Keep a focusable field at 16px or larger on mobile. iOS Safari zooms the whole page when a focused input computes under 16px and never zooms back out. Input handles this itself — below the sm breakpoint it renders text-body-lg (17px) and returns to text-body-md at sm and up. Build a custom field the same way: a second paired tier under a max-sm: variant, never a hand-set font-size."
          },
          {
            "guidance": "do",
            "description": "Choose outlined or filled fields once, in the theme: `--theme-field: var(--muted)` with `--theme-field-border: transparent` turns every Input, Textarea, Select, Combobox, SearchInput, InputGroup and ChatComposer into a borderless filled well; unset, they are outlined on the card. Every field reads the `field` / `field-border` pair, so they change together."
          },
          {
            "guidance": "dont",
            "description": "Restyle one Input as a filled chip with `bg-muted border-transparent`. It drifts from every other field on the page, and the theme can no longer move them together; set the field tokens instead."
          },
          {
            "guidance": "dont",
            "description": "Override an Input's type with a page tier below 16px (text-body-md, text-body-sm, text-label-*) without a >=16px mobile arm — that reintroduces the iOS focus zoom."
          },
          {
            "guidance": "dont",
            "description": "Use placeholder text as the label; it disappears once the user types and is not enough context."
          },
          {
            "guidance": "dont",
            "description": "Use Input for long body copy. Use Textarea for multi-line content."
          }
        ],
        "anatomy": [
          {
            "name": "Input",
            "required": true,
            "description": "The native input element with Sable surface, disabled, focus, and invalid styling."
          },
          {
            "name": "Label",
            "required": true,
            "description": "Usually provided by Field or a separate Label. It gives the input its visible purpose."
          },
          {
            "name": "Description",
            "required": false,
            "description": "Optional helper copy connected through aria-describedby when using Field."
          },
          {
            "name": "Error",
            "required": false,
            "description": "Validation message paired with aria-invalid and destructive styling."
          }
        ]
      },
      "related": {
        "components": [
          "Field",
          "Form",
          "Textarea",
          "SearchInput",
          "NumberField"
        ],
        "patterns": [
          "SettingsPage",
          "AuthPage"
        ]
      },
      "props": [
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | \"xs\"",
          "default": "\"md\"",
          "description": "md is the form field. sm is the toolbar field, one rung down (--control-sm), so a filter row with an sm Select, sm buttons and an Input is one height. xs is the dense inset field of a tool panel (an inset panel-field fill, no outline, tight padding) — the same ladder as Select and Combobox. Use it instead of overriding the height with className."
        },
        {
          "name": "type",
          "type": "string",
          "default": "\"text\"",
          "description": "Native input type (text, email, password, search, number, file, …). type=\"file\" themes the native selector button via file: token utilities."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Dims the control and blocks pointer interaction."
        },
        {
          "name": "aria-invalid",
          "type": "boolean",
          "description": "Surfaces the destructive border + ring. Base UI form fields set this automatically."
        },
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"input\">",
          "description": "All native input attributes (placeholder, value, onChange, ref, …) pass through."
        }
      ],
      "variants": {
        "size": [
          "md",
          "sm",
          "xs"
        ]
      },
      "tokensUsed": [
        "field-border",
        "field",
        "foreground",
        "muted-foreground",
        "ring",
        "destructive"
      ],
      "a11y": [
        "Renders a native <input> — labels, keyboard, and form semantics come for free.",
        "Renders through Base UI's Input (Field.Control): inside a Field it picks up the label, description, error and validity wiring from context, even when nested in a wrapper.",
        "Always associate a <label htmlFor> (or wrap) — placeholder text is not a label.",
        "Focus-visible ring uses the --ring token at 40% opacity.",
        "Set aria-invalid='true' on error so the destructive treatment is conveyed, not color-only."
      ],
      "examples": [
        {
          "label": "Default",
          "code": "<Input placeholder=\"Search posts\" />",
          "imports": "import { Input } from \"@sableui/react\""
        },
        {
          "label": "With a label",
          "code": "<Field label=\"Email\"><Input type=\"email\" placeholder=\"you@example.com\" /></Field>",
          "imports": "import { Field, Input } from \"@sableui/react\""
        },
        {
          "label": "Field with helper text",
          "code": "<Field label=\"Display name\" description=\"Shown on your public profile.\"><Input placeholder=\"Nova Reed\" /></Field>",
          "imports": "import { Field, Input } from \"@sableui/react\""
        },
        {
          "label": "Field error",
          "code": "<Field label=\"Email\" error=\"Enter a valid email address.\"><Input type=\"email\" defaultValue=\"not-an-email\" /></Field>",
          "imports": "import { Field, Input } from \"@sableui/react\""
        },
        {
          "label": "Search input",
          "code": "<Field label=\"Search posts\"><Input type=\"search\" placeholder=\"Search by title, creator, or tag\" /></Field>",
          "imports": "import { Field, Input } from \"@sableui/react\""
        },
        {
          "label": "Invalid",
          "code": "<Input aria-invalid defaultValue=\"not-an-email\" />",
          "imports": "import { Input } from \"@sableui/react\""
        },
        {
          "label": "File",
          "code": "<Input type=\"file\" accept=\"image/*\" />",
          "imports": "import { Input } from \"@sableui/react\""
        },
        {
          "label": "Disabled",
          "code": "<Input disabled placeholder=\"Disabled\" />",
          "imports": "import { Input } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "InputGroup",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/input-group",
      "summary": "An Input with addons inside the same field: a prefix or suffix (\"https://\", \".com\", \"$\"), an icon, or a borderless Button such as copy or reveal. One shell, one focus ring, one error state; a Field's label and error wiring reaches the Input inside.",
      "keywords": [
        "input group",
        "input addon",
        "prefix",
        "suffix",
        "adornment",
        "url input",
        "currency input",
        "password reveal",
        "copy field",
        "icon in input"
      ],
      "usage": {
        "description": "Use InputGroup when something belongs inside the field with the text: a unit, a fixed prefix, an icon, or a small action on the value itself (copy, reveal, clear). Use Field's `trailing` for an action beside the field (Apply next to a promo code), SearchInput for search, and NumberField for numbers with steppers.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep text addons short and fixed (\"https://\", \"kg\", \"USD\"). They are part of the field, not its label."
          },
          {
            "guidance": "do",
            "description": "For a button addon, use a borderless Button (`variant=\"ghost\"`, `size=\"icon-sm\"`) with an aria-label. The addon tightens around it, so it sits as far from the edge as from the top and bottom."
          },
          {
            "guidance": "do",
            "description": "Wrap the group in Field for a label and errors: `<Field label=\"Website\"><InputGroup leading=\"https://\"><Input /></InputGroup></Field>`."
          },
          {
            "guidance": "dont",
            "description": "Do not put the value's meaning only in an addon. A screen reader hears the label and the text, so \"Price (USD)\" belongs in the label too."
          },
          {
            "guidance": "dont",
            "description": "Do not restyle an Input to fake an addon; the group owns the border, the fill and the ring."
          }
        ]
      },
      "related": {
        "components": [
          "Input",
          "Field",
          "SearchInput",
          "NumberField",
          "Button"
        ]
      },
      "props": [
        {
          "name": "leading",
          "type": "ReactNode",
          "default": "—",
          "description": "Inside the field, before the text: a prefix (\"https://\", \"$\"), an icon, or a borderless Button."
        },
        {
          "name": "trailing",
          "type": "ReactNode",
          "default": "—",
          "description": "Inside the field, after the text: a suffix (\".com\", \"kg\"), an icon, or a borderless Button (copy, reveal, clear)."
        },
        {
          "name": "children",
          "type": "ReactElement",
          "default": "—",
          "description": "The single `<Input />`. It keeps its own props and type; the group takes over its border, fill and focus ring."
        },
        {
          "name": "id / required / disabled / aria-describedby / aria-invalid",
          "type": "control props",
          "default": "—",
          "description": "Forwarded to the Input, not set on the group. This is how a Field's wiring reaches the text box when the group is its child."
        },
        {
          "name": "className",
          "type": "string",
          "default": "—",
          "description": "Layout classes for the group (width, margins)."
        }
      ],
      "tokensUsed": [
        "field-border",
        "field",
        "ring",
        "destructive",
        "muted-foreground",
        "foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the form it belongs to. A field that animated in on its own would be briefly unusable for no stated reason."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The shell owns one focus ring for the input and its addons and eases it in, so focusing the text, or tabbing to a copy button inside the field, reads as the one field taking focus."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "An invalid value turns the shell's edge destructive on the same ease, so the error lands as the field changing state rather than a red box swapping in."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A field does no work of its own. A pending check (an availability lookup) puts a Spinner in `trailing`, which is where its answer will appear."
        }
      ],
      "a11y": [
        "The Input stays the focusable control; the group draws the focus ring around the whole field while it is focused.",
        "Inside a Field, the label, description and error are wired to the Input itself, not the group.",
        "Text addons are plain text beside the input, read in order; put a unit or currency in the label as well so it is not only visual.",
        "A button addon is a real Button with its own focus stop and needs an aria-label."
      ],
      "examples": [
        {
          "label": "Prefix and suffix",
          "code": "<Field label=\"Website\"><InputGroup leading=\"https://\" trailing=\".com\"><Input placeholder=\"example\" /></InputGroup></Field>",
          "imports": "import { Field, Input, InputGroup } from \"@sableui/react\""
        },
        {
          "label": "Leading icon",
          "code": "<Field label=\"Email\"><InputGroup leading={<Icon name=\"mail\" />}><Input type=\"email\" placeholder=\"you@example.com\" /></InputGroup></Field>",
          "imports": "import { Field, Icon, Input, InputGroup } from \"@sableui/react\""
        },
        {
          "label": "Copy button",
          "code": "<Field label=\"API key\"><InputGroup trailing={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Copy key\" onClick={copy}><span aria-hidden=\"true\" className=\"motion-icon-swap\"><span data-active={!copied} className=\"inline-flex\"><Icon name=\"copy\" /></span><span data-active={copied} className=\"inline-flex\"><Icon name=\"check\" /></span></span></Button>}><Input readOnly value={key} /></InputGroup></Field>",
          "imports": "import { Button, Field, Icon, Input, InputGroup } from \"@sableui/react\""
        },
        {
          "label": "Password with reveal",
          "code": "<Field label=\"Password\"><InputGroup trailing={<Button variant=\"ghost\" size=\"icon-sm\" aria-label={shown ? \"Hide password\" : \"Show password\"} aria-pressed={shown} onClick={() => setShown(!shown)}><Icon name={shown ? \"eye-off\" : \"eye\"} /></Button>}><Input type={shown ? \"text\" : \"password\"} autoComplete=\"current-password\" /></InputGroup></Field>",
          "imports": "import { Button, Field, Icon, Input, InputGroup } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Kbd",
      "status": "stable",
      "group": "Text & code",
      "register": "either",
      "path": "components/kbd",
      "summary": "A keyboard key indicator. Renders a raised <kbd> key cap sized from the surrounding text, so one Kbd fits body copy, menus and tooltips; KbdGroup sets one cap per key for a combo. `mod` renders the platform modifier (⌘ or Ctrl); `variant=\"ghost\"` is the bare label for menu rows and tooltips.",
      "keywords": [
        "keyboard",
        "shortcut",
        "key",
        "kbd"
      ],
      "usage": {
        "description": "Use Kbd to display keyboard keys or shortcuts in help text, menus, and docs.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it only for literal keyboard input such as Cmd, Enter, or Esc."
          },
          {
            "guidance": "do",
            "description": "Show a combo as one cap per key inside KbdGroup — `<KbdGroup><Kbd mod /><Kbd>K</Kbd></KbdGroup>` — not several keys typed into one cap."
          },
          {
            "guidance": "do",
            "description": "Use `variant=\"ghost\"` where the shortcut sits on a surface of its own — a menu row's trailing slot, a tooltip — so it reads as a hint, not a second control."
          },
          {
            "guidance": "dont",
            "description": "Do not use Kbd as a decorative badge or button replacement."
          },
          {
            "guidance": "dont",
            "description": "Do not set a text size on a Kbd. It sizes itself from the text around it."
          },
          {
            "guidance": "dont",
            "description": "Do not hardcode ⌘ or Ctrl. The modifier differs by platform; use `<Kbd mod />`, which renders ⌘ on macOS/iOS and Ctrl elsewhere, or Windows users read Mac keys."
          }
        ]
      },
      "related": {
        "components": [
          "Code",
          "Menu",
          "CommandMenu"
        ]
      },
      "props": [
        {
          "name": "mod",
          "type": "boolean",
          "default": "false",
          "description": "Render the platform's shortcut modifier in place of children: ⌘ on macOS and iOS, Ctrl everywhere else. Server-rendered as Ctrl and corrected on hydration."
        },
        {
          "name": "variant",
          "type": "\"key\" | \"ghost\"",
          "default": "\"key\"",
          "description": "`key`: a raised cap on the surface it sits on, with a heavier bottom edge as the key's lip. `ghost`: the bare label, for menu rows, tooltips and other surfaces that are already a frame."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merge additional classes onto the key cap."
        },
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"kbd\">",
          "description": "All native <kbd> attributes (children, ref, etc.)."
        }
      ],
      "tokensUsed": [
        "border",
        "border-strong",
        "background",
        "muted-foreground"
      ],
      "a11y": [
        "Uses the semantic <kbd> element so assistive tech announces keyboard input.",
        "KbdGroup is itself a <kbd> around the per-key caps — the HTML spelling of one key combination — so the combo is announced as a single piece of input.",
        "Sized in em from the surrounding text, so it scales with the user's text size and never shrinks below 12px."
      ],
      "examples": [
        {
          "label": "Single keys",
          "code": "<Kbd>Esc</Kbd>",
          "imports": "import { Kbd } from \"@sableui/react\""
        },
        {
          "label": "Combo",
          "code": "<KbdGroup><Kbd mod /><Kbd>K</Kbd></KbdGroup>",
          "imports": "import { Kbd, KbdGroup } from \"@sableui/react\""
        },
        {
          "label": "In a menu row",
          "code": "<MenuItem>Search<KbdGroup className=\"ms-auto\"><Kbd variant=\"ghost\" mod /><Kbd variant=\"ghost\">K</Kbd></KbdGroup></MenuItem>",
          "imports": "import { Kbd, MenuItem } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Label",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/label",
      "summary": "Styled native <label>. Paired label typography via a size step (xs / sm / md / lg, all sentence case) or an uppercase eyebrow (eyebrow), non-selectable, dims when its peer control is disabled. Optional hint adds a dotted-underline tooltip affordance.",
      "keywords": [
        "label",
        "form label",
        "control",
        "accessibility"
      ],
      "usage": {
        "description": "Use Label to name a form control and create a clear accessible relationship with that control.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use explicit, persistent labels for inputs, selects, textareas, and grouped controls."
          },
          {
            "guidance": "do",
            "description": "Place helper text separately so the label stays short and direct."
          },
          {
            "guidance": "dont",
            "description": "Do not rely on placeholder text as the only label for a control."
          },
          {
            "guidance": "dont",
            "description": "Do not use it as a bare styled span. A Label without htmlFor or a wrapped control looks like a label and does nothing — clicking it will not focus the field, which is the entire point."
          }
        ]
      },
      "related": {
        "components": [
          "Input",
          "Textarea",
          "Fieldset",
          "Form",
          "Field"
        ]
      },
      "props": [
        {
          "name": "htmlFor",
          "type": "string",
          "description": "Associates the label with a control by its id (native <label for>)."
        },
        {
          "name": "size",
          "type": "\"xs\" | \"sm\" | \"md\" | \"lg\"",
          "default": "\"lg\"",
          "description": "Paired label typography step, all sentence case. xs is simply the smallest; for an uppercase eyebrow use eyebrow."
        },
        {
          "name": "eyebrow",
          "type": "boolean",
          "default": "false",
          "description": "Set the label as an eyebrow: the uppercase, letter-spaced text-overline tier (themeable to sentence case). Replaces size. For a kicker above a group, not an ordinary field label."
        },
        {
          "name": "hint",
          "type": "ReactNode",
          "description": "When set, the label gets a dotted-underline affordance and reveals this content in a tooltip on hover/focus."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merge or override classes via cn()."
        }
      ],
      "variants": {
        "size": [
          "xs",
          "sm",
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "foreground",
        "muted-foreground"
      ],
      "a11y": [
        "Renders a native <label> — clicking it focuses/activates the associated control.",
        "Associate with a control via htmlFor (matching the control's id) or by wrapping the control.",
        "In a form, use Field: it renders this Label, wires htmlFor/id, and dims the label when the field is disabled. Hand-wired outside a Field, the label only dims via peer-disabled when the control carries `peer` AND precedes the Label in the DOM (Tailwind peer-* only matches a later sibling).",
        "With `hint`, the label becomes focusable and the help text is announced via the tooltip's aria-describedby — so the affordance works for keyboard and screen-reader users, not just hover."
      ],
      "examples": [
        {
          "label": "With control",
          "code": "<Stack gap={1}><Label htmlFor=\"name\">Display name</Label><Input id=\"name\" /></Stack>",
          "imports": "import { Input, Label, Stack } from \"@sableui/react\""
        },
        {
          "label": "In a form",
          "code": "<Field label=\"Display name\" disabled><Input /></Field>",
          "imports": "import { Field, Input } from \"@sableui/react\""
        },
        {
          "label": "With hint",
          "code": "<Label htmlFor=\"discount\" hint=\"Taken off every order this code is used on.\">Discount</Label>",
          "imports": "import { Label } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "LikeButton",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/like-button",
      "summary": "A pressed-or-not toggle for a like, a star or a save, with its count. Pressing it on fills the glyph, which blooms while a ring and a spray of dots burst from it and the count rolls up; pressing it off is quiet.",
      "keywords": [
        "like",
        "heart",
        "favorite",
        "favourite",
        "love",
        "star",
        "bookmark",
        "save",
        "upvote",
        "reaction",
        "count",
        "toggle"
      ],
      "usage": {
        "description": "Use LikeButton for a personal, reversible endorsement that other people can see the tally of: liking a post, starring a repository, saving a recipe. It is the one place in Sable that celebrates, because the person chose it and it costs nothing to undo.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pass the server's total as `count` and update it when the save lands. The button shows the viewer's own like at once, before the save, and goes back to `count` exactly whenever it changes, so a failed save that leaves `count` alone can also turn `pressed` back off."
          },
          {
            "guidance": "do",
            "description": "Match the glyph, family and label to the meaning: `icon=\"star\" tone=\"yellow\" label=\"Star\"` for a star. The label is the accessible name, so it must say what pressing does."
          },
          {
            "guidance": "do",
            "description": "Use `format={{ notation: \"compact\" }}` once counts pass a few thousand, so a feed of buttons keeps one width."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a setting or a view switch (bold, mute, grid or list). Those are tools, not endorsements, and a burst on every press of a formatting control is noise; use Toggle.",
            "instead": [
              "Toggle"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a rating or a verdict on an answer (helpful, not helpful). That is a question with two sides; use Feedback.",
            "instead": [
              "Feedback"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not press it for the user. A burst is a reply to a person's choice — liking something on their behalf, or on load, turns delight into a notification."
          }
        ]
      },
      "related": {
        "components": [
          "Toggle",
          "Feedback",
          "NumberTicker",
          "Button"
        ]
      },
      "props": [
        {
          "name": "count",
          "type": "number",
          "description": "The total, rolled when it changes. Pressing adds or removes the viewer's like at once; the button shows `count` exactly again whenever `count` changes. Omit it for a bare glyph (an icon-size button)."
        },
        {
          "name": "pressed",
          "type": "boolean",
          "description": "Controlled pressed state."
        },
        {
          "name": "defaultPressed",
          "type": "boolean",
          "default": "false",
          "description": "Initial pressed state when uncontrolled."
        },
        {
          "name": "onPressedChange",
          "type": "(pressed: boolean, event) => void",
          "description": "Called when the user presses it, with the new state."
        },
        {
          "name": "icon",
          "type": "string",
          "default": "\"heart\"",
          "description": "The glyph, by icon name. Its `solid` variant is shown while pressed."
        },
        {
          "name": "tone",
          "type": "PaletteColor",
          "default": "\"red\"",
          "description": "The palette family the glyph fills with while pressed, and the burst blooms from. A family, so it follows the theme."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Like\"",
          "description": "The accessible name, read before the count."
        },
        {
          "name": "format",
          "type": "Intl.NumberFormatOptions",
          "description": "How to write the count, e.g. `{ notation: \"compact\" }`."
        },
        {
          "name": "variant",
          "type": "\"ghost\" | \"outline\" | \"secondary\"",
          "default": "\"ghost\"",
          "description": "The Button surface."
        },
        {
          "name": "size",
          "type": "\"xs\" | \"sm\" | \"md\"",
          "default": "\"sm\"",
          "description": "A Button size; without a count, the matching icon size."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Disables it."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The bloom and the burst are the flourish; the fill and the count changing stay."
        }
      ],
      "variants": {
        "variant": [
          "ghost",
          "outline",
          "secondary"
        ],
        "size": [
          "xs",
          "sm",
          "md"
        ],
        "tone": [
          "red",
          "orange",
          "yellow",
          "green",
          "teal",
          "blue",
          "purple",
          "pink"
        ]
      },
      "tokensUsed": [
        "palette-dot",
        "accent",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the post or row it belongs to. A page that loads with likes already given must be still: nothing blooms on mount."
        },
        {
          "slot": "response",
          "recipe": "motion-bloom",
          "part": "Glyph",
          "why": "Pressing it on is the moment. The glyph is 16px, so it needs real amplitude to read as an event: it grows from nothing past its size and settles, after a 90ms beat in which the ring leads. Inherits Button's motion-press for the press itself. Pressing off has no bloom — taking a like back is not a celebration."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Burst",
          "why": "The follow-through: <Burst> draws a disc that hollows into a ring and shifts colour, then dots thrown outward in the theme's palette families. Expressive only — under `subtle` or reduced motion it renders nothing and the fill alone answers the press. The count rolls with NumberTicker."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "There is no in-between state to show: the like is shown at once, before it is saved."
        }
      ],
      "a11y": [
        "A native <button> through Button, with `aria-pressed`. Enter and Space press it.",
        "The accessible name is the label then the count (\"Like 1,301\"); the burst is aria-hidden and the rolling digits are hidden behind the count's real text.",
        "The pressed state is carried by the filled glyph and `aria-pressed`, never by colour alone.",
        "Under reduced motion the glyph fills and the count changes at once; the bloom and the burst are dropped."
      ],
      "examples": [
        {
          "label": "A post's likes",
          "code": "<LikeButton count={post.likes} defaultPressed={post.liked} onPressedChange={(on) => api.like(post.id, on)} />",
          "imports": "import { LikeButton } from \"@sableui/react\""
        },
        {
          "label": "Star a repository",
          "code": "<LikeButton icon=\"star\" tone=\"yellow\" label=\"Star\" variant=\"outline\" count={repo.stars} format={{ notation: \"compact\" }} />",
          "imports": "import { LikeButton } from \"@sableui/react\""
        },
        {
          "label": "Bare glyph",
          "code": "<LikeButton label=\"Save recipe\" />",
          "imports": "import { LikeButton } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "LineChart",
      "status": "beta",
      "group": "Charts",
      "register": "page",
      "path": "components/line-chart",
      "summary": "Lines over a sequence — for comparing how measures move. Smooth, linear or step curves, optional dots (coloured by series or by category) and value labels. Lines draw on as the chart scrolls into view.",
      "keywords": [
        "chart",
        "line",
        "trend",
        "time series",
        "graph",
        "compare",
        "analytics",
        "dashboard"
      ],
      "usage": {
        "description": "Use LineChart to compare how two or more measures change over the same sequence, or to show one trend precisely (with dots and labels). Unlike AreaChart, its value axis is fitted to the data rather than forced to zero, so small movements stay visible — say so if the axis is shown.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Turn on dots and labels for six or fewer points, when the exact values are the story."
          },
          {
            "guidance": "do",
            "description": "Use curve=\"step\" for values that hold until they change — prices, plan tiers, headcount."
          },
          {
            "guidance": "dont",
            "description": "Plot unordered categories (channels, products) as a line — the line implies a path between them; use BarChart."
          },
          {
            "guidance": "dont",
            "description": "Use it for data-heavy views — streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
          }
        ]
      },
      "related": {
        "components": [
          "AreaChart",
          "BarChart",
          "Sparkline",
          "Card"
        ]
      },
      "props": [
        {
          "name": "data",
          "type": "Record<string, unknown>[]",
          "description": "The rows, in order along the category axis."
        },
        {
          "name": "index",
          "type": "string",
          "description": "The datum field naming each row's category (a month, a day, a channel)."
        },
        {
          "name": "series",
          "type": "{ key: string; label: string; tone?: ChartTone; color?: string; icon?: string }[]",
          "description": "The measures to plot: the datum field, its name in the legend/tooltip/table, and its colour (a tone by role, or any CSS colour). Omitted, series take the chart palette in order: --chart-1 … --chart-8, validated for colour-blind separation in light and dark; a theme may override the set."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
        },
        {
          "name": "className",
          "type": "string",
          "default": "\"h-60\"",
          "description": "Sizes the chart (plot + legend). Set a height: `h-72`, `aspect-video h-auto`."
        },
        {
          "name": "valueFormatter",
          "type": "(value: number) => string",
          "description": "Format values everywhere (axis, labels, tooltip, table) — units like \"$12,480\". Default: compact on the axis, full elsewhere."
        },
        {
          "name": "indexFormatter",
          "type": "(value: string) => string",
          "description": "Shorten category labels on the axis (\"January\" → \"Jan\"); the tooltip keeps the full value."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for default number and date formatting."
        },
        {
          "name": "tooltip",
          "type": "boolean | { indicator?: \"dot\" | \"line\" | \"dashed\" | \"none\"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean; cursor?: \"line\" | \"dashed\" | \"none\"; order?: \"series\" | \"reverse\" }",
          "default": "true",
          "description": "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row, the cursor, the row order."
        },
        {
          "name": "legend",
          "type": "boolean",
          "default": "true when there is more than one series",
          "description": "Show the legend under the chart."
        },
        {
          "name": "grid",
          "type": "boolean",
          "default": "true (false for horizontal bars)",
          "description": "Hairline gridlines along the value axis."
        },
        {
          "name": "xAxis",
          "type": "boolean",
          "default": "true for columns; false for horizontal bars",
          "description": "The horizontal axis."
        },
        {
          "name": "yAxis",
          "type": "boolean",
          "default": "false for columns; true for horizontal bars",
          "description": "The vertical axis."
        },
        {
          "name": "yAxisSide",
          "type": "\"left\" | \"right\"",
          "default": "\"left\"",
          "description": "Which edge the value axis sits on, on a vertical chart."
        },
        {
          "name": "yAxisWidth",
          "type": "number",
          "description": "The vertical axis's label width, in px. Left unset it follows the longest label, so the plot slides sideways when new data changes the labels; set it where a chart swaps data in place, such as tabs."
        },
        {
          "name": "categoryTicks",
          "type": "number",
          "description": "At most this many category labels. They already thin to fit, from the latest back; this asks for fewer."
        },
        {
          "name": "domain",
          "type": "\"auto\" | [number, number]",
          "description": "The value axis's range. A line chart already fits its data; a [min, max] pair fixes the range, and values past it stop at the plot's edge."
        },
        {
          "name": "referenceLines",
          "type": "ChartReferenceLine[]",
          "description": "Mark positions on the plot, each { category } or { value }, with an optional label and tone: a Today line, a target."
        },
        {
          "name": "axisFormatter",
          "type": "(value: number) => string",
          "description": "Format values on the axis alone, when it needs less than valueFormatter prints: $50K beside $41,746.08."
        },
        {
          "name": "lineWidth",
          "type": "number",
          "default": "2",
          "description": "The line's weight, in px."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The arrival (lines drawing on) and the data-change morph are the flourish; the gliding cursor, dots and tooltip are the feedback `subtle` keeps."
        },
        {
          "name": "animate",
          "type": "boolean",
          "default": "true",
          "description": "Play the arrival once the chart scrolls into view. Reduced motion shows the finished chart. `animate={false}` is `motion=\"subtle\"`.",
          "deprecated": "motion=\"subtle\" (what animate={false} now maps to: no arrival, hover kept) or motion=\"off\""
        },
        {
          "name": "activeIndex",
          "type": "number | null",
          "description": "The highlighted row (controlled); `null` for none."
        },
        {
          "name": "defaultActiveIndex",
          "type": "number | null",
          "description": "The row highlighted at first — a tooltip already open before anyone hovers."
        },
        {
          "name": "onActiveIndexChange",
          "type": "(index: number | null) => void",
          "description": "Called as the pointer or keyboard moves between rows."
        },
        {
          "name": "curve",
          "type": "\"smooth\" | \"linear\" | \"step\"",
          "default": "\"smooth\"",
          "description": "How the line runs between points. `smooth` is monotone: it never overshoots a value the data does not contain."
        },
        {
          "name": "dots",
          "type": "boolean",
          "default": "false",
          "description": "Mark every data point with a dot."
        },
        {
          "name": "colorBy",
          "type": "\"series\" | \"index\"",
          "default": "\"series\"",
          "description": "Colour the dots by series, or each by its category."
        },
        {
          "name": "labels",
          "type": "boolean",
          "default": "false",
          "description": "Print each point's value above it."
        }
      ],
      "tokensUsed": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "primary",
        "muted-foreground",
        "border",
        "popover",
        "popover-foreground",
        "foreground",
        "background",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Line",
          "why": "Once on screen each line draws on from the first point (stroke-dashoffset), series staggered, then the dots and labels fade in. On the motion tokens; reduced motion shows the finished chart. The arrival is expressive: it plays at the full motion level only, so `motion=\"subtle\"` (or a subtle app policy) shows the finished chart while hover feedback stays."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Cursor + tooltip",
          "why": "Hover and focus move the cursor and tooltip instantly — a lagging cursor reads as a slow chart."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Line + dots",
          "why": "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place. Expressive, like the arrival: under `subtle` new data swaps in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "LineChart",
          "why": "A chart has no indeterminate state; show a Skeleton while the data loads."
        }
      ],
      "a11y": [
        "The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
        "With a tooltip, the chart is one tab stop (role=group, aria-roledescription=\"chart\"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.",
        "Colour is never the only key: series are named in the legend, tooltip and table."
      ],
      "examples": [
        {
          "label": "Compare two series",
          "code": "<LineChart\n\tlabel=\"Desktop and mobile visitors\"\n\tdata={visitors}\n\tindex=\"month\"\n\tseries={[\n\t\t{ key: \"desktop\", label: \"Desktop\", tone: \"primary\" },\n\t\t{ key: \"mobile\", label: \"Mobile\", tone: \"info\" },\n\t]}\n\tindexFormatter={(m) => m.slice(0, 3)}\n/>",
          "imports": "import { LineChart } from \"@sableui/react\""
        },
        {
          "label": "Dots and labels",
          "code": "<LineChart\n\tlabel=\"Desktop visitors\"\n\tdata={visitors}\n\tindex=\"month\"\n\tseries={[{ key: \"desktop\", label: \"Desktop\" }]}\n\tcurve=\"linear\"\n\tdots\n\tlabels\n\tgrid={false}\n/>",
          "imports": "import { LineChart } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Marker",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/marker",
      "summary": "A non-message row in a conversation: streaming status, system note, bordered notice, or a labelled rule for date breaks. Quieter than the message tier by design.",
      "keywords": [
        "chat status",
        "typing indicator",
        "thinking",
        "streaming",
        "tool call",
        "system message",
        "date separator",
        "date break",
        "conversation divider"
      ],
      "usage": {
        "description": "Everything in a conversation that is not a message. Date breaks, \"Carla joined\", \"Thinking…\", \"Ran search — 3 results\", \"Message failed to send\". One component because they share one job: annotate the stream without competing with it.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use `status` with `icon=\"spinner\" spin` for work in flight, and add `shimmer` while text is actually streaming. The shimmer is scale-aware, so it freezes with the rest of the system under reduced motion."
          },
          {
            "guidance": "do",
            "description": "Use `variant=\"separator\"` for date breaks. The label sits between two rules, which reads as a division of the transcript rather than as another thing someone said."
          },
          {
            "guidance": "do",
            "description": "Replace a status marker's text as the work progresses — \"Thinking…\" → \"Searching the docs\" → \"Writing the answer\". It is a live region, so each change is announced."
          },
          {
            "guidance": "do",
            "description": "Reach for `bordered` only when a note needs containing — an error, an escalation, a retention notice. Boxing routine system events makes a transcript look like a list of alerts."
          },
          {
            "guidance": "dont",
            "description": "Do not style a Marker up to message weight. Its whole value is being below that tier; a marker as loud as a message competes with the conversation it is annotating."
          },
          {
            "guidance": "dont",
            "description": "Do not leave a status marker mounted after the work finishes. A permanent \"Thinking…\" is a live region that never resolves, which is worse than no status at all."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a message from a person or an assistant. That is `Message` + `Bubble` — a marker has no author and no side."
          },
          {
            "guidance": "dont",
            "description": "Do not set `live` on a `separator` or on a run of `note` markers. Announcing every date break and join event turns the live region into noise and buries the status that mattered."
          }
        ]
      },
      "related": {
        "components": [
          "Message",
          "Bubble",
          "MessageScroller",
          "InlineStatus",
          "Separator"
        ]
      },
      "props": [
        {
          "name": "variant",
          "type": "\"status\" | \"note\" | \"bordered\" | \"separator\"",
          "default": "\"status\"",
          "description": "`status` for live activity, `note` for a system event, `bordered` for a note that needs containing, `separator` for a labelled rule."
        },
        {
          "name": "icon",
          "type": "string",
          "description": "Semantic icon name shown before the label, resolved through IconProvider."
        },
        {
          "name": "spin",
          "type": "boolean",
          "default": "false",
          "description": "Spin the icon — pair with `icon=\"spinner\"` for work in flight."
        },
        {
          "name": "shimmer",
          "type": "boolean",
          "default": "false",
          "description": "Sweep the label while something is streaming, via the scale-aware `motion-text-shimmer` recipe (freezes under reduced motion)."
        },
        {
          "name": "live",
          "type": "boolean",
          "default": "true for `status`, false otherwise",
          "description": "Announce the label to assistive tech as it changes. On for `status`, because a screen-reader user otherwise gets silence for the whole generation and no way to tell a slow answer from a dead one."
        },
        {
          "name": "...div props",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "Spread onto the row."
        }
      ],
      "variants": {
        "variant": [
          "status",
          "note",
          "bordered",
          "separator"
        ]
      },
      "tokensUsed": [
        "muted-foreground",
        "muted",
        "border",
        "foreground"
      ],
      "a11y": [
        "`status` markers render as `role=\"status\"` with `aria-live=\"polite\"`, so a change of activity is announced without interrupting whatever is being read.",
        "The other variants are silent by default and can opt in with `live` — announcing every date break and join event would bury the status that mattered.",
        "The separator's rules are `aria-hidden`, leaving only the label in the accessibility tree; the shimmer is decoration over readable text, not a replacement for it.",
        "`motion-text-shimmer` keeps the label opaque through every frame — the gradient runs muted-foreground → foreground rather than fading to transparent, so the text never becomes unreadable mid-animation, and `--motion-scale` freezes it entirely under reduced motion."
      ],
      "examples": [
        {
          "label": "Streaming status",
          "code": "<Marker icon=\"spinner\" spin shimmer>Thinking…</Marker>",
          "imports": "import { Marker } from \"@sableui/react\""
        },
        {
          "label": "Date break",
          "code": "<Marker variant=\"separator\">Yesterday</Marker>",
          "imports": "import { Marker } from \"@sableui/react\""
        },
        {
          "label": "System note",
          "code": "<Marker variant=\"note\" icon=\"user\">Carla joined the conversation</Marker>",
          "imports": "import { Marker } from \"@sableui/react\""
        },
        {
          "label": "A notice that needs containing",
          "code": "<Marker variant=\"bordered\" icon=\"warning\">This conversation will be archived in 7 days.</Marker>",
          "imports": "import { Marker } from \"@sableui/react\""
        },
        {
          "label": "In a transcript",
          "code": "<MessageScroller className=\"h-96\">\n\t<Marker variant=\"separator\">Today</Marker>\n\t<Message messageId=\"m1\"><Bubble>Can you summarise the release?</Bubble></Message>\n\t<Marker variant=\"note\" icon=\"sparkles\">Ran changelog — 12 entries</Marker>\n\t<Marker icon=\"spinner\" spin shimmer>Writing the answer</Marker>\n</MessageScroller>",
          "imports": "import { Bubble, Marker, Message, MessageScroller } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Marquee",
      "status": "stable",
      "group": "Media & mockups",
      "register": "page",
      "path": "components/marquee",
      "summary": "Seamless, constant-speed infinite loop (logos, tags, testimonials). Zero-dependency: duplicates children to fill the track and advances exactly one group + gap per iteration so it never seams. Pauses on hover/focus; freezes to a scroll region when motion is off/reduced.",
      "keywords": [
        "marquee",
        "ticker",
        "scrolling",
        "ambient"
      ],
      "usage": {
        "description": "Use Marquee for decorative or ambient continuous content where motion supports the surface.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for low-priority repeated content such as logos, tags, or lightweight highlights."
          },
          {
            "guidance": "do",
            "description": "Respect reduced motion and keep the content understandable without relying on animation."
          },
          {
            "guidance": "dont",
            "description": "Do not put critical messages, controls, or required reading inside Marquee."
          },
          {
            "guidance": "dont",
            "description": "Do not put content that must be read in a Marquee. It moves continuously, so anything longer than a logo or a short label cannot be read reliably — and it must stop for prefers-reduced-motion."
          }
        ]
      },
      "related": {
        "components": [
          "Scroller",
          "Carousel",
          "Badge"
        ]
      },
      "props": [
        {
          "name": "direction",
          "type": "\"left\" | \"right\" | \"up\" | \"down\"",
          "default": "\"left\"",
          "description": "Scroll direction; up/down switch to a vertical loop, which needs a bounded height (e.g. className=\"h-56\")."
        },
        {
          "name": "speed",
          "type": "number",
          "default": "40",
          "description": "Constant speed in px/s — independent of content length."
        },
        {
          "name": "gap",
          "type": "string",
          "default": "\"calc(var(--spacing) * 8)\"",
          "description": "Gap between items (any CSS length). Use a spacing-scale value (calc(var(--spacing) * n)) so it moves with density."
        },
        {
          "name": "pauseOnHover",
          "type": "boolean",
          "default": "true",
          "description": "Pause while hovered or keyboard-focused (WCAG 2.2.2)."
        },
        {
          "name": "controls",
          "type": "boolean",
          "default": "false",
          "description": "Render a visible pause/play control — recommended for WCAG 2.2.2 when content auto-scrolls."
        },
        {
          "name": "pauseLabel",
          "type": "string",
          "default": "\"Pause\"",
          "description": "Accessible name of the control while the strip moves."
        },
        {
          "name": "playLabel",
          "type": "string",
          "default": "\"Play\"",
          "description": "Accessible name of the control while the strip is paused."
        },
        {
          "name": "fade",
          "type": "boolean",
          "default": "false",
          "description": "Fade the leading/trailing edges with a mask."
        },
        {
          "name": "label",
          "type": "string",
          "description": "Accessible label for the scrolling region."
        }
      ],
      "tokensUsed": [],
      "a11y": [
        "Duplicate groups are aria-hidden, so screen readers read the content once.",
        "Pauses on hover and focus-within; under prefers-reduced-motion / MotionProvider off it stops and becomes a normal scroll region.",
        "Decorative by default — pass a label only when the row conveys meaning."
      ],
      "examples": [
        {
          "label": "Logo row",
          "code": "<Marquee>{logos.map((l) => <img key={l.id} src={l.src} alt={l.name} className=\"h-8\" />)}</Marquee>",
          "imports": "import { Marquee } from \"@sableui/react\""
        },
        {
          "label": "Reverse, faster",
          "code": "<Marquee direction=\"right\" speed={70}>{tags.map((t) => <Badge key={t} appearance=\"outline\">{t}</Badge>)}</Marquee>",
          "imports": "import { Badge, Marquee } from \"@sableui/react\""
        },
        {
          "label": "Vertical",
          "code": "<Marquee direction=\"up\" className=\"h-64\">{items}</Marquee>",
          "imports": "import { Marquee } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "MediaImage",
      "status": "beta",
      "group": "Media & mockups",
      "register": "either",
      "path": "components/media-image",
      "summary": "An image that fills its box and falls back to GradientArt seeded by the item when it has no source or the source fails — Avatar's image-load tracking, for covers, thumbnails and product shots instead of faces.",
      "keywords": [
        "image",
        "img",
        "image fallback",
        "broken image",
        "cover art",
        "album art",
        "thumbnail",
        "placeholder image",
        "onError",
        "missing image"
      ],
      "usage": {
        "description": "Use MediaImage wherever content imagery may be missing or broken: a cover in a grid, a thumbnail in a row, a product shot. It fills the box it is given — an AspectBox for a cover, a sized and rounded box for a thumbnail — shows a quiet muted surface while the image loads, fades the image in once decoded, and paints GradientArt seeded by the item when there is no image to show, so a grid of missing covers still reads as distinct things. For a person use Avatar; for a whole tile with title and actions use MediaTile, which composes this.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give the box the shape: `<AspectBox ratio={1} className=\"rounded-md\"><MediaImage … /></AspectBox>`, or `size-14 rounded-md` on MediaImage itself for a thumbnail. It clips to whatever radius the box has."
          },
          {
            "guidance": "do",
            "description": "Pass `seed` (the title or an id) when `alt` is empty, so the fallback art is the item's own and stays the same in every list it appears in."
          },
          {
            "guidance": "do",
            "description": "Leave `alt` empty when a visible title sits next to the image — a tile, a row — and describe it when the image stands alone. A set `alt` also names the fallback, so the description survives a broken URL."
          },
          {
            "guidance": "do",
            "description": "Set `position` when a cover crop would cut off the subject — a face high in a portrait, a product at one edge. Store the focus with the image (`\"35% 50%\"`) rather than re-cropping the file."
          },
          {
            "guidance": "dont",
            "description": "Do not hand-write `<img onError={() => setBroken(true)}>`. An image that fails before hydration never fires the handler on a prerendered page; MediaImage preloads off the DOM and catches it."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for profile pictures. A person is a circle with initials — Avatar, whose `variant=\"art\"` is the same fallback with the person's initials over it."
          }
        ]
      },
      "related": {
        "components": [
          "MediaTile",
          "Avatar",
          "GradientArt",
          "AspectBox"
        ]
      },
      "props": [
        {
          "name": "src",
          "type": "string",
          "description": "Image URL. Omitted, empty or failing to load ⇒ the fallback shows."
        },
        {
          "name": "alt",
          "type": "string",
          "default": "\"\"",
          "description": "Alt text. Empty is decorative — right beside a visible title. When set and no image shows, it names the fallback instead."
        },
        {
          "name": "seed",
          "type": "string | number",
          "description": "Seeds the fallback art. Defaults to `alt`; pass the title or an id when `alt` is empty."
        },
        {
          "name": "fallback",
          "type": "ReactNode",
          "description": "Replaces the GradientArt fallback — a glyph or monogram. Fills the frame under the same clipping."
        },
        {
          "name": "fit",
          "type": "\"cover\" | \"contain\"",
          "default": "\"cover\"",
          "description": "`cover` crops to fill (artwork, photos); `contain` letterboxes on the muted surface (a logo, a product that must not be cropped)."
        },
        {
          "name": "position",
          "type": "CSSProperties[\"objectPosition\"]",
          "default": "\"center\"",
          "description": "Where the image sits in its frame — CSS `object-position`, the sibling of `fit`. Under `cover` it is the part the crop keeps (`\"50% 30%\"` for a face, `\"bottom\"` for a horizon); under `contain` it is the side the letterbox gives way to."
        },
        {
          "name": "srcSet",
          "type": "string",
          "description": "Responsive sources, passed to the `<img>`."
        },
        {
          "name": "sizes",
          "type": "string",
          "description": "The `sizes` attribute for `srcSet`."
        },
        {
          "name": "loading",
          "type": "\"lazy\" | \"eager\"",
          "default": "\"lazy\"",
          "description": "Native lazy loading. Use `eager` for the first row of a grid above the fold."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Sizing and rounding when MediaImage is the box itself (`size-14 rounded-md`). Inside an AspectBox it already fills."
        }
      ],
      "variants": {
        "fit": [
          "cover",
          "contain"
        ]
      },
      "tokensUsed": [
        "muted",
        "art-1",
        "art-2",
        "art-3",
        "art-4",
        "art-5",
        "art-6",
        "art-ground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-fade",
          "part": "image",
          "why": "The image fades in over the muted surface once it has decoded, so a slow cover settles in instead of popping row by row as the grid loads."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "root",
          "why": "Imagery, not a control. The tile or row around it answers the pointer."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "root",
          "why": "Its only state change is loading → loaded or failed, which the arrival covers."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "A loading image rests on a static muted surface; a shimmer per cover across a long grid would be noise."
        }
      ],
      "a11y": [
        "`alt` defaults to empty (decorative), because the usual neighbour is a visible title that already names the item; describe the image when it stands alone.",
        "When no image is on screen and `alt` is set, the frame takes `role=\"img\"` with that label, so a broken URL does not erase the description. The fallback art itself is always aria-hidden.",
        "The `<img>` mounts only once it has loaded, so assistive technology never meets a broken-image icon."
      ],
      "examples": [
        {
          "label": "Cover with fallback",
          "code": "<AspectBox ratio={1} className=\"rounded-md\">\n\t<MediaImage src={album.cover} seed={album.title} />\n</AspectBox>",
          "imports": "import { AspectBox, MediaImage } from \"@sableui/react\""
        },
        {
          "label": "No image yet",
          "code": "<AspectBox ratio={1} className=\"rounded-md\">\n\t<MediaImage seed=\"Low tide, high noon\" />\n</AspectBox>",
          "imports": "import { AspectBox, MediaImage } from \"@sableui/react\""
        },
        {
          "label": "Row thumbnail",
          "code": "<MediaImage src={track.art} seed={track.title} className=\"size-12 shrink-0 rounded-sm\" />",
          "imports": "import { MediaImage } from \"@sableui/react\""
        },
        {
          "label": "Logo, never cropped",
          "code": "<AspectBox ratio={16 / 9} className=\"rounded-lg\">\n\t<MediaImage src={brand.logo} alt={brand.name} fit=\"contain\" />\n</AspectBox>",
          "imports": "import { AspectBox, MediaImage } from \"@sableui/react\""
        },
        {
          "label": "Crop focus per image",
          "code": "<AspectBox ratio={1} className=\"rounded-md\">\n\t<MediaImage src={project.thumbnail} seed={project.title} position={project.focus ?? \"center\"} />\n</AspectBox>",
          "imports": "import { AspectBox, MediaImage } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "MediaTile",
      "status": "beta",
      "composition": "AspectBox, MediaImage, a stretched link (or Card render), Badge appearance=\"overlay\", Button",
      "group": "Media & mockups",
      "register": "page",
      "path": "components/media-tile",
      "summary": "A cover-first tile — square, 16:9 or poster artwork with an optional play-style action over it, then a title and a subtitle that can each be links — that is one link as a whole without nesting its other controls inside one.",
      "keywords": [
        "album",
        "album art",
        "cover",
        "tile",
        "media card",
        "video thumbnail",
        "podcast",
        "playlist",
        "gallery",
        "product tile",
        "poster",
        "grid item",
        "play button",
        "music"
      ],
      "usage": {
        "description": "The item in a media grid or shelf: an album, a playlist, a video, a podcast, a film, a photo, a product. The cover leads and carries the weight; the title and subtitle sit underneath without a card around them. The whole tile follows the title's link, the subtitle can link somewhere else (the artist, the channel), and an action — usually play — floats over the cover's corner, revealed on hover and focus and always shown on touch. A missing or broken cover becomes GradientArt seeded by the title, so a grid of items without artwork still reads as distinct things.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Lay tiles out with `Grid` (`<Grid minItemWidth=\"10rem\">`) or a horizontal `Scroller` for a shelf. The tile fills its cell; the grid decides the width."
          },
          {
            "guidance": "do",
            "description": "Pass `render={<Link to=\"…\" />}` (or `href`) for where the tile goes, and `subtitleRender` / `subtitleHref` for a second destination. Each stays a separate control; never wrap the tile in your own link."
          },
          {
            "guidance": "do",
            "description": "Name the action for its item — `aria-label=\"Play Low tide, high noon\"`, not \"Play\". A grid of twenty identical \"Play\" buttons is unusable from a screen reader's list of controls."
          },
          {
            "guidance": "do",
            "description": "Use `titleAs=\"h3\"` when the tiles sit under a section heading, so screen-reader users can move tile to tile by heading."
          },
          {
            "guidance": "dont",
            "description": "Do not build this from `Card render={<Link />}`. A card that is a link cannot hold a second link or a button — interactive content cannot nest — which is exactly what a media tile needs."
          },
          {
            "guidance": "dont",
            "description": "Do not put more than one action on the cover. A second control over the art is a toolbar on a thumbnail; move secondary actions (add to queue, share) into an OverflowMenu in the action slot or onto the item's page."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a framed commerce card with a price and a buy button — that is ProductCardBlock — or for a person, which is an Avatar."
          }
        ],
        "anatomy": [
          {
            "name": "Cover",
            "required": true,
            "description": "An AspectBox holding MediaImage: the image, or GradientArt seeded by the title. Drawn first, read last."
          },
          {
            "name": "Title",
            "required": true,
            "description": "The item's name. When the tile links, this is the link, stretched over the whole tile."
          },
          {
            "name": "Subtitle",
            "required": false,
            "description": "The second line. Optionally its own link, raised above the stretched one."
          },
          {
            "name": "Action",
            "required": false,
            "description": "One control over the cover's bottom-end corner — usually play. Revealed on hover and focus; always visible on touch."
          },
          {
            "name": "Badge",
            "required": false,
            "description": "A static label over the cover's top-start corner — a duration, \"New\". Click-through."
          }
        ]
      },
      "related": {
        "components": [
          "MediaImage",
          "GradientArt",
          "Grid",
          "AspectBox",
          "Card",
          "Scroller"
        ]
      },
      "props": [
        {
          "name": "title",
          "type": "ReactNode",
          "description": "The item's name. Seeds the fallback art when it is a string."
        },
        {
          "name": "subtitle",
          "type": "ReactNode",
          "description": "The second line — an artist, a channel, a year."
        },
        {
          "name": "meta",
          "type": "ReactNode",
          "description": "Lines under the subtitle, in its muted type: a price beside its sale price, a count of finishes, a status Badge. A wrapping block, where the subtitle is one truncated line. Use it for a product tile instead of building one."
        },
        {
          "name": "src",
          "type": "string",
          "description": "Cover image URL. Without one, or when it fails, the cover is GradientArt seeded by the item."
        },
        {
          "name": "srcSet",
          "type": "string",
          "description": "Responsive cover candidates, passed to the `<img>`."
        },
        {
          "name": "sizes",
          "type": "string",
          "description": "The cover's layout width for `srcSet`, e.g. `\"(min-width: 64rem) 25vw, 50vw\"`."
        },
        {
          "name": "alt",
          "type": "string",
          "default": "\"\"",
          "description": "Cover alt text. Empty by default: the title below already names the item."
        },
        {
          "name": "seed",
          "type": "string | number",
          "description": "Seeds the fallback art. Defaults to `title` when it is a string."
        },
        {
          "name": "position",
          "type": "CSSProperties[\"objectPosition\"]",
          "default": "\"center\"",
          "description": "Which part of the cover the crop keeps — CSS `object-position`, forwarded to the cover's MediaImage: `\"50% 30%\"` for a face, `\"top\"` for a poster's title. Store it with the image when each one frames differently."
        },
        {
          "name": "aspect",
          "type": "\"square\" | \"video\" | \"poster\" | number",
          "default": "\"square\"",
          "description": "The cover's shape: square (albums, podcasts), video (16:9), poster (2:3 — films, books), or any width / height ratio."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Moves the type tier, the cover-to-text gap, the corner and the overlay inset together."
        },
        {
          "name": "href",
          "type": "string",
          "description": "Where the tile goes. The title becomes the link, stretched over the whole tile."
        },
        {
          "name": "render",
          "type": "useRender.RenderProp",
          "description": "The title link's element, for a router: `render={<Link to=\"/albums/1\" />}`. Takes precedence over `href`."
        },
        {
          "name": "subtitleHref",
          "type": "string",
          "description": "Makes the subtitle its own link — a separate tab stop above the tile's."
        },
        {
          "name": "subtitleRender",
          "type": "useRender.RenderProp",
          "description": "The subtitle link's element, for a router."
        },
        {
          "name": "action",
          "type": "ReactNode",
          "description": "One control over the cover's bottom-end corner, usually a play Button. Hidden until hover or focus on hover-capable devices; always shown on touch."
        },
        {
          "name": "badge",
          "type": "ReactNode",
          "description": "A static label on the cover's top-start corner — `<Badge appearance=\"overlay\">`."
        },
        {
          "name": "titleAs",
          "type": "\"h2\" | \"h3\" | \"h4\" | \"h5\" | \"p\"",
          "default": "\"p\"",
          "description": "The title's element. A heading one level below the section's lets screen-reader users move tile to tile."
        },
        {
          "name": "loading",
          "type": "\"lazy\" | \"eager\"",
          "default": "\"lazy\"",
          "description": "Native image loading. `eager` for the first row above the fold."
        },
        {
          "name": "...div props",
          "type": "Omit<ComponentPropsWithRef<\"div\">, \"title\">",
          "description": "Spread onto the root."
        }
      ],
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ],
        "aspect": [
          "square",
          "video",
          "poster"
        ]
      },
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "muted",
        "overlay",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-fade",
          "part": "Cover",
          "why": "The cover image fades in over a quiet surface once it decodes, so a grid loading on a slow connection settles tile by tile instead of popping."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Cover",
          "why": "Hovering the tile deepens the cover with a light scrim and lifts the action in (`reveal-on-hover`), so it is clear the whole tile is one target and where its action is."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "root",
          "why": "A tile has no states of its own to move between; the action carries any (play / pause)."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "Nothing runs inside a tile; a now-playing indicator belongs to the player, not the grid."
        }
      ],
      "a11y": [
        "No nested interactive content: the title is the tile's link, and its `stretched-link` overlay covers the tile, while the subtitle link and the action sit above it as separate controls.",
        "Tab order is title → subtitle → action. The text comes first in the DOM and the cover is drawn above it with CSS `order`, so focus follows how a reader names the item.",
        "Focusing the title link rings the whole tile, rounded like the cover, because the whole tile is what the link is; the subtitle link and the action ring themselves.",
        "The action is hidden with opacity only, and only where the device can hover; it stays in the tab order and the accessibility tree, appears when anything in the tile has focus, and is always visible on touch.",
        "The cover is decorative by default (`alt=\"\"`), since the title names the item; the fallback art is aria-hidden.",
        "Truncated titles keep their full text in the link's accessible name and in a `title` tooltip."
      ],
      "examples": [
        {
          "label": "Product tile",
          "code": "<Grid minItemWidth=\"14rem\" gap={4}>\n\t{products.map((product) => (\n\t\t<MediaTile\n\t\t\tkey={product.id}\n\t\t\taspect={4 / 5}\n\t\t\ttitle={product.name}\n\t\t\tsubtitle={product.material}\n\t\t\tsrc={product.image}\n\t\t\tsrcSet={product.imageSet}\n\t\t\tsizes=\"(min-width: 64rem) 25vw, 50vw\"\n\t\t\trender={<Link to={`/products/${product.slug}`} />}\n\t\t\tbadge={product.isNew ? <Badge appearance=\"overlay\">New</Badge> : undefined}\n\t\t\tmeta={\n\t\t\t\t<>\n\t\t\t\t\t<span className=\"text-foreground\">{formatPrice(product.price)}</span>\n\t\t\t\t\t<span>{product.finishes.length} finishes</span>\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t))}\n</Grid>",
          "imports": "import { Badge, Grid, MediaTile } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Album grid",
          "code": "<Grid minItemWidth=\"10rem\" gap={3}>\n\t{albums.map((album) => (\n\t\t<MediaTile\n\t\t\tkey={album.id}\n\t\t\ttitle={album.title}\n\t\t\tsubtitle={album.artist}\n\t\t\tsrc={album.cover}\n\t\t\trender={<Link to={`/albums/${album.id}`} />}\n\t\t\tsubtitleRender={<Link to={`/artists/${album.artistId}`} />}\n\t\t\taction={\n\t\t\t\t<Button size=\"icon\" aria-label={`Play ${album.title}`} onClick={() => play(album)}>\n\t\t\t\t\t<Icon name=\"play\" variant=\"solid\" />\n\t\t\t\t</Button>\n\t\t\t}\n\t\t/>\n\t))}\n</Grid>",
          "imports": "import { Button, Grid, Icon, MediaTile } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Video tile with a duration",
          "code": "<MediaTile\n\taspect=\"video\"\n\ttitle=\"Building a synth from scratch\"\n\tsubtitle=\"Undertow Sessions · 2 days ago\"\n\tsrc={video.thumbnail}\n\thref={`/watch/${video.id}`}\n\tbadge={<Badge appearance=\"overlay\">12:04</Badge>}\n/>",
          "imports": "import { Badge, MediaTile } from \"@sableui/react\""
        },
        {
          "label": "Gallery, no links",
          "code": "<Grid minItemWidth=\"8rem\" gap={2}>\n\t{photos.map((photo) => (\n\t\t<MediaTile key={photo.id} size=\"sm\" title={photo.caption} src={photo.url} alt={photo.description} />\n\t))}\n</Grid>",
          "imports": "import { Grid, MediaTile } from \"@sableui/react\""
        },
        {
          "label": "Portfolio grid with crop focus",
          "code": "<Grid minItemWidth=\"16rem\" gap={4}>\n\t{projects.map((project) => (\n\t\t<MediaTile\n\t\t\tkey={project.slug}\n\t\t\taspect=\"video\"\n\t\t\ttitle={project.title}\n\t\t\tsubtitle={project.client}\n\t\t\tsrc={project.thumbnail}\n\t\t\tposition={project.focus}\n\t\t\thref={`/work/${project.slug}`}\n\t\t/>\n\t))}\n</Grid>",
          "imports": "import { Grid, MediaTile } from \"@sableui/react\""
        },
        {
          "label": "Poster shelf",
          "code": "<MediaTile aspect=\"poster\" size=\"lg\" titleAs=\"h3\" title=\"The Long Dark\" subtitle=\"2026 · Drama\" href=\"/films/the-long-dark\" />",
          "imports": "import { MediaTile } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Menu",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/menu",
      "summary": "Dropdown menu over Base UI Menu — roving focus, typeahead, ARIA menu/menuitem wiring, collision-aware positioning, Esc/outside dismissal. Trigger + portal-rendered popup with items, groups, and separators.",
      "keywords": [
        "menu",
        "dropdown",
        "actions",
        "commands"
      ],
      "usage": {
        "description": "Use Menu for a compact list of actions opened from a visible trigger.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for secondary or grouped commands that do not need to be visible all the time."
          },
          {
            "guidance": "do",
            "description": "Keep item labels action-oriented and easy to scan."
          },
          {
            "guidance": "dont",
            "description": "Do not use Menu for complex forms, persistent navigation, or arbitrary rich content."
          },
          {
            "guidance": "do",
            "description": "Show a command's keyboard shortcut with `shortcut` on the row (`<MenuItem shortcut=\"Ctrl S\">Save</MenuItem>`), not a span you push right yourself: the column stays aligned and muted under the highlight. A menu is where people learn the keys."
          },
          {
            "guidance": "dont",
            "description": "Do not build a Select out of it. A menu fires actions and has no value; a Select holds one and reports changes. Swapping them loses form semantics and keyboard type-ahead.",
            "instead": [
              "Select"
            ]
          },
          {
            "guidance": "do",
            "description": "Inside a <Workspace> a Menu adapts automatically — its popup re-applies the compact density across the portal, so items render on the chrome type tier and the control ladder resolves to workspace sizes. Do NOT override the size per call site; that was necessary before v0.41 and is now drift."
          }
        ],
        "anatomy": [
          {
            "name": "MenuTrigger",
            "required": true,
            "description": "The control that opens the menu."
          },
          {
            "name": "MenuContent",
            "required": true,
            "description": "The floating command surface."
          },
          {
            "name": "MenuItem",
            "required": true,
            "description": "One selectable command."
          },
          {
            "name": "MenuSeparator",
            "required": false,
            "description": "A divider between groups."
          },
          {
            "name": "MenuGroup",
            "required": false,
            "description": "A grouped set of menu items."
          },
          {
            "name": "MenuGroupLabel",
            "required": false,
            "description": "A label for a group of items."
          }
        ]
      },
      "related": {
        "components": [
          "ContextMenu",
          "OverflowMenu"
        ]
      },
      "props": [
        {
          "name": "Menu (Root)",
          "type": "Base UI Menu.Root props (open, defaultOpen, onOpenChange, modal, orientation, loopFocus)",
          "default": "—",
          "description": "Groups all parts and controls open state. Uncontrolled by default."
        }
      ],
      "subcomponents": [
        {
          "name": "MenuTrigger",
          "type": "Base UI Menu.Trigger props + render",
          "description": "The button that opens the menu. Compose with render={<Button … />}."
        },
        {
          "name": "MenuContent",
          "type": "Base UI Popup props + side: 'top' | 'right' | 'bottom' | 'left' + align: 'start' | 'center' | 'end' + sideOffset: number + className",
          "description": "Portal + Positioner + Popup. side picks which side of the trigger the popup renders against (auto-flips on collision; defaults to 'bottom'); align sets alignment along that side (defaults to 'start'); sideOffset is the gap in px between trigger and popup (defaults to 6)."
        },
        {
          "name": "MenuItem",
          "type": "Base UI Menu.Item props + className (disabled, closeOnClick, onClick) + variant?: \"default\" | \"destructive\" + icon?: ReactNode + description?: ReactNode + shortcut?: ReactNode",
          "description": "An interactive row. Highlights via data-[highlighted]; dims via data-[disabled]. variant=\"destructive\" for a delete or irreversible action: it keeps the destructive ink when highlighted (never className=\"text-destructive\", which the highlight repaints). `icon` leads the row; `description` adds a quieter second line saying what the action does, and the icon then sits in a small tile spanning both lines. `shortcut` ends the row with the key that runs the action from outside the menu (\"Ctrl S\", or ghost Kbd caps), muted and end-aligned so a column of them lines up; it is display only, so bind the key yourself."
        },
        {
          "name": "MenuLinkItem",
          "type": "Base UI Menu.LinkItem props (href, target, closeOnClick) + className + icon?: ReactNode + description?: ReactNode + newTabLabel?: string",
          "description": "A row that navigates: a real <a>, so it opens in a new tab, middle-clicks and copies as a link. With target=\"_blank\" it adds rel=\"noopener noreferrer\", a trailing ↗ (decorative), and a visually hidden newTabLabel after the label (default \"(opens in new tab)\") so a screen reader announces the new tab; pass newTabLabel to translate it. Takes icon and description like MenuItem."
        },
        {
          "name": "MenuSeparator",
          "type": "Base UI Separator props + className",
          "description": "Hairline rule between item runs."
        },
        {
          "name": "MenuSubmenu",
          "type": "Base UI Menu.SubmenuRoot props",
          "description": "A nested menu. Wraps a MenuSubmenuTrigger and its own MenuContent — pass side=\"inline-end\" to that content so the submenu opens away from its parent in RTL as well as LTR."
        },
        {
          "name": "MenuSubmenuTrigger",
          "type": "Base UI Menu.SubmenuTrigger props + value: ReactNode + icon: ReactNode + className",
          "description": "The row that opens a submenu: item styling, a trailing chevron, and an optional `value` showing the current choice so the row reads \"Effort  High ›\" rather than making the reader open it to find out. `icon` leads the row as MenuItem's does; give it one whenever the items around it have icons, or its label starts a column to their left."
        },
        {
          "name": "MenuRadioGroup",
          "type": "Base UI Menu.RadioGroup props (value, defaultValue, onValueChange)",
          "description": "A single-choice group inside a menu. Controlled via value/onValueChange, uncontrolled via defaultValue."
        },
        {
          "name": "MenuRadioItem",
          "type": "Base UI Menu.RadioItem props + indicatorSide?: \"start\" | \"end\" + className (value, disabled)",
          "description": "One option in a MenuRadioGroup, rendered as menuitemradio with a real checked state. The check sits in a reserved leading column so labels never shift sideways as the highlight moves; indicatorSide=\"end\" moves it to the row's end, for a picker whose rows lead with an avatar."
        },
        {
          "name": "MenuCheckboxItem",
          "type": "Base UI Menu.CheckboxItem props + className + shortcut?: ReactNode + { checked?: boolean; defaultChecked?: boolean; onCheckedChange?: (checked: boolean) => void; disabled?: boolean }",
          "description": "A toggling row, with the same reserved leading column as MenuRadioItem so a menu mixing the two keeps one text margin. Takes `shortcut` like MenuItem (View → Show ruler  Ctrl R)."
        },
        {
          "name": "MenuGroup",
          "type": "Base UI Menu.Group props + className",
          "description": "Groups related items; pair with MenuGroupLabel for an accessible group name."
        },
        {
          "name": "MenuGroupLabel",
          "type": "Base UI Menu.GroupLabel props + className",
          "description": "The label for a MenuGroup — auto-associated with the group for screen readers."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "accent",
        "accent-foreground",
        "muted-foreground"
      ],
      "a11y": [
        "Base UI provides role=menu/menuitem, roving tabindex, arrow-key navigation, and typeahead.",
        "Esc and outside-press dismiss; focus returns to the trigger on close.",
        "Animate open/close via data-[starting-style]/data-[ending-style] attributes.",
        "MenuGroupLabel is auto-associated with its MenuGroup for screen readers.",
        "An external MenuLinkItem (target=\"_blank\") reads its newTabLabel, \"(opens in new tab)\" by default, after its label; the ↗ is aria-hidden.",
        "A disabled MenuItem stays in the arrow-key order — Base UI keeps it focusable with aria-disabled so screen-reader users learn the command exists — but it cannot be activated, and it ignores the pointer."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<Menu><MenuTrigger render={<Button variant=\"secondary\">Options</Button>} /><MenuContent><MenuItem>Edit</MenuItem><MenuItem>Duplicate</MenuItem><MenuSeparator /><MenuItem variant=\"destructive\">Delete</MenuItem></MenuContent></Menu>",
          "imports": "import { Button, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "Grouped",
          "code": "<Menu><MenuTrigger render={<Button variant=\"secondary\">Account</Button>} /><MenuContent><MenuGroup><MenuGroupLabel>Signed in</MenuGroupLabel><MenuItem>Profile</MenuItem><MenuItem>Settings</MenuItem></MenuGroup><MenuSeparator /><MenuItem>Sign out</MenuItem></MenuContent></Menu>",
          "imports": "import { Button, Menu, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuSeparator, MenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "Nested, with a single-choice submenu",
          "code": "<Menu>\n\t<MenuTrigger render={<Button variant=\"secondary\">View</Button>} />\n\t<MenuContent>\n\t\t<MenuItem>Reload</MenuItem>\n\t\t<MenuSubmenu>\n\t\t\t<MenuSubmenuTrigger value={density}>Density</MenuSubmenuTrigger>\n\t\t\t<MenuContent side=\"inline-end\" align=\"start\" sideOffset={4}>\n\t\t\t\t<MenuRadioGroup value={density} onValueChange={setDensity}>\n\t\t\t\t\t<MenuRadioItem value=\"Comfortable\">Comfortable</MenuRadioItem>\n\t\t\t\t\t<MenuRadioItem value=\"Compact\">Compact</MenuRadioItem>\n\t\t\t\t</MenuRadioGroup>\n\t\t\t</MenuContent>\n\t\t</MenuSubmenu>\n\t</MenuContent>\n</Menu>",
          "imports": "import { Button, Menu, MenuContent, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "Rows with icons and descriptions, and links",
          "code": "<Menu>\n\t<MenuTrigger render={<Button variant=\"outline\" size=\"sm\">Share</Button>} />\n\t<MenuContent align=\"end\">\n\t\t<MenuItem icon={<Icon name=\"copy\" />} description=\"Copy page as Markdown for LLMs\" onClick={copy}>Copy page</MenuItem>\n\t\t<MenuLinkItem icon={<Icon name=\"file\" />} description=\"View this page as plain text\" href={markdownUrl} target=\"_blank\">View as Markdown</MenuLinkItem>\n\t</MenuContent>\n</Menu>",
          "imports": "import { Button, Icon, Menu, MenuContent, MenuItem, MenuLinkItem, MenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "With keyboard shortcuts",
          "code": "<Menu>\n\t<MenuTrigger render={<Button variant=\"secondary\">Edit</Button>} />\n\t<MenuContent>\n\t\t<MenuItem shortcut=\"Ctrl Z\" onClick={undo}>Undo</MenuItem>\n\t\t<MenuItem shortcut=\"Ctrl Shift Z\" onClick={redo}>Redo</MenuItem>\n\t\t<MenuSeparator />\n\t\t<MenuItem shortcut={<KbdGroup><Kbd variant=\"ghost\" mod /><Kbd variant=\"ghost\">D</Kbd></KbdGroup>} onClick={duplicate}>Duplicate</MenuItem>\n\t</MenuContent>\n</Menu>",
          "imports": "import { Button, Kbd, KbdGroup, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "Toggling rows",
          "code": "<Menu>\n\t<MenuTrigger render={<Button variant=\"secondary\">Columns</Button>} />\n\t<MenuContent>\n\t\t<MenuCheckboxItem checked={cols.status} onCheckedChange={(v) => setCol(\"status\", v)}>Status</MenuCheckboxItem>\n\t\t<MenuCheckboxItem checked={cols.updated} onCheckedChange={(v) => setCol(\"updated\", v)}>Updated</MenuCheckboxItem>\n\t</MenuContent>\n</Menu>",
          "imports": "import { Button, Menu, MenuCheckboxItem, MenuContent, MenuTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Menubar",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/menubar",
      "summary": "An application's row of menus — File, Edit, View — over Base UI's Menubar. Each menu is an ordinary Sable Menu with a MenubarTrigger as its title; the bar joins them into one tab stop with ←/→ between titles, and once one menu is open, pointing at a neighbour opens it.",
      "keywords": [
        "menubar",
        "menu bar",
        "app menu",
        "file menu",
        "edit menu",
        "application menu",
        "desktop menu"
      ],
      "usage": {
        "description": "Use Menubar for a tool or editor whose commands are too many for a toolbar and belong under named menus (File, Edit, View, Help). Use Toolbar for a row of direct actions, a single Menu or OverflowMenu for one set of options, and NavigationMenu-style links for site navigation.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Compose each menu from the Menu parts: `<Menu><MenubarTrigger>File</MenubarTrigger><MenuContent>…</MenuContent></Menu>`. Rows, groups, submenus, checkbox and radio items are the same parts a lone Menu uses."
          },
          {
            "guidance": "do",
            "description": "Name the bar with aria-label (\"Editor\") so it is announced as the application's menus, not a list of buttons."
          },
          {
            "guidance": "do",
            "description": "Keep titles to one short word each. A reader scans a menubar left to right; a phrase in the bar is a toolbar button."
          },
          {
            "guidance": "dont",
            "description": "Do not use MenubarTrigger outside a Menubar, or a plain MenuTrigger inside one. The bar's arrow keys and hover-to-switch work on the triggers it owns; a Button trigger in the bar looks like a menu title and behaves like a stray button."
          },
          {
            "guidance": "dont",
            "description": "Do not use a menubar for site navigation. Its items are commands in menus (role=menuitem), not links between pages.",
            "instead": [
              "NavigationMenu"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "Menubar",
            "required": true,
            "description": "The bar: role=menubar, one tab stop, arrow keys between titles."
          },
          {
            "name": "Menu",
            "required": true,
            "description": "One per title; the ordinary Menu root."
          },
          {
            "name": "MenubarTrigger",
            "required": true,
            "description": "The title in the bar that opens its menu."
          },
          {
            "name": "MenuContent",
            "required": true,
            "description": "The menu's popup, with MenuItem / MenuSubmenu / MenuCheckboxItem rows inside."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "Toolbar",
          "OverflowMenu",
          "ContextMenu"
        ]
      },
      "props": [
        {
          "name": "orientation",
          "type": "\"horizontal\" | \"vertical\"",
          "default": "\"horizontal\"",
          "description": "The bar's axis. Arrow keys follow it: ←/→ along a horizontal bar, ↑/↓ down a vertical one."
        },
        {
          "name": "loopFocus",
          "type": "boolean",
          "default": "true",
          "description": "Wrap from the last title back to the first with the arrow keys."
        },
        {
          "name": "modal",
          "type": "boolean",
          "default": "true",
          "description": "While a menu is open, block pointer interaction outside it and lock page scroll, like a lone Menu."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Disable every menu in the bar."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Layout classes for the bar. Titles take their look from MenubarTrigger."
        }
      ],
      "subcomponents": [
        {
          "name": "MenubarTrigger",
          "type": "Base UI Menu.Trigger props + className",
          "description": "A menu's title in the bar. A small ghost Button in the control type tier, held in the accent wash while its menu is open (`sable-open:`), so the reader sees which title the popup belongs to."
        }
      ],
      "tokensUsed": [
        "accent",
        "accent-foreground",
        "foreground",
        "ring"
      ],
      "a11y": [
        "Base UI renders role=\"menubar\" with aria-orientation; each title is a menuitem with aria-haspopup and aria-expanded.",
        "The bar is one tab stop. ←/→ move between titles (↑/↓ when vertical), ↓ or Enter opens a menu and moves into it, and Esc closes it and returns focus to its title.",
        "With one menu open, pointing at another title opens that menu instead, so a reader can sweep across the bar, as in a desktop application.",
        "Name the bar with aria-label; titles are their own text."
      ],
      "examples": [
        {
          "label": "Editor menus",
          "code": "<Menubar aria-label=\"Editor\">\n\t<Menu>\n\t\t<MenubarTrigger>File</MenubarTrigger>\n\t\t<MenuContent>\n\t\t\t<MenuItem shortcut=\"Ctrl N\">New</MenuItem>\n\t\t\t<MenuItem shortcut=\"Ctrl O\">Open…</MenuItem>\n\t\t\t<MenuSeparator />\n\t\t\t<MenuItem shortcut=\"Ctrl S\">Save</MenuItem>\n\t\t</MenuContent>\n\t</Menu>\n\t<Menu>\n\t\t<MenubarTrigger>Edit</MenubarTrigger>\n\t\t<MenuContent>\n\t\t\t<MenuItem shortcut=\"Ctrl Z\">Undo</MenuItem>\n\t\t\t<MenuItem shortcut=\"Ctrl Shift Z\">Redo</MenuItem>\n\t\t</MenuContent>\n\t</Menu>\n</Menubar>",
          "imports": "import { Menu, Menubar, MenubarTrigger, MenuContent, MenuItem, MenuSeparator } from \"@sableui/react\""
        },
        {
          "label": "With a submenu and toggling rows",
          "code": "<Menubar aria-label=\"Editor\">\n\t<Menu>\n\t\t<MenubarTrigger>View</MenubarTrigger>\n\t\t<MenuContent>\n\t\t\t<MenuCheckboxItem checked={ruler} onCheckedChange={setRuler}>Show ruler</MenuCheckboxItem>\n\t\t\t<MenuSubmenu>\n\t\t\t\t<MenuSubmenuTrigger value={zoom}>Zoom</MenuSubmenuTrigger>\n\t\t\t\t<MenuContent side=\"inline-end\" align=\"start\" sideOffset={4}>\n\t\t\t\t\t<MenuRadioGroup value={zoom} onValueChange={setZoom}>\n\t\t\t\t\t\t<MenuRadioItem value=\"100%\">100%</MenuRadioItem>\n\t\t\t\t\t\t<MenuRadioItem value=\"Fit\">Fit</MenuRadioItem>\n\t\t\t\t\t</MenuRadioGroup>\n\t\t\t\t</MenuContent>\n\t\t\t</MenuSubmenu>\n\t\t</MenuContent>\n\t</Menu>\n</Menubar>",
          "imports": "import { Menu, Menubar, MenubarTrigger, MenuCheckboxItem, MenuContent, MenuRadioGroup, MenuRadioItem, MenuSubmenu, MenuSubmenuTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Message",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/message",
      "summary": "One row in a conversation: avatar gutter, side, and stacked header / content / footer. Layout only — the surface is Bubble, passed as children.",
      "keywords": [
        "chat",
        "message",
        "conversation row",
        "turn",
        "thread",
        "messaging",
        "grouped messages",
        "ai chat"
      ],
      "usage": {
        "description": "The row a single turn occupies. It owns the geometry — which side, the avatar gutter, where the name and timestamp go, where reactions and receipts go — and nothing about how the content looks. That separation is the point: an assistant's markdown answer, a one-line reply, an attachment, and a tool-call card are all the same row with different children.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Set `messageId`. It is what MessageScroller reads for `scrollToMessage`, `initialScroll`, and visibility tracking — a message without one cannot be jumped to or marked as read."
          },
          {
            "guidance": "do",
            "description": "Pass the same `align` to Message and to the Bubble inside it, so the flattened tail corner lands on the speaker's side."
          },
          {
            "guidance": "do",
            "description": "Use `grouped` for consecutive messages from one author. It tightens the spacing and hides the avatar while keeping its column reserved, so the run reads as one block instead of stepping left. Pass `tail={false}` to the Bubble in each continuation too, so only the first message in the run carries a tail."
          },
          {
            "guidance": "do",
            "description": "Match `avatarSize` to the `size` of the Avatar you pass (sm/md/lg line up 1:1). The gutter is declared, not measured, because it has to hold its width when `grouped` hides the avatar."
          },
          {
            "guidance": "dont",
            "description": "Do not justify the content to move a message to the right. `align=\"end\"` already mirrors the whole row, gutter included; adding your own justification fights it."
          },
          {
            "guidance": "dont",
            "description": "Do not put the timestamp inside the Bubble. It belongs in `header` or `footer`, which stay outside the surface so `variant=\"plain\"` content still has one."
          },
          {
            "guidance": "dont",
            "description": "Do not reach for Message to lay out a system note or a date break. That is `Marker`, which is deliberately quieter than the message tier."
          }
        ],
        "anatomy": [
          {
            "name": "Avatar gutter",
            "required": false,
            "description": "Fixed-width column for the author's Avatar. Kept (but emptied) when `grouped`, which is what keeps a run aligned."
          },
          {
            "name": "Header",
            "required": false,
            "description": "Author name and timestamp, above the content."
          },
          {
            "name": "Content",
            "required": true,
            "description": "The children — usually a Bubble, but equally an Attachment, a tool card, or plain rendered markdown."
          },
          {
            "name": "Footer",
            "required": false,
            "description": "Reactions, delivery receipts, retry actions."
          }
        ]
      },
      "related": {
        "components": [
          "Bubble",
          "MessageScroller",
          "Marker",
          "Attachment",
          "Avatar"
        ]
      },
      "props": [
        {
          "name": "messageId",
          "type": "string",
          "description": "Stable id, published as `data-message-id`. The handle MessageScroller uses for scroll commands and visibility tracking."
        },
        {
          "name": "align",
          "type": "\"start\" | \"end\"",
          "default": "\"start\"",
          "description": "Which side of the conversation. \"start\" is the other party or the assistant; \"end\" is the person reading. Mirrors the whole row, gutter included."
        },
        {
          "name": "avatar",
          "type": "ReactNode",
          "description": "Avatar node for the gutter. Omit for a message with no author identity."
        },
        {
          "name": "avatarSize",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"sm\"",
          "description": "Gutter width, matching Avatar's own size scale 1:1 (32 / 40 / 48px). Declared rather than measured so it survives `grouped`."
        },
        {
          "name": "header",
          "type": "ReactNode",
          "description": "Author name, timestamp — anything above the content."
        },
        {
          "name": "footer",
          "type": "ReactNode",
          "description": "Reactions, receipts, retry actions — anything below the content."
        },
        {
          "name": "grouped",
          "type": "boolean",
          "default": "false",
          "description": "This message continues a run from the same author: tightens the spacing (via `--message-gap`) and drops the avatar while reserving its column."
        },
        {
          "name": "...div props",
          "type": "Omit<ComponentPropsWithRef<\"div\">, \"id\">",
          "description": "Spread onto the row. Use `messageId` rather than `id` — the scroller matches on `data-message-id`."
        }
      ],
      "variants": {
        "align": [
          "start",
          "end"
        ],
        "avatarSize": [
          "sm",
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "foreground",
        "muted-foreground"
      ],
      "a11y": [
        "A plain container with no imposed role — the conversation's semantics belong to the list or log element you wrap it in, not to each row.",
        "`align` reverses the visual row without reordering the DOM, so reading order in assistive tech stays chronological regardless of which side a message is on.",
        "The header and footer render at the secondary type step in muted ink, keeping both below the message tier in the visual hierarchy without dropping either below the AA contrast floor."
      ],
      "examples": [
        {
          "label": "Incoming and outgoing",
          "code": "<>\n\t<Message messageId=\"m1\" avatar={<Avatar size=\"sm\" fallback=\"CA\" />} header={<><strong className=\"text-foreground\">Carla</strong><RelativeTime date={sentAt} /></>}>\n\t\t<Bubble>Did the deploy finish?</Bubble>\n\t</Message>\n\t<Message messageId=\"m2\" align=\"end\">\n\t\t<Bubble variant=\"primary\" align=\"end\">Green across the board.</Bubble>\n\t</Message>\n</>",
          "imports": "import { Avatar, Bubble, Message, RelativeTime } from \"@sableui/react\""
        },
        {
          "label": "A grouped run",
          "code": "<>\n\t<Message messageId=\"m1\" avatar={<Avatar size=\"sm\" fallback=\"CA\" />} header={<strong className=\"text-foreground\">Carla</strong>}>\n\t\t<Bubble>One more thing.</Bubble>\n\t</Message>\n\t<Message messageId=\"m2\" grouped>\n\t\t<Bubble tail={false}>The staging cert expires Friday.</Bubble>\n\t</Message>\n</>",
          "imports": "import { Avatar, Bubble, Message } from \"@sableui/react\""
        },
        {
          "label": "With reactions in the footer",
          "code": "<Message messageId=\"m3\" avatar={<Avatar size=\"sm\" fallback=\"JR\" />} footer={<BubbleReactions><BubbleReaction emoji=\"🎉\" count={3} active /><BubbleReaction emoji=\"👀\" /></BubbleReactions>}>\n\t<Bubble>Shipped 0.45.0.</Bubble>\n</Message>",
          "imports": "import { Avatar, Bubble, BubbleReaction, BubbleReactions, Message } from \"@sableui/react\""
        },
        {
          "label": "An attachment as the content",
          "code": "<Message messageId=\"m4\" align=\"end\">\n\t<Attachment name=\"proposal.pdf\" meta=\"2.4 MB · PDF\" />\n</Message>",
          "imports": "import { Attachment, Message } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "MessageScroller",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/message-scroller",
      "summary": "Scroll container for a conversation. Auto-follows new messages until the reader scrolls away, holds position when older history is prepended, and exposes scroll commands and visibility tracking through its ref.",
      "keywords": [
        "chat",
        "conversation",
        "messages",
        "thread",
        "transcript",
        "stick to bottom",
        "auto scroll",
        "streaming",
        "infinite scroll",
        "inbox",
        "ai chat",
        "support chat"
      ],
      "usage": {
        "description": "The scroll region a conversation lives in. It owns the scrolling and nothing else — not your messages, not your AI state, not your transport or persistence — so you bring the content renderer and it handles the behaviors that make streaming chat feel right: pinning to the newest message, releasing when the reader scrolls up, keeping the view still when older history loads above, jumping to a specific message, restoring a saved read position, and reporting what is actually on screen.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Building a whole chat? `sable docs building-a-chat` covers what the scroller does during a stream, what the app owns, and the failure states around it."
          },
          {
            "guidance": "do",
            "description": "Bound it the way you would bound any scroll box — `flex-1 min-h-0` inside a flex column, or `max-h-96`. `className` lands on the element that actually scrolls, so the obvious bound is the correct one (same contract as Scroller)."
          },
          {
            "guidance": "do",
            "description": "Give every Message a `messageId`. It is the handle for `scrollToMessage`, `initialScroll`, and `onVisibleMessagesChange` — a message without one is invisible to all three."
          },
          {
            "guidance": "do",
            "description": "Prepend older history directly into `children` when the reader reaches the top. The scroller anchors on the first rendered message and re-adds the height that appeared above it, so the view does not jump."
          },
          {
            "guidance": "do",
            "description": "Set the rhythm between messages with the `gap` prop, not with a flex class on `className` — the messages are laid out in a column inside the scroll region, not directly on it."
          },
          {
            "guidance": "do",
            "description": "Restore a reopened thread with `initialScroll={{ messageId: lastRead }}` instead of dropping the reader at the bottom of a conversation they have not finished."
          },
          {
            "guidance": "do",
            "description": "Wrap a docked agent panel in `<Density value=\"compact\">`. The scroller tightens its rhythm and every message inside it drops to the workspace type tier — one attribute for the whole conversation, no per-component sizing."
          },
          {
            "guidance": "dont",
            "description": "Do not call `scrollToBottom` on every incoming token. Auto-follow already does it, and doing it yourself fights the reader who scrolled up to read something."
          },
          {
            "guidance": "dont",
            "description": "Do not expect `ref` to be the DOM node — it is a command handle (`scrollToBottom`, `scrollToMessage`, `isFollowing`). Reach for `ref.current.element` when you genuinely need the element."
          },
          {
            "guidance": "dont",
            "description": "Do not wrap it in a positioned div to place a jump-to-latest button. It ships one, stuck to the bottom edge from inside the scroll region, which is why `className` gets to stay on the scrolling element."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for an ordinary long list. That is `Scroller` — this one's follow-the-bottom behavior is wrong for content the reader is browsing rather than receiving."
          }
        ],
        "anatomy": [
          {
            "name": "Scroll region",
            "required": true,
            "description": "The element that scrolls. Carries `className`: sizing, padding, and background."
          },
          {
            "name": "Message column",
            "required": true,
            "description": "The flex column holding the children, spaced by `gap`. Publishes `--message-gap` so `<Message grouped>` can close it."
          },
          {
            "name": "Jump to latest",
            "required": false,
            "description": "A control stuck to the bottom edge, shown only while the reader is scrolled away from the newest message."
          }
        ]
      },
      "related": {
        "components": [
          "Message",
          "Bubble",
          "Marker",
          "Attachment",
          "Scroller"
        ]
      },
      "props": [
        {
          "name": "ref",
          "type": "Ref<MessageScrollerHandle>",
          "description": "Imperative commands, not the DOM node: `scrollToBottom(opts)`, `scrollToTop(opts)`, `scrollToMessage(id, opts)` (returns false when the message is not rendered), `isFollowing()`, and `element` for the scrolling node itself. `opts` is `ScrollCommandOptions`: `{ animate?: boolean }` (default true, and off whenever motion is), not the DOM's `behavior`."
        },
        {
          "name": "autoFollow",
          "type": "boolean",
          "default": "true",
          "description": "Keep the newest message in view as content arrives, until the reader scrolls away from the bottom. Set false for a transcript that must never move under the reader."
        },
        {
          "name": "followThreshold",
          "type": "number",
          "default": "64",
          "description": "Distance from the bottom, in px, that still counts as following. A band rather than a pixel, so a token arriving mid-frame does not flicker the state."
        },
        {
          "name": "onFollowChange",
          "type": "(following: boolean) => void",
          "description": "Notified when the viewport pins to, or releases from, the newest message."
        },
        {
          "name": "initialScroll",
          "type": "\"bottom\" | \"top\" | { messageId: string }",
          "default": "\"bottom\"",
          "description": "Where a freshly mounted thread lands. Pass a messageId to restore a saved read position. Applied once, on mount — changing it later will not yank a reader mid-conversation."
        },
        {
          "name": "jumpToLatest",
          "type": "boolean",
          "default": "true",
          "description": "Show the jump-to-latest control while the reader is scrolled away from the newest message."
        },
        {
          "name": "jumpToLatestLabel",
          "type": "string",
          "default": "\"Jump to latest\"",
          "description": "Accessible label and tooltip for that control."
        },
        {
          "name": "gap",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Vertical rhythm between messages. Also published as `--message-gap`, which `<Message grouped>` reads to collapse the gap within a run."
        },
        {
          "name": "onVisibleMessagesChange",
          "type": "(ids: string[]) => void",
          "description": "Ids of the messages currently intersecting the viewport, in DOM order. The hook for read receipts, mark-as-seen, and unread counters."
        },
        {
          "name": "...div props",
          "type": "Omit<ComponentPropsWithRef<\"div\">, \"ref\">",
          "description": "Spread onto the scrolling element. `className` bounds and pads the scroll region; `onScroll` composes with the component's own."
        }
      ],
      "variants": {
        "gap": [
          "sm",
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "border",
        "secondary",
        "secondary-foreground",
        "ring"
      ],
      "a11y": [
        "Native overflow, so keyboard scrolling (arrows, Page Up/Down, Home/End) and the OS scrollbar work unchanged; the scrollbar is styled thin, not replaced.",
        "Overscroll is contained, so a wheel gesture that runs out of conversation does not start scrolling the page behind it.",
        "The jump-to-latest control is a real button with an accessible label, reachable by keyboard, and only present when there is somewhere to jump to.",
        "Smooth scrolling is used only when motion is enabled — `prefers-reduced-motion` and <MotionProvider> off both collapse every scroll command to an instant jump."
      ],
      "examples": [
        {
          "label": "Streaming conversation",
          "code": "<MessageScroller className=\"flex-1 min-h-0 px-4 py-6\">{messages.map((m) => (<Message key={m.id} messageId={m.id} align={m.mine ? \"end\" : \"start\"}><Bubble variant={m.mine ? \"primary\" : \"muted\"} align={m.mine ? \"end\" : \"start\"}>{m.body}</Bubble></Message>))}{pending ? <Marker icon=\"spinner\" spin shimmer>Thinking…</Marker> : null}</MessageScroller>",
          "imports": "import { Bubble, Marker, Message, MessageScroller } from \"@sableui/react\""
        },
        {
          "label": "Scroll to a message on demand",
          "code": "function Thread({ messages, replyTo }) {\n\tconst thread = useRef(null)\n\treturn (\n\t\t<>\n\t\t\t<Button onClick={() => thread.current?.scrollToMessage(replyTo)}>Show original</Button>\n\t\t\t<MessageScroller ref={thread} className=\"max-h-96\">\n\t\t\t\t{messages.map((m) => (<Message key={m.id} messageId={m.id}><Bubble>{m.body}</Bubble></Message>))}\n\t\t\t</MessageScroller>\n\t\t</>\n\t)\n}",
          "imports": "import { Bubble, Button, Message, MessageScroller } from \"@sableui/react\""
        },
        {
          "label": "Restore a saved read position and track receipts",
          "code": "<MessageScroller className=\"h-96\" initialScroll={{ messageId: lastRead }} onVisibleMessagesChange={(ids) => markSeen(ids)}>{messages.map((m) => (<Message key={m.id} messageId={m.id}><Bubble>{m.body}</Bubble></Message>))}</MessageScroller>",
          "imports": "import { Bubble, Message, MessageScroller } from \"@sableui/react\""
        },
        {
          "label": "Prepend older history without moving the view",
          "code": "<MessageScroller className=\"h-96\" gap=\"sm\">{hasMore ? <Button variant=\"secondary\" loadingLabel=\"Loading…\" onClick={loadOlder}>Load earlier messages</Button> : null}{messages.map((m) => (<Message key={m.id} messageId={m.id}><Bubble>{m.body}</Bubble></Message>))}</MessageScroller>",
          "imports": "import { Bubble, Button, Message, MessageScroller } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Meter",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/meter",
      "summary": "A role=meter reading over Base UI Meter, drawn as a bar or a ring — how full something is within a known range (storage, quota, strength), with a tone for good/caution/bad. Not task progress.",
      "keywords": [
        "meter",
        "usage bar",
        "storage",
        "quota",
        "capacity",
        "limit",
        "password strength",
        "level",
        "segmented",
        "tick bar",
        "score",
        "credits",
        "spend limit"
      ],
      "usage": {
        "description": "Use Meter to show a static measurement against a known maximum — storage used, seats taken, API quota, password strength. It is announced as a meter, not a progress bar, so a screen-reader user hears a level rather than a task underway.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Label it and show the reading in units people use (\"7.2 of 10 GB\"), with MeterLabel and MeterValue. The bar shows proportion; the number is what gets acted on."
          },
          {
            "guidance": "do",
            "description": "Pick `tone` from thresholds you own and apply them consistently across the page — warning near the limit, destructive at or over it. The component does not guess where good becomes bad."
          },
          {
            "guidance": "dont",
            "description": "Do not use Meter for a task in flight — an upload, an install, a step count. That is Progress; Meter tells assistive tech nothing is happening.",
            "instead": [
              "Progress"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a value without a meaningful maximum (followers, total spend). A bar implies a full scale; an unbounded count is a stat."
          },
          {
            "guidance": "do",
            "description": "Use shape=\"ring\" when the reading is a score that belongs in a small, glanceable spot on a card. It is the same measurement drawn as a circular gauge, not a different component."
          },
          {
            "guidance": "do",
            "description": "Use `segments` (a tick bar, ▮▮▮▮▮▮▯▯▯▯) for a discrete budget, score or quota read at a glance — a spend limit, credits left, an ICP lead score, months of data coverage. Pick a count that matches the unit when there is one (10 for a score out of 10, 12 for months) and otherwise size it to the track: a tick reads as a tick when it is taller than it is wide, about one per 8px of track (40 across a card row, 20 in a narrow table cell). Any reading above min shows at least one tick."
          },
          {
            "guidance": "dont",
            "description": "Do not segment a fine-grained continuous value where the exact proportion matters (disk at 73.4%) — ticks round it to the nearest mark; use the continuous bar. And do not use a tick bar for a task in flight or steps completed: that is Progress, or a Stepper for named steps.",
            "instead": [
              "Progress"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "MeterTrack",
            "required": true,
            "description": "The rail that represents the full range."
          },
          {
            "name": "MeterIndicator",
            "required": true,
            "description": "The fill, sized from value and coloured by tone. Not used with `segments`: the track draws its ticks instead."
          },
          {
            "name": "MeterLabel",
            "required": false,
            "description": "The visible name; also names the meter for assistive tech."
          },
          {
            "name": "MeterValue",
            "required": false,
            "description": "The formatted reading."
          }
        ]
      },
      "related": {
        "components": [
          "Progress",
          "Badge"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "number",
          "description": "The current reading, between min and max. Required."
        },
        {
          "name": "min",
          "type": "number",
          "default": "0",
          "description": "The bottom of the range."
        },
        {
          "name": "max",
          "type": "number",
          "default": "100",
          "description": "The top of the range."
        },
        {
          "name": "tone",
          "type": "\"primary\" | \"3\" | \"success\" | \"warning\" | \"destructive\"",
          "default": "\"primary\"",
          "description": "Fill colour, mapped to a semantic token. Choose it from your own thresholds."
        },
        {
          "name": "shape",
          "type": "\"bar\" | \"ring\"",
          "default": "\"bar\"",
          "description": "bar is a horizontal track; ring is a circular gauge for a small, glanceable reading — the same value, min, max and tones."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Ring diameter (40 / 64 / 96px at the default spacing; the centre value steps with it), or bar thickness on the same sm / md / lg rails as Progress."
        },
        {
          "name": "showValue",
          "type": "boolean",
          "description": "Print the value in the ring's centre (formatted like MeterValue)."
        },
        {
          "name": "segments",
          "type": "number",
          "description": "Draw the bar as this many separate ticks instead of a continuous fill (a quota, score or spend limit). Filled ticks = round(share × N), at least one for any reading above min, none at min. Ticks take the tone; empty ones sit on the rail colour. The segmented track has its own, taller sm / md / lg ladder. Bar only: ignored for shape=\"ring\"."
        },
        {
          "name": "strokeWidth",
          "type": "number",
          "default": "6",
          "description": "Ring stroke width, in viewBox units of 100."
        },
        {
          "name": "format",
          "type": "Intl.NumberFormatOptions",
          "description": "Formatting for MeterValue and aria-valuetext (percent, unit, currency)."
        },
        {
          "name": "getAriaValueText",
          "type": "(formatted: string, value: number) => string",
          "description": "Human-readable reading for assistive tech (\"7.2 of 10 gigabytes used\")."
        },
        {
          "name": "locale",
          "type": "Intl.LocalesArgument",
          "description": "Locale for formatting. Defaults to the runtime locale."
        }
      ],
      "subcomponents": [
        {
          "name": "MeterTrack",
          "type": "Base UI Track props + className + size",
          "description": "The rail. Rendered automatically when Meter has no children; renders a MeterIndicator by default — or, when the Meter has `segments`, its row of ticks (children are not rendered then)."
        },
        {
          "name": "MeterIndicator",
          "type": "Base UI Indicator props + className + tone",
          "description": "The fill. Inherits the Meter's tone unless given its own."
        },
        {
          "name": "MeterLabel",
          "type": "Base UI Label props + className",
          "description": "Visible label; wires aria-labelledby on the root."
        },
        {
          "name": "MeterValue",
          "type": "Base UI Value props + className",
          "description": "Formatted reading. Accepts a `(formatted, value) => ReactNode` child."
        }
      ],
      "variants": {
        "tone": [
          "primary",
          "3",
          "success",
          "warning",
          "destructive"
        ],
        "shape": [
          "bar",
          "ring"
        ],
        "size": [
          "sm",
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "secondary",
        "primary",
        "tone-3",
        "success",
        "tone-warning",
        "destructive",
        "foreground",
        "muted-foreground",
        "destructive-mark",
        "success-mark",
        "tone-warning-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Meter",
          "why": "A meter is a reading, present with the page that reports it. Animating the fill up from zero on load would act out a change that did not happen."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Meter",
          "why": "It reports and accepts no input. A bar that reacted to the pointer would read as a Slider the user could drag."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "MeterIndicator",
          "why": "Width and colour ease on the motion tokens (no recipe animates width) when the reading changes — freeing space after a delete visibly shrinks the bar, so the user sees the cause and effect rather than a different bar."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "MeterTrack (segments)",
          "why": "With segments, the fill runs through the ticks from the edge it is leaving — left to right as it grows, right to left as it shrinks — each tick easing its colour on the fast token after a stagger that is a share of the slow token (a full sweep is one slow duration) × --motion-expressive. Every tick switching at once would read as a different bar, not the same budget moving; `subtle` lands them together and off is instant."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Meter",
          "why": "A meter has no indeterminate state; a reading is either known or not shown. Unknown-but-working is Progress with no value."
        }
      ],
      "a11y": [
        "Base UI renders role=meter with aria-valuenow, aria-valuemin, aria-valuemax and aria-valuetext — distinct from Progress's role=progressbar.",
        "Name it with MeterLabel or aria-label; an unnamed meter is announced as a bare number.",
        "Tone is colour only. Say the state in text too (\"Almost full\") when it matters, and use getAriaValueText to give units."
      ],
      "examples": [
        {
          "label": "Ring",
          "code": "<Meter shape=\"ring\" value={72} showValue aria-label=\"Storage used\" />",
          "imports": "import { Meter } from \"@sableui/react\""
        },
        {
          "label": "Bare",
          "code": "<Meter value={64} aria-label=\"Storage used\" />",
          "imports": "import { Meter } from \"@sableui/react\""
        },
        {
          "label": "Storage with label and reading",
          "code": "<Meter value={7.2} max={10} tone=\"warning\" getAriaValueText={(_, v) => `${v} of 10 gigabytes used`}>\n\t<div className=\"mb-2 flex flex-wrap items-center justify-between gap-x-3 gap-y-1\">\n\t\t<MeterLabel>Storage</MeterLabel>\n\t\t<MeterValue>{(_, value) => `${value} of 10 GB`}</MeterValue>\n\t</div>\n\t<MeterTrack />\n</Meter>",
          "imports": "import { Meter, MeterLabel, MeterTrack, MeterValue } from \"@sableui/react\""
        },
        {
          "label": "Segmented spend limit",
          "code": "<Meter value={1240} max={2000} segments={40} getAriaValueText={() => \"€1,240 of €2,000 spent this month\"}>\n\t<div className=\"mb-2 flex flex-wrap items-center justify-between gap-x-3 gap-y-1\">\n\t\t<MeterLabel>Monthly spend limit</MeterLabel>\n\t\t<MeterValue>{() => \"€1,240 / €2,000\"}</MeterValue>\n\t</div>\n\t<MeterTrack />\n</Meter>",
          "imports": "import { Meter, MeterLabel, MeterTrack, MeterValue } from \"@sableui/react\""
        },
        {
          "label": "Segmented score cell",
          "code": "<div className=\"flex items-center gap-3\">\n\t<Meter value={8} max={10} segments={10} size=\"sm\" tone=\"success\" className=\"w-24\" aria-label=\"ICP score\" getAriaValueText={(_, v) => `${v} out of 10`} />\n\t<span className=\"text-mono-caption text-foreground\">8/10</span>\n</div>",
          "imports": "import { Meter } from \"@sableui/react\""
        },
        {
          "label": "Tones",
          "code": "<div className=\"flex flex-col gap-3\">\n\t<Meter value={30} tone=\"success\" aria-label=\"Seats used\" />\n\t<Meter value={82} tone=\"warning\" aria-label=\"API quota used\" />\n\t<Meter value={100} tone=\"destructive\" aria-label=\"Storage used\" />\n</div>",
          "imports": "import { Meter } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "MiddleTruncate",
      "status": "stable",
      "group": "Text & code",
      "register": "either",
      "path": "components/middle-truncate",
      "summary": "Middle-truncates a long string (hash, address, signature) to `5J7s…8xQp`, keeping the start and end legible while preserving the full value on hover.",
      "keywords": [
        "truncate",
        "middle truncate",
        "hash",
        "identifier"
      ],
      "usage": {
        "description": "Use MiddleTruncate when both the beginning and end of a long identifier must remain visible.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for hashes, addresses, long filenames, URLs, or generated IDs."
          },
          {
            "guidance": "do",
            "description": "Provide the full value through title text, copy action, or surrounding detail when needed."
          },
          {
            "guidance": "dont",
            "description": "Do not use MiddleTruncate for human prose where the middle words carry meaning."
          },
          {
            "guidance": "dont",
            "description": "Do not middle-truncate a value with no way to obtain it in full. Truncation removes characters from the page, so the value needs a copy affordance beside it: an icon Button with useCopy, as in the Copyable value example."
          }
        ]
      },
      "related": {
        "components": [
          "Code",
          "Button"
        ]
      },
      "props": [
        {
          "name": "text",
          "type": "string",
          "description": "The full string to render. When it is truncated, the full value is also set as the title attribute (a pointer tooltip)."
        },
        {
          "name": "startChars",
          "type": "number",
          "default": "6",
          "description": "How many leading characters to keep before the ellipsis."
        },
        {
          "name": "endChars",
          "type": "number",
          "default": "6",
          "description": "How many trailing characters to keep after the ellipsis."
        }
      ],
      "tokensUsed": [],
      "a11y": [
        "When truncated, the visible abbreviation is aria-hidden and a visually hidden copy carries the full value, so screen readers announce the whole string. The title attribute holds it too, for a pointer tooltip only.",
        "Renders the string verbatim when it is too short to benefit from truncation, so no value is hidden needlessly."
      ],
      "examples": [
        {
          "label": "API key",
          "code": "<MiddleTruncate text=\"demo_key_7f3a9c2e5b8d1f4a6c0e9b3d7a2f5c8e1b4\" />",
          "imports": "import { MiddleTruncate } from \"@sableui/react\""
        },
        {
          "label": "Custom start/end counts",
          "code": "<MiddleTruncate text=\"9f2c4e7a1b3d5f60c8e2a4b6d8f0e1c3a5b7d9f2\" startChars={4} endChars={4} />",
          "imports": "import { MiddleTruncate } from \"@sableui/react\""
        },
        {
          "label": "Copyable value",
          "code": "const { copy, copied } = useCopy(commitHash)\n<Row gap={1}><MiddleTruncate text={commitHash} /><Button variant=\"ghost\" size=\"icon-xs\" aria-label=\"Copy commit hash\" onClick={copy}><span aria-hidden=\"true\" className=\"motion-icon-swap\"><span data-active={!copied} className=\"inline-flex\"><Icon name=\"copy\" /></span><span data-active={copied} className=\"inline-flex\"><Icon name=\"check\" /></span></span></Button><span role=\"status\" className=\"sr-only\">{copied ? \"Copied\" : \"\"}</span></Row>",
          "imports": "import { Button, Icon, MiddleTruncate, Row, useCopy } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "NavigationMenu",
      "status": "stable",
      "group": "Navigation",
      "register": "page",
      "path": "components/navigation-menu",
      "summary": "A site header's primary nav over Base UI NavigationMenu: a bar of links and triggers, where a trigger opens a panel of links on hover, click or Enter. One shared panel glides between triggers and resizes to each one's content. Links take any router's link through `render` and mark the current page with `active`.",
      "keywords": [
        "navigation",
        "nav",
        "header nav",
        "site nav",
        "mega menu",
        "top nav",
        "navbar",
        "dropdown nav"
      ],
      "usage": {
        "description": "Use NavigationMenu for a marketing or docs site's header: a few top-level destinations, some of which open a panel of related pages. Use Menu for actions rather than destinations, Tabs to switch views inside a page, Sidebar or SideNav for an app's persistent navigation, and AppHeader for an app's mobile top bar.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep the bar to a handful of entries. A trigger groups related pages; a destination with nothing beneath it is a plain NavigationMenuLink in its own item."
          },
          {
            "guidance": "do",
            "description": "Give panel links a `description` when titles alone are ambiguous (\"Sync\" → \"Offline first, conflict free\"), and lay the Content out with layout classes (`grid w-[30rem] grid-cols-2`); the shared panel sizes itself to it."
          },
          {
            "guidance": "do",
            "description": "Pass your router's link through `render` (`<NavigationMenuLink render={<Link to=\"/pricing\" />}>`) and set `active` on the current page's link, so the bar shows where the reader is and announces it as `aria-current=\"page\"`."
          },
          {
            "guidance": "do",
            "description": "Below `md`, hide the bar and offer the same destinations in a Sheet opened from a menu Button: SheetContent side=\"left\" holding a SideNav, its groups mirroring the panels. A hover panel has nothing to hover on a phone, and a bar of five entries does not fit one."
          },
          {
            "guidance": "dont",
            "description": "Do not put actions in it (Sign in, New project). Those are Buttons beside the nav; the nav holds places to go."
          },
          {
            "guidance": "dont",
            "description": "Do not assemble the panel yourself. The root renders the one Portal, Positioner, Popup and Viewport every trigger shares; a second one breaks the glide between triggers."
          }
        ],
        "anatomy": [
          {
            "name": "NavigationMenu",
            "required": true,
            "description": "The `<nav>` root; also renders the shared floating panel."
          },
          {
            "name": "NavigationMenuList",
            "required": true,
            "description": "The bar: a `<ul>` the arrow keys rove across."
          },
          {
            "name": "NavigationMenuItem",
            "required": true,
            "description": "One `<li>`: a link, or a trigger with its content."
          },
          {
            "name": "NavigationMenuTrigger",
            "required": false,
            "description": "Opens its item's content; carries a chevron."
          },
          {
            "name": "NavigationMenuContent",
            "required": false,
            "description": "The links a trigger reveals, rendered into the shared panel."
          },
          {
            "name": "NavigationMenuLink",
            "required": true,
            "description": "A destination: a bar entry in an item, a two-line row in content."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "SideNav",
          "Sheet",
          "AppHeader",
          "Tabs"
        ]
      },
      "props": [
        {
          "name": "NavigationMenu (Root)",
          "type": "Base UI NavigationMenu.Root props (value, defaultValue, onValueChange, delay, closeDelay, orientation) + className",
          "default": "—",
          "description": "The `<nav>`. `value` is the open item's value (null when closed); `delay` / `closeDelay` tune hover-to-open."
        },
        {
          "name": "align",
          "type": "\"start\" | \"center\" | \"end\"",
          "default": "\"start\"",
          "description": "Alignment of the shared panel along its trigger."
        },
        {
          "name": "sideOffset",
          "type": "number",
          "default": "8",
          "description": "Gap between the bar and the panel, in px. The pointer crosses it on a bridge, so the panel does not close on the way in."
        }
      ],
      "subcomponents": [
        {
          "name": "NavigationMenuList",
          "type": "Base UI NavigationMenu.List props + className",
          "description": "The bar of items, a `<ul>`. Arrow keys move between entries."
        },
        {
          "name": "NavigationMenuItem",
          "type": "Base UI NavigationMenu.Item props + className + value?: string",
          "description": "One `<li>` holding either a NavigationMenuLink or a NavigationMenuTrigger with its NavigationMenuContent."
        },
        {
          "name": "NavigationMenuTrigger",
          "type": "Base UI NavigationMenu.Trigger props + className",
          "description": "Opens its item's content on hover, click or Enter, with a chevron that turns while open. Styled like the bar's links: muted at rest, full ink when hovered or open."
        },
        {
          "name": "NavigationMenuContent",
          "type": "Base UI NavigationMenu.Content props + className + keepMounted?: boolean",
          "description": "The item's panel content. Size and lay it out with layout classes; the shared panel follows its size and slides it in from the side it was reached from."
        },
        {
          "name": "NavigationMenuLink",
          "type": "Base UI NavigationMenu.Link props + className + href?: string + active?: boolean + closeOnClick?: boolean + render?: ReactElement + description?: ReactNode",
          "description": "A destination. In an item it is a bar entry; in content it is a row with an optional `description` line. `active` sets `aria-current=\"page\"`; `render={<Link to=\"…\" />}` keeps the roving focus on your router's link."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border-floating",
        "accent",
        "accent-foreground",
        "muted-foreground",
        "foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Panel",
          "why": "The panel fades and scales in from its trigger like a popover, but it also resizes as the reader moves between triggers, which motion-pop cannot express: Base UI measures each content into --popup-width/--popup-height and the popup transitions to them on the motion tokens."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Panel",
          "why": "Moving from one trigger to the next keeps one panel open: it glides along the bar and the new content slides in from the direction of travel, so the reader sees one surface changing rather than two popups swapping. Snaps on first open and on resize (data-instant), where a glide would mean nothing."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Trigger, Link",
          "why": "Bar entries and panel rows fill on hover and focus like the other interactive surfaces, so the bar reads as live before anything opens."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "Nothing in a nav moves on its own."
        }
      ],
      "a11y": [
        "The root is a <nav>; give it an aria-label when the page has more than one nav (\"Main\").",
        "Arrow keys move across the bar; Enter, Space or ArrowDown opens a trigger's content and moves focus into it; Esc closes and returns focus to the trigger.",
        "A trigger is a button with aria-expanded; its content is reachable by Tab in reading order once open.",
        "`active` on a link sets aria-current=\"page\" and gives it full ink, so the current page is announced as well as shown.",
        "Panel motion runs on the motion tokens, so reduced motion (or MotionProvider \"reduced\") collapses the glide and resize to instant."
      ],
      "examples": [
        {
          "label": "Bar with a panel",
          "code": "<NavigationMenu aria-label=\"Main\">\n\t<NavigationMenuList>\n\t\t<NavigationMenuItem>\n\t\t\t<NavigationMenuTrigger>Product</NavigationMenuTrigger>\n\t\t\t<NavigationMenuContent className=\"grid w-[30rem] grid-cols-2\">\n\t\t\t\t<NavigationMenuLink href=\"/editor\" description=\"Write and review together.\">Editor</NavigationMenuLink>\n\t\t\t\t<NavigationMenuLink href=\"/sync\" description=\"Offline first, conflict free.\">Sync</NavigationMenuLink>\n\t\t\t</NavigationMenuContent>\n\t\t</NavigationMenuItem>\n\t\t<NavigationMenuItem>\n\t\t\t<NavigationMenuLink href=\"/pricing\">Pricing</NavigationMenuLink>\n\t\t</NavigationMenuItem>\n\t</NavigationMenuList>\n</NavigationMenu>",
          "imports": "import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger } from \"@sableui/react\""
        },
        {
          "label": "With a router, marking the current page",
          "code": "<NavigationMenu aria-label=\"Main\">\n\t<NavigationMenuList>\n\t\t<NavigationMenuItem>\n\t\t\t<NavigationMenuLink active={path === \"/docs\"} render={<Link to=\"/docs\" />}>Docs</NavigationMenuLink>\n\t\t</NavigationMenuItem>\n\t\t<NavigationMenuItem>\n\t\t\t<NavigationMenuLink active={path === \"/blog\"} render={<Link to=\"/blog\" />}>Blog</NavigationMenuLink>\n\t\t</NavigationMenuItem>\n\t</NavigationMenuList>\n</NavigationMenu>",
          "imports": "import { NavigationMenu, NavigationMenuItem, NavigationMenuLink, NavigationMenuList } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        }
      ]
    },
    {
      "name": "Note",
      "status": "stable",
      "group": "Status",
      "register": "page",
      "path": "components/note",
      "summary": "Callout / admonition box. Its tone follows the shared status-tone vocabulary (neutral/info/success/warning/destructive), pairing a soft tone fill with a matching leading icon. Optional title.",
      "keywords": [
        "note",
        "callout",
        "admonition",
        "warning",
        "caveat",
        "hint",
        "context"
      ],
      "usage": {
        "description": "Use Note for helpful supporting information that should sit near the relevant content — including a caveat or warning attached to a form, a dialog, or a section. It is the in-context callout; Banner is the page-level strip.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for tips, caveats, or secondary context that improves understanding."
          },
          {
            "guidance": "do",
            "description": "Reach for Note rather than Banner when the message qualifies something on the page — a warning inside a dialog, a caveat above a submit button. Banner is a full-width announcement strip for page- or app-level state; inside a form it reads as a slab, and its soft fill carries no border or tone-colored icon, so the severity stops being visible."
          },
          {
            "guidance": "do",
            "description": "Keep tone calm and concise so the note does not compete with primary content."
          },
          {
            "guidance": "do",
            "description": "When the reader can resolve the state, pass `action` rather than putting a Button in children. The prop is data — label plus handler — so the callout owns the placement and weight; a Button dropped into children inherits neither, floats in the box's padding, and (in `secondary`) punches a near-background hole in the tone fill."
          },
          {
            "guidance": "dont",
            "description": "Do not use Note for state the whole page or app is in (an outage, an offline session, a blocked account) — that is Banner — or for a message tied to one field, which is the field's own error text.",
            "instead": [
              "Banner"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not give a Note two actions. One remedy reads as the sentence's next move; two make it a decision point, which is a Dialog's job."
          },
          {
            "guidance": "dont",
            "description": "Do not stack several in a row. Three notes together are a wall of asides; if everything is called out, nothing is."
          }
        ]
      },
      "related": {
        "components": [
          "Banner",
          "InlineStatus",
          "EmptyState"
        ]
      },
      "props": [
        {
          "name": "action",
          "type": "{ label: string; onClick?: () => void; href?: string }",
          "description": "A single remedy, rendered below the body and aligned to the text column. Deliberately data, not a slot: Note owns the placement, weight, ink and motion, so the action cannot be styled into a button that outweighs the sentence explaining it. Use onClick for an in-place action (renders a button, no glyph) or href for a link (renders an anchor with a trailing chevron) — the chevron means navigate, so it appears only when the action genuinely goes somewhere."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"info\" | \"success\" | \"warning\" | \"destructive\"",
          "default": "\"info\"",
          "description": "Severity tone — drives the border, fill, and leading icon color/name. The shared status-tone vocabulary (STATUS_TONES)."
        },
        {
          "name": "title",
          "type": "string",
          "description": "Optional bold lead-in rendered above the body (text-title-sm)."
        },
        {
          "name": "icon",
          "type": "string | ReactNode | null",
          "description": "Override the variant glyph: a string swaps the icon name (keeping the tone color), a ReactNode replaces it, null removes it; omit for the variant default."
        }
      ],
      "variants": {
        "tone": [
          "neutral",
          "info",
          "success",
          "warning",
          "destructive"
        ]
      },
      "tokensUsed": [
        "foreground",
        "border",
        "muted",
        "muted-foreground",
        "tone-info",
        "tone-warning",
        "success",
        "destructive",
        "destructive-mark",
        "success-mark",
        "tone-warning-mark",
        "tone-info-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A note is part of the content it annotates and renders with it. A callout that animated in would pull the eye before the reader has reached it in the flow."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Action",
          "why": "The action's focus ring eases in, and its underline thickens on hover. Inside a block of guidance, that is what separates the one thing to do from the prose around it."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Action",
          "why": "A note's action usually navigates or opens something; the small settle on press is the only confirmation before the next surface paints."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "A note has no states to move between: its tone is fixed when it renders. A note that changes tone is a new message, and should arrive as one."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Static guidance. Work in progress belongs in a Progress or a Spinner, not in a callout."
        }
      ],
      "a11y": [
        "Rendered with role=\"note\" so assistive tech can announce it as an aside.",
        "Color is never the sole signal — the leading icon and optional title reinforce severity."
      ],
      "examples": [
        {
          "label": "Info",
          "code": "<Note tone=\"info\">Reports refresh every hour.</Note>",
          "imports": "import { Note } from \"@sableui/react\""
        },
        {
          "label": "With title",
          "code": "<Note tone=\"warning\" title=\"Low balance\">Add credits before your next export.</Note>",
          "imports": "import { Note } from \"@sableui/react\""
        },
        {
          "label": "Warning with a remedy, inside a dialog",
          "code": "<Note tone=\"warning\" action={{ label: \"Unload chat model\", onClick: unloadChatModel }}>gemma-4 is holding VRAM — generating now may be slow or fail.</Note>",
          "imports": "import { Note } from \"@sableui/react\""
        },
        {
          "label": "Custom icon",
          "code": "<Note tone=\"neutral\" icon=\"lock\">Pricing cannot be changed after an order is placed.</Note>",
          "imports": "import { Note } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "NotificationBadge",
      "status": "stable",
      "group": "Badges & pills",
      "register": "either",
      "path": "components/notification-badge",
      "summary": "An unread indicator. Renders a bare dot or a count pill (capped as \"{max}+\"), or nothing when there's nothing to show. A changing count rolls to its new number, and a badge that appears after being empty pops in. overlay pins it to the corner of a relative host; it is aria-hidden, so the host's name carries the count.",
      "keywords": [
        "notification",
        "badge",
        "count",
        "unread"
      ],
      "usage": {
        "description": "Use NotificationBadge to show a compact unread count, alert count, or attention marker.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Place it on or near the item that owns the notifications."
          },
          {
            "guidance": "do",
            "description": "Use compact counts and cap large numbers when exact precision is not useful."
          },
          {
            "guidance": "dont",
            "description": "Do not use NotificationBadge as a standalone status label or category marker."
          },
          {
            "guidance": "dont",
            "description": "Do not show a bare dot when the count is meaningful. A dot says \"something\"; if the user can act on \"how many\", show the number."
          },
          {
            "guidance": "dont",
            "description": "Do not put a neutral badge on a secondary host. Both are the secondary surface, so the badge disappears; use primary or destructive there."
          }
        ]
      },
      "related": {
        "components": [
          "Badge",
          "StatusDot",
          "NumberTicker"
        ]
      },
      "props": [
        {
          "name": "dot",
          "type": "boolean",
          "default": "false",
          "description": "Render a bare dot indicator with no number. Takes precedence over count."
        },
        {
          "name": "count",
          "type": "number",
          "description": "Unread count. Renders nothing when <= 0 and dot is unset."
        },
        {
          "name": "max",
          "type": "number",
          "default": "99",
          "description": "Cap before showing \"{max}+\"."
        },
        {
          "name": "tone",
          "type": "\"destructive\" | \"primary\" | \"neutral\"",
          "default": "\"destructive\"",
          "description": "Fill color. destructive for alarming counts; primary/neutral for non-alarming ones."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Scales the dot/pill on the spacing scale (count pill: sm 16px, md 18px, lg 20px at the default density)."
        },
        {
          "name": "overlay",
          "type": "boolean",
          "default": "false",
          "description": "Pin to the top-end corner of the nearest relative host (an icon button) — one placement for every caller instead of hand-tuned absolute offsets."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Under `subtle` the count updates in place and the badge fades in without the pop."
        }
      ],
      "variants": {
        "tone": [
          "destructive",
          "primary",
          "neutral"
        ],
        "size": [
          "sm",
          "md",
          "lg"
        ],
        "overlay": [
          "true",
          "false"
        ]
      },
      "tokensUsed": [
        "destructive",
        "destructive-foreground",
        "primary",
        "primary-foreground",
        "secondary",
        "secondary-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-appear",
          "part": "root",
          "why": "A badge that shows up after being empty is the news — something just arrived — so it fades and scales in where it sits instead of popping into existence. Never on first paint: a badge that mounts with a count is content, and a page of them popping on load is noise."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "root",
          "why": "It is decorative and not interactive; the host it sits on answers the pointer."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Count",
          "why": "The count rolls to its new number through NumberTicker (expressive), so 3 → 4 reads as one more arriving rather than a different badge. Past the cap the ticker holds at max with a static \"+\", so a count climbing beyond 99 does not keep rolling a badge that has not changed."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "An unread count has no working state."
        }
      ],
      "a11y": [
        "The badge is aria-hidden: a count rendered on a control is not associated with it, so the host needs an accessible name that includes the count — \"Notifications, 3 unread\" — or a screen-reader user hears \"Notifications, button\" and never learns there is anything new. Pass aria-hidden={false} only for a standalone badge whose number is the information.",
        "A dot carries no number and no words: on its own it tells a sighted user only that something changed, and tells everyone else nothing. Pair it with a label that says what is new, and never make its colour the only difference between two states."
      ],
      "examples": [
        {
          "label": "Dot + counts",
          "code": "<Row gap={3}><NotificationBadge dot /><NotificationBadge count={3} /><NotificationBadge count={128} /></Row>",
          "imports": "import { NotificationBadge, Row } from \"@sableui/react\""
        },
        {
          "label": "Overlay on an icon button",
          "code": "<Button variant=\"secondary\" size=\"icon\" aria-label=\"Notifications, 5 unread\" className=\"relative\"><Icon name=\"bell\" /><NotificationBadge count={5} overlay /></Button>",
          "imports": "import { Button, Icon, NotificationBadge } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "NumberField",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/number-field",
      "summary": "Numeric input with decrement/increment steppers over Base UI NumberField — keyboard arrows, scroll, scrub-to-change, min/max clamping, locale formatting, and form integration. Styled like Input; drops straight into a Field.",
      "keywords": [
        "number field",
        "numeric input",
        "stepper",
        "form"
      ],
      "usage": {
        "description": "Use NumberField for numeric values that benefit from validation, min/max bounds, or step controls.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for quantities, thresholds, percentages, and other real numeric values."
          },
          {
            "guidance": "do",
            "description": "Set sensible min, max, and step behavior when the domain has bounds."
          },
          {
            "guidance": "dont",
            "description": "Do not use NumberField for identifiers such as phone numbers, ZIP codes, or credit card numbers."
          },
          {
            "guidance": "dont",
            "description": "Do not use it in a property grid with steppers left on. Its two 32px stepper buttons (36px each with their inset) put a ~110px floor on a control that needs ~44px there — pass steppers={false}, or use ScrubField."
          }
        ]
      },
      "related": {
        "components": [
          "Input",
          "Slider"
        ]
      },
      "props": [
        {
          "name": "min",
          "type": "number",
          "description": "Lower bound. Clamps typing, arrows, scroll and scrub alike, so the value cannot leave the range by any route."
        },
        {
          "name": "max",
          "type": "number",
          "description": "Upper bound, clamped on every input route the same way as `min`."
        },
        {
          "name": "value / defaultValue",
          "type": "number",
          "description": "Controlled / uncontrolled numeric value."
        },
        {
          "name": "onValueChange",
          "type": "(value: number | null, event) => void",
          "description": "Fired when the value changes (null when cleared)."
        },
        {
          "name": "step / smallStep / largeStep",
          "type": "number",
          "description": "Increment amount; smallStep applies with the meta key, largeStep with shift."
        },
        {
          "name": "format",
          "type": "Intl.NumberFormatOptions",
          "description": "Locale formatting (currency, percent, units, …)."
        },
        {
          "name": "steppers",
          "type": "boolean",
          "default": "true",
          "description": "Show the decrement / increment buttons. Turn off in a dense property grid — the two 32px stepper buttons (36px with their inset) put a ~110px floor on the control; without them the value left-aligns."
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | \"xs\"",
          "default": "\"md\"",
          "description": "The field ladder shared with Input, SelectTrigger, ComboboxInput, SearchInput and DatePicker: md is the form field, sm the toolbar field one rung down (--control-sm) beside sm buttons and an sm Select, xs the inset tool-panel field. The steppers step down with it."
        },
        {
          "name": "decrementLabel",
          "type": "string",
          "default": "\"Decrease\"",
          "description": "Accessible name of the decrement stepper. Translate it with the rest of the form."
        },
        {
          "name": "incrementLabel",
          "type": "string",
          "default": "\"Increase\"",
          "description": "Accessible name of the increment stepper."
        },
        {
          "name": "disabled / readOnly / required / name / id",
          "type": "—",
          "description": "Standard form-control props. Base UI applies id + required to the input, so it labels and validates correctly."
        }
      ],
      "variants": {
        "size": [
          "md",
          "sm",
          "xs"
        ]
      },
      "tokensUsed": [
        "field-border",
        "field",
        "foreground",
        "muted-foreground",
        "accent",
        "accent-foreground",
        "ring"
      ],
      "a11y": [
        "Decrement / Increment are labelled buttons (`decrementLabel` / `incrementLabel`, default Decrease / Increase); the input is a spinbutton with aria-valuenow/min/max from Base UI.",
        "Routes aria-describedby / aria-invalid onto the input, so a Field's helper + error are announced for it."
      ],
      "examples": [
        {
          "label": "Bounded",
          "code": "<NumberField defaultValue={1} min={0} max={99} />",
          "imports": "import { NumberField } from \"@sableui/react\""
        },
        {
          "label": "In a field",
          "code": "<Field label=\"Quantity\"><NumberField min={1} defaultValue={1} /></Field>",
          "imports": "import { Field, NumberField } from \"@sableui/react\""
        },
        {
          "label": "Currency",
          "code": "<NumberField defaultValue={9.99} format={{ style: \"currency\", currency: \"USD\" }} />",
          "imports": "import { NumberField } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "NumberTicker",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/number-ticker",
      "summary": "A number that rolls to its new value digit by digit, like an odometer. Formatted with Intl.NumberFormat (currency, percent, compact, any locale); separators, signs and units hold still while each digit column turns, and a digit that appears or goes away eases its width so nothing around it jumps. At rest on first paint; under subtle or reduced motion the value simply updates.",
      "keywords": [
        "number",
        "counter",
        "odometer",
        "rolling number",
        "animated number",
        "ticker",
        "count up",
        "stat",
        "kpi",
        "metric",
        "price"
      ],
      "usage": {
        "description": "Use NumberTicker for a figure that changes in place while someone is looking at it — a dashboard total after a filter changes, a live count, a price as a plan's options change, a score. The roll says \"this number moved, and by roughly this much\"; the reader sees the change happen instead of noticing, later, that a number is different.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for the headline figure that a control on the same screen changes — the total above a chart, the price beside a quantity stepper — so cause and effect are seen together."
          },
          {
            "guidance": "do",
            "description": "Format through `format` (currency, percent, compact) rather than pre-formatting a string, so separators and units stay put while only the digits roll."
          },
          {
            "guidance": "do",
            "description": "Pass `aria-live=\"polite\"` only when the change itself is news the reader would otherwise miss; most tickers sit beside the control that changed them and need no announcement."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for values that change many times a second (a stopwatch, a stock tick, a progress percentage) — the rolls never land and read as a blur. Render the number as plain tabular text."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for numbers that are names rather than amounts — an order ID, a phone number, a year, a version. Rolling implies a quantity going up or down."
          },
          {
            "guidance": "dont",
            "description": "Do not animate a number on page load to make it feel alive. The first paint is at rest on purpose; for an entrance, reveal the card it sits in (the Reveal motion primitive)."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a value inside a known range that needs a picture of how full it is — show a Meter, with the number beside it.",
            "instead": [
              "Meter"
            ]
          }
        ]
      },
      "related": {
        "components": [
          "Meter",
          "NotificationBadge",
          "PieChart",
          "RadialChart",
          "Sparkline"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "number",
          "description": "The number to show. When it changes, the digits roll to it."
        },
        {
          "name": "format",
          "type": "Intl.NumberFormatOptions",
          "description": "How to write the number — `{ style: \"currency\", currency: \"USD\" }`, `{ style: \"percent\" }`, `{ notation: \"compact\" }`, fraction digits. Passed to Intl.NumberFormat; an inline object is fine (it is compared by value)."
        },
        {
          "name": "locales",
          "type": "string | string[]",
          "default": "runtime locale",
          "description": "BCP 47 locale(s) for the formatting. Digits roll through the locale's own numbering system."
        },
        {
          "name": "prefix",
          "type": "ReactNode",
          "description": "Before the number. A string becomes part of the number's text (and rolls in or out with it); an element is rendered as given."
        },
        {
          "name": "suffix",
          "type": "ReactNode",
          "description": "After the number (\"+\", \" pts\"). A string becomes part of the number's text; an element is rendered as given."
        },
        {
          "name": "trend",
          "type": "\"auto\" | \"up\" | \"down\"",
          "default": "\"auto\"",
          "description": "Which way the digits roll. `auto` rolls up as the value grows and down as it shrinks; `up` / `down` fix it (a countdown, a score that only climbs)."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The roll is expressive, so `subtle` updates the value in place."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merged onto the root span. Set the type tier here (`text-heading-2`, `text-display-lg`); the ticker adds tabular figures so widths hold still."
        },
        {
          "name": "...span props",
          "type": "Omit<ComponentPropsWithRef<\"span\">, \"children\" | \"prefix\">",
          "description": "Remaining span attributes pass through to the root — `aria-live` to announce changes, `id`, data attributes."
        }
      ],
      "tokensUsed": [],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The first paint is at rest. A number counting up on page load is decoration that delays the reading; the roll is kept for the moment the value actually changes."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Root",
          "why": "It is a reading, not a control; the control that changes it gives the feedback."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Digit",
          "why": "Each digit column turns to its new place on the expressive roll (the slower token, emphasized easing, staggered from the ones column), and arriving or departing columns ease their width. The roll is what shows a change happened and how big it was — the hundreds turning reads as a bigger move than the ones. No recipe can translate per-digit columns, so it is custom; it is multiplied by --motion-expressive, so `subtle` and reduced motion land the value at once."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A number has no working state; show a Skeleton while it loads."
        }
      ],
      "a11y": [
        "The whole written number (with any string prefix or suffix) is real text in a visually hidden span; the rolling columns are aria-hidden and draw their glyphs as generated content, so screen readers, find-in-page and copy all get \"$1,234.50\", never a stack of digits.",
        "It is not a live region by default — a figure that changes because the reader moved a control is already where their attention is. Pass `aria-live=\"polite\"` when a change elsewhere should be announced.",
        "Tabular figures keep every digit the same width, so a roll never shifts the text around it."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<NumberTicker value={1284} className=\"text-heading-2\" />",
          "imports": "import { NumberTicker } from \"@sableui/react\""
        },
        {
          "label": "Currency",
          "code": "<NumberTicker value={4280.5} format={{ style: \"currency\", currency: \"USD\" }} className=\"text-display-lg\" />",
          "imports": "import { NumberTicker } from \"@sableui/react\""
        },
        {
          "label": "Percent, announced",
          "code": "<NumberTicker value={0.428} format={{ style: \"percent\", maximumFractionDigits: 1 }} aria-live=\"polite\" />",
          "imports": "import { NumberTicker } from \"@sableui/react\""
        },
        {
          "label": "Subtle",
          "code": "<NumberTicker value={92} suffix=\" pts\" motion=\"subtle\" />",
          "imports": "import { NumberTicker } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "OtpField",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/otp-field",
      "summary": "One-time-code entry over Base UI's OTP Field — one slot per character, SMS autofill on the first slot, paste fills every slot, and only one tab stop for the whole code.",
      "keywords": [
        "otp",
        "one-time code",
        "one-time password",
        "verification code",
        "2fa",
        "two-factor",
        "mfa",
        "pin",
        "passcode",
        "input otp"
      ],
      "usage": {
        "description": "Use OtpField for a short, fixed-length code the user copies from somewhere else — an SMS or email verification code, an authenticator app, a device pairing PIN. The slots show how long the code is and where the user is in it, which a plain Input cannot.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Set `length` to the exact length the server sends, and verify in `onValueComplete` (or with `autoSubmit` inside a form). Most users paste or autofill the whole code at once, so the moment of completion is the natural submit."
          },
          {
            "guidance": "do",
            "description": "Label it through a `Field` (\"Verification code\") and say where the code was sent in the description. The first slot takes the field's name; the rest are announced by position."
          },
          {
            "guidance": "do",
            "description": "Use `groupSize` for codes of 6 or more so the user can check the code in chunks against the message they are reading from."
          },
          {
            "guidance": "dont",
            "description": "Do not use OtpField for a password, an arbitrary-length PIN, or anything the user types from memory. Slots promise a fixed length; use Input with `type=\"password\"` and `autocomplete=\"current-password\"` instead."
          },
          {
            "guidance": "do",
            "description": "Clear the error as soon as the user edits the code (`onValueChange` → reset the error), and set it again when the next code is refused. Each refusal is then a fresh change to invalid, so the field shakes for every wrong code, not only the first."
          },
          {
            "guidance": "dont",
            "description": "Do not intercept paste or clear the field on a wrong code before the user has seen the error. Blocking paste breaks SMS autofill and password managers, and wiping the slots erases the evidence of which digit was wrong."
          },
          {
            "guidance": "dont",
            "description": "Do not swap it for NumberField because the code is digits. A code is an identifier, not a quantity: NumberField strips leading zeros and offers steppers that make no sense here."
          }
        ],
        "anatomy": [
          {
            "name": "Root",
            "required": true,
            "description": "A role=group that holds the value, carries the field label and description, and reports completion."
          },
          {
            "name": "Slot",
            "required": true,
            "description": "One input per character. The first carries autocomplete=\"one-time-code\" and accepts the whole code."
          },
          {
            "name": "Group gap",
            "required": false,
            "description": "A decorative dash inserted every `groupSize` slots; hidden from assistive tech."
          }
        ]
      },
      "related": {
        "components": [
          "Input",
          "Form",
          "NumberField"
        ]
      },
      "props": [
        {
          "name": "length",
          "type": "number",
          "default": "6",
          "description": "Number of character slots. Completion fires when every slot is filled."
        },
        {
          "name": "groupSize",
          "type": "number",
          "description": "Insert a visual gap every N slots (3 renders 123 – 456). The value stays one contiguous string."
        },
        {
          "name": "value / defaultValue",
          "type": "string",
          "description": "Controlled / uncontrolled code."
        },
        {
          "name": "onValueChange",
          "type": "(value: string, details) => void",
          "description": "Fires on every edit. `details.reason` is input-change, input-clear, input-paste or keyboard."
        },
        {
          "name": "onValueComplete",
          "type": "(value: string, details) => void",
          "description": "Fires once every slot is filled — the place to verify the code. Also fires when a complete code is pasted over a complete value."
        },
        {
          "name": "onValueInvalid",
          "type": "(attempted: string, details) => void",
          "description": "Fires when typed or pasted text contains characters `validationType` rejects, so you can explain the rejection rather than letting it vanish."
        },
        {
          "name": "validationType",
          "type": "\"numeric\" | \"alpha\" | \"alphanumeric\" | \"none\"",
          "default": "\"numeric\"",
          "description": "Which characters a slot accepts. Also picks the virtual keyboard (numeric → number pad)."
        },
        {
          "name": "autoSubmit",
          "type": "boolean",
          "default": "false",
          "description": "Submit the owning form when the code becomes complete."
        },
        {
          "name": "mask",
          "type": "boolean",
          "default": "false",
          "description": "Render slots as password inputs. Only for codes that are secret on screen, such as a card PIN."
        },
        {
          "name": "getSlotLabel",
          "type": "(index: number, length: number) => string",
          "default": "Character N of L",
          "description": "Accessible name for slots after the first. Override to localize."
        },
        {
          "name": "aria-invalid",
          "type": "boolean",
          "description": "Marks every slot invalid (destructive border and digits). Turning it on after mount shakes the field once. `<Field error>` sets it for you."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The shake is the flourish; the destructive colour stays at every level."
        },
        {
          "name": "disabled / readOnly / required / name / id / form",
          "type": "—",
          "description": "Standard form-control props. `id` lands on the first slot, so `<Field>` and `<label htmlFor>` name the field."
        }
      ],
      "tokensUsed": [
        "field-border",
        "field",
        "foreground",
        "muted-foreground",
        "border-strong",
        "primary",
        "ring",
        "destructive"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A code field is part of the form it sits in and appears with it. Animating it in would delay the one thing the user arrived to do — paste the code they just copied."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Slot",
          "why": "Focus moves between slots on every keystroke. The eased ring and border are what let the eye follow the cursor across six identical boxes instead of hunting for it after each digit."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Slot",
          "why": "A filled slot strengthens its border, so a pasted code visibly lands in every slot at once. Easing it reads as the code arriving rather than the field flickering."
        },
        {
          "slot": "transition",
          "recipe": "motion-shake",
          "part": "Root",
          "why": "A refused code shakes the field once as it turns invalid — the short horizontal no that makes a second wrong code feel noticed rather than ignored. It never carries the refusal alone: the digits and borders turn destructive and the Field says why. It plays on the change to invalid, not on mount, and is expressive, so `subtle` keeps only the colour."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Verifying the code is the form's work, not the field's. Show it on the submit Button's `loading` state, where the user expects the answer to appear."
        }
      ],
      "a11y": [
        "The root is a role=group named by the field label; the first slot shares the label through `id`/`htmlFor`, and later slots are announced by position (\"Character 2 of 6\").",
        "Only one slot is in the tab order. Arrow keys, Home/End and Backspace move between slots; Tab leaves the whole field.",
        "The first slot carries autocomplete=\"one-time-code\" and the numeric virtual keyboard, so iOS and Android offer the SMS code above the keyboard.",
        "Slots render at 20px (`text-mono-lg`), above the 16px floor that stops iOS Safari zooming on focus.",
        "An invalid code is never signalled by motion alone: every slot carries aria-invalid, the digits and borders turn destructive, and the Field's error message is wired through aria-describedby. The shake resolves instantly under reduced motion and `subtle`."
      ],
      "examples": [
        {
          "label": "Six digits",
          "code": "<Field label=\"Verification code\"><OtpField length={6} onValueComplete={verify} /></Field>",
          "imports": "import { Field, OtpField } from \"@sableui/react\""
        },
        {
          "label": "In a field, grouped",
          "code": "<Field label=\"Verification code\" description=\"Enter the 6-digit code we sent to your phone.\"><OtpField length={6} groupSize={3} /></Field>",
          "imports": "import { Field, OtpField } from \"@sableui/react\""
        },
        {
          "label": "With an error",
          "code": "<Field label=\"Verification code\" error=\"That code has expired. Request a new code and try again.\"><OtpField length={6} groupSize={3} defaultValue=\"482913\" /></Field>",
          "imports": "import { Field, OtpField } from \"@sableui/react\""
        },
        {
          "label": "Verify on completion, shake on a wrong code",
          "code": "const [code, setCode] = useState(\"\")\nconst [wrong, setWrong] = useState(false)\n<Field label=\"Verification code\" error={wrong ? \"That code does not match. Check the message and try again.\" : undefined}><OtpField length={6} groupSize={3} value={code} onValueChange={(next) => { setCode(next); setWrong(false) }} onValueComplete={(value) => setWrong(value !== expected)} /></Field>",
          "imports": "import { Field, OtpField } from \"@sableui/react\""
        },
        {
          "label": "Alphanumeric",
          "code": "<Field label=\"Pairing code\"><OtpField length={8} groupSize={4} validationType=\"alphanumeric\" /></Field>",
          "imports": "import { Field, OtpField } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "OverflowMenu",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/overflow-menu",
      "summary": "An overflow ellipsis icon button that opens a Menu. Composes our Menu + Button + Icon — pass MenuItems as children and it wires the ghost icon trigger, accessible label, and portal-rendered content. All keyboard, focus, and dismissal behavior comes through Menu.",
      "keywords": [
        "dots menu",
        "more actions",
        "ellipsis",
        "kebab",
        "responsive actions",
        "responsive action menu",
        "collapse actions",
        "actions overflow on mobile"
      ],
      "usage": {
        "description": "Use OverflowMenu for compact overflow actions when the primary action is already visible elsewhere.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for secondary commands that belong to a row, card, or toolbar item."
          },
          {
            "guidance": "do",
            "description": "Keep labels explicit so the icon-only trigger does not obscure the command meaning."
          },
          {
            "guidance": "do",
            "description": "For actions that fit inline on a wide screen but not a narrow one, render them twice: inline (a Row inside a wrapper shown from a container width; Row sets its own display, so the wrapper does the hiding), and as MenuItems in an OverflowMenu hidden from that width (`@container` + `@md:`). display:none takes the hidden copy out of the accessibility tree, so only one set is ever announced. Keep the primary action inline at every width."
          },
          {
            "guidance": "dont",
            "description": "Do not hide the most important or most frequent action inside OverflowMenu."
          },
          {
            "guidance": "dont",
            "description": "Do not use it as the only affordance on a touch surface. It is revealed on hover in most layouts, and hover does not exist on touch — pair it with a visible action or make it always-visible there."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "ContextMenu"
        ]
      },
      "props": [
        {
          "name": "children",
          "type": "ReactNode",
          "default": "—",
          "description": "The menu rows — MenuItem / MenuSeparator / MenuGroup, etc. Rendered inside MenuContent."
        },
        {
          "name": "align",
          "type": "'start' | 'center' | 'end'",
          "default": "end",
          "description": "Alignment of the popup along its side. Overflow menus typically right-align under the trigger; 'start' anchors the popup's left edge to the trigger instead."
        },
        {
          "name": "label",
          "type": "string",
          "default": "More actions",
          "description": "Accessible label (aria-label) for the icon-only trigger button."
        },
        {
          "name": "icon",
          "type": "string",
          "default": "ellipsis",
          "description": "Semantic icon name rendered in the trigger, always at the solid weight."
        },
        {
          "name": "size",
          "type": "'icon' | 'icon-sm' | 'icon-xs'",
          "default": "icon",
          "description": "The trigger's rung on the icon-button ladder. 'icon' for a card or page header; 'icon-sm' or 'icon-xs' in a list row or dense toolbar, so the trigger does not set the row height."
        }
      ],
      "variants": {
        "size": [
          "icon",
          "icon-sm",
          "icon-xs"
        ]
      },
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "accent",
        "accent-foreground",
        "muted-foreground"
      ],
      "a11y": [
        "The icon-only trigger is labeled via aria-label (label prop, default 'More actions').",
        "Menu provides role=menu/menuitem, roving tabindex, arrow-key navigation, and typeahead via Base UI.",
        "Esc and outside-press dismiss; focus returns to the trigger on close."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<OverflowMenu label=\"Post actions\"><MenuItem>Edit</MenuItem><MenuItem>Share</MenuItem><MenuSeparator /><MenuItem variant=\"destructive\">Delete</MenuItem></OverflowMenu>",
          "imports": "import { MenuItem, MenuSeparator, OverflowMenu } from \"@sableui/react\""
        },
        {
          "label": "With leading icons",
          "code": "<OverflowMenu><MenuItem><Icon name=\"check\" className=\"text-sm\" />Mark as read</MenuItem><MenuSeparator /><MenuItem variant=\"destructive\"><Icon name=\"xmark\" className=\"text-sm\" />Delete</MenuItem></OverflowMenu>",
          "imports": "import { Icon, MenuItem, MenuSeparator, OverflowMenu } from \"@sableui/react\""
        },
        {
          "label": "Responsive actions: inline when wide, in a menu when narrow",
          "code": "<div className=\"@container/actions flex w-full justify-end\">\n\t<Row gap={1} align=\"center\">\n\t\t<div className=\"hidden @md/actions:block\">\n\t\t\t<Row gap={1}>\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" iconStart={<Icon name=\"share\" />}>Share</Button>\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" iconStart={<Icon name=\"download\" />}>Export</Button>\n\t\t\t</Row>\n\t\t</div>\n\t\t<div className=\"@md/actions:hidden\">\n\t\t\t<OverflowMenu label=\"Report actions\" size=\"icon-sm\">\n\t\t\t\t<MenuItem icon={<Icon name=\"share\" />}>Share</MenuItem>\n\t\t\t\t<MenuItem icon={<Icon name=\"download\" />}>Export</MenuItem>\n\t\t\t</OverflowMenu>\n\t\t</div>\n\t\t<Button size=\"sm\" iconStart={<Icon name=\"edit\" />}>Edit report</Button>\n\t</Row>\n</div>",
          "imports": "import { Button, Icon, MenuItem, OverflowMenu, Row } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "PageHeader",
      "status": "stable",
      "group": "Layout",
      "register": "page",
      "path": "components/page-header",
      "summary": "In-flow page heading block: a title row (optional back control + actions) over an optional description, with room for children (filters, tabs) below.",
      "keywords": [
        "page header",
        "title",
        "lede",
        "page actions",
        "page title size",
        "display title",
        "editorial header",
        "hero title"
      ],
      "usage": {
        "description": "Use PageHeader to establish a page's title, supporting description, and primary page actions.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use one PageHeader per major page or route."
          },
          {
            "guidance": "do",
            "description": "Keep the title literal and put explanation in the lede or nearby content."
          },
          {
            "guidance": "do",
            "description": "Use size=\"lg\" for an editorial page (a personal site, a marketing page, an article index): a display-tier title over a body-lg lede. Pair it with SectionHeader size=\"lg\" for the sections below, so the steps stay display → heading-2 → body."
          },
          {
            "guidance": "dont",
            "description": "Use size=\"lg\" on product routes (settings, lists, dashboards). Display type is never product chrome: there it competes with the content it frames. Keep md, and do not restyle the title with a display class through className either."
          },
          {
            "guidance": "dont",
            "description": "Do not use PageHeader inside repeated cards, dialogs, or compact panels."
          },
          {
            "guidance": "dont",
            "description": "Do not use a second PageHeader for a section of the page. It is the route's one h1; each section below it takes a SectionHeader (an h2 with the same title row, description and actions)."
          },
          {
            "guidance": "dont",
            "description": "Do not put it outside the Region that holds the page content. It then sits at a different measure from what it introduces, and the page reads as two documents."
          }
        ]
      },
      "related": {
        "components": [
          "AppHeader",
          "SectionHeader",
          "Breadcrumbs",
          "Button"
        ]
      },
      "props": [
        {
          "name": "title",
          "type": "ReactNode",
          "description": "The page title (renders an <h1>)."
        },
        {
          "name": "description",
          "type": "ReactNode",
          "description": "Supporting copy beneath the title."
        },
        {
          "name": "back",
          "type": "ReactNode",
          "description": "Leading element before the title — typically a back control on drill-in routes. Keep it a ghost icon Button (size=\"icon\", variant=\"ghost\", aria-label=\"Back\") so it stays quieter than the title. A ghost back control bleeds by its inset at the start, so its glyph lines up with the content edge below (Button bleed=\"none\" opts out)."
        },
        {
          "name": "actions",
          "type": "ReactNode",
          "description": "Trailing actions aligned to the title row's end. They drop under the title when the title would have less than 20rem beside them (on a phone, nearly always), and the title wraps rather than truncating. A ghost or link Button at either end of the group bleeds by its own padding, so its label meets the content edge (the end on the title row, the start once wrapped); filled buttons keep their edge on the line. Direct children only."
        },
        {
          "name": "titleAs",
          "type": "\"h1\" | \"h2\"",
          "default": "\"h1\"",
          "description": "The title's heading element. Keep h1 — the route's one h1. Use h2 only when something above already owns the h1: a shell that renders the route title, or a page showing a PageHeader as an example."
        },
        {
          "name": "size",
          "type": "\"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "The title's scale. md: text-heading-2 over a text-body-sm description, for product pages. lg: text-display-lg over a text-body-lg lede capped at the prose measure, with more space between and below, for an editorial page (personal site, marketing page, article index). Beside actions or a back control, a title line taller than the controls lifts by half the difference, so its first line stays centred on them."
        }
      ],
      "variants": {
        "size": [
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "foreground",
        "muted-foreground"
      ],
      "a11y": [
        "Renders the title as an <h1>; use one PageHeader per page.",
        "Its title renders the route's `h1`. Do not render another `h1` elsewhere on the page: heading navigation would report two documents, and the outline a screen-reader user builds from it stops matching the page."
      ],
      "examples": [
        {
          "label": "With actions",
          "code": "<PageHeader title=\"Storage credits\" description=\"Fund permanent storage.\" actions={<Button>Top up</Button>} />",
          "imports": "import { Button, PageHeader } from \"@sableui/react\""
        },
        {
          "label": "Editorial page title (size lg)",
          "code": "<PageHeader size=\"lg\" title=\"Field notes\" description=\"Essays on making things slowly, from a studio by the sea.\" actions={<Button variant=\"outline\">Subscribe</Button>} />",
          "imports": "import { Button, PageHeader } from \"@sableui/react\""
        },
        {
          "label": "One per page, inside the region",
          "code": "// PageHeader introduces the current route: title, optional description, and the\n// actions that act on THIS page.\n\n<Region max=\"content\">\n  <PageHeader\n    title=\"Invoices\"\n    description=\"Every charge on this account.\"\n    actions={<Button>Export</Button>}\n  />\n  <p className=\"text-body-md text-muted-foreground\">Page content.</p>\n</Region>\n\n// ✗ Outside the Region. The header then sits at a different measure from the\n//   content it introduces, and the page reads as two documents.\n// ✗ Two on one page. A second one is a section heading: a SectionHeader\n//   (an h2 on text-heading-3, same title row and actions), not another PageHeader.\n// ✗ Global actions in it (account, search). Those persist across routes and\n//   belong in AppHeader.",
          "imports": "import { Button, PageHeader, Region } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "PageLoader",
      "status": "stable",
      "group": "Loading & progress",
      "register": "page",
      "path": "components/page-loader",
      "summary": "Full-screen branded loading splash: the screen fades in, the mark breathes, and an indeterminate Progress bar pulses beneath it. All motion is token-driven, so it freezes to a calm static screen when motion is off/reduced.",
      "keywords": [
        "page loader",
        "loading",
        "route",
        "pending"
      ],
      "usage": {
        "description": "Use PageLoader for full-route or full-page pending states where the entire view is not ready yet.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it during route transitions, auth checks, or initial data loading."
          },
          {
            "guidance": "do",
            "description": "Prefer a clear page-level message when the wait may take noticeable time."
          },
          {
            "guidance": "dont",
            "description": "Do not use PageLoader for small inline waits; use Spinner, an indeterminate Progress, or Skeleton.",
            "instead": [
              "Spinner",
              "Progress",
              "Skeleton"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not leave it mounted if the route's data can fail. It covers the whole viewport, so a PageLoader that never resolves is indistinguishable from a hung application — always give it a failure path."
          }
        ]
      },
      "related": {
        "components": [
          "Spinner",
          "Skeleton",
          "Progress"
        ]
      },
      "props": [
        {
          "name": "children",
          "type": "ReactNode",
          "description": "Brand mark / logo shown at center. Falls back to a neutral pulsing mark."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Loading\"",
          "description": "Caption beneath the mark; also the accessible label on the role=status region."
        },
        {
          "name": "fullscreen",
          "type": "boolean",
          "default": "true",
          "description": "Cover the viewport (fixed) vs fill the nearest positioned parent (absolute)."
        },
        {
          "name": "hideBar",
          "type": "boolean",
          "default": "false",
          "description": "Hide the indeterminate Progress bar under the mark."
        }
      ],
      "tokensUsed": [
        "background",
        "foreground",
        "secondary",
        "primary",
        "muted-foreground"
      ],
      "a11y": [
        "role=status with an aria-label (the label prop) announces the loading state politely.",
        "Decorative mark and bar are aria-hidden.",
        "Motion respects the policy: under off/reduced the pulses hold their first frame (static)."
      ],
      "examples": [
        {
          "label": "Default",
          "code": "<PageLoader label=\"Loading Studio\" />",
          "imports": "import { PageLoader } from \"@sableui/react\""
        },
        {
          "label": "With a logo",
          "code": "<PageLoader label=\"Loading\"><img src=\"/logo.svg\" alt=\"\" className=\"h-10 w-auto\" /></PageLoader>",
          "imports": "import { PageLoader } from \"@sableui/react\""
        },
        {
          "label": "Contained (fills parent)",
          "code": "<div className=\"relative h-80\"><PageLoader fullscreen={false} hideBar /></div>",
          "imports": "import { PageLoader } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Pagination",
      "status": "stable",
      "group": "Navigation",
      "register": "either",
      "path": "components/pagination",
      "summary": "Page navigation built from our own Button + Icon (no Base UI). A <nav aria-label='Pagination'> with prev/next icon buttons that disable at the bounds and numbered page buttons; the current page is a secondary button marked aria-current. With pageLink every control is a real link (crawlable, opens in a new tab, any router through render). Collapses to first/last/current plus a sibling window, bridging skipped runs with an ellipsis.",
      "keywords": [
        "pagination",
        "pager",
        "pages",
        "table",
        "results",
        "navigation",
        "next",
        "previous",
        "page links",
        "seo",
        "url"
      ],
      "usage": {
        "description": "Use Pagination when a result set is split into discrete pages and the user needs predictable movement through them. Pair it with DataTable, list results, or server-paged views; use a load-more Button or infinite scroll when page numbers are not meaningful.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep page state controlled by the parent route or data layer so URL, filters, and result fetches stay in sync."
          },
          {
            "guidance": "do",
            "description": "Use a specific label when multiple pagers appear on a page, such as \"Customer pages\"."
          },
          {
            "guidance": "do",
            "description": "Pass pageLink when the page lives in the URL (search results, a blog, a catalogue): each page becomes a link a crawler can follow and a reader can open in a new tab. Use a router's Link there so navigation stays in the app."
          },
          {
            "guidance": "do",
            "description": "Reset to page 1 when filters or search terms materially change the result set."
          },
          {
            "guidance": "dont",
            "description": "Use Pagination for tiny lists where all items fit comfortably on one page."
          },
          {
            "guidance": "dont",
            "description": "Hide disabled previous/next buttons at the bounds; disabled controls make the current position clearer."
          }
        ],
        "anatomy": [
          {
            "name": "Nav",
            "required": true,
            "description": "The labelled pagination landmark."
          },
          {
            "name": "Previous/next",
            "required": true,
            "description": "Icon buttons for adjacent page movement, disabled at the bounds."
          },
          {
            "name": "Page buttons",
            "required": true,
            "description": "Numbered buttons with aria-current on the active page."
          },
          {
            "name": "Ellipsis",
            "required": false,
            "description": "Non-interactive marker for skipped page ranges."
          }
        ]
      },
      "related": {
        "components": [
          "DataTable",
          "Table",
          "Button"
        ],
        "patterns": [
          "ListDetailPage",
          "DashboardPage"
        ]
      },
      "props": [
        {
          "name": "page",
          "type": "number",
          "default": "—",
          "description": "The active page (1-based). Clamped into the valid range."
        },
        {
          "name": "total",
          "type": "number",
          "default": "—",
          "description": "Total number of pages."
        },
        {
          "name": "onPageChange",
          "type": "(page: number) => void",
          "default": "—",
          "description": "Called with the next page when a control is activated. No-op for out-of-range or unchanged values. Optional with pageLink, where the URL is the page state."
        },
        {
          "name": "pageLink",
          "type": "(page: number) => ReactElement",
          "default": "—",
          "description": "Render each page control as a link: return the element for a page, (page) => <a href={`?page=${page}`} /> or a router's <Link to={`?page=${page}`} />. The current page keeps aria-current; previous/next at the bounds stay disabled buttons. onPageChange becomes optional and, if set, still fires on click."
        },
        {
          "name": "siblingCount",
          "type": "number",
          "default": "1",
          "description": "Page buttons shown on each side of the current page before the list collapses into ellipses. First and last pages are always shown."
        },
        {
          "name": "label",
          "type": "string",
          "default": "Pagination",
          "description": "Accessible label applied to the surrounding nav element."
        },
        {
          "name": "previousLabel",
          "type": "string",
          "default": "Previous page",
          "description": "Accessible name of the previous-page button."
        },
        {
          "name": "nextLabel",
          "type": "string",
          "default": "Next page",
          "description": "Accessible name of the next-page button."
        },
        {
          "name": "pageLabel",
          "type": "(page: number) => string",
          "default": "(page) => `Page ${page}`",
          "description": "Accessible name of each numbered page button. Translate the whole phrase, page number included."
        },
        {
          "name": "className",
          "type": "string",
          "default": "—",
          "description": "Extra classes merged onto the nav."
        }
      ],
      "tokensUsed": [
        "secondary",
        "secondary-foreground",
        "accent",
        "accent-foreground",
        "foreground",
        "muted-foreground",
        "ring"
      ],
      "a11y": [
        "Renders a landmark <nav> with aria-label so assistive tech can jump to the pager.",
        "The current page button carries aria-current='page'.",
        "Prev/next buttons are real <button>s with aria-label and become disabled at the bounds.",
        "With pageLink the controls are real <a> links (or the router's), so they are crawlable and open in a new tab; a bound arrow stays a disabled button rather than a link to nowhere.",
        "Ellipsis slots are aria-hidden — they convey no navigable target."
      ],
      "examples": [
        {
          "label": "Controlled",
          "code": "const [page, setPage] = useState(1)\n<Pagination page={page} total={10} onPageChange={setPage} />",
          "imports": "import { Pagination } from \"@sableui/react\""
        },
        {
          "label": "Many pages (ellipsis)",
          "code": "const [page, setPage] = useState(8)\n<Pagination page={page} total={20} onPageChange={setPage} />",
          "imports": "import { Pagination } from \"@sableui/react\""
        },
        {
          "label": "Table results footer",
          "code": "<Stack gap={2}><DataTable data={rows} columns={columns} rowKey={(row) => row.id} /><Pagination label=\"Customer pages\" page={page} total={12} onPageChange={setPage} /></Stack>",
          "imports": "import { DataTable, Pagination, Stack } from \"@sableui/react\""
        },
        {
          "label": "Page links (URL is the state)",
          "code": "<Pagination page={page} total={pageCount} pageLink={(page) => <Link to={`/search?q=${query}&page=${page}`} />} />",
          "imports": "import { Pagination } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Server query state",
          "code": "const [page, setPage] = useState(searchParams.page ?? 1)\n<Pagination page={page} total={pageCount} onPageChange={(next) => { setPage(next); loadPage(next) }} />",
          "imports": "import { Pagination } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "PanelGroup",
      "status": "stable",
      "group": "Layout",
      "register": "workspace",
      "path": "components/panel-group",
      "summary": "A row of docked chrome panels around a flexible centre, with draggable and keyboard-resizable edges and optional persisted widths.",
      "keywords": [
        "panel",
        "panels",
        "resize",
        "resizable",
        "splitter",
        "docked",
        "workspace",
        "tool",
        "chrome",
        "inspector",
        "layout",
        "mobile",
        "responsive",
        "sheet",
        "drawer",
        "narrow",
        "detail pane"
      ],
      "usage": {
        "description": "Use PanelGroup for the body of a tool workspace: fixed-width Panels docked left and/or right, a flexible Panel in the middle for the canvas, and a PanelResizer between them. Panels scroll internally and the group never scrolls. This is the workspace-register counterpart to SplitPane, which only switches between side-by-side and stacked at a breakpoint and cannot be resized.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give every docked Panel a fixed width and leave the centre Panel width-less so it absorbs the remaining space."
          },
          {
            "guidance": "do",
            "description": "Drive the width with usePanelWidth and pass a storageKey, so a user's layout survives a reload. Spread its bounds onto the PanelResizer rather than repeating min and max by hand."
          },
          {
            "guidance": "do",
            "description": "Label every Panel — they are landmarks, and 'Layers' or 'Properties' is what a screen-reader user navigates by."
          },
          {
            "guidance": "do",
            "description": "Decide what each docked Panel becomes on a phone with `narrow`: \"sheet\" for an inspector or a navigation rail the user opens on demand, \"hidden\" for chrome a phone does without. Drive a sheet's `open` from the same state that selects the record, so selecting a row opens the inspector at every width."
          },
          {
            "guidance": "dont",
            "description": "Render the same inspector twice, once in a Panel and once in a Sheet behind a hand-rolled viewport check. `narrow=\"sheet\"` renders the content once, in whichever place applies."
          },
          {
            "guidance": "dont",
            "description": "Let the group scroll. Only panels and the canvas scroll; a scrolling group means the shell lost its height constraint."
          },
          {
            "guidance": "dont",
            "description": "Use it for page content columns — that's Grid or Columns. PanelGroup is chrome, and it sits outside the content grid."
          },
          {
            "guidance": "dont",
            "description": "Omit PanelResizer to save effort and then let users live with a fixed panel. If a panel holds a tree or a property grid, its width is a preference."
          }
        ],
        "anatomy": [
          {
            "name": "PanelGroup",
            "required": true,
            "description": "The flex row. Sets min-h-0/min-w-0 so children can actually shrink and scroll."
          },
          {
            "name": "Panel",
            "required": true,
            "description": "One column. Fixed-width when `width` is set, flexible otherwise. Scrolls internally."
          },
          {
            "name": "PanelResizer",
            "required": false,
            "description": "The draggable edge between two panels: a 1px hairline with a wider hit area, operable by pointer and keyboard."
          }
        ]
      },
      "related": {
        "components": [
          "PanelSection",
          "ScrubField",
          "SplitPane",
          "Sidebar",
          "AppShell"
        ]
      },
      "props": [],
      "subcomponents": [
        {
          "name": "Panel",
          "type": "{ label: string; width?: number; scroll?: boolean; narrow?: \"dock\" | \"sheet\" | \"hidden\"; open?: boolean; onOpenChange?: (open: boolean) => void; side?: \"left\" | \"right\"; below?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" }",
          "description": "A docked or flexible column. Below `below` (default lg, where Sidebar and BottomNav swap), `narrow` decides what it becomes: \"dock\" (default) stays docked, \"sheet\" renders the same content once inside a Sheet from `side` (default \"right\"; a panel before the canvas is \"left\"), titled by `label`, open while `open` is true and closed through `onOpenChange` (Esc, scrim, swipe), and \"hidden\" drops it. `open` defaults to true docked (false removes the column, so the canvas takes its width) and false as a sheet. Crossing the breakpoint remounts the content, so keep state that must survive it in the app. `label` names the landmark; omit `width` for the flexible centre. `scroll` defaults to true — set it false for a header + scrolling body + pinned footer, so the footer doesn't scroll away with the list. When you own the layout, give the header and footer shrink-0 and the middle min-h-0 flex-1 overflow-y-auto. overflow-y-auto only activates if every flex ancestor can shrink: a single missing min-h-0 anywhere up the chain makes the panel grow instead of scroll, and nothing reports it."
        },
        {
          "name": "PanelResizer",
          "type": "{ side: 'left' | 'right'; width: number; onWidthChange: (n: number) => void; label: string; min?: number; max?: number; step?: number }",
          "description": "The draggable edge. `side` says which side the resized panel is on, so the drag delta's sign is right."
        },
        {
          "name": "usePanelWidth",
          "type": "(defaultWidth: number, options?: { storageKey?: string; min?: number; max?: number }) => readonly [number, (n: number) => void, { min: number; max: number }]",
          "description": "Controlled width for a Panel, clamped and optionally persisted to localStorage (only when `storageKey` is passed). Read through useSyncExternalStore, so there is no server/client hydration mismatch and no setState in an effect; do not hand-roll a localStorage read during render or a write from an effect. Without `storageKey` the width is kept in memory per hook instance. The third element is the `{ min, max }` it clamps to: spread it onto the paired PanelResizer so the separator's aria-valuemin/max and Home/End match the real clamp."
        }
      ],
      "tokensUsed": [
        "primary",
        "panel",
        "hairline",
        "hairline-strong"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Panels are the app's frame, present from first paint. A dock that slid in on load would make the workspace look like it is still assembling."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "PanelResizer",
          "why": "The hairline widens into a visible bar on hover and turns primary on keyboard focus, eased, so a 1px edge says it can be grabbed before the pointer commits."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Panel",
          "why": "Width tracks the pointer one-to-one while dragging, and keyboard steps land at once. An eased width would trail the cursor, and resizing is a layout change: easing it would reflow the canvas beside the panel on every frame."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Layout chrome has no working state."
        }
      ],
      "a11y": [
        "PanelResizer is a role=separator with aria-orientation, aria-valuenow/min/max, and is focusable — a pointer-only resizer is a keyboard trap.",
        "Arrow keys resize by `step`; Home and End jump to the minimum and maximum.",
        "Each Panel renders an <aside> with an accessible name from `label`, so panels are navigable landmarks."
      ],
      "examples": [
        {
          "label": "Tool body with a resizable left panel",
          "code": "function Body() {\n  const [leftWidth, setLeftWidth, leftBounds] = usePanelWidth(240, { storageKey: \"app:panel:left\", min: 180, max: 360 })\n  return (\n    <PanelGroup>\n      <Panel label=\"Layers\" width={leftWidth}>\n        <PanelSection title=\"Layers\">\n          <PropertyRow label=\"Background\">\n            <Switch checked />\n          </PropertyRow>\n        </PanelSection>\n      </Panel>\n      <PanelResizer side=\"left\" width={leftWidth} onWidthChange={setLeftWidth} label=\"Resize layers panel\" {...leftBounds} />\n      <Panel label=\"Canvas\">\n        <div className=\"grid h-full place-items-center bg-canvas text-ui-body text-muted-foreground\">Canvas</div>\n      </Panel>\n    </PanelGroup>\n  )\n}",
          "imports": "import { Panel, PanelGroup, PanelResizer, PanelSection, PropertyRow, Switch, usePanelWidth } from \"@sableui/react\""
        },
        {
          "label": "Both edges resizable",
          "code": "function Body() {\n  const [left, setLeft, leftBounds] = usePanelWidth(240, { storageKey: \"app:left\" })\n  const [right, setRight, rightBounds] = usePanelWidth(256, { storageKey: \"app:right\" })\n  return (\n    <PanelGroup>\n      <Panel label=\"Layers\" width={left} />\n      <PanelResizer side=\"left\" width={left} onWidthChange={setLeft} label=\"Resize layers panel\" {...leftBounds} />\n      <Panel label=\"Canvas\" />\n      <PanelResizer side=\"right\" width={right} onWidthChange={setRight} label=\"Resize properties panel\" {...rightBounds} />\n      <Panel label=\"Properties\" width={right}>\n        <PanelSection title=\"Blending\">\n          <PropertyPair>\n            <ScrubField label=\"Opacity\" icon=\"grid\" suffix=\"%\" value={100} min={0} max={100} />\n            <ScrubField label=\"Blur\" value={0} min={0} max={64} suffix=\"px\" />\n          </PropertyPair>\n        </PanelSection>\n      </Panel>\n    </PanelGroup>\n  )\n}",
          "imports": "import { Panel, PanelGroup, PanelResizer, PanelSection, PropertyPair, ScrubField, usePanelWidth } from \"@sableui/react\""
        },
        {
          "label": "Inspector that becomes a sheet on phones",
          "code": "function Body() {\n  const [selected, setSelected] = useState<string | null>(null)\n  return (\n    <PanelGroup>\n      <Panel label=\"Issues\">\n        <div className=\"p-2\">\n          <Button size=\"xs\" variant=\"ghost\" onClick={() => setSelected(\"AES-104\")}>AES-104 Refine product page</Button>\n        </div>\n      </Panel>\n      <Panel\n        label=\"Issue details\"\n        width={320}\n        narrow=\"sheet\"\n        open={selected !== null}\n        onOpenChange={(open) => !open && setSelected(null)}\n      >\n        <PanelSection title={selected ?? \"\"}>\n          <PropertyRow label=\"Status\"><Input defaultValue=\"In progress\" /></PropertyRow>\n        </PanelSection>\n      </Panel>\n    </PanelGroup>\n  )\n}",
          "imports": "import { Button, Input, Panel, PanelGroup, PanelSection, PropertyRow } from \"@sableui/react\""
        },
        {
          "label": "Fixed panel, no resizer",
          "code": "<PanelGroup>\n  <Panel label=\"Tools\" width={56}>\n    <div className=\"flex flex-col gap-1 p-1\">\n      <Button size=\"icon-xs\" variant=\"ghost\" aria-label=\"Toggle grid\"><Icon name=\"grid\" /></Button>\n      <Button size=\"icon-xs\" variant=\"ghost\" aria-label=\"Hide\"><Icon name=\"eye\" /></Button>\n    </div>\n  </Panel>\n  <Panel label=\"Canvas\" />\n</PanelGroup>",
          "imports": "import { Button, Icon, Panel, PanelGroup } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "PanelSection",
      "status": "stable",
      "group": "Layout",
      "register": "workspace",
      "path": "components/panel-section",
      "summary": "A flush group of property rows inside a docked panel — eyebrow header, hairline separator, rows beneath. The workspace register's answer to Card, which does not belong in a panel.",
      "keywords": [
        "panel",
        "section",
        "inspector",
        "properties",
        "property grid",
        "workspace",
        "tool",
        "chrome",
        "sidebar"
      ],
      "usage": {
        "description": "Use PanelSection to group properties inside an inspector or docked panel, with PropertyRow for one label-plus-control line and PropertyPair for two controls side by side. This is the workspace register's grouping primitive: it separates with a hairline and nothing else, because a Card inside a 240px panel spends its border and inset on nothing and pushes every row inward.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Group related properties under a short functional title — Blending, Layout, Fill — the way a tool inspector names its sections."
          },
          {
            "guidance": "do",
            "description": "Reach for PropertyPair before giving each property its own full-width row; pairing halves the vertical cost in a narrow panel."
          },
          {
            "guidance": "do",
            "description": "Put a section-scoped control (a visibility toggle, an add action) in the action slot rather than inventing a second header row."
          },
          {
            "guidance": "dont",
            "description": "Wrap panel content in Card. Cards are page-register furniture; in a panel they read as a page pasted into chrome."
          },
          {
            "guidance": "dont",
            "description": "Repeat the panel's own title as the section title. If the header above already names the selection, title the section by what it controls (Parameters, Blending)."
          },
          {
            "guidance": "dont",
            "description": "Hand-roll a property line (`<div className=\"flex justify-between\"><span>Opacity</span><Slider /></div>`). Use PropertyRow for every label-plus-control line: when each property type invents its own arrangement, a panel of fifteen properties ends up with fifteen layouts."
          },
          {
            "guidance": "dont",
            "description": "Use PropertyRow for page forms — use Field, which carries label/description/error semantics. PropertyRow is a dense chrome row, not a form control."
          }
        ],
        "anatomy": [
          {
            "name": "Header",
            "required": true,
            "description": "The section title in the UI section tier, with an optional trailing action."
          },
          {
            "name": "PropertyRow",
            "required": false,
            "description": "One property: label left, control right. `stacked` moves the control to its own line for full-width controls."
          },
          {
            "name": "PropertyPair",
            "required": false,
            "description": "Two controls side by side, with optional captions above each."
          },
          {
            "name": "PropertyGroup",
            "required": false,
            "description": "A set of properties folded behind one row that names the group and summarises its value, opening with +/− to the controls beneath."
          }
        ]
      },
      "related": {
        "components": [
          "Workspace",
          "PanelGroup",
          "ScrubField",
          "StatusBar",
          "Field",
          "Card"
        ]
      },
      "props": [
        {
          "name": "title",
          "type": "ReactNode",
          "description": "Section name, rendered as the header in the UI section tier."
        },
        {
          "name": "action",
          "type": "ReactNode",
          "description": "Optional trailing control in the header — a visibility toggle, an add action."
        }
      ],
      "subcomponents": [
        {
          "name": "PropertyRow",
          "type": "{ label: ReactNode; htmlFor?: string; hint?: string; stacked?: boolean; scrub?: { value, onValueChange, step?, min?, max?, onGestureStart?, onGestureEnd?, disabled? } }",
          "description": "One property line. `hint` becomes the label's hover explanation; `stacked` puts the control on its own line. `scrub` makes the property NAME a drag handle for its value — the Figma/Framer/Paper convention, and the answer for a numeric row with no honest glyph to put in a ScrubField (a schema-generated `levels` or `seed`, where a `#` would be noise pretending to be meaning). Opt-in and additive: a row without it is unchanged. The label stays a real `<label htmlFor>` — a 2px jitter threshold keeps a click a click, and the click synthesised after a real drag is swallowed so a scrub does not also select the field's text."
        },
        {
          "name": "PropertyPair",
          "type": "{ labels?: [ReactNode, ReactNode] }",
          "description": "Two controls side by side in a 2-up grid, with optional captions above each."
        },
        {
          "name": "PropertyGroup",
          "type": "{ label: ReactNode; summary?: ReactNode; defaultOpen?: boolean; open?: boolean; onOpenChange?: (open: boolean) => void }",
          "description": "A collapsible set of properties inside a section, at the panel's scale (an Accordion is page furniture). The row shows the label, then the summary (the group's value, readable while closed: a word, a few swatches, or both), then a + that turns to − when open. Groups open independently and stack with a hairline between them. Built on Collapsible."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "hairline"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Sections are part of the inspector they sit in and arrive with it. Animating each in would make a panel switch look like a page load."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "PropertyGroup trigger",
          "why": "The fold row eases its focus ring, so arrowing down a dense inspector shows where the keyboard is without the ring flickering from row to row."
        },
        {
          "slot": "transition",
          "recipe": "motion-disclosure",
          "part": "PropertyGroup panel",
          "why": "The group opens by easing its height, so the rows below slide down to make room instead of jumping. In an inspector, the next section moving is otherwise how you lose your place."
        },
        {
          "slot": "transition",
          "recipe": "motion-icon-swap",
          "part": "PropertyGroup indicator",
          "why": "The + collapses into − as the group opens, both glyphs stacked as one mark, so the indicator reads as this row changing state rather than a different icon landing."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "The inspector edits values in place; nothing in it loads."
        }
      ],
      "a11y": [
        "PropertyGroup's row is a real button with aria-expanded (Collapsible); its summary is part of the button's name, so a closed group still announces its value.",
        "PropertyRow renders a real <label>; pass htmlFor with the control's id so clicking the label focuses it.",
        "The section title is an h3, so panels contribute a real heading outline rather than styled divs.",
        "`hint` is exposed as the label's title attribute — keep the essential meaning in the label itself, since title text is not reliably announced.",
        "A `scrub` label does not replace keyboard editing and must not be the only way to set the value: the drag is a pointer affordance, so the control it names still has to accept typing and arrow keys. It also keeps its `htmlFor` behaviour, which is the reason the gesture arms on a 2px threshold rather than on pointerdown."
      ],
      "examples": [
        {
          "label": "Groups that fold behind their value",
          "code": "<PanelSection title=\"Color\">\n  <PropertyGroup label=\"Tones\" summary=\"Brand only\">\n    <PropertyRow label=\"Scheme\">\n      <Select value=\"brand\">\n        <SelectTrigger size=\"xs\" />\n        <SelectContent>\n          <SelectItem value=\"brand\">Brand only</SelectItem>\n          <SelectItem value=\"harmonize\">Harmonize</SelectItem>\n        </SelectContent>\n      </Select>\n    </PropertyRow>\n  </PropertyGroup>\n  <PropertyGroup label=\"Grid\" summary=\"8px\">\n    <PropertyRow label=\"Size\">\n      <ScrubField label=\"Grid size\" value={8} min={1} max={64} suffix=\"px\" />\n    </PropertyRow>\n  </PropertyGroup>\n</PanelSection>",
          "imports": "import { PanelSection, PropertyGroup, PropertyRow, ScrubField, Select, SelectContent, SelectItem, SelectTrigger } from \"@sableui/react\""
        },
        {
          "label": "Blending section, 2-up",
          "code": "<PanelSection title=\"Blending\">\n  <PropertyPair>\n    <ScrubField label=\"Opacity\" value={100} min={0} max={100} suffix=\"%\" />\n    <Select value=\"normal\">\n      <SelectTrigger size=\"xs\" />\n      <SelectContent>\n        <SelectItem value=\"normal\">Normal</SelectItem>\n        <SelectItem value=\"multiply\">Multiply</SelectItem>\n      </SelectContent>\n    </Select>\n  </PropertyPair>\n</PanelSection>",
          "imports": "import { PanelSection, PropertyPair, ScrubField, Select, SelectContent, SelectItem, SelectTrigger } from \"@sableui/react\""
        },
        {
          "label": "Rows with a stacked slider",
          "code": "<PanelSection title=\"Parameters\">\n  <PropertyRow label=\"Block size\" hint=\"Block edge length in reference pixels.\" stacked>\n    <Slider value={32} min={4} max={256} />\n  </PropertyRow>\n  <PropertyRow label=\"Direction\">\n    <Select value=\"both\">\n      <SelectTrigger size=\"xs\" />\n      <SelectContent>\n        <SelectItem value=\"both\">Both</SelectItem>\n        <SelectItem value=\"horizontal\">Horizontal</SelectItem>\n      </SelectContent>\n    </Select>\n  </PropertyRow>\n  <PropertyRow label=\"Reverse\">\n    <Switch checked={false} />\n  </PropertyRow>\n</PanelSection>",
          "imports": "import { PanelSection, PropertyRow, Select, SelectContent, SelectItem, SelectTrigger, Slider, Switch } from \"@sableui/react\""
        },
        {
          "label": "Section with a header action",
          "code": "<PanelSection\n  title=\"Blending\"\n  action={\n    <Button size=\"icon-xs\" variant=\"ghost\" aria-label=\"Hide layer\">\n      <Icon name=\"eye\" />\n    </Button>\n  }\n>\n  <PropertyRow label=\"Opacity\">\n    <ScrubField label=\"Opacity\" value={60} min={0} max={100} suffix=\"%\" />\n  </PropertyRow>\n</PanelSection>",
          "imports": "import { Button, Icon, PanelSection, PropertyRow, ScrubField } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Phone",
      "status": "stable",
      "group": "Media & mockups",
      "register": "page",
      "path": "components/phone",
      "summary": "A current smartphone frame at iPhone proportions: a dark body with a titanium band, thin bezels, an island, an optional status bar and a scrollable screen.",
      "keywords": [
        "phone",
        "device mockup",
        "mobile preview",
        "frame"
      ],
      "usage": {
        "description": "Use Phone to frame a mobile product preview when the device context is useful.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for mobile UI demos, screenshots, and responsive previews."
          },
          {
            "guidance": "do",
            "description": "Keep the framed content legible and avoid stuffing full desktop layouts into the phone frame."
          },
          {
            "guidance": "dont",
            "description": "Do not use Phone as a generic panel, card, or production app shell."
          },
          {
            "guidance": "dont",
            "description": "Do not use it to test responsive behaviour. The frame is a fixed aspect box, not a viewport, so media queries inside key off the real window."
          }
        ]
      },
      "related": {
        "components": [
          "Browser"
        ]
      },
      "props": [
        {
          "name": "children",
          "type": "ReactNode",
          "description": "Content rendered inside the scrollable screen region."
        },
        {
          "name": "statusBar",
          "type": "boolean",
          "default": "true",
          "description": "Draw a status bar (time, signal, battery) across the top of the screen. Turn it off to frame a screenshot that already has one."
        },
        {
          "name": "systemChrome",
          "type": "boolean",
          "default": "true",
          "description": "Draw the camera pill and home indicator. Turn it off when the content draws its own system chrome, such as an iOS prototype framed by PhoneFrame from @sableui/react/ios/preview."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Additional classes merged onto the outer wrapper (set the width here; the screen keeps its proportions)."
        }
      ],
      "tokensUsed": [
        "background",
        "foreground"
      ],
      "a11y": [
        "Purely presentational frame; the screen region scrolls when content overflows. Add headings/landmarks in the content as needed.",
        "The frame's chrome (status bar, camera, buttons) is aria-hidden, so the content inside carries the entire accessible meaning. A screenshot with no alt text makes the whole mockup announce as nothing at all."
      ],
      "examples": [
        {
          "label": "Framing a mobile layout",
          "code": "<Phone><div className=\"p-4\"><h2 className=\"text-title-lg\">Activity</h2><p className=\"text-body-sm text-muted-foreground\">3 new orders today.</p></div></Phone>",
          "imports": "import { Phone } from \"@sableui/react\""
        },
        {
          "label": "Mockup, not a responsive preview",
          "code": "// Phone is DECORATIVE framing for a mobile screenshot on a marketing surface.\n\n<Phone>\n  <img src=\"/screenshots/mobile.png\" alt=\"The mobile app\" />\n</Phone>\n\n// ✗ Using it to test responsive layout. The frame is a fixed aspect box, not a\n//   viewport — media queries inside it key off the real window, so what you see\n//   is not what a phone renders. Resize the browser, or use device emulation.\n// ✗ Wrapping live, interactive app UI (forms, buttons that act). Same as Browser: the frame says \"picture of\n//   software\", so real controls inside it read as a screenshot that moves. Static composed content is fine.\n//   The exception is a clickable iOS prototype: PhoneFrame (@sableui/react/ios/preview)\n//   frames a whole phone-sized document in an iframe, where the frame is the device.",
          "imports": "import { Phone } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "PieChart",
      "status": "beta",
      "group": "Charts",
      "register": "page",
      "path": "components/pie-chart",
      "summary": "Parts of a whole as slices: a pie or donut, concentric rings for several measures, a total in the hole, slice labels inside or out, and an active slice that pulls outward. Slices sweep in clockwise as the chart scrolls into view.",
      "keywords": [
        "chart",
        "pie",
        "donut",
        "doughnut",
        "share",
        "proportion",
        "breakdown",
        "parts",
        "whole"
      ],
      "usage": {
        "description": "Use PieChart for a share of one total across two to six categories — traffic sources, a budget split, survey answers. A donut leaves room for the total in the middle (`centerLabel`). With more categories, or to compare values precisely, use BarChart; for a breakdown inside a stat card, SegmentedBar is lighter.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Put the total, or the headline slice, in a donut's centerLabel."
          },
          {
            "guidance": "do",
            "description": "Configure slice names, tones and icons with categories, keyed by each slice's value in the data."
          },
          {
            "guidance": "dont",
            "description": "Use more than six slices — merge the tail into \"Other\" or use BarChart."
          },
          {
            "guidance": "dont",
            "description": "Use it for data-heavy views — streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
          }
        ]
      },
      "related": {
        "components": [
          "SegmentedBar",
          "RadialChart",
          "BarChart",
          "Card"
        ]
      },
      "props": [
        {
          "name": "data",
          "type": "Record<string, unknown>[]",
          "description": "One row per slice."
        },
        {
          "name": "index",
          "type": "string",
          "description": "The datum field naming each slice."
        },
        {
          "name": "valueKey",
          "type": "string | string[]",
          "description": "The datum field holding each slice's amount — or several fields, drawn as concentric rings, outer first."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
        },
        {
          "name": "categories",
          "type": "Record<string, { label?: string; tone?: ChartTone; color?: string; icon?: string }>",
          "description": "Labels, tones and icons per slice, keyed by the slice's name. Unlisted slices take the tones in order."
        },
        {
          "name": "className",
          "type": "string",
          "default": "\"h-64\"",
          "description": "Sizes the chart. Set a height."
        },
        {
          "name": "donut",
          "type": "boolean | number",
          "default": "false",
          "description": "Cut out the middle: `true` for a ring at 60% of the radius, or a ratio (0–0.9)."
        },
        {
          "name": "centerLabel",
          "type": "{ value: string | number; label?: string }",
          "description": "A value and caption in the hole of a donut. The value holds the centre and the caption hangs below it. A number is formatted for you: in full up to 9,999, compact from 10,000 (10.2K, 102.1K, 1.2M); pass a string for units."
        },
        {
          "name": "separator",
          "type": "boolean",
          "default": "true",
          "description": "A hairline in the surface colour between slices."
        },
        {
          "name": "labels",
          "type": "\"none\" | \"outside\" | \"inside\"",
          "default": "\"none\"",
          "description": "Label each slice outside the pie or inside it."
        },
        {
          "name": "labelContent",
          "type": "\"value\" | \"percent\" | \"name\"",
          "default": "\"value\"",
          "description": "What a slice label says."
        },
        {
          "name": "legend",
          "type": "boolean",
          "default": "true unless slices are labelled",
          "description": "Show the legend."
        },
        {
          "name": "tooltip",
          "type": "boolean | { indicator?: \"dot\" | \"line\" | \"dashed\" | \"none\"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean }",
          "default": "true",
          "description": "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row."
        },
        {
          "name": "valueFormatter",
          "type": "(value: number) => string",
          "description": "Format values everywhere (axis, labels, tooltip, table) — units like \"$12,480\". Default: compact on the axis, full elsewhere."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for default number and date formatting."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The sweep, the slice morph and the rolling centre number are the flourish; the hover pull-out and dim are the feedback `subtle` keeps."
        },
        {
          "name": "animate",
          "type": "boolean",
          "default": "true",
          "description": "Sweep the slices in clockwise when the chart scrolls into view. `animate={false}` is `motion=\"subtle\"`.",
          "deprecated": "motion=\"subtle\" (what animate={false} now maps to: no arrival, hover kept) or motion=\"off\""
        },
        {
          "name": "activeIndex",
          "type": "number | null",
          "description": "The highlighted row (controlled); `null` for none."
        },
        {
          "name": "defaultActiveIndex",
          "type": "number | null",
          "description": "The row highlighted at first — a tooltip already open before anyone hovers."
        },
        {
          "name": "onActiveIndexChange",
          "type": "(index: number | null) => void",
          "description": "Called as the pointer or keyboard moves between rows."
        }
      ],
      "tokensUsed": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "primary",
        "muted-foreground",
        "border",
        "popover",
        "popover-foreground",
        "foreground",
        "background",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Slices",
          "why": "Once on screen the slices are revealed by a mask that sweeps clockwise from 12 o'clock — the whole is read as it fills. On the motion tokens; reduced motion shows the finished chart. The arrival is expressive: it plays at the full motion level only, so `motion=\"subtle\"` (or a subtle app policy) shows the finished chart while hover feedback stays."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Active slice",
          "why": "The hovered slice pulls outward and the rest dim at once (mixed toward the surface, not faded); the geometry change itself eases (see transition). Essential: `subtle` keeps it."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Centre value",
          "why": "A numeric centre value rolls to its new total digit by digit (NumberTicker) when the data changes, so the headline is seen moving with the slices instead of being found different afterwards. Expressive: under `subtle` it updates in place."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Slices",
          "why": "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place. Expressive, like the arrival: under `subtle` new data swaps in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "PieChart",
          "why": "A chart has no indeterminate state; show a Skeleton while the data loads."
        }
      ],
      "a11y": [
        "The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
        "With a tooltip, the chart is one tab stop (role=group, aria-roledescription=\"chart\"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.",
        "Colour is never the only key: series are named in the legend, tooltip and table."
      ],
      "examples": [
        {
          "label": "Donut with a total",
          "code": "const sources = [\n\t{ source: \"Search\", visitors: 275 },\n\t{ source: \"Direct\", visitors: 200 },\n\t{ source: \"Social\", visitors: 187 },\n\t{ source: \"Email\", visitors: 90 },\n]\n\n<PieChart\n\tlabel=\"Visitors by source\"\n\tdata={sources}\n\tindex=\"source\"\n\tvalueKey=\"visitors\"\n\tdonut\n\tcenterLabel={{ value: 752, label: \"Visitors\" }}\n/>",
          "imports": "import { PieChart } from \"@sableui/react\""
        },
        {
          "label": "Labelled slices",
          "code": "<PieChart\n\tlabel=\"Share of visitors by source\"\n\tdata={sources}\n\tindex=\"source\"\n\tvalueKey=\"visitors\"\n\tlabels=\"outside\"\n\tlabelContent=\"percent\"\n\tcategories={{ Search: { tone: \"primary\" }, Email: { tone: \"neutral\" } }}\n/>",
          "imports": "import { PieChart } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Pill",
      "status": "stable",
      "group": "Badges & pills",
      "register": "page",
      "path": "components/pill",
      "summary": "A chip someone clicks: a filter, a tag choice, an option in a row. Always a button; pass selected to make it a toggle with aria-pressed, and leave it unset on a chip that fires an action. appearance=\"solid\" (filters; selected lifts onto the primary surface) , \"outline\" (quiet chips that annotate content, like a tag on a card) or \"ghost\" (nothing drawn at rest, for small toggles under content, like reactions); size lg, md or sm. A static label is a Badge.",
      "keywords": [
        "pill",
        "chip",
        "filter",
        "tag",
        "toggle chip",
        "category"
      ],
      "usage": {
        "description": "Use Pill for a row of filters or choices a person clicks to narrow or toggle what they see. For a label that only describes something, use Badge.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use short text that names the filter or choice."
          },
          {
            "guidance": "do",
            "description": "Reflect the current choice with selected, so the active filter reads at a glance."
          },
          {
            "guidance": "do",
            "description": "In a toolbar where filter chips share a row with a search field (\"All 8 · Products 5 · Open source 2 … [Find a project]\"), pair Pill size=\"lg\" with SearchInput size=\"sm\", and Button size=\"sm\" for any action beside them. All three stand on --control-sm (32px, 28 compact), the rung the spacing doctrine gives toolbar controls, so the row is one height in either density. Pill md (28px) has no text field of its height in the page register, so md beside a field always reads as a mismatch."
          },
          {
            "guidance": "dont",
            "description": "Do not use Pill as a static label. A pressable-looking chip that does nothing is the most common cause of dead clicks in a filter row — that is a Badge.",
            "instead": [
              "Badge"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use Pill for primary actions or important system status."
          },
          {
            "guidance": "dont",
            "description": "Do not restyle a Pill with border or background classes to get a quieter chip. That is appearance=\"outline\", or \"ghost\" for no chip at all (and size=\"sm\" for a small one); an override is a look that exists nowhere else in the system. Likewise never set h-* on a Pill to match a neighbour: pick the size that shares its rung."
          }
        ]
      },
      "related": {
        "components": [
          "Badge",
          "ToggleGroup",
          "SearchInput"
        ]
      },
      "props": [
        {
          "name": "selected",
          "type": "boolean",
          "default": "false",
          "description": "Marks the pill as chosen. Solid lifts onto the primary surface; outline takes a primary tint and soft primary edge; ghost takes the tint with no edge. Passing it, true or false, sets aria-pressed; left unset the chip is a plain action button."
        },
        {
          "name": "appearance",
          "type": "\"solid\" | \"outline\" | \"ghost\"",
          "default": "\"solid\"",
          "description": "solid for a filter row; outline for quiet chips that annotate other content (a tag on a card), where a filled chip would compete with what it annotates; ghost for a run of small toggles under other content (the reactions under a message): nothing drawn at rest, a hover fill, and a primary tint when selected."
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\"",
          "default": "\"md\"",
          "description": "lg sits on --control-sm (32px, 28 compact), the toolbar rung it shares with SearchInput sm and Button sm, for a filter row beside a search field. md sits on --control-xs (28px, 24 compact), the chip in a row of its own or among content. sm is a fixed 24px (the target floor, which density does not shrink), for chips under or inside other content."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\"",
          "default": "\"neutral\"",
          "description": "neutral is the chip as described. A palette family colours it as a category, like the choices in a tag picker: a wash at rest, the solid family colour when selected. Painted from the theme's generated palette."
        },
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "Optional leading glyph (e.g. <Icon name=\"lock\" />), rendered before the children with the base gap."
        }
      ],
      "variants": {
        "appearance": [
          "solid",
          "outline",
          "ghost"
        ],
        "size": [
          "lg",
          "md",
          "sm"
        ],
        "selected": [
          "true",
          "false"
        ],
        "tone": [
          "neutral",
          "red",
          "orange",
          "yellow",
          "green",
          "teal",
          "blue",
          "purple",
          "pink"
        ]
      },
      "tokensUsed": [
        "palette-wash",
        "palette-wash-strong",
        "palette-edge",
        "palette-solid",
        "palette-text",
        "palette-solid-ink",
        "secondary",
        "secondary-foreground",
        "accent",
        "accent-foreground",
        "primary",
        "primary-foreground",
        "card",
        "border",
        "muted-foreground",
        "foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Pills arrive with the filter row or the content they annotate. A chip that animated in alone would read as a filter someone just added."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The hover wash eases, so sweeping the pointer along a filter row reads as one cursor moving rather than chips flashing in turn."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Root",
          "why": "A pill often toggles a filter that takes a moment to reach the results; the settle on press confirms the click landed before they change."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "`selected` lifts the chip onto its selected surface on the same ease, so toggling reads as this chip changing state, not a different chip appearing in its place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A chip is a choice, not a process. If applying it is slow, the results show it."
        }
      ],
      "a11y": [
        "Renders a native <button type=\"button\"> for focus and keyboard activation.",
        "Selected state is exposed via aria-pressed when selected is passed; a chip without it is a plain button."
      ],
      "examples": [
        {
          "label": "Tag picker",
          "code": "<Row gap={1}><Pill tone=\"blue\" selected onClick={() => {}}>Design</Pill><Pill tone=\"teal\" onClick={() => {}}>Research</Pill><Pill tone=\"orange\" onClick={() => {}}>Marketing</Pill></Row>",
          "imports": "import { Pill, Row } from \"@sableui/react\""
        },
        {
          "label": "Filter row",
          "code": "<Row gap={1}><Pill selected onClick={() => {}}>All</Pill><Pill onClick={() => {}}>Projects</Pill><Pill onClick={() => {}}>Reports</Pill></Row>",
          "imports": "import { Pill, Row } from \"@sableui/react\""
        },
        {
          "label": "Filters with search",
          "code": "const [filter, setFilter] = useState(\"all\")\nconst [q, setQ] = useState(\"\")\n\n<Row gap={2} align=\"center\" justify=\"between\" wrap>\n\t<Row gap={1}>\n\t\t<Pill size=\"lg\" selected={filter === \"all\"} onClick={() => setFilter(\"all\")}>All 8</Pill>\n\t\t<Pill size=\"lg\" selected={filter === \"products\"} onClick={() => setFilter(\"products\")}>Products 5</Pill>\n\t\t<Pill size=\"lg\" selected={filter === \"oss\"} onClick={() => setFilter(\"oss\")}>Open source 2</Pill>\n\t</Row>\n\t<SearchInput size=\"sm\" value={q} onValueChange={setQ} placeholder=\"Find a project…\" aria-label=\"Find a project\" className=\"max-w-64\" />\n</Row>",
          "imports": "import { Pill, Row, SearchInput } from \"@sableui/react\""
        },
        {
          "label": "Ghost, small (reactions)",
          "code": "<Row gap={1}><Pill appearance=\"ghost\" size=\"sm\" selected onClick={() => {}}>🎉 3</Pill><Pill appearance=\"ghost\" size=\"sm\" onClick={() => {}}>👀</Pill></Row>",
          "imports": "import { Pill, Row } from \"@sableui/react\""
        },
        {
          "label": "Outline, small (tags)",
          "code": "<Row gap={1}><Pill appearance=\"outline\" size=\"sm\" selected onClick={() => {}}>Design</Pill><Pill appearance=\"outline\" size=\"sm\" onClick={() => {}}>Research</Pill></Row>",
          "imports": "import { Pill, Row } from \"@sableui/react\""
        },
        {
          "label": "With icon",
          "code": "<Pill icon={<Icon name=\"lock\" />} onClick={() => {}}>Locked</Pill>",
          "imports": "import { Icon, Pill } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Popover",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/popover",
      "summary": "Click-triggered overlay over Base UI Popover (focus management, collision-aware positioning, Esc/outside dismissal). Holds interactive content; 18rem-wide surface.",
      "keywords": [
        "popover",
        "floating panel",
        "anchored",
        "disclosure"
      ],
      "usage": {
        "description": "Use Popover for anchored secondary content that needs more room than a tooltip but less commitment than a dialog.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for small pickers, summaries, or contextual controls tied to a trigger."
          },
          {
            "guidance": "do",
            "description": "Keep focus behavior and dismissal predictable."
          },
          {
            "guidance": "dont",
            "description": "Do not use Popover for blocking confirmations, long forms, or critical information.",
            "instead": [
              "Dialog"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not put a form that can fail validation inside one. A popover dismisses on outside click, which discards what the user typed with no warning — that is a Dialog.",
            "instead": [
              "Dialog"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "PopoverTrigger",
            "required": true,
            "description": "The element that anchors and opens the popover."
          },
          {
            "name": "PopoverContent",
            "required": true,
            "description": "The floating content surface."
          },
          {
            "name": "PopoverTitle",
            "required": false,
            "description": "An optional heading for the content."
          },
          {
            "name": "PopoverDescription",
            "required": false,
            "description": "Optional supporting copy."
          },
          {
            "name": "PopoverClose",
            "required": false,
            "description": "An explicit close control when helpful."
          },
          {
            "name": "PopoverArrow",
            "required": false,
            "description": "An optional arrow pointing to the trigger."
          }
        ]
      },
      "related": {
        "components": [
          "Tooltip",
          "ContextCard",
          "Dialog"
        ]
      },
      "props": [
        {
          "name": "Popover (Root)",
          "type": "Base UI Popover.Root props (open, defaultOpen, onOpenChange, modal)",
          "description": "Groups the trigger and content. Uncontrolled by default."
        }
      ],
      "subcomponents": [
        {
          "name": "PopoverTrigger",
          "type": "Base UI Trigger props + render",
          "description": "The anchor element. Use render={<Button/>} to compose with another component."
        },
        {
          "name": "PopoverContent",
          "type": "Base UI Popup props + side: \"top\" | \"bottom\" | \"left\" | \"right\" | \"inline-*\" + align: \"start\" | \"center\" | \"end\" + sideOffset: number + anchor: Element | Ref | (() => Element) | VirtualElement + className",
          "description": "Portals + positions + paints the popup. side picks which side of the trigger to render against (auto-flips on collision; defaults to \"bottom\"); align sets alignment along that side (defaults to \"center\"); sideOffset is the gap in px (defaults to 8). anchor positions against a different element/ref/getter than the trigger — Base UI 1.5 has no separate Anchor part, so pass it here to decouple the open-location from the trigger."
        },
        {
          "name": "PopoverTitle",
          "type": "Base UI Title props + className",
          "description": "Accessible heading; Base UI wires aria-labelledby to the popup."
        },
        {
          "name": "PopoverDescription",
          "type": "Base UI Description props + className",
          "description": "Supplementary copy; Base UI wires aria-describedby to the popup."
        },
        {
          "name": "PopoverClose",
          "type": "Base UI Close props + render",
          "description": "A button that closes the popover. Use render={<Button/>} to compose."
        },
        {
          "name": "PopoverArrow",
          "type": "Base UI Arrow props + className",
          "description": "Optional pointer connecting the popup to its trigger. Place inside PopoverContent."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border-floating",
        "muted-foreground"
      ],
      "a11y": [
        "Base UI manages focus into and out of the popup, traps focus when modal, and restores focus to the trigger on close.",
        "Opens on trigger press (click/Enter/Space); dismisses on Esc and outside press.",
        "PopoverTitle/PopoverDescription wire aria-labelledby/aria-describedby on the popup.",
        "Enters and exits on the motion-pop recipe (Base UI starting/ending-style attributes), so it follows the motion policy."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<Popover><PopoverTrigger render={<Button variant=\"secondary\">Details</Button>} /><PopoverContent><PopoverTitle>Plan details</PopoverTitle><PopoverDescription>Up to 10 seats, billed monthly per seat.</PopoverDescription></PopoverContent></Popover>",
          "imports": "import { Button, Popover, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from \"@sableui/react\""
        },
        {
          "label": "With close",
          "code": "<Popover><PopoverTrigger render={<Button variant=\"secondary\">Open</Button>} /><PopoverContent><PopoverTitle>Heads up</PopoverTitle><PopoverDescription>Upgrading starts a new billing period today.</PopoverDescription><PopoverClose render={<Button size=\"sm\">Got it</Button>} /></PopoverContent></Popover>",
          "imports": "import { Button, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Progress",
      "status": "stable",
      "group": "Loading & progress",
      "register": "either",
      "path": "components/progress",
      "summary": "Linear progress bar over Base UI Progress — value 0–100 drives the fill; omit value (or pass null) for an indeterminate, pulsing bar.",
      "keywords": [
        "progress",
        "task progress",
        "meter",
        "loading"
      ],
      "usage": {
        "description": "Use Progress to communicate determinate or indeterminate completion for a task or process.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use determinate values when progress can be measured."
          },
          {
            "guidance": "do",
            "description": "Pair the visual indicator with text when users need context or exact values."
          },
          {
            "guidance": "dont",
            "description": "Do not use Progress as a decorative divider or status color bar."
          },
          {
            "guidance": "dont",
            "description": "Do not use a determinate Progress for an unknown duration. A bar that sits at 90% is worse than a Spinner, because it makes a promise about time that you cannot keep.",
            "instead": [
              "Spinner"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "ProgressTrack",
            "required": true,
            "description": "The background track that defines the range."
          },
          {
            "name": "ProgressIndicator",
            "required": true,
            "description": "The filled or animated progress indicator."
          },
          {
            "name": "ProgressLabel",
            "required": false,
            "description": "A text label for the progress task."
          },
          {
            "name": "ProgressValue",
            "required": false,
            "description": "A readable value such as 45 percent."
          }
        ]
      },
      "related": {
        "components": [
          "Spinner",
          "Skeleton"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "number | null",
          "default": "null",
          "description": "Current value between min and max. null (or omitted) renders the indeterminate state."
        },
        {
          "name": "min",
          "type": "number",
          "default": "0",
          "description": "The minimum value of the range."
        },
        {
          "name": "max",
          "type": "number",
          "default": "100",
          "description": "The maximum value of the range."
        },
        {
          "name": "format",
          "type": "Intl.NumberFormatOptions",
          "description": "Formatting options for ProgressValue (e.g. style: 'percent', or a currency)."
        },
        {
          "name": "getAriaValueText",
          "type": "(formatted, value) => string",
          "description": "Returns a human-readable text alternative for aria-valuenow."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Bar thickness, on the same three rails as Meter so the two match on one page. ProgressTrack inherits it."
        }
      ],
      "subcomponents": [
        {
          "name": "ProgressTrack",
          "type": "Base UI Track props + className",
          "description": "The rail. Rendered automatically when Progress has no children; renders a ProgressIndicator child by default. Takes `size` (inherited from Progress) for its thickness — use that rather than a className height."
        },
        {
          "name": "ProgressIndicator",
          "type": "Base UI Indicator props + className",
          "description": "The fill. Width is set by Base UI from the value; spans full width and pulses while indeterminate."
        },
        {
          "name": "ProgressLabel",
          "type": "Base UI Label props + className",
          "description": "Accessible label; wires aria-labelledby on the Root."
        },
        {
          "name": "ProgressValue",
          "type": "Base UI Value props + className",
          "description": "Formatted value readout. Accepts a render-function child for custom formatting."
        }
      ],
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "secondary",
        "primary",
        "foreground",
        "muted-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A progress bar appears because work started. Staging its entrance delays the one piece of information the reader is waiting for."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Root",
          "why": "It reports; it does not accept input. A bar that reacted to the pointer would read as a Slider, which is a control the reader can drag."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "ProgressIndicator",
          "why": "Fill width eases between values on the motion tokens (no recipe animates width), so the bar reads as filling rather than as a series of unrelated widths. It matters most where progress arrives in coarse jumps — four chunked upload callbacks look like a glitching bar without it."
        },
        {
          "slot": "activity",
          "recipe": "motion-pulse",
          "part": "ProgressIndicator",
          "why": "Indeterminate (value null) has no width to animate, so the pulse carries the whole signal that work is still happening. Without it the indeterminate state is a static bar — indistinguishable from a stalled determinate one."
        }
      ],
      "a11y": [
        "Base UI sets role=progressbar with aria-valuenow / aria-valuemin / aria-valuemax and reports status to screen readers.",
        "Indeterminate state (value null) omits aria-valuenow per the ARIA spec.",
        "Pair ProgressLabel with the bar for a visible, associated name; ProgressValue exposes the formatted value."
      ],
      "examples": [
        {
          "label": "Determinate",
          "code": "<Progress value={64} aria-label=\"Upload\" />",
          "imports": "import { Progress } from \"@sableui/react\""
        },
        {
          "label": "Indeterminate",
          "code": "<Progress aria-label=\"Preparing export\" />",
          "imports": "import { Progress } from \"@sableui/react\""
        },
        {
          "label": "With label and value",
          "code": "<Progress value={40}><div className=\"mb-2 flex flex-wrap items-center justify-between gap-x-3 gap-y-1\"><ProgressLabel>Uploading</ProgressLabel><ProgressValue /></div><ProgressTrack /></Progress>",
          "imports": "import { Progress, ProgressLabel, ProgressTrack, ProgressValue } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "RadarChart",
      "status": "beta",
      "group": "Charts",
      "register": "page",
      "path": "components/radar-chart",
      "summary": "Several measures compared around a centre: one polygon per series over a polygon or circular web, filled or outline only, with optional dots, a radius scale and a tinted web. Polygons grow from the centre as the chart scrolls into view.",
      "keywords": [
        "chart",
        "radar",
        "spider",
        "web",
        "profile",
        "skills",
        "comparison",
        "polar"
      ],
      "usage": {
        "description": "Use RadarChart to compare the shape of a profile across five to eight dimensions — skills, product scores, a cycle of months — for one to three series. The shape is the message; for exact values or more than three series, BarChart is easier to read.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep every spoke on the same scale and direction (more is better on all of them)."
          },
          {
            "guidance": "do",
            "description": "Use filled={false} when two polygons overlap heavily, so both outlines stay visible."
          },
          {
            "guidance": "dont",
            "description": "Use fewer than five spokes — three or four make a triangle or square that says little; use BarChart."
          },
          {
            "guidance": "dont",
            "description": "Use it for data-heavy views — streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
          }
        ]
      },
      "related": {
        "components": [
          "BarChart",
          "LineChart",
          "Card"
        ]
      },
      "props": [
        {
          "name": "data",
          "type": "Record<string, unknown>[]",
          "description": "One row per spoke."
        },
        {
          "name": "index",
          "type": "string",
          "description": "The datum field naming each spoke."
        },
        {
          "name": "series",
          "type": "{ key: string; label: string; tone?: ChartTone; color?: string; icon?: string }[]",
          "description": "The measures to plot: the datum field, its name in the legend/tooltip/table, and its colour (a tone by role, or any CSS colour). Omitted, series take the chart palette in order: --chart-1 … --chart-8, validated for colour-blind separation in light and dark; a theme may override the set."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
        },
        {
          "name": "className",
          "type": "string",
          "default": "\"h-72\"",
          "description": "Sizes the chart. Set a height."
        },
        {
          "name": "grid",
          "type": "\"polygon\" | \"circle\" | \"none\"",
          "default": "\"polygon\"",
          "description": "The web behind the polygons."
        },
        {
          "name": "gridFill",
          "type": "boolean",
          "default": "false",
          "description": "Tint the web's outer area."
        },
        {
          "name": "filled",
          "type": "boolean",
          "default": "true",
          "description": "Fill each polygon; `false` draws outlines only."
        },
        {
          "name": "dots",
          "type": "boolean",
          "default": "false",
          "description": "Mark every vertex with a dot."
        },
        {
          "name": "radiusAxis",
          "type": "boolean",
          "default": "false",
          "description": "Print the ring values along the top spoke."
        },
        {
          "name": "legend",
          "type": "boolean",
          "default": "true when there is more than one series",
          "description": "Show the legend."
        },
        {
          "name": "tooltip",
          "type": "boolean | { indicator?: \"dot\" | \"line\" | \"dashed\" | \"none\"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean }",
          "default": "true",
          "description": "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row."
        },
        {
          "name": "valueFormatter",
          "type": "(value: number) => string",
          "description": "Format values everywhere (axis, labels, tooltip, table) — units like \"$12,480\". Default: compact on the axis, full elsewhere."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for default number and date formatting."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The polygons growing in and morphing are the flourish; the hover highlight is the feedback `subtle` keeps."
        },
        {
          "name": "animate",
          "type": "boolean",
          "default": "true",
          "description": "Grow the polygons from the centre when the chart scrolls into view. `animate={false}` is `motion=\"subtle\"`.",
          "deprecated": "motion=\"subtle\" (what animate={false} now maps to: no arrival, hover kept) or motion=\"off\""
        },
        {
          "name": "activeIndex",
          "type": "number | null",
          "description": "The highlighted row (controlled); `null` for none."
        },
        {
          "name": "defaultActiveIndex",
          "type": "number | null",
          "description": "The row highlighted at first — a tooltip already open before anyone hovers."
        },
        {
          "name": "onActiveIndexChange",
          "type": "(index: number | null) => void",
          "description": "Called as the pointer or keyboard moves between rows."
        }
      ],
      "tokensUsed": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "primary",
        "muted-foreground",
        "border",
        "popover",
        "popover-foreground",
        "foreground",
        "background",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Polygon",
          "why": "Once on screen each polygon grows from the centre and fades in, series staggered, on the emphasized easing. On the motion tokens; reduced motion shows the finished chart. The arrival is expressive: it plays at the full motion level only, so `motion=\"subtle\"` (or a subtle app policy) shows the finished chart while hover feedback stays."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Active spoke",
          "why": "The hovered spoke's vertices and label highlight at once."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Polygon",
          "why": "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place. Expressive, like the arrival: under `subtle` new data swaps in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "RadarChart",
          "why": "A chart has no indeterminate state; show a Skeleton while the data loads."
        }
      ],
      "a11y": [
        "The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
        "With a tooltip, the chart is one tab stop (role=group, aria-roledescription=\"chart\"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.",
        "Colour is never the only key: series are named in the legend, tooltip and table."
      ],
      "examples": [
        {
          "label": "Two profiles",
          "code": "const scores = [\n\t{ skill: \"Speed\", a: 86, b: 65 },\n\t{ skill: \"Quality\", a: 72, b: 90 },\n\t{ skill: \"Support\", a: 64, b: 80 },\n\t{ skill: \"Price\", a: 90, b: 55 },\n\t{ skill: \"Docs\", a: 70, b: 85 },\n\t{ skill: \"Ecosystem\", a: 60, b: 75 },\n]\n\n<RadarChart\n\tlabel=\"Product scores compared\"\n\tdata={scores}\n\tindex=\"skill\"\n\tseries={[\n\t\t{ key: \"a\", label: \"Atlas\" },\n\t\t{ key: \"b\", label: \"Beacon\" },\n\t]}\n/>",
          "imports": "import { RadarChart } from \"@sableui/react\""
        },
        {
          "label": "Circular web, outlines only",
          "code": "<RadarChart\n\tlabel=\"Atlas scores\"\n\tdata={scores}\n\tindex=\"skill\"\n\tseries={[{ key: \"a\", label: \"Atlas\" }]}\n\tgrid=\"circle\"\n\tgridFill\n\tfilled={false}\n\tdots\n/>",
          "imports": "import { RadarChart } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "RadialChart",
      "status": "beta",
      "group": "Charts",
      "register": "page",
      "path": "components/radial-chart",
      "summary": "Progress or share as rings: one ring per row against a muted track, a full circle or a gauge (`sweep`), one ring split between rows (`stacked`), ring labels and a value in the middle. Rings draw round as the chart scrolls into view.",
      "keywords": [
        "chart",
        "radial",
        "ring",
        "gauge",
        "progress",
        "goal",
        "score",
        "activity rings",
        "donut"
      ],
      "usage": {
        "description": "Use RadialChart for progress toward goals (several rings), a single score or usage gauge (`sweep={180}` with `centerLabel`), or a split of one total along a gauge (`stacked`). For one reading in a form or settings row, Meter's ring shape is lighter.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Set max to the goal, so a full ring means \"done\"."
          },
          {
            "guidance": "do",
            "description": "Pair a gauge with centerLabel stating the value in words or units."
          },
          {
            "guidance": "dont",
            "description": "Compare more than four rings — inner rings are shorter for the same value, which misleads; use BarChart."
          },
          {
            "guidance": "dont",
            "description": "Use it for data-heavy views — streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
          }
        ]
      },
      "related": {
        "components": [
          "Meter",
          "PieChart",
          "Progress",
          "Card"
        ]
      },
      "props": [
        {
          "name": "data",
          "type": "Record<string, unknown>[]",
          "description": "One row per ring, outermost first."
        },
        {
          "name": "index",
          "type": "string",
          "description": "The datum field naming each ring."
        },
        {
          "name": "valueKey",
          "type": "string",
          "description": "The datum field holding each ring's amount."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
        },
        {
          "name": "categories",
          "type": "Record<string, { label?: string; tone?: ChartTone; color?: string; icon?: string }>",
          "description": "Labels, tones and icons per ring, keyed by the ring's name."
        },
        {
          "name": "className",
          "type": "string",
          "default": "\"h-64\"",
          "description": "Sizes the chart. Set a height."
        },
        {
          "name": "max",
          "type": "number",
          "default": "the largest value (stacked: the total; labelled: the largest value ÷ 0.75, leaving room for the labels)",
          "description": "The value a full ring stands for."
        },
        {
          "name": "sweep",
          "type": "number",
          "default": "360",
          "description": "How far round a full ring runs, in degrees: 360 for a circle, 180 for a gauge."
        },
        {
          "name": "stacked",
          "type": "boolean",
          "default": "false",
          "description": "Split ONE ring between the rows instead of a ring each."
        },
        {
          "name": "track",
          "type": "boolean",
          "default": "true",
          "description": "Draw each ring's full track behind it."
        },
        {
          "name": "labels",
          "type": "boolean",
          "default": "false",
          "description": "Name each ring at its start."
        },
        {
          "name": "centerLabel",
          "type": "{ value: string | number; label?: string }",
          "description": "A value and caption in the middle. On a full ring the value holds the centre and the caption hangs below it. A number is formatted for you: in full up to 9,999, compact from 10,000 (10.2K); pass a string for units (\"7.2 GB\", \"72%\")."
        },
        {
          "name": "legend",
          "type": "boolean",
          "default": "true unless rings are labelled",
          "description": "Show the legend."
        },
        {
          "name": "tooltip",
          "type": "boolean | { indicator?: \"dot\" | \"line\" | \"dashed\" | \"none\"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean }",
          "default": "true",
          "description": "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row."
        },
        {
          "name": "valueFormatter",
          "type": "(value: number) => string",
          "description": "Format values everywhere (axis, labels, tooltip, table) — units like \"$12,480\". Default: compact on the axis, full elsewhere."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for default number and date formatting."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. The draw-on, the ring morph and the rolling centre number are the flourish; the hover dim is the feedback `subtle` keeps."
        },
        {
          "name": "animate",
          "type": "boolean",
          "default": "true",
          "description": "Draw the rings round from their start when the chart scrolls into view. `animate={false}` is `motion=\"subtle\"`.",
          "deprecated": "motion=\"subtle\" (what animate={false} now maps to: no arrival, hover kept) or motion=\"off\""
        },
        {
          "name": "activeIndex",
          "type": "number | null",
          "description": "The highlighted row (controlled); `null` for none."
        },
        {
          "name": "defaultActiveIndex",
          "type": "number | null",
          "description": "The row highlighted at first — a tooltip already open before anyone hovers."
        },
        {
          "name": "onActiveIndexChange",
          "type": "(index: number | null) => void",
          "description": "Called as the pointer or keyboard moves between rows."
        }
      ],
      "tokensUsed": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "primary",
        "muted-foreground",
        "border",
        "popover",
        "popover-foreground",
        "foreground",
        "background",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Ring",
          "why": "Once on screen each ring draws round from its start (stroke-dashoffset on a round-capped arc), staggered outside in. On the motion tokens; reduced motion shows the finished chart. The arrival is expressive: it plays at the full motion level only, so `motion=\"subtle\"` (or a subtle app policy) shows the finished chart while hover feedback stays."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Active ring",
          "why": "The hovered ring stays full strength and the others dim at once — mixed toward the surface rather than faded, so a dimmed ring stays solid over its track instead of turning muddy. Essential: `subtle` keeps it."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Centre value",
          "why": "A numeric centre value rolls to its new total digit by digit (NumberTicker) when the data changes, so the headline is seen moving with the rings instead of being found different afterwards. Expressive: under `subtle` it updates in place."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Ring",
          "why": "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place. Expressive, like the arrival: under `subtle` new data swaps in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "RadialChart",
          "why": "A chart has no indeterminate state; show a Skeleton while the data loads."
        }
      ],
      "a11y": [
        "The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
        "With a tooltip, the chart is one tab stop (role=group, aria-roledescription=\"chart\"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.",
        "Colour is never the only key: series are named in the legend, tooltip and table."
      ],
      "examples": [
        {
          "label": "Goal rings",
          "code": "<RadialChart\n\tlabel=\"Weekly goals\"\n\tdata={[\n\t\t{ goal: \"Move\", progress: 82 },\n\t\t{ goal: \"Exercise\", progress: 64 },\n\t\t{ goal: \"Stand\", progress: 91 },\n\t]}\n\tindex=\"goal\"\n\tvalueKey=\"progress\"\n\tmax={100}\n\tlabels\n/>",
          "imports": "import { RadialChart } from \"@sableui/react\""
        },
        {
          "label": "Gauge with a value",
          "code": "<RadialChart\n\tlabel=\"Plan usage\"\n\tdata={[{ plan: \"Used\", gb: 7.2 }]}\n\tindex=\"plan\"\n\tvalueKey=\"gb\"\n\tmax={10}\n\tsweep={180}\n\tcenterLabel={{ value: \"7.2 GB\", label: \"of 10 GB\" }}\n\tlegend={false}\n/>",
          "imports": "import { RadialChart } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Radio",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/radio",
      "summary": "Single-select control over Base UI RadioGroup + Radio (roving focus, arrow-key nav, ARIA radiogroup wiring, form integration). RadioGroup + Radio.",
      "keywords": [
        "radio",
        "radio group",
        "single choice",
        "form control"
      ],
      "usage": {
        "description": "Use Radio when a user must choose exactly one option from a visible set.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it when all options should be visible for comparison."
          },
          {
            "guidance": "do",
            "description": "Keep option labels mutually exclusive and easy to understand."
          },
          {
            "guidance": "dont",
            "description": "Do not use Radio for independent toggles or multiple selection; use Checkbox or Switch.",
            "instead": [
              "Checkbox",
              "Switch"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use a radio group with only one option, and do not omit the Fieldset. Without the fieldset the options share no accessible name, so a screen reader reads the choices with no question attached."
          }
        ],
        "anatomy": [
          {
            "name": "RadioGroup",
            "required": true,
            "description": "The grouped set that manages one selected value."
          },
          {
            "name": "Radio",
            "required": true,
            "description": "One selectable option in the group."
          }
        ]
      },
      "related": {
        "components": [
          "Checkbox",
          "RadioCard",
          "Field",
          "Fieldset",
          "Select"
        ]
      },
      "props": [
        {
          "name": "Radio",
          "type": "Base UI Radio.Root props (value, disabled, readOnly, required) + className",
          "description": "A single radio button. value pairs it with the group's selected value. Renders a native button with radio semantics, the ring and an inner Indicator dot. A custom non-button render must also set nativeButton={false}."
        }
      ],
      "subcomponents": [
        {
          "name": "RadioGroup",
          "type": "Base UI RadioGroup props (value, defaultValue, onValueChange, name, disabled, readOnly, required) + className",
          "description": "The group container that wraps Radio items and shares selection state across them. Controlled via value + onValueChange; uncontrolled via defaultValue. Lays its Radio items out in a vertical stack."
        }
      ],
      "tokensUsed": [
        "input",
        "card",
        "primary",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Radios arrive with the form they belong to. Animating each one in turns a question into a title sequence."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The ring's edge and focus ring ease, so arrowing through a group — which moves the selection with focus — reads as one choice moving down the list."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Indicator",
          "why": "The dot grows from the centre on a spring and shrinks out of the radio being left. A group's selection moves from one option to another, and the paired grow and shrink is what makes it read as moving rather than two dots blinking."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A radio commits instantly. A slow write belongs to the surrounding form's pending state, not the control."
        }
      ],
      "a11y": [
        "Base UI provides the radiogroup/radio roles, aria-checked, hidden native inputs, and roving tabindex.",
        "Arrow keys move and select between items; Space selects the focused item; Tab enters/leaves the group.",
        "Checked state styling reads from the data-[checked] attribute; disabled items from the disabled state.",
        "Focus-visible draws a 2px ring on the focused item. Wrap each Radio in <Field label orientation=\"horizontal\"> so the label names it, is part of the hit target, sits on the first line, and dims with it when disabled — do not hand-build a <label> row."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<Fieldset>\n\t<FieldsetLegend>Post type</FieldsetLegend>\n\t<FieldsetContent>\n\t\t<RadioGroup defaultValue=\"standard\">\n\t\t\t<Field label=\"Standard\" orientation=\"horizontal\"><Radio value=\"standard\" /></Field>\n\t\t\t<Field label=\"Poll\" orientation=\"horizontal\"><Radio value=\"poll\" /></Field>\n\t\t</RadioGroup>\n\t</FieldsetContent>\n</Fieldset>",
          "imports": "import { Field, Fieldset, FieldsetContent, FieldsetLegend, Radio, RadioGroup } from \"@sableui/react\""
        },
        {
          "label": "With a disabled option",
          "code": "<Fieldset>\n\t<FieldsetLegend>Post type</FieldsetLegend>\n\t<FieldsetContent>\n\t\t<RadioGroup defaultValue=\"standard\">\n\t\t\t<Field label=\"Standard\" orientation=\"horizontal\"><Radio value=\"standard\" /></Field>\n\t\t\t<Field label=\"Poll\" orientation=\"horizontal\" disabled><Radio value=\"poll\" /></Field>\n\t\t</RadioGroup>\n\t</FieldsetContent>\n</Fieldset>",
          "imports": "import { Field, Fieldset, FieldsetContent, FieldsetLegend, Radio, RadioGroup } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "RadioCard",
      "status": "stable",
      "group": "Selection",
      "register": "page",
      "path": "components/radio-card",
      "summary": "A selectable card option (radio-card) over Base UI RadioGroup + Radio. RadioGroup shares selection state; each RadioCard is a card with a radio indicator, title, and description. Add an icon to switch to the richer two-dimensional card, and a tone to give the selected state a semantic colour identity.",
      "keywords": [
        "radio-card",
        "choice card",
        "selection",
        "option card"
      ],
      "usage": {
        "description": "Use RadioCard for visual choice cards when users compare a small set of named options.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it when labels, descriptions, or icons make options easier to understand."
          },
          {
            "guidance": "do",
            "description": "Make the selected state explicit and preserve keyboard access through the group."
          },
          {
            "guidance": "dont",
            "description": "Do not use RadioCard for dense menus, long lists, or simple yes/no settings."
          },
          {
            "guidance": "dont",
            "description": "Do not use a single RadioCard on its own. It is a radio, so one option cannot be deselected — a lone one is a switch, and should be a Switch."
          }
        ],
        "anatomy": [
          {
            "name": "RadioCard",
            "required": true,
            "description": "One selectable option card."
          },
          {
            "name": "RadioGroup",
            "required": false,
            "description": "A grouped set of related choice cards."
          }
        ]
      },
      "related": {
        "components": [
          "Radio",
          "CheckboxCard",
          "Select"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "string",
          "description": "The unique value that pairs this card with the group's selected value."
        },
        {
          "name": "title",
          "type": "ReactNode",
          "description": "The card's primary label (rendered as text-title-sm)."
        },
        {
          "name": "description",
          "type": "ReactNode",
          "description": "Optional supporting copy beneath the title (text-body-sm, muted)."
        },
        {
          "name": "trailing",
          "type": "ReactNode",
          "description": "End-aligned on the title's line: a price, a delivery date, a count. The title takes the rest of the row."
        },
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "Leading icon (e.g. a solid <Icon>). Its presence switches to the two-dimensional card — icon top-left, indicator top-right, copy below — and the glyph is rendered as a solid-fill icon in the tone colour."
        },
        {
          "name": "tone",
          "type": "\"neutral\" | \"3\" | \"2\" | \"1\" | \"info\" | \"warning\"",
          "default": "\"neutral\"",
          "description": "Semantic colour the selected state carries across the border, radio, and icon glyph. Neutral uses the primary ring with a muted wash."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Dims the card and blocks selection. The group skips it during keyboard navigation."
        },
        {
          "name": "titleClassName",
          "type": "string",
          "description": "Merged onto the title span (default text-title-sm) — e.g. to tighten copy in a two-column layout."
        },
        {
          "name": "descriptionClassName",
          "type": "string",
          "description": "Merged onto the description span (default text-body-sm text-muted-foreground)."
        }
      ],
      "subcomponents": [
        {
          "name": "RadioGroup",
          "type": "Base UI RadioGroup props (value, defaultValue, onValueChange, name, disabled, readOnly, required) + className",
          "description": "The group container that wraps the RadioCard cards and shares their selection state. Controlled via value + onValueChange; uncontrolled via defaultValue. Lays its cards out in a single column by default; override with className (e.g. 'grid sm:grid-cols-3') for a grid — the group is a flex column, so a grid-cols-* class alone does nothing."
        }
      ],
      "variants": {
        "tone": [
          "neutral",
          "3",
          "2",
          "1",
          "info",
          "warning"
        ]
      },
      "tokensUsed": [
        "input",
        "card",
        "foreground",
        "primary",
        "muted",
        "ring",
        "muted-foreground",
        "tone-3",
        "tone-2",
        "tone-1",
        "tone-info",
        "tone-warning"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Cards arrive with the form. A plan picker that animated each card in would delay the choice it exists to make."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The edge steps toward the ring colour on hover, eased. On a card-sized target a hard snap across the whole border reads as the layout flickering."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Root",
          "why": "The settle on press confirms a click anywhere in the card — the radio is small, and without it a click in the card's body can feel like it missed the control."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "Checking eases the tone ring and wash onto the new card as the old one releases, so the choice reads as moving between cards rather than two cards repainting."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Indicator",
          "why": "The radio dot grows in on a spring, the same mark as Radio, so a card and a plain radio confirm a choice the same way."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A choice commits instantly. A slow write belongs to the surrounding form's pending state."
        }
      ],
      "a11y": [
        "Base UI provides the radiogroup/radio roles, aria-checked, hidden native inputs, and roving tabindex.",
        "Arrow keys move and select between cards; Space selects the focused card; Tab enters/leaves the group.",
        "Checked state styling reads from the data-[checked] attribute; disabled cards from data-disabled.",
        "focus-within draws a 2px ring on the focused card; the whole card is the hit target.",
        "The icon is decorative — the title labels the card — so selection meaning never relies on colour alone (the border ring and the filled radio both shift; the neutral tone adds a muted fill)."
      ],
      "examples": [
        {
          "label": "Post type (tone + icon)",
          "code": "<RadioGroup defaultValue=\"starter\" className=\"grid sm:grid-cols-3\"><RadioCard value=\"starter\" tone=\"3\" icon={<Icon name=\"plus\" />} title=\"Starter\" description=\"Free for one person\" /><RadioCard value=\"studio\" tone=\"2\" icon={<Icon name=\"gem\" />} title=\"Studio\" description=\"For small teams\" /><RadioCard value=\"business\" tone=\"1\" icon={<Icon name=\"image-stack\" />} title=\"Business\" description=\"SSO and audit log\" /></RadioGroup>",
          "imports": "import { Icon, RadioCard, RadioGroup } from \"@sableui/react\""
        },
        {
          "label": "Plan picker (plain)",
          "code": "<RadioGroup defaultValue=\"pro\"><RadioCard value=\"free\" title=\"Free\" description=\"For trying things out.\" /><RadioCard value=\"pro\" title=\"Pro\" description=\"For growing teams.\" /><RadioCard value=\"enterprise\" title=\"Enterprise\" description=\"Custom limits and support.\" /></RadioGroup>",
          "imports": "import { RadioCard, RadioGroup } from \"@sableui/react\""
        },
        {
          "label": "With a disabled option",
          "code": "<RadioGroup defaultValue=\"free\"><RadioCard value=\"free\" title=\"Free\" description=\"For trying things out.\" /><RadioCard value=\"enterprise\" title=\"Enterprise\" description=\"Contact sales to enable.\" disabled /></RadioGroup>",
          "imports": "import { RadioCard, RadioGroup } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ReactionPicker",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/reaction-picker",
      "summary": "The quick row of emoji you react to a message with: a toolbar of large emoji toggles that bloom in one after another as it opens and magnify under the pointer, with MenuReactions as the same row inside a right-click menu.",
      "keywords": [
        "reaction",
        "reactions",
        "emoji",
        "emoji picker",
        "react",
        "tapback",
        "quick reactions",
        "message actions",
        "chat"
      ],
      "usage": {
        "description": "Use ReactionPicker wherever a reader chooses a reaction for something: in a Popover from an add-reaction control (BubbleReactionAdd is that, ready-made), or as a hover bar over a message. Use MenuReactions for the same row as the first group of the menu a message opens on right-click or long-press, above Reply and Copy. Both report which emoji the reader has already used, so choosing one again removes it.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep the quick set short — six to eight. It is the reactions people actually use; a full emoji catalogue belongs behind a trailing \"more\" control passed as children."
          },
          {
            "guidance": "do",
            "description": "Give every reaction a `label`. It is the accessible name and the menu's typeahead, and an emoji's own spoken name differs between platforms."
          },
          {
            "guidance": "do",
            "description": "Pass `selected` so the reader's own reactions show pressed, and toggle in `onSelect`: choosing a reaction you already gave takes it back."
          },
          {
            "guidance": "do",
            "description": "Offer the right-click menu and a visible add-reaction control together. A context menu is invisible until you know it is there; the pill is how a first-time reader finds reactions."
          },
          {
            "guidance": "dont",
            "description": "Do not put a ReactionPicker inside a Menu or ContextMenu. A toolbar is not a menu item, so the menu's arrow keys would skip it; use MenuReactions there.",
            "instead": [
              "MenuReactions"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it to rate an answer or collect a verdict. Reactions are social and many-valued; a helpful / not-helpful question is Feedback.",
            "instead": [
              "Feedback"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "ReactionPicker",
            "required": true,
            "description": "The toolbar: one tab stop, arrow keys move between emoji, each a toggle with `aria-pressed`."
          },
          {
            "name": "MenuReactions",
            "required": false,
            "description": "The same row as a group of checkbox menu items, for MenuContent and ContextMenuContent. Choosing one closes the menu."
          }
        ]
      },
      "related": {
        "components": [
          "Bubble",
          "ContextMenu",
          "Popover",
          "Toolbar",
          "Feedback"
        ]
      },
      "props": [
        {
          "name": "reactions",
          "type": "readonly { emoji: string; label: string }[]",
          "default": "DEFAULT_REACTIONS",
          "description": "The choices, in order. The default is 👍 ❤️ 😂 🎉 😮 😢 🙏."
        },
        {
          "name": "selected",
          "type": "readonly string[]",
          "default": "[]",
          "description": "The emoji the reader has already reacted with: shown pressed, and choosing one again removes it."
        },
        {
          "name": "onSelect",
          "type": "(emoji: string) => void",
          "description": "Called with the emoji the reader chose. Toggle it in or out of `selected`."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "ReactionPicker only: trailing controls after the emoji, such as a button that opens a full emoji picker."
        },
        {
          "name": "aria-label",
          "type": "string",
          "default": "\"Reactions\"",
          "description": "The name of the toolbar or menu group."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps the press and drops the wave of emoji blooming in and the magnify, `off` stills it. It can only turn motion down."
        }
      ],
      "subcomponents": [
        {
          "name": "MenuReactions",
          "type": "{ reactions?; selected?; onSelect?; motion? } & ComponentProps<typeof Menu.Group>",
          "description": "The quick row as checkbox menu items, for the first group of a MenuContent or ContextMenuContent. Same props as ReactionPicker, without children."
        }
      ],
      "tokensUsed": [
        "accent",
        "primary",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-bloom",
          "part": "Glyph",
          "why": "Opening the picker is the reader's own action, so the emoji answer it: each blooms in 24ms after the one before, a short wave from first to last. The surface it sits in (a Popover or a menu) arrives with its own motion-pop. Expressive only — under `subtle` the emoji are simply there."
        },
        {
          "slot": "response",
          "recipe": "custom",
          "part": "Glyph",
          "why": "The emoji under the pointer or the keyboard highlight magnifies to 1.25 on a fast standard ease, so you can see which one a release will choose; each cell also carries motion-interactive and motion-press. The magnify rides an inner layer so it never fights the bloom over `scale`."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Cell",
          "why": "Pressed and not pressed differ by a tint, eased by motion-interactive. The celebration belongs to the reaction that lands under the message (BubbleReaction), not to the picker that chose it."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Choosing is instant; there is no in-between state to show."
        }
      ],
      "a11y": [
        "ReactionPicker is a Base UI toolbar: one tab stop, Left/Right move between emoji, Home/End jump to the ends.",
        "Each emoji is a button named by its `label` and reporting `aria-pressed`, so a screen-reader user hears whether choosing it adds or removes their reaction. The glyph itself is aria-hidden.",
        "MenuReactions renders checkbox menu items (`menuitemcheckbox` with `aria-checked`), reached by the menu's arrow keys and typeahead like every other row.",
        "Under reduced motion the emoji appear at once and do not magnify; pressed state is carried by `aria-pressed` and a tint, never motion."
      ],
      "examples": [
        {
          "label": "In a popover",
          "code": "<Popover>\n\t<PopoverTrigger render={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Add reaction\" />}>\n\t\t<Icon name=\"emoji\" />\n\t</PopoverTrigger>\n\t<PopoverContent side=\"top\" className=\"w-auto rounded-full p-1\">\n\t\t<ReactionPicker selected={mine} onSelect={toggle} />\n\t</PopoverContent>\n</Popover>",
          "imports": "import { Button, Icon, Popover, PopoverContent, PopoverTrigger, ReactionPicker } from \"@sableui/react\""
        },
        {
          "label": "In a right-click menu",
          "code": "<ContextMenu>\n\t<ContextMenuTrigger render={<Bubble />}>See you at 6.</ContextMenuTrigger>\n\t<ContextMenuContent>\n\t\t<MenuReactions selected={mine} onSelect={toggle} />\n\t\t<ContextMenuSeparator />\n\t\t<ContextMenuItem>Reply</ContextMenuItem>\n\t\t<ContextMenuItem>Copy text</ContextMenuItem>\n\t</ContextMenuContent>\n</ContextMenu>",
          "imports": "import { Bubble, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, MenuReactions } from \"@sableui/react\""
        },
        {
          "label": "A custom set",
          "code": "<ReactionPicker\n\treactions={[\n\t\t{ emoji: \"✅\", label: \"Done\" },\n\t\t{ emoji: \"👀\", label: \"Looking\" },\n\t\t{ emoji: \"🚀\", label: \"Shipped\" },\n\t]}\n\tselected={mine}\n\tonSelect={toggle}\n/>",
          "imports": "import { ReactionPicker } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "RelativeTime",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/relative-time",
      "summary": "A human relative timestamp (e.g. \"3 minutes ago\") that reveals the full absolute date/time on hover or focus. Renders a native <time> element wrapped in our Tooltip; the absolute time is formatted with date-fns format(date, 'PPpp') (e.g. \"Apr 29, 2025, 4:05:12 PM\").",
      "keywords": [
        "relative time",
        "timestamp",
        "time ago",
        "date"
      ],
      "usage": {
        "description": "Use RelativeTime to show recent activity or timestamps in conversational relative language.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for feeds, audit summaries, comments, and activity streams."
          },
          {
            "guidance": "do",
            "description": "Expose the exact timestamp when precision matters."
          },
          {
            "guidance": "dont",
            "description": "Do not use RelativeTime as the only date format for legal, billing, or audit-critical records."
          },
          {
            "guidance": "dont",
            "description": "Do not server-render it without passing now. \"2 minutes ago\" computed on the server differs from the client's value; pass the same now (a request timestamp from your loader) to both renders so they agree. Without now the <time> suppresses the hydration warning and the words drift as the page sits open."
          }
        ]
      },
      "related": {
        "components": [
          "InlineStatus",
          "Table"
        ]
      },
      "props": [
        {
          "name": "date",
          "type": "Date | string | number",
          "description": "The instant to render. Accepts a Date, an ISO/parseable string, or an epoch number (ms). Coerced to a Date for date-fns. A value that does not parse renders as its own text, with no tooltip and no dateTime, instead of throwing."
        },
        {
          "name": "now",
          "type": "Date | number",
          "default": "Date.now()",
          "description": "The instant \"ago\" is measured from. Pass the same value on the server and the client so both render the same words and the page hydrates cleanly; leave it out to measure from the reader's clock."
        },
        {
          "name": "locale",
          "type": "Locale (date-fns)",
          "default": "en-US",
          "description": "A date-fns locale for the relative words and the absolute time in the tooltip (import { fr } from \"date-fns/locale\")."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merged onto the <time> trigger element (the visible relative label)."
        },
        {
          "name": "...time props",
          "type": "Omit<ComponentPropsWithRef<\"time\">, \"dateTime\" | \"children\">",
          "description": "Remaining native <time> attributes pass through to the trigger. dateTime is set automatically from the parsed ISO value."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It is a word in a line of text and arrives with that line."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Root",
          "why": "The only hover change on the timestamp is a dotted underline, and text-decoration-line is discrete: CSS cannot tween it, so a transition here would animate nothing and imply the snap had been handled."
        },
        {
          "slot": "response",
          "recipe": "motion-pop",
          "part": "Tooltip",
          "why": "The pointer's real answer is the absolute time, which arrives in a Tooltip on its own fast pop. That short entrance is what makes the full date read as belonging to the word under the cursor."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "The label does not tick: it is computed when the component renders, so it never changes in front of the reader. A timestamp rolling from one minute to two would pull the eye off the content it dates."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A timestamp has nothing to wait for."
        }
      ],
      "a11y": [
        "Renders a semantic <time> element with a machine-readable dateTime (ISO) attribute.",
        "The <time> carries tabIndex=0 (it is not focusable natively), so the absolute time — exposed via Base UI's Tooltip, which opens on keyboard focus as well as hover and wires aria-describedby — is reachable from the keyboard.",
        "It inherits the type size of the surrounding text rather than setting its own, so it sits inside a meta row or message header without changing tier.",
        "Wrap the page or a group in <TooltipProvider> to share open/close delays.",
        "Relative phrasing is supplementary; the dateTime attribute remains the canonical machine value."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<TooltipProvider><RelativeTime date={new Date()} /></TooltipProvider>",
          "imports": "import { RelativeTime, TooltipProvider } from \"@sableui/react\""
        },
        {
          "label": "From an ISO string",
          "code": "<TooltipProvider><RelativeTime date=\"2025-04-29T16:05:12Z\" /></TooltipProvider>",
          "imports": "import { RelativeTime, TooltipProvider } from \"@sableui/react\""
        },
        {
          "label": "Server-rendered, measured from the request",
          "code": "<TooltipProvider><RelativeTime date={post.createdAt} now={requestTime} /></TooltipProvider>",
          "imports": "import { RelativeTime, TooltipProvider } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Scroller",
      "status": "stable",
      "group": "Containers",
      "register": "either",
      "path": "components/scroller",
      "summary": "Scroll container that fades its leading/trailing edges when content overflows. Tracks scroll position to toggle the fades.",
      "keywords": [
        "scroller",
        "overflow",
        "horizontal scroll",
        "carousel"
      ],
      "usage": {
        "description": "Use Scroller to create a contained overflow region for content that naturally extends beyond the viewport.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for chip rows, media strips, or comparison sets where horizontal browsing is expected."
          },
          {
            "guidance": "do",
            "description": "Keep scroll affordances visible enough that overflow is discoverable."
          },
          {
            "guidance": "do",
            "description": "Put everything on `className` — sizing (`max-h-80`, `h-64`, `flex-1 min-h-0`) and chrome (`rounded-lg border`, `bg-card`) alike. It styles the Scroller's outer box, and the scrolling element inside it is `flex-1 min-h-0`, so a cap on the Scroller is still a cap on what scrolls."
          },
          {
            "guidance": "do",
            "description": "Pass `label` on any Scroller with real content. It is a focusable region, and an unnamed one announces as a bare group — \"Tags\" or \"Recent covers\" costs a word and is the difference between navigable and not."
          },
          {
            "guidance": "dont",
            "description": "Do not use Scroller to hide primary page layout or required controls."
          },
          {
            "guidance": "dont",
            "description": "Do not add your own wheel handler to make a horizontal strip mouse-scrollable — it already is. A second handler double-scrolls and usually loses the end-release, which traps the page."
          },
          {
            "guidance": "dont",
            "description": "Do not reach past it with a child selector (`[&>div]:snap-x`). The scrolling element is addressable by name: `viewportClassName`."
          },
          {
            "guidance": "dont",
            "description": "Do not use it to hide overflow you should have laid out. It exists to make an intentionally scrolling strip legible, not to contain content that overflowed by accident."
          }
        ]
      },
      "related": {
        "components": [
          "Carousel",
          "Marquee"
        ]
      },
      "props": [
        {
          "name": "orientation",
          "type": "\"vertical\" | \"horizontal\"",
          "default": "\"vertical\"",
          "description": "\"vertical\" scrolls and fades top/bottom; \"horizontal\" scrolls and fades left/right."
        },
        {
          "name": "wheelScroll",
          "type": "boolean",
          "default": "true",
          "description": "On a horizontal Scroller, let a vertical mouse wheel scroll it sideways. Ignored when vertical. Turn it off only if the region is inside something that owns the wheel itself (a map, a canvas)."
        },
        {
          "name": "smoothWheel",
          "type": "boolean",
          "default": "false",
          "description": "Ease mouse-wheel steps toward their target, on either axis: the inertia a smooth-scroll library such as Lenis adds, scoped to this region. Off by default, so the region scrolls natively, off the main thread; easing needs a non-passive wheel listener that runs before every scroll. Only a mouse wheel is eased; trackpads and touch keep their own momentum, keys and scrollbar drags stay native, and reduced motion (the OS preference or MotionProvider) turns it off. Anything else that moves the region (scrollIntoView, a stick-to-bottom chat) stops the easing at once. For a scroll container of your own, `useSmoothWheel()` returns the same behaviour as a ref callback."
        },
        {
          "name": "label",
          "type": "string",
          "description": "Accessible name for the scroll region. The region takes focus, so it should say what it contains; without one a screen reader announces an unnamed group."
        },
        {
          "name": "viewportClassName",
          "type": "string",
          "description": "Classes for the inner element that actually scrolls. Narrow on purpose — `className` is what you want almost always. This is for the few utilities that only mean something on the scrolling box: `snap-x`, `scroll-smooth`, `scroll-p-*`."
        },
        {
          "name": "...div props",
          "type": "ComponentPropsWithRef<'div'>",
          "description": "Everything except `className`/`style` spreads onto the SCROLLING element — `role`, `id`, `aria-*`, `data-*` and event handlers all describe the thing that scrolls, and CommandMenu relies on it to make this component its listbox. `ref` and `onScroll` likewise address the scroller, and compose with the component's own."
        }
      ],
      "variants": {
        "orientation": [
          "vertical",
          "horizontal"
        ],
        "wheelScroll": [
          "true",
          "false"
        ]
      },
      "tokensUsed": [
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It is a region, not an event; its content arrives with whatever fills it."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Viewport",
          "why": "The region is focusable so the keyboard can scroll it, and its focus ring eases in like any control's. It is the one sign the region, not the page, now takes the arrow keys."
        },
        {
          "slot": "response",
          "recipe": "custom",
          "part": "Scrollbar",
          "why": "The vertical bar (`scrollbar-quiet`) stays hidden until the region is hovered, focused or scrolled, then fades its thumb in on the motion tokens. A bar that appeared in one frame would flash every time the pointer crossed the list."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Edge fade",
          "why": "The edge fades switch on and off as you scroll, in the frame the content is already moving, so the change is carried by the scroll itself. They are a mask gradient, which CSS cannot interpolate without registered custom properties."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A scroll region does no work of its own. Content still loading inside it brings its own Skeleton or Spinner."
        }
      ],
      "a11y": [
        "The edge fades are a CSS mask-image on the scrolling element, not overlay elements — there is nothing in the DOM to intercept a pointer or be read by assistive tech, and the content under a fade stays fully interactive.",
        "Two boxes: a chrome box carrying `className` (border, background, radius, sizing) and, inside it, the element that actually scrolls and carries the fade mask. They are split because a `mask-image` applies to its element's own border — so with both on one box, a bordered Scroller watched its frame dissolve at the scrolling edge. The axis is published as `data-orientation`, not `aria-orientation`, which is invalid on `role=\"group\"`.",
        "The scroll region uses native overflow and contains overscroll, so a gesture that runs out of content does not scroll the page behind it.",
        "It is focusable (`tabIndex=0`, `role=\"group\"`) and handles arrows, Home/End and PageUp/PageDown along its own axis. Chrome 128+ and Firefox make scrollable regions focusable on their own; Safari does not, so a strip with a hidden scrollbar and no focusable children is unreachable there. Declaring it makes the behaviour a property of the component, not of the reader's browser. Pass `label` to name it — an unnamed focusable region announces as a bare group.",
        "On a horizontal Scroller, a vertical mouse wheel scrolls it sideways, because most mice have no horizontal wheel and the content past the fold is otherwise unreachable on them. The strip releases the wheel at both ends so it never traps the page, and leaves trackpad `deltaX` gestures and `shift+wheel` to the browser.",
        "Cross-axis arrow keys are deliberately not captured, and a consumer can take the arrows entirely by calling `preventDefault()` in their own `onKeyDown` — a strip of interactive chips usually wants them for roving focus."
      ],
      "examples": [
        {
          "label": "Vertical with overflow",
          "code": "<Scroller label=\"Projects\" className=\"h-64\"><ul className=\"space-y-2 p-4\">{items.map((item) => (<li key={item.id} className=\"text-body-sm\">{item.title}</li>))}</ul></Scroller>",
          "imports": "import { Scroller } from \"@sableui/react\""
        },
        {
          "label": "Capped, scrolls past the cap",
          "code": "<Scroller label=\"Versions\" className=\"max-h-80 rounded-md border border-border\"><ul className=\"divide-y divide-border\">{versions.map((v) => (<li key={v.id} className=\"px-3 py-2 text-body-sm\">{v.label}</li>))}</ul></Scroller>",
          "imports": "import { Scroller } from \"@sableui/react\""
        },
        {
          "label": "Horizontal",
          "code": "<Scroller orientation=\"horizontal\" label=\"Recent covers\" className=\"w-full\"><div className=\"flex gap-3 p-4\">{covers.map((src) => (<img key={src} src={src} alt=\"\" className=\"h-32 w-32 rounded-lg object-cover\" />))}</div></Scroller>",
          "imports": "import { Scroller } from \"@sableui/react\""
        },
        {
          "label": "Snap points on the scrolling box",
          "code": "<Scroller orientation=\"horizontal\" label=\"Covers\" className=\"w-full rounded-lg border border-border\" viewportClassName=\"snap-x snap-mandatory scroll-smooth\"><div className=\"flex gap-3 p-4\">{covers.map((src) => (<img key={src} src={src} alt=\"\" className=\"h-32 w-32 snap-start rounded-lg object-cover\" />))}</div></Scroller>",
          "imports": "import { Scroller } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ScrubField",
      "status": "stable",
      "group": "Forms",
      "register": "workspace",
      "path": "components/scrub-field",
      "summary": "The compact numeric field a property grid is built from: a leading glyph inside the field that doubles as a drag-to-scrub handle, the value, and an optional unit.",
      "keywords": [
        "scrub",
        "numeric",
        "number",
        "field",
        "property",
        "inspector",
        "drag",
        "workspace",
        "tool",
        "unit"
      ],
      "usage": {
        "description": "Use ScrubField for numeric properties in tool chrome — an inspector, a property grid, a panel. The leading icon or letter says what the number is and is also the thing you drag, which is why a value like opacity needs no slider. Reach for NumberField instead in page-register forms: it has steppers and locale formatting, and it renders at page-register height. Those two steppers put a ~112px floor on a control that needs to be about 44px in a property grid, which is why ScrubField exists rather than a NumberField size variant. The input is sized in ch, so each field is as wide as its longest value and a grid of them lines up without per-field tuning.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give the field an icon or prefix when it stands alone, so the row has a drag affordance and the value has an identity."
          },
          {
            "guidance": "do",
            "description": "Pass the unit as `suffix` rather than baking it into the label — it renders against the number the way reference tools show 100%."
          },
          {
            "guidance": "do",
            "description": "Bracket undo with onGestureStart/onGestureEnd. A scrub fires per frame, so without it one undo rewinds a single pixel of the drag."
          },
          {
            "guidance": "do",
            "description": "Set `step` to the real precision (0.01 for a normalised threshold). Display precision follows it, so a seed shows 1234 and never 1,234."
          },
          {
            "guidance": "dont",
            "description": "Add a separate drag gripper beside the glyph. The icon or prefix already is the scrub handle; a second one is the same affordance twice and costs width a 240px panel does not have."
          },
          {
            "guidance": "dont",
            "description": "Pair it with a Slider AND give it a glyph. The slider is already the drag affordance; two on one row is the same gesture twice. Omit icon/prefix when there's a slider. For a value with both bounds, SliderField is that pair as one control."
          },
          {
            "guidance": "dont",
            "description": "Use it in a page form. It is chrome-sized and has no label, description, or error slots — that's Field plus Input or NumberField."
          }
        ]
      },
      "related": {
        "components": [
          "NumberField",
          "Slider",
          "SliderField",
          "PanelSection",
          "Workspace",
          "Input"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "number",
          "description": "The current value (controlled)."
        },
        {
          "name": "onValueChange",
          "type": "(next: number) => void",
          "description": "Fires on commit, arrow-key step, and every frame of a scrub."
        },
        {
          "name": "min",
          "type": "number",
          "description": "Lower clamp, applied to typing and scrubbing."
        },
        {
          "name": "max",
          "type": "number",
          "description": "Upper clamp, applied to typing and scrubbing."
        },
        {
          "name": "step",
          "type": "number",
          "default": "1",
          "description": "Arrow-key and scrub increment, and the source of display precision. Shift multiplies arrows by 10 and divides scrubbing by 10."
        },
        {
          "name": "label",
          "type": "string",
          "description": "Accessible name for the input. Required — the visible glyph is decorative."
        },
        {
          "name": "icon",
          "type": "string",
          "description": "Semantic icon name rendered inside the field; doubles as the scrub handle. Any name the app's IconProvider resolves works — image tools typically supply their own checkerboard glyph for opacity, which is a domain icon rather than one Sable's contract carries."
        },
        {
          "name": "prefix",
          "type": "ReactNode",
          "description": "Short text used instead of an icon (e.g. \"X\" / \"Y\"), with the same scrub role."
        },
        {
          "name": "suffix",
          "type": "ReactNode",
          "description": "Unit rendered after the value inside the field (e.g. \"%\", \"px\")."
        },
        {
          "name": "onGestureStart",
          "type": "() => void",
          "description": "Fires once when a scrub drag begins — open an undo transaction here, and drop expensive downstream work (e.g. a GPU renderer) to a cheap preview quality; without it a pipeline re-renders at full quality on every pointer move and the drag stutters."
        },
        {
          "name": "onGestureEnd",
          "type": "() => void",
          "description": "Fires when a scrub drag ends — close the undo transaction here and restore full render quality."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "description": "Disables typing and scrubbing; a disabled field submits nothing, like a native control."
        },
        {
          "name": "readOnly",
          "type": "boolean",
          "description": "Blocks typing, arrow keys and scrubbing. The value still submits."
        },
        {
          "name": "name",
          "type": "string",
          "description": "Submits the value with a form under this name, through a hidden input: a plain number at the precision of step (\"60\", \"0.25\") — no unit, no separators. It is always the last committed value, never the draft being typed."
        },
        {
          "name": "form",
          "type": "string",
          "description": "Id of a form elsewhere on the page that the hidden input belongs to."
        },
        {
          "name": "id",
          "type": "string",
          "description": "Input id, for a PropertyRow's htmlFor."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Sizes the field shell (w-16, flex-1). Defaults to w-full."
        },
        {
          "name": "dragLabel",
          "type": "(label: string) => string",
          "default": "(label) => `Drag to change ${label}`",
          "description": "The scrub handle's tooltip, given `label`. Translate it with the rest of the panel."
        },
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"input\">",
          "description": "ref, aria-describedby, aria-invalid, required, data-* and handlers land on the input, so a Field's description and error reach it and a ref can focus it."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "ring",
        "panel-field",
        "panel-field-hover"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the inspector row it sits in."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The shell eases its focus ring like every field, so tabbing through a column of numbers shows where the keyboard is without flicker."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Handle",
          "why": "The handle's ink brightens while the field is hovered. It is the only sign that the icon or prefix can be dragged, which nobody would guess from a label."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Value",
          "why": "The number follows the drag pixel for pixel. Easing it — or rolling it with a NumberTicker — would show a value the pointer has already left, in a control whose whole point is precision."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Scrubbing is synchronous; there is nothing to wait for."
        }
      ],
      "a11y": [
        "The input carries the accessible name via `label`; the glyph is aria-hidden because it is decorative.",
        "Every scrub gesture is reachable from the keyboard: ArrowUp/ArrowDown step by `step`, Shift+Arrow by ten steps.",
        "Enter commits, Escape reverts to the last committed value, and blur commits — so a partial edit is never silently kept.",
        "Inside a Field the id, aria-describedby, aria-invalid and required it clones reach the input, so the description and error are announced with it."
      ],
      "examples": [
        {
          "label": "In a form (submits the committed number)",
          "code": "<form action={save}>\n  <ScrubField label=\"Opacity\" name=\"opacity\" icon=\"grid\" suffix=\"%\" value={opacity} min={0} max={100} onValueChange={setOpacity} />\n</form>",
          "imports": "import { ScrubField } from \"@sableui/react\""
        },
        {
          "label": "Opacity with a glyph handle",
          "code": "<ScrubField label=\"Opacity\" icon=\"grid\" suffix=\"%\" value={60} min={0} max={100} onValueChange={(v) => setOpacity(v)} />",
          "imports": "import { ScrubField } from \"@sableui/react\""
        },
        {
          "label": "X/Y offset pair (PropertyPair puts two fields on one scan line)",
          "code": "<PropertyPair labels={[\"Offset X\", \"Offset Y\"]}>\n  <ScrubField label=\"Offset X\" prefix=\"X\" value={x} min={-128} max={128} onValueChange={setX} />\n  <ScrubField label=\"Offset Y\" prefix=\"Y\" value={y} min={-128} max={128} onValueChange={setY} />\n</PropertyPair>",
          "imports": "import { PropertyPair, ScrubField } from \"@sableui/react\""
        },
        {
          "label": "No glyph — the property name is the handle",
          "code": "<PropertyRow label=\"Block size\" scrub={{ value: size, onValueChange: setSize, min: 2, max: 256 }}>\n  <ScrubField label=\"Block size\" value={size} min={2} max={256} suffix=\"px\" onValueChange={setSize} />\n</PropertyRow>",
          "imports": "import { PropertyRow, ScrubField } from \"@sableui/react\""
        },
        {
          "label": "Paired with a slider (no glyph — one drag affordance per row)",
          "code": "<PropertyRow label=\"Block size\" stacked>\n  <div className=\"flex items-center gap-2\">\n    <Slider value={32} min={4} max={256} className=\"min-w-0 flex-1\" />\n    <ScrubField label=\"Block size\" value={32} min={4} max={256} step={1} suffix=\"px\" className=\"w-16 shrink-0\" onValueChange={(v) => setBlockSize(v)} />\n  </div>\n</PropertyRow>",
          "imports": "import { PropertyRow, ScrubField, Slider } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "SearchInput",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/search-input",
      "summary": "Styled search field with a leading magnifier and a clearable X. Soft-square (rounded-sm), the theme's field surface, 2px focus ring; the clear button appears only when there is a value. size md (form), sm (toolbar, matching Pill lg and Button sm) or xs (inset tool-panel field).",
      "keywords": [
        "search",
        "input",
        "filter",
        "query"
      ],
      "usage": {
        "description": "Use SearchInput for text queries that filter or search a known content set.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use a clear placeholder that names the content being searched."
          },
          {
            "guidance": "do",
            "description": "Provide a visible clear affordance when query state persists."
          },
          {
            "guidance": "do",
            "description": "When a button stands in for search (a header trigger that opens CommandMenu with ⌘K), use CommandMenuTrigger. It wears this field's shell from the same source, so the two cannot drift; a hand-styled button already did once, into a borderless chip that matched neither the field nor a button."
          },
          {
            "guidance": "do",
            "description": "Light the query in the results it filters with `useMatchHighlight(query)` — a callback ref for the results container, with `selector` to keep it to titles. It paints on the `highlight` pair without wrapping matches in `<mark>`, the same paint Combobox and CommandMenu use for their rows."
          },
          {
            "guidance": "do",
            "description": "In a toolbar beside filter chips, use size=\"sm\" with Pill size=\"lg\" (and Button size=\"sm\" for actions). All three stand on --control-sm (32px, 28 compact), the rung the spacing doctrine gives toolbar controls, so the row is one height in either density. Keep md for a search field in a form or a page header beside md buttons, and xs for a filter inside a workspace panel, where it matches Input xs's inset surface."
          },
          {
            "guidance": "dont",
            "description": "Do not match a neighbour's height with h-* on className or inputClassName. The magnifier, padding and clear button would stay sized for the old rung; pick the size that shares the neighbour's rung."
          },
          {
            "guidance": "dont",
            "description": "Do not use SearchInput as a command palette; use CommandMenu for global commands, opened from the header by CommandMenuTrigger. A SearchInput that opens a dialog on focus is a text box you cannot type in."
          },
          {
            "guidance": "dont",
            "description": "Do not search on every keystroke against an expensive backend without debouncing. The user sees results flicker and reorder under them, and you send a request per character."
          }
        ]
      },
      "related": {
        "components": [
          "Input",
          "CommandMenu",
          "Combobox",
          "Pill"
        ]
      },
      "props": [
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | \"xs\"",
          "default": "\"md\"",
          "description": "The rung of the control ladder, named as on Input, Select and Combobox. md is the form field (--control-md, 40px / 32 compact). sm is the toolbar field (--control-sm, 32px / 28 compact), the rung Pill lg and Button sm share, so filters + search + actions in one row are one height. xs is the tool-panel field (--control-xs, 28px / 24 compact) on Input xs's inset panel-field surface. The magnifier, inline padding and clear button scale with the rung and stay vertically centred."
        },
        {
          "name": "value",
          "type": "string",
          "description": "Controlled value of the search field."
        },
        {
          "name": "defaultValue",
          "type": "string",
          "description": "Uncontrolled initial value. The field tracks its own text, so the clear button still appears and empties it."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Sizes and places the whole field — magnifier, input and clear button together (e.g. max-w-80). A width cap here keeps the clear button inside the field."
        },
        {
          "name": "inputClassName",
          "type": "string",
          "description": "Classes for the <input> element alone, for the rare input-only override."
        },
        {
          "name": "onValueChange",
          "type": "(value: string) => void",
          "description": "Called with the next string on every keystroke."
        },
        {
          "name": "onClear",
          "type": "() => void",
          "description": "Called when the clear button is pressed. The component also fires onValueChange('') so a controlled value resets."
        },
        {
          "name": "clearLabel",
          "type": "string",
          "default": "\"Clear search\"",
          "description": "Accessible name of the clear button."
        },
        {
          "name": "placeholder",
          "type": "string",
          "default": "\"Search\"",
          "description": "Placeholder text shown when the field is empty."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Dims the control and blocks pointer interaction."
        },
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"input\">",
          "description": "All native input attributes (name, autoFocus, ref, aria-invalid, …) pass through to the <input> except value/onChange, which are owned by value/onValueChange, className, which sizes the whole field, and the native numeric size attribute, which the size prop replaces."
        }
      ],
      "tokensUsed": [
        "field-border",
        "field",
        "foreground",
        "muted-foreground",
        "ring",
        "destructive",
        "panel-field",
        "panel-field-hover"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-appear",
          "part": "Clear button",
          "why": "The X mounts as the first character lands. Fading and settling in from a smaller scale keeps it from popping into the corner of the eye on every new search; removal is instant so an emptied field does not wait on it."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Input",
          "why": "The focus ring and invalid border ease in, so focus reads as the field answering rather than a repaint."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "The field has no states of its own to move between — the clear button arriving is its only change, and arrival covers it."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Searching is the results' job: a list skeleton or a Spinner beside them, not a field that animates while you type."
        }
      ],
      "a11y": [
        "Renders a native <input type=\"search\"> — keyboard and form semantics come for free.",
        "Associate a <label htmlFor> (or wrap) — the magnifier glyph is decorative, not a label.",
        "The leading search Icon is pointer-events-none and purely decorative.",
        "The clear button is a real <button> (Sable's ghost icon Button) with aria-label='Clear search' and a focus-visible ring. It is hidden while the field is disabled.",
        "Focus-visible draws a 2px ring in the --ring token; aria-invalid raises the destructive border and ring."
      ],
      "examples": [
        {
          "label": "Controlled",
          "code": "const [q, setQ] = useState(\"\")\n<SearchInput value={q} onValueChange={setQ} placeholder=\"Search posts\" />",
          "imports": "import { SearchInput } from \"@sableui/react\""
        },
        {
          "label": "With onClear",
          "code": "<SearchInput value={q} onValueChange={setQ} onClear={() => console.log(\"cleared\")} />",
          "imports": "import { SearchInput } from \"@sableui/react\""
        },
        {
          "label": "Uncontrolled, sized as a whole",
          "code": "<Field label=\"Search posts\"><SearchInput defaultValue=\"roadmap\" className=\"max-w-80\" /></Field>",
          "imports": "import { Field, SearchInput } from \"@sableui/react\""
        },
        {
          "label": "Highlighting matches in the results",
          "code": "const [q, setQ] = useState(\"\")\nconst results = useMatchHighlight<HTMLUListElement>(q, { selector: \"[data-title]\" })\nconst shown = posts.filter((post) => post.title.toLowerCase().includes(q.trim().toLowerCase()))\n\n<SearchInput value={q} onValueChange={setQ} placeholder=\"Search posts\" />\n<ul ref={results}>\n\t{shown.map((post) => (\n\t\t<li key={post.id}><span data-title>{post.title}</span></li>\n\t))}\n</ul>",
          "imports": "import { SearchInput, useMatchHighlight } from \"@sableui/react\""
        },
        {
          "label": "Filters with search",
          "code": "const [filter, setFilter] = useState(\"all\")\nconst [q, setQ] = useState(\"\")\n\n<Row gap={2} align=\"center\" justify=\"between\" wrap>\n\t<Row gap={1}>\n\t\t<Pill size=\"lg\" selected={filter === \"all\"} onClick={() => setFilter(\"all\")}>All 8</Pill>\n\t\t<Pill size=\"lg\" selected={filter === \"products\"} onClick={() => setFilter(\"products\")}>Products 5</Pill>\n\t\t<Pill size=\"lg\" selected={filter === \"oss\"} onClick={() => setFilter(\"oss\")}>Open source 2</Pill>\n\t</Row>\n\t<SearchInput size=\"sm\" value={q} onValueChange={setQ} placeholder=\"Find a project…\" aria-label=\"Find a project\" className=\"max-w-64\" />\n</Row>",
          "imports": "import { Pill, Row, SearchInput } from \"@sableui/react\""
        },
        {
          "label": "Sizes",
          "code": "<Stack gap={1}>\n\t<SearchInput size=\"md\" placeholder=\"Search posts\" aria-label=\"Search posts\" />\n\t<SearchInput size=\"sm\" placeholder=\"Find a project…\" aria-label=\"Find a project\" />\n\t<SearchInput size=\"xs\" placeholder=\"Filter layers\" aria-label=\"Filter layers\" />\n</Stack>",
          "imports": "import { SearchInput, Stack } from \"@sableui/react\""
        },
        {
          "label": "Disabled",
          "code": "<SearchInput disabled placeholder=\"Search\" />",
          "imports": "import { SearchInput } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "SectionHeader",
      "status": "stable",
      "group": "Layout",
      "register": "page",
      "path": "components/section-header",
      "summary": "The heading block for one section of a page: a title (h2 by default), an optional line of description, and actions on the title row — a \"View all\" link or a couple of buttons — that drop beneath the title only when the row runs out of room.",
      "keywords": [
        "section header",
        "section heading",
        "section title",
        "shelf",
        "view all",
        "see all",
        "show all",
        "h2",
        "subsection",
        "optical alignment",
        "bleed",
        "editorial section",
        "large section title"
      ],
      "usage": {
        "description": "Use SectionHeader to head each section below the page title — a home-page shelf with View all, a settings group, a list with its own actions. PageHeader is the route's single h1; every section under it takes a SectionHeader, with titleId wired to the section's aria-labelledby.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Wrap the header and its content in a `<section aria-labelledby={titleId}>` (a flex column with a gap, or a Stack inside it) so the section is a named region and the header's title is its name."
          },
          {
            "guidance": "do",
            "description": "Pick titleAs by the document outline (h2 under the page h1, h3 inside an h2 section) and size by visual weight: lg for an editorial page's sections under a PageHeader size=\"lg\", md for a page's sections and shelves, sm for denser groups like settings."
          },
          {
            "guidance": "do",
            "description": "Keep actions to one or two `size=\"sm\"` buttons — the title is centred on that height. A shelf's \"View all\" is a ghost Button rendered as a link (`render={<a href=… />}`), named for what it opens when the label alone is ambiguous (aria-label=\"View all new releases\")."
          },
          {
            "guidance": "do",
            "description": "Pass a ghost or link action as a plain Button and let the header align it: the last direct child bleeds by its own padding at the end, so \"View all\" sits on the edge of the grid below, and the first bleeds at the start, which is the edge once the actions wrap beneath the title. Filled buttons keep their edge on the line. Set bleed=\"none\" on the Button to opt one out."
          },
          {
            "guidance": "dont",
            "description": "Nudge a View all onto the edge with -me-3, or wrap the actions in your own div: the header aligns direct children only, and only by each button's real padding. If you must wrap them, set bleed on the Button inside instead."
          },
          {
            "guidance": "dont",
            "description": "Use a second PageHeader for a section — that is a second h1, and the outline then reports two documents. And do not hand-build `<div className=\"flex justify-between\"><h2 className=\"text-heading-3\">…` per shelf: it misses the wrapping, the aria wiring and the shared rhythm."
          },
          {
            "guidance": "dont",
            "description": "Use SectionHeader to title a Card (use CardHeader + CardTitle) or a docked tool panel (use PanelSection). It heads a section of the page, not a surface."
          },
          {
            "guidance": "dont",
            "description": "Add margin to the header to space it from its content. It has no outer spacing on purpose; the section's gap owns that rhythm, so every section on the page keeps the same one."
          }
        ],
        "anatomy": [
          {
            "name": "Title",
            "required": true,
            "description": "The section's heading (h2 by default), wrapping rather than truncating. Its id names the section."
          },
          {
            "name": "Description",
            "required": false,
            "description": "One line of supporting copy under the title, capped at the prose measure."
          },
          {
            "name": "Actions",
            "required": false,
            "description": "Buttons or links at the title row's end; they move beneath the title when the row is too narrow for both. A borderless (ghost/link) Button at either end of the group is optically aligned: its label, not its invisible padding, meets the content edge."
          }
        ]
      },
      "related": {
        "components": [
          "PageHeader",
          "CardHeader",
          "PanelSection",
          "Grid",
          "Stack",
          "Button"
        ],
        "patterns": [
          "SettingsPage",
          "DashboardPage"
        ]
      },
      "props": [
        {
          "name": "title",
          "type": "ReactNode",
          "description": "The section's title."
        },
        {
          "name": "description",
          "type": "ReactNode",
          "description": "One line of supporting copy beneath the title, capped at the prose measure."
        },
        {
          "name": "actions",
          "type": "ReactNode",
          "description": "Trailing actions on the title row — a View all link or a couple of buttons, size=\"sm\". They stay on the title's row and drop beneath it only when the row runs out of room; the title wraps rather than truncating. A ghost or link Button that ends the group bleeds by its padding at the end (and one that starts it, at the start — the edge once wrapped), so its label lines up with the content below; Button bleed=\"none\" opts out. Direct children only."
        },
        {
          "name": "titleAs",
          "type": "\"h2\" | \"h3\" | \"h4\"",
          "default": "\"h2\"",
          "description": "The heading element, chosen by the document outline: h2 for a section under the page's h1, h3 for a subsection inside one."
        },
        {
          "name": "titleId",
          "type": "string",
          "description": "The title's id, so the section it heads can point at it: <section aria-labelledby={titleId}>. Generated when omitted."
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\"",
          "default": "\"md\"",
          "description": "Visual weight, independent of the heading level: lg (text-heading-2 over a text-body-md description) for an editorial page's sections, under a PageHeader size=\"lg\"; md (text-heading-3) for a page's sections and shelves; sm (text-heading-4) for denser sets — settings groups, subsections. lg stops at heading-2: heading-1 is the page title's, one per route. The actions stay centred on the title's first line at every size."
        }
      ],
      "variants": {
        "size": [
          "lg",
          "md",
          "sm"
        ]
      },
      "tokensUsed": [
        "foreground",
        "muted-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "root",
          "why": "A heading arrives with the section it names; animating it separately would make the section's title lag its content."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "root",
          "why": "The header itself is not interactive; the Buttons passed as actions carry their own response."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "root",
          "why": "It has no states of its own to move between."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "root",
          "why": "It never does indeterminate work."
        }
      ],
      "a11y": [
        "Renders a real heading (h2 by default); choose titleAs by the outline, never to get a size — size sets the look.",
        "The title always carries an id (titleId, or a generated one). Point the section at it with aria-labelledby so the section is announced as a named region and appears in landmark navigation.",
        "A repeated \"View all\" is ambiguous in a links list; name each one for its section (aria-label=\"View all new releases\") or keep the visible label specific."
      ],
      "examples": [
        {
          "label": "A shelf with View all",
          "code": "<section aria-labelledby=\"new-releases\" className=\"flex flex-col gap-4\">\n\t<SectionHeader\n\t\ttitleId=\"new-releases\"\n\t\ttitle=\"New releases\"\n\t\tdescription=\"Fresh from artists you follow.\"\n\t\tactions={\n\t\t\t<Button variant=\"ghost\" size=\"sm\" render={<a href=\"/new\" />} aria-label=\"View all new releases\">\n\t\t\t\tView all\n\t\t\t</Button>\n\t\t}\n\t/>\n\t<Grid minItemWidth=\"10rem\" gap={2}>\n\t\t<Card><CardHeader><CardTitle>Night Swim</CardTitle><CardDescription>Lena Vale</CardDescription></CardHeader></Card>\n\t\t<Card><CardHeader><CardTitle>Low Tide</CardTitle><CardDescription>Harbour Lights</CardDescription></CardHeader></Card>\n\t</Grid>\n</section>",
          "imports": "import { Button, Card, CardDescription, CardHeader, CardTitle, Grid, SectionHeader } from \"@sableui/react\""
        },
        {
          "label": "A settings section",
          "code": "<section aria-labelledby=\"playback\" className=\"flex flex-col gap-4\">\n\t<SectionHeader\n\t\ttitleId=\"playback\"\n\t\tsize=\"sm\"\n\t\ttitle=\"Playback\"\n\t\tdescription=\"How tracks start, end and blend into each other.\"\n\t/>\n\t<Field label=\"Crossfade\" orientation=\"horizontal\">\n\t\t<Switch defaultChecked />\n\t</Field>\n\t<Field label=\"Normalize volume\" orientation=\"horizontal\">\n\t\t<Switch />\n\t</Field>\n</section>",
          "imports": "import { Field, SectionHeader, Switch } from \"@sableui/react\""
        },
        {
          "label": "A section with two actions",
          "code": "<section aria-labelledby=\"playlists\" className=\"flex flex-col gap-4\">\n\t<SectionHeader\n\t\ttitleId=\"playlists\"\n\t\ttitle=\"Your playlists\"\n\t\tactions={\n\t\t\t<>\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" iconStart={<Icon name=\"filter\" />}>Filter</Button>\n\t\t\t\t<Button size=\"sm\" iconStart={<Icon name=\"plus\" />}>New playlist</Button>\n\t\t\t</>\n\t\t}\n\t/>\n\t<Stack gap={1}>\n\t\t<Entity className=\"[--entity-px:0]\" title=\"Late drives\" subtitle=\"42 tracks\" />\n\t\t<Entity className=\"[--entity-px:0]\" title=\"Focus\" subtitle=\"18 tracks\" />\n\t</Stack>\n</section>",
          "imports": "import { Button, Entity, Icon, SectionHeader, Stack } from \"@sableui/react\""
        },
        {
          "label": "An editorial section (size lg)",
          "code": "<section aria-labelledby=\"selected-work\" className=\"flex flex-col gap-6\">\n\t<SectionHeader\n\t\ttitleId=\"selected-work\"\n\t\tsize=\"lg\"\n\t\ttitle=\"Selected work\"\n\t\tdescription=\"Five projects from the last two years.\"\n\t\tactions={\n\t\t\t<Button variant=\"ghost\" size=\"sm\" render={<a href=\"/work\" />} aria-label=\"View all work\">\n\t\t\t\tView all\n\t\t\t</Button>\n\t\t}\n\t/>\n\t<Grid minItemWidth=\"16rem\" gap={3}>\n\t\t<Card><CardHeader><CardTitle>Tidewater</CardTitle><CardDescription>Brand identity</CardDescription></CardHeader></Card>\n\t\t<Card><CardHeader><CardTitle>Northlight</CardTitle><CardDescription>Product design</CardDescription></CardHeader></Card>\n\t</Grid>\n</section>",
          "imports": "import { Button, Card, CardDescription, CardHeader, CardTitle, Grid, SectionHeader } from \"@sableui/react\""
        },
        {
          "label": "A subsection inside a section",
          "code": "<SectionHeader titleAs=\"h3\" size=\"sm\" title=\"Appears on\" />",
          "imports": "import { SectionHeader } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "SectionRail",
      "status": "stable",
      "group": "Navigation",
      "register": "page",
      "path": "components/section-rail",
      "summary": "A slim vertical rail of dots, one per section of a long page, that shows where the reader is and jumps to any section. The current section's bar glides as the page scrolls; a shared tooltip names each dot.",
      "keywords": [
        "section rail",
        "scroll spy",
        "scrollspy",
        "dot navigation",
        "page navigation",
        "table of contents",
        "on this page",
        "chapter nav",
        "scroll progress",
        "case study nav"
      ],
      "usage": {
        "description": "Use SectionRail beside a long, single-column read — a case study, an essay, a long landing page — so the reader can see which section they are in and jump to another without leaving the text. It follows the scroll by itself (useActiveSection); pass value when the parent already knows the current section.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give every section an id that matches its entry, and keep the list to the page's top-level sections — about ten at most, so the rail stays shorter than the viewport."
          },
          {
            "guidance": "do",
            "description": "Place it with layout classes — usually `fixed top-1/2 left-6 z-(--z-nav) -translate-y-1/2` — and hide it below the width where it would overlap the text (`max-lg:hidden`). Offer the same links another way on narrow screens, such as a Collapsible list at the top of the page."
          },
          {
            "guidance": "do",
            "description": "Pass `root` when the content scrolls inside an element (a Scroller, an inset AppShell main) rather than the window, and give sections `scroll-mt-*` when a sticky header would cover their tops after a jump."
          },
          {
            "guidance": "do",
            "description": "Set `side=\"right\"` when the rail sits on the right edge, so labels open toward the content."
          },
          {
            "guidance": "dont",
            "description": "Use it for app navigation between pages; that is SideNav or Sidebar. A SectionRail only moves within one page.",
            "instead": [
              "SideNav",
              "Sidebar"
            ]
          },
          {
            "guidance": "dont",
            "description": "Use it to show the steps of a task or a flow; that is Stepper, which shows progress through steps rather than position in a read.",
            "instead": [
              "Stepper"
            ]
          },
          {
            "guidance": "dont",
            "description": "Use it for a handful of switchable views in one place; that is Tabs.",
            "instead": [
              "Tabs"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "Rail",
            "required": true,
            "description": "The `<nav>` landmark: a rounded muted track holding one link per section."
          },
          {
            "name": "Dot",
            "required": true,
            "description": "A link to `#id`, drawn as a small dot that grows under the pointer or focus."
          },
          {
            "name": "Marker",
            "required": true,
            "description": "One primary bar that sits on the current section's dot and glides to the next."
          },
          {
            "name": "Label",
            "required": true,
            "description": "A shared tooltip that names the hovered or focused dot and travels between dots."
          }
        ]
      },
      "related": {
        "components": [
          "SideNav",
          "Tooltip",
          "Stepper",
          "Tabs",
          "GlidingHighlight"
        ]
      },
      "props": [
        {
          "name": "sections",
          "type": "readonly { id: string; label: string }[]",
          "description": "The sections, in document order. `id` is the section element's id (the link goes to `#id`); `label` is the tooltip and the link's accessible name."
        },
        {
          "name": "value",
          "type": "string",
          "description": "The current section's id, when the parent decides it. Leave it unset and the rail follows the scroll itself."
        },
        {
          "name": "onValueChange",
          "type": "(id: string) => void",
          "description": "Called with the new id when the reader scrolls into a section or picks one."
        },
        {
          "name": "offset",
          "type": "number",
          "default": "0.35",
          "description": "Where the reading line sits, as a fraction of the viewport from its top. A section becomes current once its top crosses it."
        },
        {
          "name": "root",
          "type": "RefObject<HTMLElement | null>",
          "description": "The element that scrolls, when it is not the window."
        },
        {
          "name": "side",
          "type": "\"left\" | \"right\"",
          "default": "\"left\"",
          "description": "Which edge of the page the rail sits on. The labels open on the other side, toward the content."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` inherits the app's policy, `subtle` keeps feedback and drops the marker's glide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting."
        },
        {
          "name": "aria-label",
          "type": "string",
          "default": "\"Sections\"",
          "description": "The nav landmark's name. Name it for the page (\"Case study sections\") when it has other navs."
        }
      ],
      "tokensUsed": [
        "muted",
        "muted-foreground",
        "foreground",
        "primary",
        "ring",
        "popover",
        "popover-foreground",
        "border-floating"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Page chrome arrives with the page; the marker lands on the current section with no transition, because a bar sliding in on load narrates a move nobody made."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Dot",
          "why": "The dot darkens and grows under the pointer or focus, and the label travels between dots as one tooltip (TooltipGroup) rather than closing and reopening at each."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "Marker",
          "why": "One bar travels to the new section as the page scrolls, so the change reads as movement down the page. A picked section holds the bar until the reader scrolls by hand, so it goes straight there instead of stepping through every section in between, and stays on the pick even when the page ends before that section can reach the reading line. Expressive: `subtle` moves it at once."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Navigation chrome has no working state."
        }
      ],
      "a11y": [
        "Renders a <nav> landmark (default name \"Sections\") of real links to `#id`, so it works with no script, middle-click and copy-link.",
        "Each link is named by its section's label; the current one carries aria-current=\"location\".",
        "Activating a link from the keyboard moves focus into the section, as following an anchor does, so the next Tab continues from there.",
        "The tooltip opens on focus as well as hover; the dots are 44×32 targets.",
        "Under reduced motion the jump is instant and the marker moves without travel."
      ],
      "examples": [
        {
          "label": "Fixed beside a long read",
          "code": "<SectionRail\n  aria-label=\"Case study sections\"\n  sections={[\n    { id: \"overview\", label: \"Overview\" },\n    { id: \"problem\", label: \"The problem\" },\n    { id: \"process\", label: \"Process\" },\n    { id: \"outcome\", label: \"Outcome\" },\n  ]}\n  className=\"fixed top-1/2 left-6 z-(--z-nav) -translate-y-1/2 max-lg:hidden\"\n/>",
          "imports": "import { SectionRail } from \"@sableui/react\""
        },
        {
          "label": "On the right edge",
          "code": "<SectionRail\n  side=\"right\"\n  sections={[\n    { id: \"intro\", label: \"Introduction\" },\n    { id: \"usage\", label: \"Usage\" },\n    { id: \"api\", label: \"API\" },\n  ]}\n  className=\"fixed top-1/2 right-6 z-(--z-nav) -translate-y-1/2 max-lg:hidden\"\n/>",
          "imports": "import { SectionRail } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "SegmentedBar",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/segmented-bar",
      "summary": "One bar split into the parts of a whole — revenue by type, storage by kind, results by outcome. Segments size by their share of the total; the bar is one labelled image to assistive tech.",
      "keywords": [
        "breakdown",
        "stacked",
        "segmented",
        "proportion",
        "split",
        "distribution",
        "category",
        "bar",
        "share"
      ],
      "usage": {
        "description": "Use SegmentedBar when a stat card or row needs to show how a total divides into a few categories. Pair it with a legend you compose (StatusDot + label + share), placed where the card has room. For one reading against a range (storage used, quota), use Meter; for task completion, use Progress.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep it to two to six segments and give the same category the same tone everywhere it appears."
          },
          {
            "guidance": "do",
            "description": "Show the legend's shares in text (\"42%\") — colour identifies a segment, but the number is what a reader compares."
          },
          {
            "guidance": "dont",
            "description": "Use it for a single value against a limit; that is Meter, which carries the meter role and its value.",
            "instead": [
              "Meter"
            ]
          },
          {
            "guidance": "dont",
            "description": "Rely on tone order alone to tell segments apart; a legend row per segment, with its label, is required."
          }
        ],
        "anatomy": [
          {
            "name": "Track",
            "required": true,
            "description": "The rounded bar; segments fill it edge to edge with a hairline gap."
          },
          {
            "name": "Segment",
            "required": true,
            "description": "One category, sized by its share of the total and filled with its tone."
          }
        ]
      },
      "related": {
        "components": [
          "Meter",
          "Progress",
          "StatusDot",
          "Card"
        ],
        "patterns": [
          "DashboardPage"
        ]
      },
      "props": [
        {
          "name": "segments",
          "type": "{ label: string; value: number; tone?: SegmentedBarTone }[]",
          "description": "The categories, left to right. Values in any unit; zero or negative values are skipped."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the bar breaks down. Prefixes the accessible summary of every segment's share."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Bar thickness — the same rails as Meter and Progress."
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "Locale for the spoken percentages."
        }
      ],
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ],
        "tone": [
          "1",
          "2",
          "3",
          "info",
          "primary",
          "neutral",
          "success",
          "warning",
          "destructive"
        ]
      },
      "tokensUsed": [
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "primary",
        "muted-foreground",
        "success",
        "tone-warning",
        "destructive",
        "destructive-mark",
        "success-mark",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "SegmentedBar",
          "why": "A breakdown is a reading, present with the card that reports it; growing the segments in on load would act out a change that did not happen."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "SegmentedBar",
          "why": "It reports and accepts no input."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Segment",
          "why": "Each segment's share and colour ease on the motion tokens when the data changes (no recipe animates flex-grow), so the reader sees which part grew."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "SegmentedBar",
          "why": "No indeterminate state — an unknown breakdown is not drawn."
        }
      ],
      "a11y": [
        "Rendered role=img with an aria-label built from `label` and each segment's share (\"Revenue by channel: Direct 42%, Partners 27%\"), so the whole breakdown is read in one stop.",
        "Colour alone does not identify a segment: always show a legend with each segment's label beside the bar."
      ],
      "examples": [
        {
          "label": "With a legend",
          "code": "const sales = [\n\t{ label: \"Direct\", value: 42, tone: \"1\" },\n\t{ label: \"Partners\", value: 27, tone: \"2\" },\n\t{ label: \"Referrals\", value: 19, tone: \"3\" },\n] as const\n\n<Stack gap={3}>\n\t<SegmentedBar label=\"Revenue by channel\" segments={[...sales]} size=\"lg\" />\n\t<ul className=\"flex flex-col gap-1.5\">\n\t\t{sales.map((s) => (\n\t\t\t<li key={s.label} className=\"flex items-center gap-2 text-body-sm\">\n\t\t\t\t<StatusDot tone={s.tone} />\n\t\t\t\t<span className=\"flex-1 text-muted-foreground\">{s.label}</span>\n\t\t\t\t<span className=\"text-mono-caption\">{s.value}%</span>\n\t\t\t</li>\n\t\t))}\n\t</ul>\n</Stack>",
          "imports": "import { SegmentedBar, Stack, StatusDot } from \"@sableui/react\""
        },
        {
          "label": "Test results — status tones",
          "code": "<SegmentedBar\n\tlabel=\"Test results\"\n\tsegments={[\n\t\t{ label: \"Passed\", value: 412, tone: \"success\" },\n\t\t{ label: \"Flaky\", value: 9, tone: \"warning\" },\n\t\t{ label: \"Failed\", value: 3, tone: \"destructive\" },\n\t]}\n/>",
          "imports": "import { SegmentedBar } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Select",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/select",
      "summary": "Listbox over Base UI Select — typeahead, roving focus, collision-aware popup, ARIA option wiring, and form integration. Trigger shows the selected value; the popup portals to <body>.",
      "keywords": [
        "select",
        "listbox",
        "dropdown",
        "picker",
        "option",
        "choice",
        "typeahead",
        "form"
      ],
      "usage": {
        "description": "Use Select when users choose one value from a known, finite set. Use Combobox for searchable or user-entered values, Combobox `multiple` for several choices, and Radio when all options should remain visible.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use clear item labels and pass label explicitly when children are richer than plain text."
          },
          {
            "guidance": "do",
            "description": "Group long option sets with SelectGroup and SelectGroupLabel when categories improve scanning."
          },
          {
            "guidance": "do",
            "description": "Wrap in Field when the select belongs to a form so label, helper text, and errors are wired automatically."
          },
          {
            "guidance": "dont",
            "description": "Use Select for very large or fuzzy lists. Use Combobox when typing is the primary way to find an option.",
            "instead": [
              "Combobox"
            ]
          },
          {
            "guidance": "dont",
            "description": "Use Select for binary on/off settings. Use Switch or Checkbox instead.",
            "instead": [
              "Switch",
              "Checkbox"
            ]
          },
          {
            "guidance": "do",
            "description": "Leave the trigger's type alone on mobile. Below the sm breakpoint the md trigger renders text-body-lg (17px) so it matches the Input and Textarea beside it, which carry that tier because iOS Safari zooms the page when a focused field computes under 16px. A custom field in the same row should follow: a second paired tier under a max-sm: variant, never a hand-set font-size."
          },
          {
            "guidance": "do",
            "description": "Inside a <Workspace> a Select adapts automatically — trigger and popup both pick up the compact density, including across the portal. Do NOT hand-size it per call site; that was necessary before v0.41 and is now drift."
          }
        ],
        "anatomy": [
          {
            "name": "Root",
            "required": true,
            "description": "Owns value, open state, form integration, and item collection."
          },
          {
            "name": "Trigger",
            "required": true,
            "description": "The button that shows the selected value and opens the listbox."
          },
          {
            "name": "Content",
            "required": true,
            "description": "The positioned popup containing options and optional groups."
          },
          {
            "name": "Item",
            "required": true,
            "description": "A selectable option with selected and highlighted states."
          }
        ]
      },
      "related": {
        "components": [
          "Combobox",
          "Radio",
          "Field",
          "Input"
        ],
        "patterns": [
          "SettingsPage",
          "AuthPage"
        ]
      },
      "props": [
        {
          "name": "items",
          "type": "Record<string, ReactNode> | { value: string; label: ReactNode }[]",
          "description": "value → label map (a record, or an array of { value, label }). Derived automatically from literal SelectItem children; pass it explicitly when the items are generated in a loop, or a closed trigger renders the raw value instead of the label."
        },
        {
          "name": "Select (Root)",
          "type": "Base UI Select.Root props (value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, disabled, required, name, multiple, items)",
          "description": "Controls the selected value and open state. Uncontrolled by default. When `items` isn't passed, it is derived from the SelectItem children so the closed trigger shows display text instead of the raw value; pass `items` explicitly when item children aren't plain strings."
        }
      ],
      "subcomponents": [
        {
          "name": "SelectTrigger",
          "type": "Base UI Trigger props + placeholder?: ReactNode + size?: \"md\" | \"sm\" | \"xs\" + className",
          "description": "The button. Composes Trigger + Value + a chevron Icon that flips on open (data-[popup-open]). `size=\"sm\"` is the same raised field one rung down, for a toolbar beside `sm` buttons. `size=\"xs\"` is the property-grid rung — height, padding, radius AND surface move together, which is why it is a prop and not a className: the xs trigger is an inset `bg-panel-field` field with no border, matching ScrubField on the same row. A consumer overriding only the height gets an md-register 8px radius on a 24px box and a raised card sitting among inset fields; one inspector panel had eleven of those, and both tells are visible at a glance."
        },
        {
          "name": "SelectContent",
          "type": "Base UI Popup props + side, align, sideOffset + className",
          "description": "Portal + Positioner + Popup + List. side=\"bottom\", align=\"start\", sideOffset=6 by default; matches trigger width."
        },
        {
          "name": "SelectItem",
          "type": "{ value: string; disabled?: boolean; label?: string } + className",
          "description": "An option. Composes Item + ItemText + a check ItemIndicator for the selected row. String children double as the item's `label`, so the closed trigger shows the display text — pass `label` explicitly only when children are richer than a string."
        },
        {
          "name": "SelectGroup",
          "type": "Base UI Group props + className",
          "description": "Optional grouping of related options."
        },
        {
          "name": "SelectGroupLabel",
          "type": "Base UI GroupLabel props + className",
          "description": "The heading associated with a SelectGroup for screen readers."
        },
        {
          "name": "SelectValue",
          "type": "Base UI Value props (children render fn) + placeholder",
          "description": "Renders the selected option's label with a placeholder fallback. Already composed inside SelectTrigger; exported for advanced layouts that render the value outside the default trigger."
        },
        {
          "name": "SelectSeparator",
          "type": "Base UI Separator props + className",
          "description": "A thin themed divider between groups of items. Decorative — Base UI marks it aria-hidden."
        }
      ],
      "tokensUsed": [
        "field-border",
        "field",
        "foreground",
        "ring",
        "border",
        "popover",
        "popover-foreground",
        "accent",
        "accent-foreground",
        "muted-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "SelectContent",
          "why": "The popup's transform-origin follows Base UI's anchor, so it grows out of the trigger it belongs to. On a dense form with several selects in a column, that origin is the only thing identifying which field the open list is for."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "SelectItem",
          "why": "Highlight follows both pointer and keyboard. Easing it means arrow-keying down a list is continuous motion rather than a background teleporting between rows, which is what makes a long list readable while moving."
        },
        {
          "slot": "transition",
          "recipe": "motion-pop",
          "part": "SelectContent",
          "why": "Closing collapses back toward the trigger, so the reader's eye is returned to the field that now holds the value they just picked."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "SelectContent",
          "why": "Select takes a resident list of options. Anything that has to be fetched or filtered as you type is Combobox, which owns that state."
        }
      ],
      "a11y": [
        "Base UI provides listbox/option roles, aria-expanded, typeahead, roving focus, and a hidden form input.",
        "Esc and click-outside dismiss; arrow keys and Home/End navigate the list.",
        "Selected option carries data-[selected]; the highlighted option carries data-[highlighted].",
        "Animate the popup via data-[starting-style] / data-[ending-style]."
      ],
      "examples": [
        {
          "label": "Basic (controlled)",
          "code": "<Select value={value} onValueChange={setValue}><SelectTrigger placeholder=\"Choose a font\" /><SelectContent><SelectItem value=\"sans\">Sans-serif</SelectItem><SelectItem value=\"serif\">Serif</SelectItem><SelectItem value=\"mono\">Monospace</SelectItem></SelectContent></Select>",
          "imports": "import { Select, SelectContent, SelectItem, SelectTrigger } from \"@sableui/react\""
        },
        {
          "label": "Grouped",
          "code": "<SelectContent><SelectGroup><SelectGroupLabel>Weights</SelectGroupLabel><SelectItem value=\"regular\">Regular</SelectItem><SelectItem value=\"bold\">Bold</SelectItem></SelectGroup></SelectContent>",
          "imports": "import { SelectContent, SelectGroup, SelectGroupLabel, SelectItem } from \"@sableui/react\""
        },
        {
          "label": "Inside Field",
          "code": "<Field label=\"Default visibility\" description=\"Controls how new projects appear.\"><Select defaultValue=\"public\"><SelectTrigger placeholder=\"Choose visibility\" /><SelectContent><SelectItem value=\"public\">Public</SelectItem><SelectItem value=\"private\">Private</SelectItem><SelectItem value=\"unlisted\">Unlisted</SelectItem></SelectContent></Select></Field>",
          "imports": "import { Field, Select, SelectContent, SelectItem, SelectTrigger } from \"@sableui/react\""
        },
        {
          "label": "Rich item labels",
          "code": "<Select defaultValue=\"business\" items={[{ value: \"business\", label: \"Business\" }, { value: \"studio\", label: \"Studio\" }]}><SelectTrigger /><SelectContent><SelectItem value=\"business\" label=\"Business\"><span className=\"flex items-center gap-2\"><Badge tone=\"1\">Business</Badge><span>Business plan</span></span></SelectItem><SelectItem value=\"studio\" label=\"Studio\"><span className=\"flex items-center gap-2\"><Badge tone=\"2\">Studio</Badge><span>Studio</span></span></SelectItem></SelectContent></Select>",
          "imports": "import { Badge, Select, SelectContent, SelectItem, SelectTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Separator",
      "status": "stable",
      "group": "Containers",
      "register": "either",
      "path": "components/separator",
      "summary": "A hairline divider. Horizontal full-width rule or vertical 1px column, tinted with the border token. Optional centered label (horizontal) for a captioned section divider.",
      "keywords": [
        "separator",
        "divider",
        "section break",
        "rule"
      ],
      "usage": {
        "description": "Use Separator to divide related groups where spacing alone does not provide enough structure.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it sparingly between sections, menu groups, or dense rows."
          },
          {
            "guidance": "do",
            "description": "Choose orientation based on the layout direction it separates."
          },
          {
            "guidance": "dont",
            "description": "Do not use Separator as decoration when hierarchy, spacing, or headings would explain the layout better."
          },
          {
            "guidance": "dont",
            "description": "Do not use it where space would do. A page whose every section is divided by a rule reads as a form; the rule should mark a real change of subject."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "ContextMenu",
          "Card"
        ]
      },
      "props": [
        {
          "name": "orientation",
          "type": "\"horizontal\" | \"vertical\"",
          "default": "\"horizontal\"",
          "description": "Axis of the rule. Vertical stretches to its flex parent's height."
        },
        {
          "name": "label",
          "type": "ReactNode",
          "description": "When set (horizontal only), centers a muted caption between two hairline rules."
        },
        {
          "name": "render",
          "type": "ReactElement | (props, state) => ReactElement",
          "description": "Compose with another element/component through the Base UI render prop. Ignored on the labeled variant."
        }
      ],
      "variants": {
        "orientation": [
          "horizontal",
          "vertical"
        ]
      },
      "tokensUsed": [
        "border",
        "muted-foreground"
      ],
      "a11y": [
        "Base UI sets role=separator and aria-orientation for assistive tech.",
        "The labeled variant renders a div with explicit role=separator + aria-orientation (the caption is the visible context).",
        "Purely decorative dividers can carry aria-hidden when adjacent content already conveys the grouping."
      ],
      "examples": [
        {
          "label": "Horizontal",
          "code": "<Separator />",
          "imports": "import { Separator } from \"@sableui/react\""
        },
        {
          "label": "Labeled section divider",
          "code": "<Separator label=\"Other holdings\" />",
          "imports": "import { Separator } from \"@sableui/react\""
        },
        {
          "label": "Vertical (inside a flex row)",
          "code": "<Row gap={3} className=\"h-6 items-center\"><span>Edit</span><Separator orientation=\"vertical\" /><span>Delete</span></Row>",
          "imports": "import { Row, Separator } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "SettingsMenu",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/settings-menu",
      "summary": "A compact trigger that states the current settings, over a menu of rows that change them. Each row shows its own value and opens a submenu; with one setting, the menu opens straight to its options under the row's label.",
      "keywords": [
        "settings",
        "model picker",
        "model switcher",
        "options menu",
        "preferences",
        "submenu",
        "quality settings",
        "ai chat"
      ],
      "usage": {
        "description": "For a cluster of related settings that a reader checks often and changes occasionally — the model and effort on an AI composer, quality and format on an export control, density and sort on a table. It encodes one shape: summarise the state on the trigger, then open to a list of name → current value → submenu. It knows nothing about any particular domain; the AI-model case is one instance of it.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Put the current values in `summary`, not a noun. \"5.6 Sol High\" tells the reader where they are; a trigger reading \"Settings\" makes them open it to find out, which is the wrong trade for a control glanced at twenty times a session."
          },
          {
            "guidance": "do",
            "description": "Give every SettingsRow a `value`. One glance at the open menu should answer every setting at once — a menu of bare names is a menu you have to explore."
          },
          {
            "guidance": "do",
            "description": "Use `MenuRadioGroup` + `MenuRadioItem` inside a row for single-choice settings, so the current option is checked rather than merely remembered."
          },
          {
            "guidance": "do",
            "description": "Reach for `variant=\"subtle\"` when the trigger sits on a surface where a ghost control would float unanchored — inside a ChatComposer, for instance."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a single setting. One choice is a `Select`; the nesting only earns its cost when there are several related settings to summarise."
          },
          {
            "guidance": "dont",
            "description": "Do not put actions in it. Rows change state; a menu that mixes \"Effort ›\" with \"Delete conversation\" makes destructive commands look like preferences. That is `Menu` or `OverflowMenu`."
          },
          {
            "guidance": "dont",
            "description": "Do not nest more than one level deep. Past that the reader loses the path back, and the thing you have is a settings dialog wearing a menu."
          },
          {
            "guidance": "dont",
            "description": "Do not override the upward, end-aligned default without reason. Its home is the bottom of a composer or toolbar, where a downward menu opens off-screen."
          }
        ],
        "anatomy": [
          {
            "name": "Trigger",
            "required": true,
            "description": "The summary control. States the current settings and carries a chevron; quiet at rest, so it does not compete with the primary action beside it."
          },
          {
            "name": "SettingsRow",
            "required": true,
            "description": "One setting: its name, its current value, and a submenu of options. Without children it renders flat, for a row that is a statement rather than a choice."
          },
          {
            "name": "Submenu contents",
            "required": false,
            "description": "Usually a MenuRadioGroup of MenuRadioItems, so the active option is checked."
          }
        ]
      },
      "related": {
        "components": [
          "Menu",
          "OverflowMenu",
          "Select",
          "ChatComposer",
          "Popover"
        ],
        "patterns": [
          "ChatPanel"
        ]
      },
      "props": [
        {
          "name": "summary",
          "type": "ReactNode",
          "description": "What the trigger reads when closed. Give it the current values, not a noun — the control should answer before it is opened."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Change settings\"",
          "description": "Accessible name for the trigger, since the visible summary is data rather than a label."
        },
        {
          "name": "variant",
          "type": "\"ghost\" | \"subtle\"",
          "default": "\"ghost\"",
          "description": "Resting treatment. `ghost` disappears into the surface at rest and shows its affordance on hover — right for a toolbar. `subtle` adds a fill for surfaces where a ghost trigger would float unanchored."
        },
        {
          "name": "size",
          "type": "\"xs\" | \"sm\"",
          "default": "\"sm\"",
          "description": "Trigger height, read off the density ladder so a compact scope retunes it with every other control."
        },
        {
          "name": "side",
          "type": "\"top\" | \"bottom\" | \"inline-start\" | \"inline-end\"",
          "default": "\"top\"",
          "description": "Which side the menu opens on. Upward by default — its home is the bottom of a composer."
        },
        {
          "name": "align",
          "type": "\"start\" | \"center\" | \"end\"",
          "default": "\"end\"",
          "description": "Alignment along that side."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "description": "Disable the trigger."
        },
        {
          "name": "...Menu props",
          "type": "Omit<ComponentProps<typeof Menu>, 'children'>",
          "description": "`open` / `defaultOpen` / `onOpenChange` and the rest of Base UI's menu root props."
        }
      ],
      "subcomponents": [
        {
          "name": "SettingsRow",
          "type": "{ label: ReactNode; value?: ReactNode; disabled?: boolean; children?: ReactNode }",
          "description": "One setting. With children it opens a submenu; without them it renders as a flat statement row."
        },
        {
          "name": "MenuRadioGroup",
          "type": "{ value?: string; defaultValue?: string; onValueChange?: (value: string) => void }",
          "description": "Single-choice group for a row's submenu. Exported from Menu; re-used here rather than duplicated."
        },
        {
          "name": "MenuRadioItem",
          "type": "{ value: string; disabled?: boolean }",
          "description": "One option, with a check in a reserved leading column so labels do not shift as the highlight moves."
        }
      ],
      "variants": {
        "variant": [
          "ghost",
          "subtle"
        ],
        "size": [
          "xs",
          "sm"
        ]
      },
      "tokensUsed": [
        "foreground",
        "muted",
        "muted-foreground",
        "accent",
        "accent-foreground",
        "popover",
        "popover-foreground",
        "border",
        "ring"
      ],
      "a11y": [
        "Base UI's Menu underneath, so roving focus, typeahead, Esc and outside-dismissal, and the full menu/menuitemradio ARIA wiring come for free — including submenu traversal with the arrow keys.",
        "The trigger carries an explicit `label`, because its visible text is the current state rather than a name: without it, a screen reader announces \"5.6 Sol High\" with no indication that it is a control or what it changes.",
        "Radio rows are `menuitemradio` with a real checked state, so the current choice is conveyed to assistive tech rather than only by a visible tick.",
        "The check occupies a reserved column instead of appearing on selection, so labels never shift sideways as the highlight moves — a change that reads as motion to anyone tracking position.",
        "Submenus open on the inline-end side, which flips correctly in RTL rather than always opening right."
      ],
      "examples": [
        {
          "label": "A model switcher in a composer",
          "code": "<ChatComposer\n\tonSend={send}\n\tactions={\n\t\t<SettingsMenu variant=\"subtle\" size=\"xs\" summary={<><span className=\"text-foreground\">{model.name}</span>{\" \"}<span className=\"text-muted-foreground\">{effort}</span></>}>\n\t\t\t<SettingsRow label=\"Model\" value={model.name}>\n\t\t\t\t<MenuRadioGroup value={model.id} onValueChange={setModelId}>\n\t\t\t\t\t<MenuRadioItem value=\"sol\">5.6 Sol</MenuRadioItem>\n\t\t\t\t\t<MenuRadioItem value=\"lite\">5.6 Lite</MenuRadioItem>\n\t\t\t\t</MenuRadioGroup>\n\t\t\t</SettingsRow>\n\t\t\t<SettingsRow label=\"Effort\" value={effort}>\n\t\t\t\t<MenuRadioGroup value={effort} onValueChange={setEffort}>\n\t\t\t\t\t<MenuRadioItem value=\"Low\">Low</MenuRadioItem>\n\t\t\t\t\t<MenuRadioItem value=\"High\">High</MenuRadioItem>\n\t\t\t\t</MenuRadioGroup>\n\t\t\t</SettingsRow>\n\t\t</SettingsMenu>\n\t}\n/>",
          "imports": "import { ChatComposer, MenuRadioGroup, MenuRadioItem, SettingsMenu, SettingsRow } from \"@sableui/react\""
        },
        {
          "label": "Export options — the same shape, no chat involved",
          "code": "<SettingsMenu summary={`${format} · ${quality}`} side=\"bottom\" align=\"start\">\n\t<SettingsRow label=\"Format\" value={format}>\n\t\t<MenuRadioGroup value={format} onValueChange={setFormat}>\n\t\t\t<MenuRadioItem value=\"PNG\">PNG</MenuRadioItem>\n\t\t\t<MenuRadioItem value=\"SVG\">SVG</MenuRadioItem>\n\t\t</MenuRadioGroup>\n\t</SettingsRow>\n\t<SettingsRow label=\"Quality\" value={quality}>\n\t\t<MenuRadioGroup value={quality} onValueChange={setQuality}>\n\t\t\t<MenuRadioItem value=\"Draft\">Draft</MenuRadioItem>\n\t\t\t<MenuRadioItem value=\"Final\">Final</MenuRadioItem>\n\t\t</MenuRadioGroup>\n\t</SettingsRow>\n</SettingsMenu>",
          "imports": "import { MenuRadioGroup, MenuRadioItem, SettingsMenu, SettingsRow } from \"@sableui/react\""
        },
        {
          "label": "A flat row for a setting with nothing to choose",
          "code": "<SettingsMenu summary=\"Standard\">\n\t<SettingsRow label=\"Speed\" value=\"Standard\">\n\t\t<MenuRadioGroup value=\"standard\">\n\t\t\t<MenuRadioItem value=\"standard\">Standard</MenuRadioItem>\n\t\t\t<MenuRadioItem value=\"priority\">Priority</MenuRadioItem>\n\t\t</MenuRadioGroup>\n\t</SettingsRow>\n\t<MenuSeparator />\n\t<SettingsRow label=\"Plan\" value=\"Team\" />\n</SettingsMenu>",
          "imports": "import { MenuRadioGroup, MenuRadioItem, MenuSeparator, SettingsMenu, SettingsRow } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Sheet",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/sheet",
      "summary": "Edge-anchored drawer over Base UI Drawer — focus trap, scroll lock, Esc/outside dismissal, portal backdrop, plus swipe-to-dismiss on touch. Slides in from a viewport edge via side and swipes back out toward the same edge.",
      "keywords": [
        "sheet",
        "drawer",
        "side panel",
        "overlay",
        "swipe to dismiss",
        "bottom sheet",
        "snap points",
        "detents"
      ],
      "usage": {
        "description": "Use Sheet for secondary workflows that slide in while preserving context from the underlying page.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for inspect, edit, filter, or create flows that relate to the current page."
          },
          {
            "guidance": "do",
            "description": "Include clear title, close path, and footer actions for task-oriented sheets."
          },
          {
            "guidance": "do",
            "description": "Give a bottom sheet snap points when it shows a summary first and detail on demand (a map result, a now-playing panel): `snapPoints={[0.4, 1]}`. The first stop is where it opens; put what matters at that height, because the rest is a drag away."
          },
          {
            "guidance": "dont",
            "description": "Do not use Sheet for simple confirmations or deeply nested workflows.",
            "instead": [
              "Dialog"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it on desktop where a Dialog fits. A sheet's affordance is edge-anchored travel for thumb reach; on a wide viewport it becomes a dialog that arrives from the wrong place.",
            "instead": [
              "Dialog"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "SheetTrigger",
            "required": false,
            "description": "The element that opens the sheet."
          },
          {
            "name": "SheetContent",
            "required": true,
            "description": "The sliding panel content."
          },
          {
            "name": "SheetClose",
            "required": false,
            "description": "An explicit close control."
          },
          {
            "name": "SheetHeader",
            "required": false,
            "description": "The title and description region."
          },
          {
            "name": "SheetTitle",
            "required": false,
            "description": "The sheet heading."
          },
          {
            "name": "SheetDescription",
            "required": false,
            "description": "Supporting context for the sheet."
          },
          {
            "name": "SheetList",
            "required": false,
            "description": "Edge-to-edge rows (Entity) aligned with the header — a queue, notifications, a picker."
          },
          {
            "name": "SheetFooter",
            "required": false,
            "description": "Footer actions for the workflow."
          }
        ]
      },
      "related": {
        "components": [
          "Dialog",
          "Popover",
          "Sidebar"
        ]
      },
      "props": [
        {
          "name": "Sheet (Root)",
          "type": "Base UI Drawer.Root props (open, defaultOpen, onOpenChange, onOpenChangeComplete, modal, disablePointerDismissal, actionsRef, handle, snapPoints, snapPoint, defaultSnapPoint, onSnapPointChange, snapToSequentialPoints) — minus swipeDirection",
          "description": "Controls open state. Uncontrolled by default. The dismiss swipe direction is not a prop: it follows SheetContent's side. onOpenChange reports reason \"swipe\" when a swipe closed it. Records the element focused when the sheet opens, trigger or not, and returns focus there on close."
        },
        {
          "name": "snapPoints",
          "type": "(number | string)[]",
          "default": "—",
          "description": "Stops a bottom sheet rests at, smallest first: a fraction of the viewport (0.4), pixels (320), or a px/rem string (\"20rem\"). The panel is the full stop's height and opens at the first stop; a swipe moves between stops and a swipe below the first closes it. side=\"bottom\" only: other sides ignore them, with a development warning."
        },
        {
          "name": "snapPoint",
          "type": "number | string | null",
          "default": "—",
          "description": "The active stop, controlled. Pair with onSnapPointChange; use defaultSnapPoint to open at a different stop uncontrolled."
        },
        {
          "name": "onSnapPointChange",
          "type": "(snapPoint: number | string | null, eventDetails) => void",
          "default": "—",
          "description": "Fires when a swipe (or your code) moves the sheet to another stop."
        },
        {
          "name": "snapToSequentialPoints",
          "type": "boolean",
          "default": "false",
          "description": "Move one stop per swipe, by distance. Off, a fast flick can skip past a stop."
        }
      ],
      "subcomponents": [
        {
          "name": "SheetContent",
          "type": "Base UI Drawer.Popup props (initialFocus, finalFocus, …) + side: \"right\" | \"left\" | \"top\" | \"bottom\" + showCloseButton?: boolean + closeLabel?: string + className",
          "description": "Backdrop + edge-anchored popup; portals to <body>. side picks which viewport edge the sheet anchors to and slides in from (defaults to \"right\"). Left/right are full-height side panels; top/bottom span the width up to 80vh. A bottom sheet with snapPoints is as tall as its highest stop allows (the viewport less a top gap), shows a drag handle, and translates down to the active stop; the part below the screen becomes bottom padding, so its scroll area and SheetFooter end at the visible edge. A bottom sheet rides above the on-screen keyboard (measured from visualViewport). On touch it swipes closed toward that same edge (right swipes right, left swipes left, top swipes up, bottom swipes down). showCloseButton renders the same close (X) as Dialog, a ghost icon button in the top-end corner whose touch target grows to 44px, and the SheetHeader leaves room for it; it defaults to true for left/right (a desktop panel no mouse can swipe) and false for top/bottom. closeLabel (default \"Close\") is its accessible name."
        },
        {
          "name": "SheetTrigger",
          "type": "Base UI Drawer.Trigger props (render)",
          "description": "Element that opens the sheet. Compose via render prop."
        },
        {
          "name": "SheetClose",
          "type": "Base UI Drawer.Close props (render)",
          "description": "Element that dismisses the sheet. Compose via render prop."
        },
        {
          "name": "SheetHeader",
          "type": "ComponentProps<\"div\">",
          "description": "Top section holding SheetTitle/SheetDescription."
        },
        {
          "name": "SheetTitle",
          "type": "Base UI Drawer.Title props + className",
          "description": "The sheet's accessible name — wires aria-labelledby on the popup."
        },
        {
          "name": "SheetDescription",
          "type": "Base UI Drawer.Description props + className",
          "description": "Muted supporting line; wires aria-describedby."
        },
        {
          "name": "SheetList",
          "type": "ComponentProps<\"div\">",
          "description": "Rows that run edge to edge in the sheet, Entity most often. It bleeds through the sheet's padding (--sheet-p) and hands it back to each row as --entity-px, so row content lines up with SheetHeader and a row's hover fill reaches the panel's edges. Without it a list of Entity rows sits 12px in from the header. The Sheet equivalent of CardList."
        },
        {
          "name": "SheetFooter",
          "type": "ComponentProps<\"div\">",
          "description": "Bottom row for actions, pinned after the scrollable body. In a bottom sheet it stacks: full width, the primary on top, every button at the cta height."
        }
      ],
      "variants": {
        "side": [
          "right",
          "left",
          "top",
          "bottom"
        ]
      },
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "muted-foreground"
      ],
      "a11y": [
        "Base UI provides focus trapping, scroll lock, aria-modal, and labelled-by wiring (SheetTitle).",
        "The panel scrolls its own content (thin scrollbar, contained overscroll) when it outgrows its bound — the full height on left/right, 80vh on top/bottom.",
        "Esc and click-outside dismiss by default; on touch, a swipe toward the sheet's own edge dismisses too. A short or slow drag springs back.",
        "Swipe is an extra path, never the only one: Esc, click-outside and SheetClose all still work.",
        "Focus matches Dialog: the first tabbable on mouse/keyboard open, the panel itself on touch (so the virtual keyboard stays down). On close, focus returns to the element that held it when the sheet opened: the SheetTrigger, or your own button when it drives a controlled open. It is captured before the content mounts, so an autoFocus field inside cannot displace it; an explicit finalFocus on SheetContent wins.",
        "A side sheet carries its own labelled close button (closeLabel), so screen-reader and mouse users can always escape it; a top or bottom sheet needs a SheetClose (or showCloseButton) of its own.",
        "Slide animation runs via data-[starting-style]/data-[ending-style] attributes on the motion-duration token; while swiping the panel tracks the finger directly, and a released swipe finishes on the same token (scaled by flick speed), so reduced motion makes it instant.",
        "A mouse drag that starts on sheet content selects text rather than dragging the panel; mouse dragging only starts from the padding edge.",
        "Snap points add stops, not a gate: at any stop the content scrolls within the visible part and every control stays reachable by keyboard, so nothing needs the drag. The handle is decorative (aria-hidden).",
        "A bottom sheet stays above the on-screen keyboard: its bottom edge is lifted by the height the keyboard takes from the visual viewport, so a focused field is not covered. An app that sets interactive-widget=resizes-content in its viewport meta gets the same result from the browser, and the inset reads 0."
      ],
      "examples": [
        {
          "label": "List of rows (a queue)",
          "code": "<Sheet><SheetTrigger render={<Button variant=\"secondary\">Queue</Button>} /><SheetContent><SheetHeader><SheetTitle>Up next</SheetTitle></SheetHeader><SheetList>{queue.map((track) => <Entity key={track.id} leading={<GradientArt aria-hidden seed={track.title} className=\"size-10 rounded-sm\" />} title={track.title} subtitle={track.artist} />)}</SheetList></SheetContent></Sheet>",
          "imports": "import { Button, Entity, GradientArt, Sheet, SheetContent, SheetHeader, SheetList, SheetTitle, SheetTrigger } from \"@sableui/react\""
        },
        {
          "label": "Basic (right)",
          "code": "<Sheet><SheetTrigger render={<Button>Open</Button>} /><SheetContent><SheetHeader><SheetTitle>Filters</SheetTitle><SheetDescription>Narrow the feed.</SheetDescription></SheetHeader><SheetFooter><SheetClose render={<Button variant=\"secondary\">Cancel</Button>} /><SheetClose render={<Button>Apply</Button>} /></SheetFooter></SheetContent></Sheet>",
          "imports": "import { Button, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from \"@sableui/react\""
        },
        {
          "label": "Left side",
          "code": "<Sheet><SheetTrigger render={<Button variant=\"secondary\">Menu</Button>} /><SheetContent side=\"left\"><SheetHeader><SheetTitle>Navigation</SheetTitle></SheetHeader></SheetContent></Sheet>",
          "imports": "import { Button, Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from \"@sableui/react\""
        },
        {
          "label": "Bottom sheet with snap points",
          "code": "<Sheet snapPoints={[0.4, 1]}><SheetTrigger render={<Button variant=\"secondary\">Nearby</Button>} /><SheetContent side=\"bottom\"><SheetHeader><SheetTitle>12 places nearby</SheetTitle><SheetDescription>Drag up for the full list.</SheetDescription></SheetHeader><SheetList>{places.map((place) => <Entity key={place.id} title={place.name} subtitle={place.distance} />)}</SheetList></SheetContent></Sheet>",
          "imports": "import { Button, Entity, Sheet, SheetContent, SheetDescription, SheetHeader, SheetList, SheetTitle, SheetTrigger } from \"@sableui/react\""
        },
        {
          "label": "Bottom side",
          "code": "<Sheet><SheetTrigger render={<Button variant=\"secondary\">Details</Button>} /><SheetContent side=\"bottom\"><SheetHeader><SheetTitle>Order details</SheetTitle></SheetHeader><SheetFooter><SheetClose render={<Button variant=\"secondary\">Close</Button>} /></SheetFooter></SheetContent></Sheet>",
          "imports": "import { Button, Sheet, SheetClose, SheetContent, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ShowMore",
      "status": "stable",
      "group": "Navigation",
      "register": "page",
      "path": "components/show-more",
      "summary": "Collapsible content region that clips children to a collapsed height, fades the cut edge, and reveals the rest with a toggle.",
      "keywords": [
        "show more",
        "disclosure",
        "truncate",
        "expand"
      ],
      "usage": {
        "description": "Use ShowMore to reveal additional content after an intentionally shortened preview.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it when the preview is useful on its own and the rest is optional."
          },
          {
            "guidance": "do",
            "description": "Make the expanded state reversible when collapsing helps users regain context."
          },
          {
            "guidance": "dont",
            "description": "Do not place it on a card or tinted surface without checking the fade. The cut-edge gradient fades to the page background color, so on any other surface it reads as a visible band."
          },
          {
            "guidance": "dont",
            "description": "Do not hide required steps, important warnings, or primary actions behind ShowMore."
          },
          {
            "guidance": "dont",
            "description": "Do not use it to hide content search engines or screen readers need. Collapsed content is still in the DOM here, but if the user must read it to act, it should not be behind a toggle."
          }
        ]
      },
      "related": {
        "components": [
          "Collapsible"
        ]
      },
      "props": [
        {
          "name": "collapsedHeight",
          "type": "number",
          "default": "96",
          "description": "Collapsed height of the content region in px. The inner wrapper clips to this height until expanded. The toggle and fade only appear when the measured content is taller than this; content that already fits shows in full with no control. Expanding animates to the measured height."
        },
        {
          "name": "collapsedLines",
          "type": "number",
          "description": "Collapsed height as a count of the content's own lines (measured from its line height). Wins over collapsedHeight, and is the one to prefer: the preview keeps the same number of lines when the type scale or density changes, where a px height shows fewer as type grows."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "The content to collapse and reveal."
        },
        {
          "name": "moreLabel",
          "type": "string",
          "default": "\"Show more\"",
          "description": "The toggle's text while collapsed."
        },
        {
          "name": "lessLabel",
          "type": "string",
          "default": "\"Show less\"",
          "description": "The toggle's text while expanded."
        }
      ],
      "tokensUsed": [
        "background",
        "foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The preview arrives with the content it clips. Its fade and toggle appear only once a measurement proves the content overflows."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Toggle",
          "why": "The toggle is a link Button, so its hover and focus ease on Button's recipe."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "Content",
          "why": "The region eases its max-height between the collapsed and the measured full height on the slow motion token. motion-disclosure keys on Base UI's starting and ending styles, which this self-contained toggle does not have. The text unrolling in place keeps the reader's line; a snap drops them at a different scroll position."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Fade",
          "why": "The bottom fade dissolves as the region opens and returns as it closes, so the cut edge and the reveal read as one movement."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Chevron",
          "why": "The chevron turns 180° in step with the region (motion-interactive lists `rotate`), so the toggle visibly points at what it will do next."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Expanding is local and instant; nothing loads."
        }
      ],
      "a11y": [
        "The toggle is a real <button> with aria-expanded reflecting the open state.",
        "The fade overlay is pointer-events-none and decorative; it never traps clicks.",
        "Collapsed content stays in the DOM, so screen readers can still reach it."
      ],
      "examples": [
        {
          "label": "Long paragraph",
          "code": "<ShowMore><p className=\"text-body-md text-foreground\">A long paragraph that exceeds the collapsed height…</p></ShowMore>",
          "imports": "import { ShowMore } from \"@sableui/react\""
        },
        {
          "label": "Collapsed to a line count",
          "code": "<ShowMore collapsedLines={6}><p className=\"text-body-md text-foreground\">{post.description}</p></ShowMore>",
          "imports": "import { ShowMore } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Sidebar",
      "status": "stable",
      "group": "Navigation",
      "register": "page",
      "path": "components/sidebar",
      "summary": "Desktop side-navigation rail (in-flow sticky, hidden below lg) with SidebarHeader / SidebarBrand / SidebarNav / SidebarGroup / SidebarItem / SidebarFooter / SidebarAccount parts, all on one set of columns. Items are router-agnostic via the `render` prop; an optional collapsed icon-rail mode reveals labels in tooltips.",
      "keywords": [
        "sidebar",
        "navigation",
        "app chrome",
        "rail",
        "nav group",
        "section label",
        "account",
        "user menu",
        "profile",
        "account switcher",
        "workspace switcher",
        "sidebar footer"
      ],
      "usage": {
        "description": "Use Sidebar for persistent desktop navigation or application chrome outside the main content region.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for stable app destinations that should remain visible while content changes."
          },
          {
            "guidance": "do",
            "description": "Keep item labels predictable and active state obvious."
          },
          {
            "guidance": "do",
            "description": "Set surface=\"page\" when a full-width top bar sits above the rail. A theme's tinted or dark rail is for a full-height rail that frames the app."
          },
          {
            "guidance": "do",
            "description": "Keep surface=\"rail\" inside AppShell frame=\"inset\": the rail's tint becomes the ground the main panel floats on. Do not add a border-r class back — the gap is the divider."
          },
          {
            "guidance": "do",
            "description": "Group items with SidebarGroup and end the rail with one SidebarAccount that opens the account menu (settings, appearance, sign out). Every part sits on the same icon and label columns, at either density."
          },
          {
            "guidance": "dont",
            "description": "Do not put SideNav, an Entity or a stack of ghost Buttons in the rail. Each brings its own insets, so the icons and labels land on four different columns. SideNav is the in-page section list; the rail has its own parts."
          },
          {
            "guidance": "dont",
            "description": "Do not put a Badge or pill in the account row. Its one quiet detail line carries the plan, role or 'Demo'."
          },
          {
            "guidance": "dont",
            "description": "Do not use Sidebar for page-local settings, filters, or temporary action groups."
          },
          {
            "guidance": "dont",
            "description": "Do not put page content in it. It is fixed-width chrome OUTSIDE the content grid, so anything in it is exempt from the page's measure and rhythm."
          }
        ],
        "anatomy": [
          {
            "name": "Sidebar",
            "required": true,
            "description": "The persistent navigation container."
          },
          {
            "name": "SidebarItem",
            "required": true,
            "description": "One navigation destination or action."
          }
        ]
      },
      "related": {
        "components": [
          "SideNav",
          "BottomNav",
          "AppShell"
        ]
      },
      "props": [
        {
          "name": "collapsed",
          "type": "boolean",
          "default": "false",
          "description": "Collapse the rail to an icon-only width (--sidebar-width-collapsed). Items hide their label + badge and reveal the label in a hover tooltip; the content area reflows. Controlled — wire a toggle from app state. Read the state in custom header/footer content via useSidebar()."
        },
        {
          "name": "icons",
          "type": "boolean",
          "default": "true",
          "description": "Render the leading icon on each SidebarItem. Set false for a text-only rail. Ignored while collapsed (icon-only by definition)."
        },
        {
          "name": "variant",
          "type": "\"app\" | \"inline\"",
          "default": "\"app\"",
          "description": "Where the rail lives. \"app\" is the page's chrome column — sticky, full viewport height, hidden below lg where AppHeader + BottomNav take over. \"inline\" is always visible and fills its parent's height, for a rail inside a bounded frame (a nested shell, an embedded preview). Use it instead of overriding the layout with !important classes."
        },
        {
          "name": "surface",
          "type": "\"rail\" | \"page\"",
          "default": "\"rail\"",
          "description": "Which surface the rail is painted on. \"rail\" is its own --sidebar-* surface with a border — right for a full-height rail that frames the app, which a theme may tint or paint dark. \"page\" uses the page's surface and ink with no border — use it when a full-width header sits above the rail, where a tinted column starting under a page-coloured bar reads as pasted on. Use it instead of overriding bg-/text- classes, which the rail's re-pointed tokens defeat. In AppShell's sidebar slot with frame=\"inset\", the rail's surface is also the shell's ground: from lg a \"rail\" rail drops its border (the gap around the main panel divides them) and either surface stretches to the shell's body row instead of sizing to the viewport. AppShell signals this to its sidebar slot only, so a Sidebar elsewhere in the page is unaffected."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` inherits the app's policy, `subtle` keeps feedback and drops the collapse ease and the current-page glide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting."
        }
      ],
      "subcomponents": [
        {
          "name": "SidebarHeader",
          "type": "div props",
          "description": "The top of the rail, at least 64px tall (the chrome bar's height inside a compact Workspace, so it lines up with the WorkspaceBar beside it). It holds SidebarBrand and may take a second row under it, such as a search field or a notifications button: give that row basis-full and the header grows to hold it instead of clipping."
        },
        {
          "name": "SidebarBrand",
          "type": "{ mark: ReactNode; label: ReactNode; render?: useRender.RenderProp } + div props",
          "description": "The brand row, inside SidebarHeader, on the same grid as SidebarItem: mark in the icons' 24px slot, label on the labels' column, so a logo lines up with the nav below it without copying the rail's inset numbers. Collapsed, it shows the mark alone (named by a string label). render={<Link to=\"/\" />} makes it the home link."
        },
        {
          "name": "SidebarItem",
          "type": "{ label: ReactNode; icon?: ReactNode; active?: boolean; badge?: ReactNode; render?: useRender.RenderProp } + button props",
          "description": "A single nav row, 44px on a page and 32px inside a compact scope such as a Workspace (the rail reads the density; nothing to set). label is the row text (inline when expanded, in a hover tooltip when collapsed); icon is the leading icon node (the consumer swaps fill weight for the active state); active marks the current route (accent fill + aria-current=\"page\"); badge is a trailing node (e.g. a count) pushed to the row end and hidden when collapsed; render composes another element, e.g. render={<Link to=\"/x\" />}."
        },
        {
          "name": "SidebarGroup",
          "type": "{ label?: ReactNode } + div props",
          "description": "A labelled run of SidebarItems inside SidebarNav (\"Workspace\", \"Favorites\"). The label starts on the items' icon column; collapsed, a hairline stands in for it and the label stays as the group's accessible name."
        },
        {
          "name": "SidebarAccount",
          "type": "{ avatar: ReactNode; label: ReactNode; detail?: ReactNode; indicator?: ReactNode | false; render?: useRender.RenderProp } + button props",
          "description": "The account row at the foot of the rail, inside SidebarFooter: the avatar in the icon slot (Avatar xs on a page rail, 2xs in a compact one), the label on the label column, one muted detail line, and an up-down chevron. Make it the trigger of the account Menu (render it through MenuTrigger render) and put Settings, appearance and sign-out there; it holds its fill while the menu is open. Collapsed, the avatar alone, with the label in a tooltip."
        }
      ],
      "variants": {
        "variant": [
          "app",
          "inline"
        ]
      },
      "tokensUsed": [
        "sidebar",
        "sidebar-foreground",
        "sidebar-border",
        "sidebar-accent",
        "sidebar-accent-foreground",
        "sidebar-ring",
        "shell-ground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The rail is the app's frame, present from first paint. It is not summoned, so it has no entrance."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "SidebarItem",
          "why": "Rows ease their hover fill (SideNav's row recipe on the rail rung), so moving down the nav reads as the pointer travelling rather than rows flashing."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "SidebarNav",
          "why": "The current-page fill is one element that travels to the new item when the page changes inside a persistent layout, so the marker reads as moving rather than one row dimming while another lights. It lands in place on first paint, and each item keeps its own fill as the server-render fallback. Expressive: `subtle` moves it at once."
        },
        {
          "slot": "transition",
          "recipe": "motion-size",
          "part": "Root",
          "why": "Collapsing to the icon rail eases the width instead of jumping 192px in one frame, so the content beside it visibly takes the room the rail gave up. Nothing inside jumps — a collapsed row's centred icon and an expanded row's inset icon sit on the same column — and labels leave at once and fade back in on reopen, clipped to the rail meanwhile. It reflows the page for the length of the ease, which is acceptable for a deliberate user toggle and never happens on load. Expressive: `subtle` snaps."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Navigation chrome has no working state; a loading route shows it in the page."
        }
      ],
      "a11y": [
        "SidebarNav renders a <nav> landmark.",
        "Active item carries aria-current=\"page\".",
        "Items expose a focus-visible ring (sidebar-ring).",
        "Collapsed: items take their accessible name from a string label (or aria-label) and reveal the visible label via the tooltip, so the rail stays usable by keyboard and screen readers."
      ],
      "examples": [
        {
          "label": "Rail with nav",
          "code": "<Sidebar><SidebarHeader><SidebarBrand mark={<Icon name=\"music\" variant=\"solid\" />} label=\"Undertow\" render={<Link to=\"/\" />} /></SidebarHeader><SidebarNav><SidebarItem icon={<Icon name=\"bell\" />} label=\"Notifications\" badge={<NotificationBadge count={3} />} render={<Link to=\"/notifications\" />} /></SidebarNav><SidebarFooter>{account}</SidebarFooter></Sidebar>",
          "imports": "import { Icon, NotificationBadge, Sidebar, SidebarBrand, SidebarFooter, SidebarHeader, SidebarItem, SidebarNav } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Collapsible (icon rail)",
          "code": "const [collapsed, setCollapsed] = useState(false)\n<Sidebar collapsed={collapsed}><SidebarNav><SidebarItem icon={<Icon name=\"home\" />} label=\"Home\" active render={<Link to=\"/\" />} /></SidebarNav><SidebarFooter><Button variant=\"ghost\" size=\"icon\" onClick={() => setCollapsed((c) => !c)} aria-label=\"Toggle sidebar\"><Icon name=\"chevron-left\" /></Button></SidebarFooter></Sidebar>",
          "imports": "import { Button, Icon, Sidebar, SidebarFooter, SidebarItem, SidebarNav } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Grouped nav with an account menu",
          "code": "<Sidebar><SidebarHeader><SidebarBrand mark={<Avatar shape=\"square\" size=\"xs\" fallback=\"F\" alt=\"\" />} label=\"Forma Studio\" /></SidebarHeader><SidebarNav><SidebarItem icon={<Icon name=\"inbox\" />} label=\"Inbox\" badge={<span className=\"text-ui-num\">4</span>} /><SidebarGroup label=\"Workspace\"><SidebarItem icon={<Icon name=\"folder\" />} label=\"Projects\" active /><SidebarItem icon={<Icon name=\"users\" />} label=\"Clients\" /></SidebarGroup></SidebarNav><SidebarFooter><Menu><MenuTrigger render={<SidebarAccount avatar={<Avatar size=\"xs\" fallback=\"EL\" alt=\"\" />} label=\"Emma Lee\" detail=\"Forma Studio\" />} /><MenuContent side=\"top\" align=\"start\"><MenuItem>Settings</MenuItem><MenuSeparator /><MenuItem>Sign out</MenuItem></MenuContent></Menu></SidebarFooter></Sidebar>",
          "imports": "import { Avatar, Icon, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Sidebar, SidebarAccount, SidebarBrand, SidebarFooter, SidebarGroup, SidebarHeader, SidebarItem, SidebarNav } from \"@sableui/react\""
        },
        {
          "label": "Inline (inside a bounded frame)",
          "code": "<div className=\"flex h-80 overflow-hidden rounded-lg border border-border\"><Sidebar variant=\"inline\"><SidebarNav><SidebarItem icon={<Icon name=\"home\" />} label=\"Home\" active /></SidebarNav></Sidebar><div className=\"flex-1 p-6\">Content</div></div>",
          "imports": "import { Icon, Sidebar, SidebarItem, SidebarNav } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "SideNav",
      "status": "stable",
      "group": "Navigation",
      "register": "page",
      "path": "components/side-nav",
      "summary": "A lightweight in-content vertical navigation list - the settings / docs sub-nav, distinct from the app-chrome Sidebar. Router-agnostic items, optional SideNavGroup sections, and an explicit active-state vocabulary for content rails or sidebar chrome.",
      "keywords": [
        "side nav",
        "navigation",
        "settings nav",
        "sidebar",
        "rail",
        "docs nav",
        "active item",
        "group"
      ],
      "usage": {
        "description": "Use SideNav for vertical navigation inside a settings page, documentation area, dashboard rail, or sidebar chrome. It is router-agnostic: compose items with render={<Link />} and choose activeVariant based on whether the nav sits in content or app chrome.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use aria-label on SideNav when a page contains more than one nav landmark."
          },
          {
            "guidance": "do",
            "description": "Group related items with SideNavGroup when the rail has more than one conceptual area."
          },
          {
            "guidance": "do",
            "description": "Use size='lg' and activeVariant='sidebar' when the nav is part of persistent app chrome."
          },
          {
            "guidance": "do",
            "description": "Rows are rounded-sm, which nests in the usual rounded-lg p-2 frame. In any other rounded, padded frame give each item rounded-concentric-<outer>/<inset> — a same-radius row inset into a frame reads as a second system."
          },
          {
            "guidance": "dont",
            "description": "Use SideNav for bottom mobile navigation; use BottomNav in AppShell's bottomNav slot.",
            "instead": [
              "BottomNav"
            ]
          },
          {
            "guidance": "dont",
            "description": "Mix content and sidebar active variants in the same rail unless individual items intentionally override the group."
          }
        ],
        "anatomy": [
          {
            "name": "Nav",
            "required": true,
            "description": "The landmark container for the vertical navigation list."
          },
          {
            "name": "Group",
            "required": false,
            "description": "Optional labelled cluster of related navigation items."
          },
          {
            "name": "Item",
            "required": true,
            "description": "Interactive row with label, optional icon, optional badge, and active state."
          },
          {
            "name": "Badge",
            "required": false,
            "description": "Trailing count or state indicator aligned to the row end."
          }
        ]
      },
      "related": {
        "components": [
          "Sidebar",
          "AppShell",
          "BottomNav",
          "Badge",
          "Icon"
        ],
        "patterns": [
          "SettingsPage",
          "DashboardPage"
        ]
      },
      "props": [
        {
          "name": "size",
          "type": "\"md\" | \"lg\"",
          "description": "Density shared by all items. \"md\" (default) = the lightweight in-content sub-nav; \"lg\" = chrome-weight (larger label + icon, roomier rows) for a rail that pairs with the app Sidebar."
        },
        {
          "name": "activeVariant",
          "type": "\"content\" | \"sidebar\"",
          "default": "\"content\"",
          "description": "Active-state token vocabulary shared by all items. \"content\" uses bg-accent/text-accent-foreground for local rails inside the content area; \"sidebar\" uses bg-sidebar-accent/text-sidebar-accent-foreground for SideNavs rendered inside app chrome."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` inherits the app's policy, `subtle` keeps feedback and drops the current-page glide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting."
        }
      ],
      "subcomponents": [
        {
          "name": "SideNavItem",
          "type": "{ label: ReactNode; icon?: ReactNode; active?: boolean; badge?: ReactNode; size?: \"md\" | \"lg\"; activeVariant?: \"content\" | \"sidebar\"; render?: useRender.RenderProp } + button props",
          "description": "A single row. label is the row text; icon is an optional leading icon; active marks the current sub-section (active fill + aria-current=\"page\"); badge is a trailing node (e.g. a count) pushed to the row end; size and activeVariant override the enclosing SideNav per item; render composes another element, e.g. render={<Link to=\"/x\" />}."
        },
        {
          "name": "SideNavGroup",
          "type": "{ label?: ReactNode } + div props",
          "description": "A labelled section within a SideNav - groups settings into areas. label renders an optional sentence-case caption heading above the group's items."
        }
      ],
      "tokensUsed": [
        "muted",
        "muted-foreground",
        "foreground",
        "accent",
        "accent-foreground",
        "ring",
        "sidebar-foreground",
        "sidebar-accent",
        "sidebar-accent-foreground",
        "sidebar-ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "In-page navigation arrives with the page it navigates."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "SideNavItem",
          "why": "Rows ease their hover fill and focus ring, so moving down a long nav reads as one pointer travelling rather than rows flashing in turn."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "SideNav",
          "why": "The current-item fill is one element that travels to the new row when the section changes inside a persistent layout, so the marker reads as moving rather than one row dimming while another lights. It lands in place on first paint, each row keeps its own fill as the server-render fallback, and the active row's heavier weight lands at once — font weight does not ease. Expressive: `subtle` moves it at once."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Navigation chrome has no working state; a loading section shows it in the content."
        }
      ],
      "a11y": [
        "SideNav renders a <nav> landmark; pair multiple navs with aria-label to distinguish them.",
        "The active item carries aria-current=\"page\".",
        "Items expose a focus-visible ring; the active state is reinforced by weight + fill, not colour alone.",
        "Use activeVariant=\"content\" for local in-page rails and activeVariant=\"sidebar\" when a SideNav is placed on Sidebar chrome."
      ],
      "examples": [
        {
          "label": "Settings sub-nav",
          "code": "<SideNav><SideNavItem label=\"Profile\" active render={<Link to=\"/settings/profile\" />} /><SideNavItem label=\"Account\" render={<Link to=\"/settings/account\" />} /><SideNavItem label=\"Notifications\" render={<Link to=\"/settings/notifications\" />} /></SideNav>",
          "imports": "import { SideNav, SideNavItem } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Grouped",
          "code": "<SideNav><SideNavGroup label=\"Account\"><SideNavItem label=\"Profile\" active render={<Link to=\"/settings/profile\" />} /><SideNavItem label=\"Security\" render={<Link to=\"/settings/security\" />} /></SideNavGroup><SideNavGroup label=\"Workspace\"><SideNavItem label=\"Members\" render={<Link to=\"/settings/members\" />} /></SideNavGroup></SideNav>",
          "imports": "import { SideNav, SideNavGroup, SideNavItem } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Chrome-weight rail (size=lg)",
          "code": "<SideNav size=\"lg\"><SideNavItem label=\"Profile\" active render={<Link to=\"/settings/profile\" />} /><SideNavItem label=\"Billing\" render={<Link to=\"/settings/billing\" />} /><SideNavItem label=\"Security\" render={<Link to=\"/settings/security\" />} /></SideNav>",
          "imports": "import { SideNav, SideNavItem } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Inside Sidebar chrome",
          "code": "<SideNav size=\"lg\" activeVariant=\"sidebar\"><SideNavItem label=\"Overview\" active render={<Link to=\"/\" />} /><SideNavItem label=\"Reports\" render={<Link to=\"/reports\" />} /><SideNavItem label=\"Settings\" render={<Link to=\"/settings\" />} /></SideNav>",
          "imports": "import { SideNav, SideNavItem } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        },
        {
          "label": "Grouped with icons and badges",
          "code": "<SideNav aria-label=\"Settings sections\"><SideNavGroup label=\"Account\"><SideNavItem icon={<Icon name=\"user\" />} label=\"Profile\" active render={<Link to=\"/settings/profile\" />} /><SideNavItem icon={<Icon name=\"lock\" />} label=\"Security\" badge={<Badge tone=\"warning\" size=\"sm\">2</Badge>} render={<Link to=\"/settings/security\" />} /></SideNavGroup><SideNavGroup label=\"Workspace\"><SideNavItem icon={<Icon name=\"bell\" />} label=\"Notifications\" render={<Link to=\"/settings/notifications\" />} /></SideNavGroup></SideNav>",
          "imports": "import { Badge, Icon, SideNav, SideNavGroup, SideNavItem } from \"@sableui/react\"\n// <Link> = your router's link (react-router, next/link, @tanstack/router, …)"
        }
      ]
    },
    {
      "name": "Skeleton",
      "status": "stable",
      "group": "Loading & progress",
      "register": "either",
      "path": "components/skeleton",
      "summary": "Loading placeholder — a muted, shimmering block (rounded-md bg-muted motion-shimmer). Shape it with utility classes; rounded-full for circles.",
      "keywords": [
        "skeleton",
        "loading",
        "placeholder",
        "pending"
      ],
      "usage": {
        "description": "Use Skeleton to reserve space and hint at the shape of content while data is loading.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Match the approximate size and rhythm of the eventual content."
          },
          {
            "guidance": "do",
            "description": "Use it for content regions where layout stability matters during loading."
          },
          {
            "guidance": "dont",
            "description": "Do not leave Skeleton visible after an error or empty state; switch to EmptyState (tone='destructive' for an error).",
            "instead": [
              "EmptyState"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use a skeleton whose shape differs from the content that replaces it. A mismatched placeholder causes a visible jump, which is worse than a brief spinner."
          }
        ]
      },
      "related": {
        "components": [
          "Spinner",
          "PageLoader"
        ]
      },
      "props": [
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"div\">",
          "description": "All native div props plus className. Size and shape the placeholder with utilities (h-*, w-*, size-*, rounded-full)."
        }
      ],
      "tokensUsed": [
        "muted"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A skeleton stands in for content that has not arrived; fading the placeholder in adds a wait before the wait."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Root",
          "why": "Nothing here is interactive. A skeleton that reacted to the pointer would invite a click on a thing that cannot be clicked."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "The skeleton has one state. Swapping it for real content is the parent's job, and the parent decides whether that swap is animated."
        },
        {
          "slot": "activity",
          "recipe": "motion-shimmer",
          "part": "Root",
          "why": "The sweep is the entire point of the component: it is what separates 'still loading' from 'loaded, and empty'. A static grey block is indistinguishable from a broken layout, which is why users reload the page. It is one band of light against the viewport, so every skeleton in a loading layout lights in sequence as a single wave rather than each block flashing at its own speed; each pass eases in, glides and settles, then rests off-screen before the next."
        }
      ],
      "a11y": [
        "Purely presentational; the shimmer sweep is decorative, and it stops under reduced motion because motion-shimmer follows --motion-scale.",
        "Mark the loading region with aria-busy=\"true\" on a parent, and swap in real content (with the same layout) once loaded to avoid shift."
      ],
      "examples": [
        {
          "label": "Shapes",
          "code": "<Skeleton className=\"h-4 w-40\" /><Skeleton className=\"size-10 rounded-full\" /><Skeleton className=\"h-40 w-full\" />",
          "imports": "import { Skeleton } from \"@sableui/react\""
        },
        {
          "label": "Post-card composition",
          "code": "<div className=\"flex items-center gap-3\"><Skeleton className=\"size-10 rounded-full\" /><div className=\"space-y-2\"><Skeleton className=\"h-3 w-32\" /><Skeleton className=\"h-3 w-20\" /></div></div>",
          "imports": "import { Skeleton } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Slider",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/slider",
      "summary": "Slider over Base UI Slider — pointer + keyboard control, ARIA slider wiring, and range support via multiple thumbs. The default export composes Root + Control + Track + Indicator + Thumb; pass an array value for a range.",
      "keywords": [
        "slider",
        "range",
        "value",
        "input"
      ],
      "usage": {
        "description": "Use Slider for bounded numeric choices where approximate adjustment is faster than typing.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use visible labels, min/max context, and value output when precision matters."
          },
          {
            "guidance": "do",
            "description": "Choose steps that match the real granularity of the setting."
          },
          {
            "guidance": "dont",
            "description": "Do not use Slider when users must enter an exact arbitrary number; use NumberField."
          },
          {
            "guidance": "dont",
            "description": "Do not use it without showing the value. A slider with no numeric readout makes any precise choice guesswork — pair it with a NumberField, or in a panel or toolbar use SliderField, which carries the number inside the track.",
            "instead": [
              "SliderField"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not resize the thumb's box on hover, focus, or drag. The thumb is a fixed-size hit target wrapping a decorative dot; only the dot scales. A target that grows under the cursor is a target nobody can learn, and WCAG 2.5.8 measures target size at rest. Restyle the dot, not the box."
          }
        ],
        "anatomy": [
          {
            "name": "SliderRoot",
            "required": true,
            "description": "The controlled slider wrapper."
          },
          {
            "name": "SliderControl",
            "required": true,
            "description": "The interactive slider control region."
          },
          {
            "name": "SliderTrack",
            "required": true,
            "description": "The visible value range."
          },
          {
            "name": "SliderIndicator",
            "required": false,
            "description": "The filled portion of the track."
          },
          {
            "name": "SliderThumb",
            "required": true,
            "description": "The draggable handle."
          },
          {
            "name": "SliderValue",
            "required": false,
            "description": "A readable value display."
          }
        ]
      },
      "related": {
        "components": [
          "NumberField",
          "SliderField",
          "Progress"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "number | number[]",
          "default": "—",
          "description": "Controlled value. An array renders a range slider with one thumb per entry."
        },
        {
          "name": "defaultValue",
          "type": "number | number[]",
          "default": "—",
          "description": "Uncontrolled initial value. An array renders a range slider."
        },
        {
          "name": "onValueChange",
          "type": "(value, eventDetails) => void",
          "default": "—",
          "description": "Fires on every value change. value is a number (or number[] for a range)."
        },
        {
          "name": "min",
          "type": "number",
          "default": "0",
          "description": "Minimum allowed value."
        },
        {
          "name": "max",
          "type": "number",
          "default": "100",
          "description": "Maximum allowed value."
        },
        {
          "name": "step",
          "type": "number",
          "default": "1",
          "description": "Granularity the slider steps through. Snaps to multiples."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Ignore user interaction and dim the control."
        },
        {
          "name": "orientation",
          "type": "'horizontal' | 'vertical'",
          "default": "horizontal",
          "description": "Axis the slider tracks along. A vertical slider has no intrinsic length — give it a height (h-40, or flex-1 in a column)."
        },
        {
          "name": "aria-label",
          "type": "string",
          "default": "—",
          "description": "Accessible name, applied to each thumb's input (the element with role=slider). A range also names its group with it."
        },
        {
          "name": "getAriaLabel",
          "type": "(index) => string",
          "default": "—",
          "description": "Per-thumb name for a range (\"Minimum price\" / \"Maximum price\"). Wins over aria-label on the thumbs."
        },
        {
          "name": "getAriaValueText",
          "type": "(formattedValue, value, index) => string",
          "default": "—",
          "description": "What a screen reader announces for the value when the number alone is wrong — a seek bar's \"1:23 of 3:45\". For units or percent, `format` (Intl.NumberFormatOptions) is enough."
        }
      ],
      "subcomponents": [
        {
          "name": "SliderRoot",
          "type": "Base UI Slider.Root props",
          "description": "The unstyled Base UI Root for custom composition — owns the value state and forwards value / defaultValue / onValueChange / min / max / step. Drag state surfaces via data-[dragging]. The default Slider export wires all the parts for you."
        },
        {
          "name": "SliderControl",
          "type": "Base UI Control props + className",
          "description": "The interactive track lane — the positioning context the indicator and thumbs sit in; dims when disabled."
        },
        {
          "name": "SliderTrack",
          "type": "Base UI Track props + className",
          "description": "The full-range rail beneath the indicator."
        },
        {
          "name": "SliderIndicator",
          "type": "Base UI Indicator props + className",
          "description": "The filled portion from min (or the lower thumb) to the current value."
        },
        {
          "name": "SliderThumb",
          "type": "Base UI Thumb props + className",
          "description": "A draggable handle: a fixed-size hit target wrapping a decorative dot. The dot rests small and scales to full size on hover, keyboard focus, and drag; the box never changes, so row metrics and the tap target hold. Range sliders render one per value; pass index for SSR. Interaction state surfaces via data-[dragging]."
        },
        {
          "name": "SliderValue",
          "type": "Base UI Value props",
          "description": "Formatted value readout for custom compositions (e.g. a live number beside the control)."
        }
      ],
      "tokensUsed": [
        "secondary",
        "primary",
        "background",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the form or panel it sits in."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Thumb",
          "why": "The thumb's dot grows from 12px to full size on hover and keyboard focus, and a little past it while dragging, on a spring. Only the paint resizes, never the hit target, so the growth says the thumb is live without moving where you have to aim."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Thumb",
          "why": "The thumb and the filled range follow the pointer one-to-one, and keyboard steps land at once. An eased position would trail the drag and show a value the user has already moved past."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A slider commits as it moves; there is nothing to wait for."
        }
      ],
      "a11y": [
        "Base UI provides role=slider, aria-valuemin/max/now, and arrow-key / Page Up-Down / Home-End control.",
        "Each thumb is a focusable input[type=range] nested in the thumb element; keyboard focus raises a 2px ring on the thumb via has-[:focus-visible] (a bare focus-visible: on the thumb never fires, since the div itself is not focusable).",
        "The thumb's hit area is a fixed 16px box at every state. Only the decorative inner dot resizes — rest 12px, full 16px on hover, keyboard focus, and drag — so the target a pointer or finger must land on never moves or changes size. Keyboard users, who never hover, get the enlarged dot from focus-visible.",
        "The rest-to-full transition uses the motion duration/easing tokens, so it collapses to an instant state change under prefers-reduced-motion or MotionProvider off. The size change itself still happens: it reports interaction state, it is not decoration.",
        "Range sliders get one thumb per value with minStepsBetweenValues honored.",
        "Pass aria-label (or getAriaLabel for a range) so each handle has an accessible name. On Slider it reaches the thumb inputs; on a bare SliderRoot it only names the role=group — when composing, put aria-label / getAriaLabel on each SliderThumb, or label the Root with aria-labelledby or a Field, which Base UI does carry to the thumbs.",
        "getAriaValueText sets aria-valuetext for values a number misreads (time, named steps)."
      ],
      "examples": [
        {
          "label": "Single value",
          "code": "<Slider defaultValue={50} aria-label=\"Volume\" />",
          "imports": "import { Slider } from \"@sableui/react\""
        },
        {
          "label": "Range",
          "code": "const [range, setRange] = useState([20, 60])\n<Slider value={range} onValueChange={setRange} aria-label=\"Price range\" getAriaLabel={(i) => (i ? \"Maximum price\" : \"Minimum price\")} />",
          "imports": "import { Slider } from \"@sableui/react\""
        },
        {
          "label": "Seek bar with spoken time",
          "code": "<Slider value={position} max={duration} onValueChange={seek} aria-label=\"Seek\" getAriaValueText={(_, v) => `${formatTime(v)} of ${formatTime(duration)}`} />",
          "imports": "import { Slider } from \"@sableui/react\""
        },
        {
          "label": "Stepped",
          "code": "<Slider defaultValue={40} min={0} max={100} step={10} />",
          "imports": "import { Slider } from \"@sableui/react\""
        },
        {
          "label": "Vertical",
          "code": "<div className=\"h-40\"><Slider orientation=\"vertical\" defaultValue={40} aria-label=\"Level\" /></div>",
          "imports": "import { Slider } from \"@sableui/react\""
        },
        {
          "label": "Composed with a value readout",
          "code": "<Field label=\"Volume\"><SliderRoot defaultValue={40} className=\"flex items-center gap-3\"><SliderControl><SliderTrack><SliderIndicator /><SliderThumb /></SliderTrack></SliderControl><SliderValue className=\"text-mono-sm\" /></SliderRoot></Field>",
          "imports": "import { Field, SliderControl, SliderIndicator, SliderRoot, SliderThumb, SliderTrack, SliderValue } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "SliderField",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/slider-field",
      "summary": "A slider drawn as a field: the whole box is the track, the fill is the value's share of the range, and the number sits inside it. Double-click, Enter or a typed digit turns the readout into a text input.",
      "keywords": [
        "slider",
        "fill",
        "field",
        "numeric",
        "number",
        "range",
        "property",
        "inspector",
        "toolbar",
        "workspace",
        "unit"
      ],
      "usage": {
        "description": "Use SliderField for a bounded number in a panel, an inspector or a toolbar: opacity, strength, a resolution. It does the work of a Slider with a ScrubField beside it in one control, and the drag target is the full field instead of a 6px rail. The fill only means something between two bounds, so a number without them (an X offset, a seed) stays a ScrubField. In a form where the slider is the main control and its row has room, a Slider reads lighter.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give it real bounds. The fill is the value's share of min to max, so the range has to be one a reader would recognise: 0 to 100%, 0 to 20px."
          },
          {
            "guidance": "do",
            "description": "Pass the unit as `suffix`. It renders after the number, and a string suffix is spoken with the value (\"60%\")."
          },
          {
            "guidance": "do",
            "description": "Match the rung of the row: `xs` in a property grid beside ScrubField and an xs SelectTrigger, `sm` in a toolbar, `md` in a form."
          },
          {
            "guidance": "do",
            "description": "Give every field in a property grid the same width (w-36 in a 260px panel), so the fills share one scale and their ends line up down the column."
          },
          {
            "guidance": "do",
            "description": "Record undo in onValueCommitted. onValueChange fires on every frame of a drag, so an undo entry there rewinds one pixel at a time."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a number with no upper or lower bound. With invented bounds the fill reports a share of nothing; use ScrubField.",
            "instead": [
              "ScrubField"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not put a ScrubField or NumberField beside it for the exact value. It already takes one: double-click, Enter or type."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a range with two ends. It has one value; a range is a Slider with an array value.",
            "instead": [
              "Slider"
            ]
          }
        ]
      },
      "related": {
        "components": [
          "Slider",
          "ScrubField",
          "NumberField",
          "PanelSection",
          "Toolbar"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "number",
          "description": "Controlled value."
        },
        {
          "name": "defaultValue",
          "type": "number",
          "default": "min",
          "description": "Uncontrolled initial value."
        },
        {
          "name": "onValueChange",
          "type": "(next: number) => void",
          "description": "Fires on every change: each frame of a drag, each key step, a typed commit."
        },
        {
          "name": "onValueCommitted",
          "type": "(next: number) => void",
          "description": "Fires once when a change settles: the drag is released, a key step lands, a typed value is committed or reverted. Record an undo entry here."
        },
        {
          "name": "min",
          "type": "number",
          "default": "0",
          "description": "Lower bound, and the empty end of the fill."
        },
        {
          "name": "max",
          "type": "number",
          "default": "100",
          "description": "Upper bound, and the full end of the fill."
        },
        {
          "name": "step",
          "type": "number",
          "default": "1",
          "description": "Drag and arrow-key increment, and the source of the displayed precision: 0.01 shows 0.25. A typed value is clamped to the bounds and rounded to this precision, not snapped to a multiple."
        },
        {
          "name": "label",
          "type": "string",
          "description": "Accessible name for the slider and for the input that replaces the readout while typing. Required."
        },
        {
          "name": "icon",
          "type": "string",
          "description": "Semantic icon name shown at the start of the field. Decorative."
        },
        {
          "name": "prefix",
          "type": "ReactNode",
          "description": "Short text at the start of the field in place of an icon, for a toolbar with no label beside the control."
        },
        {
          "name": "suffix",
          "type": "ReactNode",
          "description": "Unit shown after the value (\"%\", \"px\"). A string is also spoken with the value."
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | \"xs\"",
          "default": "\"md\"",
          "description": "The field ladder shared with Input, SelectTrigger and DatePicker. md is the form field, sm the toolbar field, xs the borderless property-grid rung beside ScrubField."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "description": "Ignores the pointer and keyboard, dims the field and submits nothing."
        },
        {
          "name": "name",
          "type": "string",
          "description": "Submits the value with a form under this name."
        },
        {
          "name": "form",
          "type": "string",
          "description": "Id of a form elsewhere on the page that the value belongs to."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Sizes the field (w-36, flex-1). Defaults to w-full with a 7rem floor, so in a slot sized by its content (a PropertyRow's control side) it draws at the floor until given a width."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "ring",
        "field",
        "field-border",
        "panel-field",
        "panel-field-hover"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the panel row or toolbar it sits in."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The shell eases its hover step and focus ring like every field on the same rung."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Grip",
          "why": "The grip on the fill's leading edge comes up to full strength while the field is hovered or dragged. It is the mark that says the fill can be taken hold of, so it answers the pointer before the press."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "Fill",
          "why": "A jump glides: a press on the track, a key step or a typed value moves the fill and handle to the new place on the emphasized ease, so it reads as one value moving and not two states swapping. In a drag the fill follows the pointer with no transition, since an eased fill would show a value already left. The grip alone trails a moment behind a growing fill, like something towed on a short line; a shrinking fill pushes it along at once, so the grip is never left outside the fill."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A slider commits as it moves; there is nothing to wait for."
        }
      ],
      "a11y": [
        "Base UI provides role=slider with aria-valuemin/max/now and arrow, Page Up/Down and Home/End control; `label` names it.",
        "A string suffix is spoken with the value through aria-valuetext, so a screen reader hears 60% and not 60.",
        "Every value is reachable from the keyboard two ways: step with the arrows, or press Enter (or type a digit) to open the text input. Enter commits it, Escape reverts, blur commits, and focus returns to the slider.",
        "After a double-click, Escape restores the value from before the first press, which had already moved it.",
        "The focus ring is on the field, raised by has-[:focus-visible], because the focusable element is the range input nested in the thumb.",
        "The visible readout and unit are aria-hidden; the slider announces the value once.",
        "It takes no id, so a label's htmlFor cannot point at it. `label` is the name; inside a Field, Base UI wires the Field's label to the slider."
      ],
      "examples": [
        {
          "label": "In a property row",
          "code": "<PropertyRow label=\"Strength\">\n  <SliderField size=\"xs\" label=\"Strength\" suffix=\"px\" value={strength} min={0} max={20} onValueChange={setStrength} className=\"w-36\" />\n</PropertyRow>",
          "imports": "import { PropertyRow, SliderField } from \"@sableui/react\""
        },
        {
          "label": "Fractional step",
          "code": "<SliderField size=\"xs\" label=\"Falloff\" value={falloff} min={0} max={2} step={0.1} onValueChange={setFalloff} className=\"w-36\" />",
          "imports": "import { SliderField } from \"@sableui/react\""
        },
        {
          "label": "In a toolbar, with the name inside the field",
          "code": "<SliderField size=\"sm\" label=\"Opacity\" prefix=\"Opacity\" suffix=\"%\" defaultValue={80} className=\"w-44\" />",
          "imports": "import { SliderField } from \"@sableui/react\""
        },
        {
          "label": "Undo on commit",
          "code": "<SliderField label=\"Brightness\" suffix=\"%\" value={brightness} onValueChange={setBrightness} onValueCommitted={(v) => history.push({ brightness: v })} />",
          "imports": "import { SliderField } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Sparkline",
      "status": "beta",
      "group": "Charts",
      "register": "either",
      "path": "components/sparkline",
      "summary": "A word-sized trend with no axes — a line, a line over a soft fill, or columns — sized by its container, for stat cards, table cells and sentences. Draws on as it scrolls into view.",
      "keywords": [
        "sparkline",
        "trend",
        "mini chart",
        "inline chart",
        "micro chart",
        "kpi",
        "stat"
      ],
      "usage": {
        "description": "Use Sparkline next to a number to show where it has been — a KPI's last 30 days in a stat card, a row's trend in a table. It has no axes, tooltip or values to read off; when the reader needs those, use AreaChart or LineChart.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Pair it with the current value and its change in text; the sparkline shows only the shape."
          },
          {
            "guidance": "do",
            "description": "Give it a label that names the measure and the period — the spoken summary adds the range and latest value."
          },
          {
            "guidance": "dont",
            "description": "Put two sparklines on one shared axis to compare them — each scales to its own data; use LineChart."
          },
          {
            "guidance": "dont",
            "description": "Use it as the only place a number appears; a shape without a value cannot be read off."
          }
        ]
      },
      "related": {
        "components": [
          "AreaChart",
          "LineChart",
          "Card",
          "Table"
        ]
      },
      "props": [
        {
          "name": "data",
          "type": "number[]",
          "description": "The values, oldest first."
        },
        {
          "name": "label",
          "type": "string",
          "description": "What the line tracks (\"Revenue, last 30 days\"). The spoken summary adds the first and last values, low and high."
        },
        {
          "name": "variant",
          "type": "\"line\" | \"area\" | \"bar\"",
          "default": "\"line\"",
          "description": "A line, a line over a soft fill, or columns."
        },
        {
          "name": "tone",
          "type": "\"1\" | \"2\" | \"3\" | \"info\" | \"warning\" | \"primary\" | \"neutral\" | \"success\" | \"destructive\"",
          "default": "\"primary\"",
          "description": "Colour by role."
        },
        {
          "name": "className",
          "type": "string",
          "default": "\"h-8 w-24\"",
          "description": "Sizes it; the drawing stretches to fit."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Drawing on (or rising) is the flourish, so `subtle` and `off` show the finished line."
        },
        {
          "name": "animate",
          "type": "boolean",
          "default": "true",
          "description": "Draw on (or rise) when it scrolls into view. `animate={false}` is `motion=\"subtle\"`.",
          "deprecated": "motion=\"subtle\" (what animate={false} now maps to) or motion=\"off\""
        },
        {
          "name": "locale",
          "type": "string",
          "default": "runtime locale",
          "description": "BCP 47 locale for default number and date formatting."
        }
      ],
      "variants": {
        "variant": [
          "line",
          "area",
          "bar"
        ]
      },
      "tokensUsed": [
        "primary",
        "tone-1",
        "tone-2",
        "tone-3",
        "tone-info",
        "tone-warning",
        "muted-foreground",
        "success",
        "destructive",
        "destructive-mark",
        "success-mark",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "custom",
          "part": "Line / bars",
          "why": "Once on screen the line draws on (or the bars rise, in sequence). On the motion tokens; reduced motion shows the finished drawing. The arrival is expressive: it plays at the full motion level only, so `motion=\"subtle\"` (or a subtle app policy) shows the finished line."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Sparkline",
          "why": "Not interactive: it has no tooltip or focus."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Sparkline",
          "why": "New data redraws in place; a word-sized chart animating on every update would distract from the number beside it."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Sparkline",
          "why": "No indeterminate state."
        }
      ],
      "a11y": [
        "Rendered role=img with an aria-label built from `label` and the data: \"Revenue, last 30 days: from 120 to 184, low 96, high 190\".",
        "It is not focusable and has no tooltip, so the number it accompanies must be in text beside it."
      ],
      "examples": [
        {
          "label": "In a stat card",
          "code": "<Card>\n\t<CardHeader>\n\t\t<CardDescription>Revenue</CardDescription>\n\t\t<CardTitle className=\"text-mono-xl\">$18,240</CardTitle>\n\t\t<CardAction>\n\t\t\t<Sparkline label=\"Revenue, last 12 weeks\" data={[12, 14, 13, 17, 16, 19, 18, 21, 20, 24, 23, 26]} variant=\"area\" tone=\"success\" />\n\t\t</CardAction>\n\t</CardHeader>\n</Card>",
          "imports": "import { Card, CardAction, CardDescription, CardHeader, CardTitle, Sparkline } from \"@sableui/react\""
        },
        {
          "label": "Columns in a table cell",
          "code": "<Sparkline label=\"Daily signups, last 14 days\" data={[4, 6, 3, 8, 7, 9, 5, 6, 10, 8, 7, 11, 9, 12]} variant=\"bar\" className=\"h-6 w-20\" />",
          "imports": "import { Sparkline } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Spinner",
      "status": "stable",
      "group": "Loading & progress",
      "register": "either",
      "path": "components/spinner",
      "summary": "Pure SVG activity indicator. No Base UI, no icon dependency — a role=status ring (faint track + rounded-cap arc) that inherits the current text color. Size with the size prop (sm / md / lg), color with text-*.",
      "keywords": [
        "spinner",
        "loading",
        "pending",
        "indeterminate"
      ],
      "usage": {
        "description": "Use Spinner for short indeterminate waits where the user cannot know exact progress.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it in compact panels or places where layout is already stable. In a button, use Button's loading prop rather than placing a Spinner by hand — it disables the button, sets aria-busy and sizes the spinner to the button's icon."
          },
          {
            "guidance": "do",
            "description": "Pair it with accessible loading text when the surrounding label is not enough."
          },
          {
            "guidance": "dont",
            "description": "Do not use Spinner as the only content for long waits or full page loading.",
            "instead": [
              "Skeleton",
              "PageLoader"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it without an accessible name or a nearby status message. A spinning icon is invisible to a screen reader, so the wait is announced as nothing at all."
          }
        ]
      },
      "related": {
        "components": [
          "Skeleton",
          "Progress"
        ]
      },
      "props": [
        {
          "name": "label",
          "type": "string",
          "default": "\"Loading\"",
          "description": "Accessible label announced by screen readers while visible (sets aria-label on the role=status element)."
        },
        {
          "name": "appearance",
          "type": "\"ring\" | \"dots\"",
          "default": "\"ring\"",
          "description": "ring is the default indicator; dots are three bouncing dots, softer, for chat and inline text."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "One scale for both appearances: ring 14 / 16 / 24px, dots 4 / 6 / 8px."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Color (text-*); the ring's strokes use currentColor, so it follows the text color. Size with the size prop — a size-* class still overrides the ring for an off-scale context (Button sizes its own spinner this way), but is not the way to pick a size."
        }
      ],
      "variants": {
        "appearance": [
          "ring",
          "dots"
        ],
        "size": [
          "sm",
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "primary-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A spinner already signals a wait. Fading it in delays the signal for exactly as long as the user most needs it."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Root",
          "why": "It is a status indicator, not a control."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "One state. Whatever replaces it on completion owns that change."
        },
        {
          "slot": "activity",
          "recipe": "motion-spin",
          "part": "Root",
          "why": "The rotation is the whole component — it is the only thing distinguishing 'working' from 'frozen'. motion-spin rather than Tailwind's animate-spin because the built-in ignores --motion-scale, so the reduced-motion policy cannot freeze it."
        }
      ],
      "a11y": [
        "Wrapped in role=status, a polite live region, with an aria-label (default 'Loading').",
        "Color comes from currentColor; pair with a text-* token for adequate contrast.",
        "Spins with the motion-spin utility, which follows --motion-scale, so it slows and stops with the motion setting and reduced-motion."
      ],
      "examples": [
        {
          "label": "Dots",
          "code": "<Spinner appearance=\"dots\" label=\"Assistant is typing\" className=\"text-muted-foreground\" />",
          "imports": "import { Spinner } from \"@sableui/react\""
        },
        {
          "label": "Default",
          "code": "<Spinner />",
          "imports": "import { Spinner } from \"@sableui/react\""
        },
        {
          "label": "Sized + tinted",
          "code": "<Spinner size=\"lg\" className=\"text-muted-foreground\" />",
          "imports": "import { Spinner } from \"@sableui/react\""
        },
        {
          "label": "Inside a button (Button owns it — use loading)",
          "code": "<Button loading>Saving</Button>",
          "imports": "import { Button } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "StatusBar",
      "status": "stable",
      "group": "Layout",
      "register": "workspace",
      "path": "components/status-bar",
      "summary": "The bottom chrome strip of a Workspace: ambient document facts — dimensions, counts, sync state — in the micro type tier.",
      "keywords": [
        "status bar",
        "status",
        "footer",
        "chrome",
        "workspace",
        "tool",
        "ambient",
        "counts",
        "document"
      ],
      "usage": {
        "description": "Use StatusBar for the persistent facts about a document that otherwise have nowhere to live: size, counts, selection state, sync or connection status. Everything in it is ambient — it reports, it does not command. Pair it with Workspace's statusBar slot.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Put document-scoped facts here — dimensions, layer or record counts, saved/sync state — so panels stop competing for that space."
          },
          {
            "guidance": "do",
            "description": "Use StatusBarGroup with align=\"end\" for the trailing cluster, and StatusBarSeparator between related facts."
          },
          {
            "guidance": "do",
            "description": "Render numeric facts in the UI num tier so a changing value doesn't shift the strip's layout."
          },
          {
            "guidance": "dont",
            "description": "Make it the only route to an action. It's ambient chrome at the micro tier — anything essential needs a real control elsewhere too."
          },
          {
            "guidance": "dont",
            "description": "Put zoom here. Anchor zoom to the canvas it acts on, which is where every reference tool puts it."
          },
          {
            "guidance": "dont",
            "description": "Use it for transient feedback like a save confirmation — that's Toast. A status bar states what is true, not what just happened."
          },
          {
            "guidance": "dont",
            "description": "Derive a fact here separately from the surface that shows it, or from something expensive to recompute. The strip re-renders with the document, so read the same value the canvas or panel uses: a status bar that reports max(asset sizes) while the canvas reports something else is a bug types cannot catch, because both are numbers."
          }
        ],
        "anatomy": [
          {
            "name": "StatusBarGroup",
            "required": false,
            "description": "A cluster of items; align=\"end\" pins it to the trailing edge."
          },
          {
            "name": "StatusBarSeparator",
            "required": false,
            "description": "A decorative dot between related facts; aria-hidden."
          }
        ]
      },
      "related": {
        "components": [
          "Workspace",
          "PanelGroup",
          "InlineStatus",
          "Toast",
          "Banner"
        ]
      },
      "props": [],
      "subcomponents": [
        {
          "name": "StatusBarGroup",
          "type": "{ align?: 'start' | 'end' }",
          "description": "A cluster of status items; `end` pushes it to the trailing edge."
        },
        {
          "name": "StatusBarSeparator",
          "type": "ComponentProps<'span'>",
          "description": "A decorative middle dot between facts. aria-hidden, since order conveys grouping."
        }
      ],
      "tokensUsed": [
        "muted-foreground",
        "panel",
        "hairline",
        "hairline-strong"
      ],
      "a11y": [
        "Renders a <footer>, so the strip is a discoverable region rather than an anonymous row of text.",
        "Separators are aria-hidden — a screen reader announcing 'middle dot' between every fact is noise.",
        "Micro-tier text is small by design; never put information here that exists nowhere else."
      ],
      "examples": [
        {
          "label": "Document facts with a trailing cluster",
          "code": "<StatusBar>\n  <span className=\"text-ui-num\">1024 × 768</span>\n  <StatusBarSeparator />\n  <span>3 layers</span>\n  <StatusBarGroup align=\"end\">\n    <span>Saved</span>\n  </StatusBarGroup>\n</StatusBar>",
          "imports": "import { StatusBar, StatusBarGroup, StatusBarSeparator } from \"@sableui/react\""
        },
        {
          "label": "With a warning tone",
          "code": "<StatusBar>\n  <span>Offline — edits are queued</span>\n  <StatusBarGroup align=\"end\">\n    <span className=\"text-tone-warning\">2 unsynced</span>\n  </StatusBarGroup>\n</StatusBar>",
          "imports": "import { StatusBar, StatusBarGroup } from \"@sableui/react\""
        },
        {
          "label": "In a Workspace",
          "code": "<Workspace statusBar={<StatusBar><span>Connected</span></StatusBar>}>\n  <PanelGroup>\n    <WorkspaceCanvas />\n  </PanelGroup>\n</Workspace>",
          "imports": "import { PanelGroup, StatusBar, Workspace, WorkspaceCanvas } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "StatusDot",
      "status": "stable",
      "group": "Badges & pills",
      "register": "either",
      "path": "components/status-dot",
      "summary": "A small colored status dot. Tone variants encode state via semantic tone tokens; sizes scale the diameter. Decorative (aria-hidden) — pair with text. Optional pulse adds a live ping ring.",
      "keywords": [
        "status",
        "dot",
        "presence",
        "health",
        "state",
        "online",
        "live",
        "indicator"
      ],
      "usage": {
        "description": "Use StatusDot as a compact visual state cue next to text, avatars, rows, or labels. It is decorative by design, so pair it with visible text or use `<Badge appearance=\"plain\" dot>` when the label and dot should travel together — that is the labelled status line, not a hand-built row.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Place StatusDot beside a readable state label, person name, or row title."
          },
          {
            "guidance": "do",
            "description": "Use pulse only for live or in-progress states that are actively changing."
          },
          {
            "guidance": "dont",
            "description": "Use the dot as the only status indicator; it is aria-hidden and color alone is not enough."
          },
          {
            "guidance": "dont",
            "description": "Mix many dot sizes in the same list. Keep row indicators visually consistent."
          }
        ],
        "anatomy": [
          {
            "name": "Dot",
            "required": true,
            "description": "The small tone-colored circle. It is decorative and hidden from assistive tech."
          },
          {
            "name": "Pulse ring",
            "required": false,
            "description": "Optional motion ring for in-progress or live states."
          }
        ]
      },
      "related": {
        "components": [
          "Badge",
          "Avatar",
          "InlineStatus"
        ],
        "patterns": [
          "DashboardPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "tone",
          "type": "\"neutral\" | \"1\" | \"2\" | \"3\" | \"success\" | \"warning\" | \"info\" | \"destructive\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\"",
          "default": "\"neutral\"",
          "description": "Semantic color of the dot, or a palette family (red … pink) for a category legend."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Dot diameter."
        },
        {
          "name": "pulse",
          "type": "boolean",
          "default": "false",
          "description": "Wrap the dot in an animated ping ring to signal a live state."
        }
      ],
      "variants": {
        "tone": [
          "neutral",
          "1",
          "2",
          "3",
          "success",
          "warning",
          "info",
          "destructive",
          "red",
          "orange",
          "yellow",
          "green",
          "teal",
          "blue",
          "purple",
          "pink"
        ],
        "size": [
          "sm",
          "md",
          "lg"
        ]
      },
      "tokensUsed": [
        "palette-dot",
        "muted-foreground",
        "tone-3",
        "success",
        "tone-warning",
        "tone-info",
        "tone-1",
        "tone-2",
        "destructive",
        "destructive-mark",
        "success-mark",
        "tone-warning-mark",
        "tone-info-mark",
        "tone-1-mark",
        "tone-2-mark",
        "tone-3-mark"
      ],
      "a11y": [
        "Rendered aria-hidden — purely decorative. Convey status in adjacent text, not color alone.",
        "A dot conveys state through colour alone, which fails for colour-blind users and announces as nothing. It must always sit beside text that states the same thing, or carry its own accessible name."
      ],
      "examples": [
        {
          "label": "Tones",
          "code": "<Row gap={2}><StatusDot tone=\"3\" /><StatusDot tone=\"info\" /><StatusDot tone=\"warning\" /><StatusDot tone=\"destructive\" /></Row>",
          "imports": "import { Row, StatusDot } from \"@sableui/react\""
        },
        {
          "label": "With label — use Badge",
          "code": "<Badge appearance=\"plain\" tone=\"success\" dot pulse>Live</Badge>",
          "imports": "import { Badge } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Stepper",
      "status": "stable",
      "group": "Loading & progress",
      "register": "page",
      "path": "components/stepper",
      "summary": "Where the user is in a multi-step flow — an ordered list of numbered steps, horizontal or vertical, each complete, current, upcoming or in error, with aria-current=\"step\" on the current one. `indicator=\"dot\"` turns it into a timeline of events (an order's delivery) with dots instead of numbers.",
      "keywords": [
        "stepper",
        "steps",
        "wizard",
        "multi-step form",
        "checkout steps",
        "onboarding progress",
        "progress steps",
        "timeline"
      ],
      "usage": {
        "description": "Use Stepper above or beside a flow that is split into a known, small number of named steps — checkout, onboarding, an import wizard — so the user can see how far they have come and what is left. It reports position; the flow's own Back and Continue buttons move it.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Drive it from one number (`current`) and override a single step's `status` only for what a number cannot say — a completed step that now needs attention is `status=\"error\"`."
          },
          {
            "guidance": "do",
            "description": "Name steps with a word or two (\"Shipping\", \"Payment\"). Go vertical when steps need a description or there are more than five; horizontal titles truncate first."
          },
          {
            "guidance": "do",
            "description": "Give completed steps `onSelect` only when going back to edit them actually works, and keep the user's later answers when they do."
          },
          {
            "guidance": "dont",
            "description": "Do not use Stepper for a task with unknown length or for a percentage. That is Progress; a stepper promises a fixed set of named stops.",
            "instead": [
              "Progress"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it as navigation between independent sections. Sections the user can visit in any order are Tabs; a stepper implies each step depends on the one before.",
            "instead": [
              "Tabs"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not make upcoming steps pressable to skip ahead. A step that looks reachable but is not is worse than one that is plainly locked."
          }
        ],
        "anatomy": [
          {
            "name": "Stepper",
            "required": true,
            "description": "The ordered list. Takes `current` and `orientation`, and an aria-label naming the flow."
          },
          {
            "name": "StepperItem",
            "required": true,
            "description": "One step: a numbered disc (a check when complete, a warning mark on error) — or, with `indicator=\"dot\"`, a dot centred on the title's first line — a title, and an optional description."
          },
          {
            "name": "Connector",
            "required": false,
            "description": "The line to the next step, filled once this step is complete. Drawn automatically between items."
          }
        ]
      },
      "related": {
        "components": [
          "Progress",
          "Tabs",
          "Form",
          "Button"
        ]
      },
      "props": [
        {
          "name": "current",
          "type": "number",
          "default": "0",
          "description": "Zero-based index of the current step. Earlier steps derive complete, later ones upcoming."
        },
        {
          "name": "orientation",
          "type": "\"horizontal\" | \"vertical\"",
          "default": "\"horizontal\"",
          "description": "Horizontal for a short flow across the top of a form; vertical for long flows, narrow columns or steps with descriptions. A horizontal stepper narrower than 28rem (a phone) compacts itself: every disc stays, only the current step's title shows, and the other titles stay for screen readers. No breakpoint code needed."
        },
        {
          "name": "indicator",
          "type": "\"number\" | \"dot\"",
          "default": "\"number\"",
          "description": "`number` for a flow the user moves through; `dot` for a timeline of events (delivery tracking, a document's history) where the position number adds nothing. The dot centres on the title's first line and scales with its type at every density."
        },
        {
          "name": "statusLabels",
          "type": "Partial<Record<StepStatus, string>>",
          "description": "Screen-reader status words appended to each title (Completed, Current step, Not started, Needs attention). Override to localize."
        },
        {
          "name": "aria-label",
          "type": "string",
          "description": "Names the flow (\"Checkout progress\"). Every Stepper needs one."
        }
      ],
      "subcomponents": [
        {
          "name": "StepperItem",
          "type": "{ title: ReactNode; description?: ReactNode; status?: StepStatus; onSelect?: () => void } + li props",
          "description": "One step. `status` overrides the derived state; `onSelect` makes the disc and title a button for returning to the step."
        }
      ],
      "variants": {
        "orientation": [
          "horizontal",
          "vertical"
        ],
        "indicator": [
          "number",
          "dot"
        ],
        "status": [
          "complete",
          "current",
          "upcoming",
          "error"
        ]
      },
      "tokensUsed": [
        "primary",
        "primary-foreground",
        "background",
        "foreground",
        "muted-foreground",
        "border-strong",
        "destructive",
        "destructive-foreground",
        "ring",
        "destructive-mark"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Stepper",
          "why": "The stepper frames the flow and is on screen before any step is. Animating it in would compete with the step content, which is what changed."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "StepperItem",
          "why": "Only steps with onSelect respond, and the eased underline is what tells a returning user that this completed step can be reopened while the upcoming ones cannot."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Indicator",
          "why": "When the user continues, the disc they leave fills and its connector darkens. Easing the colour makes that read as one step completing rather than the whole bar re-rendering."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Stepper",
          "why": "A step is a place, not a process. Saving or validating between steps belongs on the Continue button's loading state; a pulsing disc would suggest the step itself is busy."
        }
      ],
      "a11y": [
        "Renders an ordered list, so assistive tech announces the step count and each step's position.",
        "The current step carries aria-current=\"step\"; every title also gets a visually hidden status word (Completed, Not started, Needs attention), so state never depends on colour or the disc glyph.",
        "Discs and connectors are aria-hidden — the number is already the list position.",
        "Steps with onSelect render as native buttons with a visible focus ring; steps without it are not focusable."
      ],
      "examples": [
        {
          "label": "Checkout",
          "code": "<Stepper current={1} aria-label=\"Checkout progress\">\n\t<StepperItem title=\"Cart\" />\n\t<StepperItem title=\"Shipping\" />\n\t<StepperItem title=\"Payment\" />\n\t<StepperItem title=\"Review\" />\n</Stepper>",
          "imports": "import { Stepper, StepperItem } from \"@sableui/react\""
        },
        {
          "label": "Vertical with descriptions",
          "code": "<Stepper orientation=\"vertical\" current={2} aria-label=\"Workspace setup\">\n\t<StepperItem title=\"Create account\" description=\"Email verified\" />\n\t<StepperItem title=\"Invite team\" description=\"3 people invited\" />\n\t<StepperItem title=\"Connect data\" description=\"Choose a source to import from\" />\n\t<StepperItem title=\"Launch\" />\n</Stepper>",
          "imports": "import { Stepper, StepperItem } from \"@sableui/react\""
        },
        {
          "label": "Delivery timeline (dots)",
          "code": "<Stepper orientation=\"vertical\" indicator=\"dot\" current={2} aria-label=\"Delivery status\">\n\t<StepperItem title=\"Order placed\" description=\"Oct 9, 10:14 AM\" />\n\t<StepperItem title=\"Printed and packed\" description=\"Oct 10, 4:02 PM\" />\n\t<StepperItem title=\"Out for delivery\" description=\"Arriving today by 6 PM\" />\n\t<StepperItem title=\"Delivered\" />\n</Stepper>",
          "imports": "import { Stepper, StepperItem } from \"@sableui/react\""
        },
        {
          "label": "A completed step with an error",
          "code": "<Stepper current={2} aria-label=\"Checkout progress\">\n\t<StepperItem title=\"Cart\" onSelect={() => console.log(\"cart\")} />\n\t<StepperItem title=\"Shipping\" status=\"error\" description=\"Address needs a postcode\" onSelect={() => console.log(\"shipping\")} />\n\t<StepperItem title=\"Payment\" />\n</Stepper>",
          "imports": "import { Stepper, StepperItem } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "StreamingText",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/streaming-text",
      "summary": "Prose arriving from a live source, a token at a time. Each token resolves out of blur, the trailing edge stays soft while more is coming, and a steady caret marks the write head.",
      "keywords": [
        "streaming",
        "stream",
        "tokens",
        "typewriter",
        "generation",
        "assistant",
        "llm",
        "caret",
        "incremental"
      ],
      "usage": {
        "description": "Use StreamingText for text whose final length is unknown while it renders — a model's answer, a live transcript, a log line being written. It is the counterpart to ThinkingOrb and Spinner: those cover the wait BEFORE the first token, this covers the arrival of the tokens themselves.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "In a chat, read `sable docs building-a-chat`: one status drives `streaming` and the composer, a regenerated answer takes a new key (the text is append-only), and the finished turn is announced once."
          },
          {
            "guidance": "do",
            "description": "Grow `text` and let the component do the rest. It assumes an append-only string and keys units by index, so React mounts only the new spans — re-rendering a longer string animates what was added and leaves what the reader has already read alone."
          },
          {
            "guidance": "do",
            "description": "Drop `streaming` to false the moment the source closes. That is what removes the caret and the softened tail, and their disappearance is the only signal the reader gets that the answer is complete."
          },
          {
            "guidance": "do",
            "description": "Turn `caret` off when something adjacent already reports the wait — a spinner in the message header, a status row beneath. Two indicators for one wait read as two things happening."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for text that is already complete. Staging known text on scroll is TextReveal (a `motion` export, not a component folder), which computes a stagger from the full string; StreamingText cannot, because nothing here knows the length. Using it for static prose animates the whole paragraph on every mount and says 'still generating' about something that finished."
          },
          {
            "guidance": "dont",
            "description": "Do not wrap it in an aria-live region. Every token would be announced, which is unusable; the component sets `aria-busy` instead. Announce once when the turn settles, from whatever owns the turn."
          },
          {
            "guidance": "dont",
            "description": "Do not pass `split=\"char\"` for paragraph-length text. It is one element per character — thousands of nodes for an answer, each with its own animation — and word-splitting is indistinguishable at prose reading speed. Reserve it for a headline-length string."
          }
        ],
        "anatomy": [
          {
            "name": "Container",
            "required": true,
            "description": "The paragraph (or `as` element). Carries `aria-busy` while output is incomplete."
          },
          {
            "name": "Unit",
            "required": true,
            "description": "One word or character. Animates once on mount and never again; the newest one carries the softened tail while streaming."
          },
          {
            "name": "Caret",
            "required": false,
            "description": "The write head, shown while streaming. Steady rather than blinking — see `motion-caret`."
          }
        ]
      },
      "related": {
        "components": [
          "ThinkingOrb",
          "Message",
          "Bubble"
        ]
      },
      "props": [
        {
          "name": "text",
          "type": "string",
          "description": "The text received so far. Assumed append-only: the component keys units by index precisely so a grown string mounts only its new spans."
        },
        {
          "name": "streaming",
          "type": "boolean",
          "default": "false",
          "description": "Whether more is still coming. Drives the caret, the softened trailing edge, and `aria-busy`."
        },
        {
          "name": "as",
          "type": "ElementType",
          "default": "\"p\"",
          "description": "Render container element."
        },
        {
          "name": "split",
          "type": "\"word\" | \"char\"",
          "default": "\"word\"",
          "description": "Split granularity. `char` is one element per character — short strings only."
        },
        {
          "name": "caret",
          "type": "boolean",
          "default": "true",
          "description": "Show the caret while streaming. Turn it off when something adjacent already reports the wait."
        }
      ],
      "tokensUsed": [
        "foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-stream-in",
          "part": "Unit",
          "why": "Each token resolves out of blur rather than fading. A fade makes every word a separate event; blur reads as the word coming into focus, so a paragraph arrives as one sentence being written instead of a queue of arrivals."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Container",
          "why": "It is prose, not a control. Selecting and copying it is the only interaction, and both are native."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Container",
          "why": "There is no state to move between — streaming to complete is marked by the caret and tail leaving, not by the text changing. Animating the whole paragraph on completion would re-stage text the reader already read."
        },
        {
          "slot": "activity",
          "recipe": "motion-caret",
          "part": "Caret",
          "why": "The caret is the write head, and it is deliberately STEADY (`data-streaming=\"true\"` suppresses the blink). A blink during arrival puts two rhythms on screen — text advancing at one rate, a caret flashing at another — and the flashing one carries no information the moving text has not already given."
        }
      ],
      "a11y": [
        "The text is real text in the accessibility tree: units are ordinary spans, not aria-hidden fragments, so a screen reader concatenates them into the sentence.",
        "`aria-busy` is set on the container while `streaming` is true, marking the output incomplete without announcing each token.",
        "The caret is `aria-hidden` — it is a rendering of the write head, and a screen reader has no use for it.",
        "Under reduced motion or with MotionProvider off, no unit animates and no tail is softened; text simply appears as it arrives."
      ],
      "examples": [
        {
          "label": "Streaming an answer",
          "code": "<StreamingText text={answer} streaming={pending} />",
          "imports": "import { StreamingText } from \"@sableui/react\""
        },
        {
          "label": "Inside a message, with the wait reported elsewhere",
          "code": "<Message align=\"start\"><StreamingText text={answer} streaming={pending} caret={false} /></Message>",
          "imports": "import { Message, StreamingText } from \"@sableui/react\""
        },
        {
          "label": "A headline resolving character by character",
          "code": "<StreamingText as=\"h2\" split=\"char\" className=\"text-heading-2\" text={headline} streaming={pending} />",
          "imports": "import { StreamingText } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Switch",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/switch",
      "summary": "Binary on/off toggle for immediate-effect settings. Track fills with the primary tone when checked; the thumb slides on a spring-eased transform (mirrored in RTL). The thumb is white in both states, like every physical toggle, and turns dark only on a near-white track (a dark mode's light primary). Themes can set --theme-switch-thumb-on.",
      "keywords": [
        "switch",
        "toggle setting",
        "on off",
        "form control"
      ],
      "usage": {
        "description": "Use Switch for immediate on/off settings that take effect as a persistent preference or mode.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for binary settings where the label describes the enabled state."
          },
          {
            "guidance": "do",
            "description": "Make the current state obvious through both position and accessible text."
          },
          {
            "guidance": "dont",
            "description": "Do not phrase the label as a negative, such as \"Don't send read receipts\". Turning off a negative is a double negative, and the user has to solve it before they can act."
          },
          {
            "guidance": "dont",
            "description": "Do not use Switch for one-time agreement, multi-select choices, or submit-only booleans.",
            "instead": [
              "Checkbox",
              "Radio"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use a Switch whose effect is not immediately visible somewhere. A toggle flipped with no observable consequence gives no confirmation it worked, so the user flips it again to check."
          }
        ]
      },
      "related": {
        "components": [
          "Checkbox",
          "Toggle",
          "ThemeSwitcher"
        ]
      },
      "props": [
        {
          "name": "checked",
          "type": "boolean",
          "description": "Controlled on/off state. Pair with onCheckedChange. Omit for an uncontrolled switch."
        },
        {
          "name": "defaultChecked",
          "type": "boolean",
          "default": "false",
          "description": "Initial state for an uncontrolled switch."
        },
        {
          "name": "onCheckedChange",
          "type": "(checked: boolean, eventDetails) => void",
          "description": "Fired when the switch is toggled. Note: Base UI passes a second eventDetails arg — not the common (checked) => void, so a single-arg handler must widen its signature."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Dims the control and ignores user interaction."
        },
        {
          "name": "readOnly",
          "type": "boolean",
          "default": "false",
          "description": "Prevents toggling while keeping the control fully visible."
        },
        {
          "name": "required",
          "type": "boolean",
          "default": "false",
          "description": "Marks the switch as required when inside a form."
        },
        {
          "name": "name",
          "type": "string",
          "description": "Identifies the field when the enclosing form is submitted."
        }
      ],
      "tokensUsed": [
        "input",
        "primary",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Switches arrive as part of a settings list. Animating each one in turns a form into a title sequence."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Root",
          "why": "The track is small and its hover change is subtle; without the ease the colour shift reads as a rendering glitch rather than a reaction."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Thumb",
          "why": "The thumb sliding IS the affordance — it shows the control has two ends and which one you are now at. Teleporting the thumb makes on and off two unrelated pictures, and users re-read the label to work out which they are looking at. motion-interactive is the right recipe because it declares `translate`, so the thumb transform and the track colour ease on one timeline instead of two."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "A switch commits instantly. If the write is slow enough to need a pending state, the surrounding form owns that, not the control."
        }
      ],
      "a11y": [
        "Renders Base UI's Switch with a hidden native <input> — role, ARIA, and keyboard (Space/Enter) toggling come for free.",
        "Focus-visible draws a 2px ring in the --ring token.",
        "Disabled state sets cursor-not-allowed and 50% opacity; readOnly keeps full contrast but blocks changes.",
        "Give it an accessible name: wrap it in <Field label=… orientation=\"horizontal\">, which wires the label for you."
      ],
      "examples": [
        {
          "label": "Default (uncontrolled)",
          "code": "<Switch defaultChecked />",
          "imports": "import { Switch } from \"@sableui/react\""
        },
        {
          "label": "Controlled",
          "code": "<Switch checked={on} onCheckedChange={setOn} />",
          "imports": "import { Switch } from \"@sableui/react\""
        },
        {
          "label": "Disabled",
          "code": "<Switch disabled defaultChecked />",
          "imports": "import { Switch } from \"@sableui/react\""
        },
        {
          "label": "With a label",
          "code": "<Field label=\"Reduce motion\" orientation=\"horizontal\"><Switch defaultChecked /></Field>",
          "imports": "import { Field, Switch } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Table",
      "status": "stable",
      "group": "Data display",
      "register": "either",
      "path": "components/table",
      "summary": "Styled native table subcomponents (Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption). Horizontally scrollable frame, hairline row borders, hover-lift, selectable rows via data-selected, and sortable column headers (TableHead sortable).",
      "keywords": [
        "table",
        "data table",
        "rows",
        "columns",
        "grid",
        "caption",
        "header",
        "cell",
        "tabular"
      ],
      "usage": {
        "description": "Use Table for structured data with consistent columns and rows. Use DataTable when the table should be data-driven with sorting or empty state behavior, and use lists or cards when each item has a different shape.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use TableCaption and TableHead so the table has a clear purpose and column semantics."
          },
          {
            "guidance": "do",
            "description": "Keep cells concise and scannable; compose Badge, StatusDot, Avatar, or Button only when they clarify the row."
          },
          {
            "guidance": "do",
            "description": "Use the built-in horizontal frame for overflow instead of squeezing columns until content becomes unreadable."
          },
          {
            "guidance": "do",
            "description": "Put a table in a card with `<CardContent flush>`. The first and last columns then take the card's own padding (`--table-edge-px`), so they line up with the CardHeader at any density. Never hand-set `pl-6`/`pr-6` on edge cells."
          },
          {
            "guidance": "dont",
            "description": "Use Table for heterogeneous items with no stable columns. Use Card, Entity, or a list composition instead.",
            "instead": [
              "Card",
              "Entity"
            ]
          },
          {
            "guidance": "dont",
            "description": "Put every possible action in every row. Use one primary row action, an OverflowMenu, or row detail navigation."
          }
        ],
        "anatomy": [
          {
            "name": "Caption",
            "required": false,
            "description": "Accessible summary of what the table contains."
          },
          {
            "name": "Header",
            "required": true,
            "description": "Column labels rendered with TableHead cells."
          },
          {
            "name": "Body",
            "required": true,
            "description": "Rows and cells containing the tabular data."
          },
          {
            "name": "Footer",
            "required": false,
            "description": "Optional totals or summary row group."
          }
        ]
      },
      "related": {
        "components": [
          "DataTable",
          "Pagination",
          "Badge",
          "StatusDot",
          "Avatar"
        ],
        "patterns": [
          "DashboardPage",
          "ListDetailPage"
        ]
      },
      "props": [
        {
          "name": "className",
          "type": "string",
          "description": "The root renders a horizontally scrollable frame around a native <table>; forwards all native table attributes plus className. Each subcomponent likewise forwards its element's native attributes + className."
        }
      ],
      "subcomponents": [
        {
          "name": "TableHeader",
          "type": "ComponentPropsWithRef<\"thead\">",
          "description": "The header row group (thead)."
        },
        {
          "name": "TableBody",
          "type": "ComponentPropsWithRef<\"tbody\">",
          "description": "The data row group (tbody)."
        },
        {
          "name": "TableFooter",
          "type": "ComponentPropsWithRef<\"tfoot\">",
          "description": "Summary row group (tfoot) with a muted fill."
        },
        {
          "name": "TableRow",
          "type": "ComponentPropsWithRef<\"tr\">",
          "description": "A row (tr) — hairline bottom border, hover lift, and a selected state via the data-selected attribute."
        },
        {
          "name": "TableHead",
          "type": "ComponentPropsWithRef<\"th\"> & { numeric?: boolean; sortable?: boolean; sortDirection?: \"asc\" | \"desc\" | null; onSort?: () => void }",
          "description": "A column header cell (th) in muted label styling. `numeric` marks a number column: end-aligned, tabular figures — set it on the column's cells too. `sortable` turns the header's content into the sort control: a ghost button on the column's text edge that calls `onSort`, with one chevron that rotates for `sortDirection` (resting at 60% when unsorted; leading in a numeric column) and `aria-sort` on the cell. The table does not sort — order the rows in `onSort`, or use DataTable, which renders this part."
        },
        {
          "name": "TableCell",
          "type": "ComponentPropsWithRef<\"td\"> & { numeric?: boolean }",
          "description": "A data cell (td). `numeric` end-aligns it with tabular figures, matching its column's header."
        },
        {
          "name": "TableCaption",
          "type": "ComponentPropsWithRef<\"caption\">",
          "description": "Accessible description of the table (caption), muted."
        }
      ],
      "tokensUsed": [
        "border",
        "muted",
        "muted-foreground"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "A table renders with the page it sits in. Staggering rows in delays reading data someone opened to scan."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "TableRow",
          "why": "Body rows ease to a muted wash under the pointer. Across a wide row, the wash is what keeps the eye on the right line, and eased it follows the cursor down the table rather than strobing."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "TableCell",
          "why": "A `data-selected` row's fill eases in on every cell together, so the selected row reads as one band being set rather than a stamp."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "TableHead sort chevron",
          "why": "A sortable header's one chevron turns between ascending and descending, so the reader sees the same column reverse rather than a different glyph land in its place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Table is markup. Loading rows are Skeletons, which carry the shimmer."
        }
      ],
      "a11y": [
        "Renders semantic native table elements (thead/tbody/tfoot/th/td/caption) preserving built-in table semantics.",
        "Use TableHead (th) for column headers and TableCaption for an accessible description.",
        "Mark the active row with the data-selected attribute for a visible selected state.",
        "A sortable TableHead is a real <button> inside the th, and the th carries aria-sort=ascending/descending while it is the sort."
      ],
      "examples": [
        {
          "label": "Orders",
          "code": "<Table>\n\t<TableCaption>Recent orders</TableCaption>\n\t<TableHeader>\n\t\t<TableRow>\n\t\t\t<TableHead>Customer</TableHead>\n\t\t\t<TableHead>Order</TableHead>\n\t\t\t<TableHead>Paid</TableHead>\n\t\t</TableRow>\n\t</TableHeader>\n\t<TableBody>\n\t\t<TableRow>\n\t\t\t<TableCell>@nova</TableCell>\n\t\t\t<TableCell>1042</TableCell>\n\t\t\t<TableCell>$48.00</TableCell>\n\t\t</TableRow>\n\t</TableBody>\n</Table>",
          "imports": "import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from \"@sableui/react\""
        },
        {
          "label": "Rich status cells",
          "code": "<Table><TableCaption>Deployments</TableCaption><TableHeader><TableRow><TableHead>Name</TableHead><TableHead>Status</TableHead><TableHead>Owner</TableHead><TableHead className=\"text-end\">Actions</TableHead></TableRow></TableHeader><TableBody><TableRow data-selected><TableCell>Catalog API</TableCell><TableCell><Badge appearance=\"plain\" tone=\"warning\" dot pulse>Building</Badge></TableCell><TableCell><Row gap={1}><Avatar fallback=\"NR\" alt=\"Nova Reed\" size=\"sm\" /><span>Nova</span></Row></TableCell><TableCell className=\"text-end\"><Button size=\"sm\" variant=\"ghost\">View</Button></TableCell></TableRow></TableBody></Table>",
          "imports": "import { Avatar, Badge, Button, Row, Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from \"@sableui/react\""
        },
        {
          "label": "Sortable headers",
          "code": "const [sort, setSort] = useState<{ key: string; direction: \"asc\" | \"desc\" } | null>(null)\nconst next = (key: string) =>\n\tsetSort((s) => (s?.key !== key ? { key, direction: \"asc\" } : s.direction === \"asc\" ? { key, direction: \"desc\" } : null))\nconst dir = (key: string) => (sort?.key === key ? sort.direction : null)\n\n<Table>\n\t<TableHeader>\n\t\t<TableRow>\n\t\t\t<TableHead sortable sortDirection={dir(\"customer\")} onSort={() => next(\"customer\")}>Customer</TableHead>\n\t\t\t<TableHead numeric sortable sortDirection={dir(\"paid\")} onSort={() => next(\"paid\")}>Paid</TableHead>\n\t\t</TableRow>\n\t</TableHeader>\n\t<TableBody>\n\t\t{sortOrders(orders, sort).map((o) => (\n\t\t\t<TableRow key={o.id}>\n\t\t\t\t<TableCell>{o.customer}</TableCell>\n\t\t\t\t<TableCell numeric>{o.paid}</TableCell>\n\t\t\t</TableRow>\n\t\t))}\n\t</TableBody>\n</Table>",
          "imports": "import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@sableui/react\""
        },
        {
          "label": "Flush in a card",
          "code": "<Card><CardHeader><CardTitle>Customers</CardTitle></CardHeader><CardContent flush><Table><TableHeader><TableRow><TableHead>Customer</TableHead><TableHead>Paid</TableHead></TableRow></TableHeader><TableBody><TableRow><TableCell>@nova</TableCell><TableCell>$48.00</TableCell></TableRow></TableBody></Table></CardContent></Card>",
          "imports": "import { Card, CardContent, CardHeader, CardTitle, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@sableui/react\""
        },
        {
          "label": "Summary footer",
          "code": "<Table><TableHeader><TableRow><TableHead>Item</TableHead><TableHead className=\"text-end\">Amount</TableHead></TableRow></TableHeader><TableBody><TableRow><TableCell>Studio plan</TableCell><TableCell className=\"text-end\">$192.00</TableCell></TableRow></TableBody><TableFooter><TableRow><TableCell>Total</TableCell><TableCell className=\"text-end\">$192.00</TableCell></TableRow></TableFooter></Table>",
          "imports": "import { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Tabs",
      "status": "stable",
      "group": "Navigation",
      "register": "either",
      "path": "components/tabs",
      "summary": "Tabs over Base UI Tabs (roving focus, arrow-key nav, ARIA tablist wiring) in two styles: underline (page sections) or pill (compact switchers), with one indicator that glides to the active tab. Tabs (Root) + TabsList + TabsTrigger + TabsPanel.",
      "keywords": [
        "tabs",
        "tablist",
        "panels",
        "segmented content"
      ],
      "usage": {
        "description": "Use Tabs to switch between related panels within the same page context.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use tabs when each panel is peer content and users may compare or switch often."
          },
          {
            "guidance": "do",
            "description": "In tool chrome (a WorkspaceBar, a compact panel header) use variant=\"pill\" for a view switch such as Overview / Issues / Updates: it reads as a control beside the bar's other controls. Underline is the page-section idiom; inside a WorkspaceBar it sits on the bar's hairline rather than drawing its own."
          },
          {
            "guidance": "do",
            "description": "Keep tab labels short and make the active tab unmistakable."
          },
          {
            "guidance": "do",
            "description": "Use variant=\"pill\" for a short switcher inside a card or toolbar (Preview / Code, List / Grid); keep the default underline for sections of a page."
          },
          {
            "guidance": "dont",
            "description": "Do not use Tabs for unrelated pages or primary navigation that needs distinct URLs.",
            "instead": [
              "SideNav",
              "NavigationMenu"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use tabs for sequential steps. Tabs are peer views the user returns to in any order; a process with an order needs a stepper, or the user will skip ahead.",
            "instead": [
              "Stepper"
            ]
          }
        ],
        "anatomy": [
          {
            "name": "TabsList",
            "required": true,
            "description": "The list of tab triggers."
          },
          {
            "name": "TabsTrigger",
            "required": true,
            "description": "One selectable tab."
          },
          {
            "name": "TabsPanel",
            "required": true,
            "description": "The content associated with a trigger."
          },
          {
            "name": "TabsContent",
            "required": false,
            "description": "Compatibility alias for panel content."
          }
        ]
      },
      "related": {
        "components": [
          "Accordion",
          "BottomNav",
          "SideNav"
        ]
      },
      "props": [
        {
          "name": "Tabs (Root)",
          "type": "Base UI Tabs.Root props (value, defaultValue, onValueChange, orientation)",
          "default": "defaultValue: 0",
          "description": "Controls the active tab. Uncontrolled via defaultValue; controlled via value + onValueChange. orientation=\"vertical\" sets the list beside its panels: a column of tabs ruled on its end edge, the mark travelling on y, and Up/Down arrows moving between tabs."
        },
        {
          "name": "orientation",
          "type": "\"horizontal\" | \"vertical\"",
          "default": "\"horizontal\"",
          "description": "On Tabs. vertical sets the list beside its panels: a column of tabs ruled on its end edge, the mark travelling on y, and Up/Down arrows moving between tabs. A horizontal list that overflows scrolls with an edge fade instead."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "On Tabs: how much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the glide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting."
        }
      ],
      "subcomponents": [
        {
          "name": "TabsList",
          "type": "Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: \"underline\" | \"pill\" + className",
          "description": "The tablist row. variant=\"underline\" (default) draws a divider rule beneath the triggers; variant=\"pill\" drops the rule and fills the active trigger, which takes the theme's button shape (--button-radius). Triggers inherit the variant. It renders the gliding indicator (Base UI Tabs.Indicator) itself, so do not add one. A horizontal list that is wider than its container scrolls sideways with no bar and an edge fade, and scrolls the newly active tab into view (the list only, never the page). Inside a WorkspaceBar, or when vertical, it does not scroll."
        },
        {
          "name": "TabsTrigger",
          "type": "Base UI Tabs.Tab props (value, disabled) + className",
          "description": "A single tab button. value pairs it with the panel of the same value."
        },
        {
          "name": "TabsPanel",
          "type": "Base UI Tabs.Panel props (value, keepMounted) + className",
          "description": "The content shown when the matching trigger is active."
        },
        {
          "name": "TabsContent",
          "type": "Alias of TabsPanel",
          "description": "Re-export of TabsPanel for consumers that prefer this name."
        }
      ],
      "tokensUsed": [
        "border",
        "muted",
        "muted-foreground",
        "foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "Tabs arrive with the section they organise. An entrance of their own would announce navigation chrome louder than the content it navigates."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "TabsTrigger",
          "why": "The label steps from muted to foreground under the pointer; the ease is what makes that read as an answer rather than a repaint."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "Indicator",
          "why": "One underline (or pill) travels to the new tab and stretches to its width. A mark that teleports makes the reader re-find the selection on every click; one that moves is tracked without looking. Expressive: motion=\"subtle\" lands it in place. Each tab's own mark is the fallback until the indicator has measured, so the server render is already right."
        },
        {
          "slot": "transition",
          "recipe": "animate-fade-in",
          "part": "TabsPanel",
          "why": "The incoming panel fades in, opacity only, so a switch between two similar panels still registers. Skipped on first render (activation direction \"none\") so a page of tabs does not fade in on load, and the outgoing panel leaves layout at once so a quick second click never stacks both."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Switching tabs is synchronous. A panel that loads data shows its own Skeleton or Spinner inside the panel, where the wait is."
        }
      ],
      "a11y": [
        "Base UI provides the tablist/tab/tabpanel roles, aria-selected, and roving tabindex.",
        "Arrow keys move between tabs; Home/End jump to first/last; panels are linked via aria-controls.",
        "Active tab styling reads from the data-active attribute; disabled tabs from data-disabled. Disabled tabs are skipped by arrow-key navigation.",
        "Keyboard focus shows a ring on the focused trigger in both variants (inset, because the list scrolls and clips at its edge), and on the panel, which Base UI keeps in the tab order.",
        "The gliding indicator is role=\"presentation\" decoration; aria-selected on the tab carries the state."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<Tabs defaultValue=\"overview\"><TabsList><TabsTrigger value=\"overview\">Overview</TabsTrigger><TabsTrigger value=\"activity\">Activity</TabsTrigger></TabsList><TabsPanel value=\"overview\">Overview content</TabsPanel><TabsPanel value=\"activity\">Activity content</TabsPanel></Tabs>",
          "imports": "import { Tabs, TabsList, TabsPanel, TabsTrigger } from \"@sableui/react\""
        },
        {
          "label": "Pill switcher",
          "code": "<Tabs defaultValue=\"preview\"><TabsList variant=\"pill\"><TabsTrigger value=\"preview\">Preview</TabsTrigger><TabsTrigger value=\"code\">Code</TabsTrigger></TabsList><TabsPanel value=\"preview\">Rendered example</TabsPanel><TabsPanel value=\"code\">Source</TabsPanel></Tabs>",
          "imports": "import { Tabs, TabsList, TabsPanel, TabsTrigger } from \"@sableui/react\""
        },
        {
          "label": "With a disabled tab",
          "code": "<Tabs defaultValue=\"overview\"><TabsList><TabsTrigger value=\"overview\">Overview</TabsTrigger><TabsTrigger value=\"billing\" disabled>Billing</TabsTrigger></TabsList><TabsPanel value=\"overview\">Overview content</TabsPanel></Tabs>",
          "imports": "import { Tabs, TabsList, TabsPanel, TabsTrigger } from \"@sableui/react\""
        },
        {
          "label": "Vertical",
          "code": "<Tabs defaultValue=\"general\" orientation=\"vertical\"><TabsList><TabsTrigger value=\"general\">General</TabsTrigger><TabsTrigger value=\"billing\">Billing</TabsTrigger><TabsTrigger value=\"members\">Members</TabsTrigger></TabsList><TabsPanel value=\"general\">General settings</TabsPanel><TabsPanel value=\"billing\">Billing settings</TabsPanel><TabsPanel value=\"members\">Member settings</TabsPanel></Tabs>",
          "imports": "import { Tabs, TabsList, TabsPanel, TabsTrigger } from \"@sableui/react\""
        },
        {
          "label": "Subtle motion",
          "code": "<Tabs defaultValue=\"table\" motion=\"subtle\"><TabsList><TabsTrigger value=\"table\">Table</TabsTrigger><TabsTrigger value=\"chart\">Chart</TabsTrigger></TabsList><TabsPanel value=\"table\">Rows</TabsPanel><TabsPanel value=\"chart\">Trend</TabsPanel></Tabs>",
          "imports": "import { Tabs, TabsList, TabsPanel, TabsTrigger } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Textarea",
      "status": "stable",
      "group": "Forms",
      "register": "either",
      "path": "components/textarea",
      "summary": "Styled native multi-line text control. Soft-square, the theme's field surface, --ring focus, and an aria-invalid destructive error state.",
      "keywords": [
        "textarea",
        "multi line input",
        "form",
        "text"
      ],
      "usage": {
        "description": "Use Textarea for multi-line freeform text entry such as notes, descriptions, or messages.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use labels, helper text, and character limits when expectations are specific."
          },
          {
            "guidance": "do",
            "description": "Size it to the expected amount of input without making the page feel blocked."
          },
          {
            "guidance": "do",
            "description": "Keep a focusable field at 16px or larger on mobile. iOS Safari zooms the whole page when a focused textarea computes under 16px and never zooms back out. Textarea handles this itself — below the sm breakpoint it renders text-body-lg (17px) and returns to text-body-md at sm and up. Build a custom field the same way: a second paired tier under a max-sm: variant, never a hand-set font-size."
          },
          {
            "guidance": "dont",
            "description": "Do not override the type with a page tier below 16px (text-body-md, text-body-sm) without a >=16px mobile arm — that reintroduces the iOS focus zoom."
          },
          {
            "guidance": "dont",
            "description": "Do not use Textarea for short single-line values; use Input."
          },
          {
            "guidance": "dont",
            "description": "Do not leave it at the default height for long-form input. A two-row textarea for a paragraph forces the user to write through a letterbox."
          }
        ]
      },
      "related": {
        "components": [
          "Input",
          "Form",
          "Label"
        ]
      },
      "props": [
        {
          "name": "aria-invalid",
          "type": "boolean",
          "description": "When true, swaps the input border to the destructive token to signal a validation error."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Dims the control to 50% and blocks pointer interaction."
        },
        {
          "name": "rows",
          "type": "number",
          "description": "Native textarea row count. The floor is min-h-20 on the spacing scale, so it moves with density."
        },
        {
          "name": "autoResize",
          "type": "boolean",
          "default": "false",
          "description": "Grows to fit content via CSS field-sizing: content (no JS). The min-height stays the floor; browsers without field-sizing fall back to the fixed min-height."
        },
        {
          "name": "...props",
          "type": "ComponentPropsWithRef<\"textarea\">",
          "description": "All native textarea attributes (value, placeholder, onChange, name, ref, …)."
        }
      ],
      "tokensUsed": [
        "field-border",
        "field",
        "foreground",
        "muted-foreground",
        "ring",
        "destructive"
      ],
      "a11y": [
        "Renders a native <textarea> — label association, keyboard, and screen-reader semantics come for free.",
        "Renders through Base UI's Field.Control: inside a Field it picks up the label, description, error and validity wiring from context.",
        "Pair with a <label htmlFor> (or aria-label) for an accessible name.",
        "Set aria-invalid and reference an error message via aria-describedby to announce validation failures.",
        "Focus-visible draws a 2px ring in the --ring token."
      ],
      "examples": [
        {
          "label": "Default",
          "code": "<Textarea placeholder=\"Write a caption…\" />",
          "imports": "import { Textarea } from \"@sableui/react\""
        },
        {
          "label": "With rows",
          "code": "<Textarea rows={6} placeholder=\"Tell your team what this project is for…\" />",
          "imports": "import { Textarea } from \"@sableui/react\""
        },
        {
          "label": "Auto-resize",
          "code": "<Textarea autoResize placeholder=\"Grows as you type…\" />",
          "imports": "import { Textarea } from \"@sableui/react\""
        },
        {
          "label": "Invalid",
          "code": "<Textarea aria-invalid defaultValue=\"Too long\" />",
          "imports": "import { Textarea } from \"@sableui/react\""
        },
        {
          "label": "Disabled",
          "code": "<Textarea disabled defaultValue=\"Notes lock once the invoice is sent.\" />",
          "imports": "import { Textarea } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "TextSwap",
      "status": "stable",
      "group": "Text & code",
      "register": "either",
      "path": "components/text-swap",
      "summary": "A short label changing in place, with blur, slide or fade replacement. One accessible current string; static first paint, immediate updates under subtle/off motion.",
      "keywords": [
        "text replacement",
        "text swap",
        "changing label",
        "status text",
        "blur",
        "crossfade"
      ],
      "usage": {
        "description": "Use for short supplied labels that change after an action, such as a schedule's day or an invoice's current state. It presents state; it never invents progress or cycles messages on a timer.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep the label beside the control or object that changed it, so the replacement explains cause and effect."
          },
          {
            "guidance": "do",
            "description": "Put aria-live=polite on the root only when the update would otherwise be missed. Visual copies are hidden from accessibility APIs."
          },
          {
            "guidance": "dont",
            "description": "Do not replace form fields or focused controls with it: it accepts text, not interactive children."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for numeric quantities or streamed paragraphs. NumberTicker preserves digit places; StreamingText preserves appended prose.",
            "instead": [
              "NumberTicker",
              "StreamingText"
            ]
          }
        ]
      },
      "related": {
        "components": [
          "NumberTicker",
          "StreamingText",
          "InlineStatus"
        ]
      },
      "props": [
        {
          "name": "text",
          "type": "string",
          "description": "The complete current label."
        },
        {
          "name": "effect",
          "type": "\"blur\" | \"slide\" | \"fade\"",
          "default": "\"blur\"",
          "description": "The visual replacement; all share the same accessible string."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "Only turns motion down. Subtle and off replace the label immediately."
        }
      ],
      "tokensUsed": [],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The initial label is already current and appears at rest."
        },
        {
          "slot": "transition",
          "recipe": "motion-swap-in",
          "part": "Current label",
          "why": "The new label resolves into place; rapid replacements retain only the latest pair."
        },
        {
          "slot": "transition",
          "recipe": "motion-swap-out",
          "part": "Previous label",
          "why": "The previous visual label leaves without duplicating the accessible announcement."
        }
      ],
      "a11y": [
        "Exactly one current string is exposed; visual copies are aria-hidden.",
        "Motion policy never delays the new text or its announcement. There is no animation on initial mount."
      ],
      "examples": [
        {
          "label": "Action result",
          "code": "const [saved, setSaved] = useState(false)\n<div className=\"flex items-center gap-3\"><Button onClick={() => setSaved(!saved)}>Toggle saved</Button><TextSwap text={saved ? \"Saved\" : \"Unsaved changes\"} aria-live=\"polite\" /></div>",
          "imports": "import { Button, TextSwap } from \"@sableui/react\""
        },
        {
          "label": "Quiet replacement",
          "code": "<TextSwap text=\"Monday\" effect=\"fade\" motion=\"subtle\" />",
          "imports": "import { TextSwap } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ThemeSelector",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/theme-selector",
      "summary": "A presentational radiogroup for choosing a Sable design theme from theme manifests — tiles that draw each theme as a miniature of its own interface (its colours, type and corner shape) for a settings page, or compact rows for tool chrome. Pair it with useSableTheme().themeId and setThemeId when the app uses SableThemeProvider.",
      "keywords": [
        "theme selector",
        "theme",
        "appearance",
        "skin",
        "design theme",
        "preset"
      ],
      "usage": {
        "description": "Use ThemeSelector wherever a person picks a theme. The default `cards` layout is page-register furniture: a miniature of each theme's interface (its background, \"Aa\" in its display face, a card, and a primary button in its own corner shape), with the name and a caption only where one distinguishes it (the default theme, or a single-mode theme). Use `layout=\"list\"` in tool chrome, a popover, or any docked panel — five cards is the wrong object for a 256px surface, however it is sized. For colour mode (light/dark/system) use ThemeSwitcher, which is a segmented control and belongs in chrome as-is.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use layout=\"list\" in a popover, a menu, or a docked panel. Rows sit on the --control-sm ladder and still show a small tile of each theme, so the choice stays visible rather than described. Rows take `sable-frame-inner`, so host the list in a sable-frame (`sable-frame sable-surface sable-surface-popover sable-frame-popover` — PopoverContent is not one; give it that class list, or its p-4 leaves the rows unnested) and their corners nest concentrically."
          },
          {
            "guidance": "do",
            "description": "Pass mode={useSableTheme().mode} so every preview renders in the colour mode actually in use, rather than in each theme's manifest default."
          },
          {
            "guidance": "do",
            "description": "Use ThemeSelector when switching is free: it is a radio group, so arrow keys check the next theme and onValueChange fires on every press — the page restyles as you go, which is the point of a live theme switcher. When a switch has a cost (it opens a \"discard changes?\" confirm, loads fonts, or resets other settings), use a DisclosurePicker list instead, with a `ThemePreview size=\"sm\"` as each option's `media`: arrows only move there, and Enter, Space or a click commits."
          },
          {
            "guidance": "do",
            "description": "Load each theme's fonts in the host app. Every card carries a type specimen in that theme's own face so people can compare typography as well as color. A theme whose fonts are not loaded falls back to system-ui, and its specimen stops telling the truth."
          },
          {
            "guidance": "dont",
            "description": "Add a viewport breakpoint to force a column count — `className=\"sm:grid-cols-1\"` or similar. `sm:` keys off the VIEWPORT, not this component's container, so on a wide screen it does nothing for a narrow parent. The cards grid already reflows on its own width via auto-fit."
          },
          {
            "guidance": "dont",
            "description": "Put the cards layout in workspace chrome. It was built for a settings page; in a 256px popover the cards clip their labels to a single character and grow to roughly twice their intended height."
          },
          {
            "guidance": "dont",
            "description": "Use ThemeSelector for light / dark / system colour mode. That is ThemeSwitcher — a segmented control. This picks the design theme, which is a different axis entirely, and the two are frequently confused."
          }
        ],
        "anatomy": [
          {
            "name": "ThemeSelector",
            "required": true,
            "description": "The radiogroup of themes, as cards or list rows."
          },
          {
            "name": "ThemePreview",
            "required": false,
            "description": "The tile each option draws, exported for showing a theme outside the picker — the row naming the current theme, or the `media` of each option in a commit-on-Enter DisclosurePicker list."
          }
        ]
      },
      "related": {
        "components": [
          "ThemeSwitcher",
          "Popover",
          "RadioCard"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "ThemeId",
          "description": "The currently selected Sable design theme id."
        },
        {
          "name": "onValueChange",
          "type": "(themeId: ThemeId) => void",
          "description": "Called with the next design theme id when an option is chosen."
        },
        {
          "name": "themes",
          "type": "readonly ThemeManifest[]",
          "default": "themeManifests",
          "description": "Theme manifests to render. Defaults to Sable's built-in themes."
        },
        {
          "name": "mode",
          "type": "\"light\" | \"dark\"",
          "description": "Preview mode for each theme's tile. Pass useSableTheme().mode to match the current color mode; omitted cards use their manifest defaultMode."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Design theme\"",
          "description": "Accessible label for the radiogroup."
        },
        {
          "name": "layout",
          "type": "\"cards\" | \"list\"",
          "default": "\"cards\"",
          "description": "Presentation. \"cards\" is the page-register picker (~144px per card); \"list\" is one compact --control-sm row per theme, for chrome and popovers. A presentation variant, not a size — \"list\" is not \"cards, smaller\" — which is why it is a prop rather than a density scope."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merged onto the outer radiogroup grid."
        }
      ],
      "subcomponents": [
        {
          "name": "ThemePreview",
          "type": "{ theme: ThemeManifest; mode?: \"light\" | \"dark\"; size?: \"md\" | \"sm\" }",
          "description": "The tile each option draws: the theme as a miniature of itself (background, \"Aa\" in its display face, a card, a primary button in its own corner shape), in its own scope. Exported for anywhere that shows a theme outside the picker, e.g. a row naming the current preset, or each option of a DisclosurePicker list where a pick has a cost. Sized in the caller's spacing unit, so it lines up with the row it sits in."
        }
      ],
      "tokensUsed": [
        "input",
        "card",
        "border",
        "background",
        "primary",
        "primary-foreground",
        "accent",
        "muted",
        "muted-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It sits in a settings panel or a popover, which owns the entrance."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Option (list)",
          "why": "List rows ease their hover fill like Menu and Select rows, so a theme list beside a menu reads as the same kind of row."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Name (grid)",
          "why": "In the grid, the theme's name brightens on hover, eased. The preview tile's outline steps rather than easing — outline is not in the recipe's transition list — so the name carries the motion."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Check (list)",
          "why": "The check fades into the chosen row and out of the old one, so the choice reads as moving, at the same moment the whole interface repaints in the new theme."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Applying a theme is synchronous: the whole interface repaints at once, and that repaint is the feedback."
        }
      ],
      "a11y": [
        "The container is role=\"radiogroup\" with an aria-label; each card is a role=\"radio\" button with aria-checked reflecting the selected theme.",
        "Standard radio keyboard: arrow keys move the check — calling onValueChange on each press — and Space checks the focused option. That instant switching is right for a free, reversible choice; where a switch has a cost, use a DisclosurePicker list (a listbox: arrows move, Enter commits) with ThemePreview tiles instead.",
        "Focus-visible draws a 2px ring on the focused card.",
        "The selected card wears the shared selection-card checked ring (the same as RadioCard and CheckboxCard), a muted fill and a check icon, so selection does not rely on colour alone.",
        "Presentational only: it does not change the document theme; pass useSableTheme().setThemeId or apply the change in onValueChange."
      ],
      "examples": [
        {
          "label": "When a switch has a cost: a DisclosurePicker list of ThemePreview tiles",
          "code": "// Arrows move; Enter, Space or a click commits — so whatever the switch costs\n// (a confirm, a font load, a reset) happens once, on the pick.\nconst { themeId, setThemeId, themes, mode } = useSableTheme()\nconst current = themes.find((theme) => theme.id === themeId)\n<DisclosurePicker>\n  <DisclosurePickerTrigger aria-label={`Theme: ${current?.label}`} media={current ? <ThemePreview theme={current} mode={mode} size=\"sm\" /> : null}>\n    {current?.label}\n  </DisclosurePickerTrigger>\n  <DisclosurePickerPanel>\n    <DisclosurePickerList aria-label=\"Theme\" value={themeId} onValueChange={setThemeId}>\n      {themes.map((theme) => (\n        <DisclosurePickerOption key={theme.id} value={theme.id} media={<ThemePreview theme={theme} mode={mode} size=\"sm\" />}>\n          {theme.label}\n        </DisclosurePickerOption>\n      ))}\n    </DisclosurePickerList>\n  </DisclosurePickerPanel>\n</DisclosurePicker>",
          "imports": "import { DisclosurePicker, DisclosurePickerList, DisclosurePickerOption, DisclosurePickerPanel, DisclosurePickerTrigger, ThemePreview, useSableTheme } from \"@sableui/react\""
        },
        {
          "label": "With SableThemeProvider",
          "code": "const { themeId, setThemeId, themes, mode } = useSableTheme()\n<ThemeSelector value={themeId} onValueChange={setThemeId} themes={themes} mode={mode} />",
          "imports": "import { ThemeSelector, useSableTheme } from \"@sableui/react\""
        },
        {
          "label": "Controlled",
          "code": "const [themeId, setThemeId] = useState<ThemeId>(\"sable\")\n<ThemeSelector value={themeId} onValueChange={setThemeId} />",
          "imports": "import { ThemeSelector, type ThemeId } from \"@sableui/react\""
        },
        {
          "label": "In chrome — a popover or a docked panel",
          "code": "// Five 144px cards is the wrong object for a 256px surface. Rows are.\n<PopoverContent align=\"end\" className=\"w-64 p-3\">\n  <ThemeSwitcher value={preference} onValueChange={setPreference} />\n  <ThemeSelector layout=\"list\" value={themeId} onValueChange={setThemeId} mode={mode} />\n</PopoverContent>",
          "imports": "import { PopoverContent, ThemeSelector, ThemeSwitcher } from \"@sableui/react\""
        },
        {
          "label": "Do not reach for a viewport breakpoint",
          "code": "// ✗ `sm:` keys off the VIEWPORT, not this component's container. On a wide\n//   screen it does nothing at all for a narrow parent — and this exact\n//   workaround, once documented here, is how the cards layout ended up in a\n//   256px popover clipping \"Default\" to \"D\".\n<ThemeSelector className=\"sm:grid-cols-1\" value={themeId} onValueChange={setThemeId} />\n\n// ✓ The cards grid already reflows on its own width (auto-fit, 9rem tracks).\n//   For a genuinely narrow surface, change the presentation instead.\n<ThemeSelector layout=\"list\" value={themeId} onValueChange={setThemeId} />",
          "imports": "import { ThemeSelector } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ThemeSwitcher",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/theme-switcher",
      "summary": "A segmented light / dark / system switch. Presentational: it renders the selected color preference and reports changes via onValueChange; pair it with useSableTheme() when the app uses SableThemeProvider. A radiogroup of three icon buttons (sun / moon / desktop).",
      "keywords": [
        "theme switcher",
        "color mode",
        "dark mode",
        "appearance"
      ],
      "usage": {
        "description": "Use ThemeSwitcher for light, dark, and system color mode preference.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it where users expect appearance controls, such as app chrome or settings."
          },
          {
            "guidance": "do",
            "description": "Respect persisted system or user preference when initializing the control."
          },
          {
            "guidance": "dont",
            "description": "Do not use ThemeSwitcher to choose brand themes or component style presets."
          },
          {
            "guidance": "dont",
            "description": "Do not hand-build another segmented capsule for a different choice. ThemeSwitcher wears the shared segmented look (lib/segmented); for any other single-select switch use ToggleGroup appearance=\"segmented\"."
          },
          {
            "guidance": "dont",
            "description": "Do not omit the `system` option or default to a hardcoded mode. Overriding the OS preference is the single most common accessibility complaint about theme controls."
          }
        ]
      },
      "related": {
        "components": [
          "ThemeSelector",
          "Switch",
          "Toggle"
        ]
      },
      "props": [
        {
          "name": "value",
          "type": "\"light\" | \"dark\" | \"system\"",
          "description": "The currently selected color preference."
        },
        {
          "name": "onValueChange",
          "type": "(value: ThemeMode) => void",
          "description": "Called with the next color preference when an option is chosen."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Theme\"",
          "description": "Accessible label for the radiogroup."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the glide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Merged onto the outer radiogroup container."
        }
      ],
      "tokensUsed": [
        "border",
        "card",
        "muted-foreground",
        "foreground",
        "accent",
        "accent-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives with the header or settings row it lives in; a theme control that announces itself competes with the page it themes."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Option",
          "why": "The icon steps from muted to foreground under the pointer, which is what tells an icon-only segment it is a control."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Option",
          "why": "A settle under the press confirms the tap on a 28px target before the theme change repaints the page around it."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "Active pill",
          "why": "One pill slides to the chosen mode, stepping by option + gap on the spacing scale, so light → dark reads as the same control moving, not three icons trading a fill. Expressive: motion=\"subtle\" lands it in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Changing the theme is synchronous; the repaint is the feedback."
        }
      ],
      "a11y": [
        "The container is role=\"radiogroup\" with an aria-label; each option is role=\"radio\" with aria-checked reflecting the selected value.",
        "Each icon button carries an aria-label (Light / Dark / System) plus a title tooltip, since the visual is icon-only.",
        "Focus-visible draws a 2px ring on the focused option; selection styling reads from aria-checked.",
        "Presentational only: it does not change the document theme; pass useSableTheme().setPreference or apply the change in onValueChange."
      ],
      "examples": [
        {
          "label": "Controlled",
          "code": "const [theme, setTheme] = useState<ThemeMode>(\"system\")\n<ThemeSwitcher value={theme} onValueChange={setTheme} />",
          "imports": "import { ThemeSwitcher, type ThemeMode } from \"@sableui/react\""
        },
        {
          "label": "With SableThemeProvider",
          "code": "const { preference, setPreference } = useSableTheme()\n<ThemeSwitcher value={preference} onValueChange={setPreference} />",
          "imports": "import { ThemeSwitcher, useSableTheme } from \"@sableui/react\""
        },
        {
          "label": "Light selected",
          "code": "<ThemeSwitcher value=\"light\" onValueChange={setTheme} />",
          "imports": "import { ThemeSwitcher } from \"@sableui/react\""
        },
        {
          "label": "Subtle motion",
          "code": "<ThemeSwitcher value={theme} onValueChange={setTheme} motion=\"subtle\" />",
          "imports": "import { ThemeSwitcher } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ThinkingOrb",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/thinking-orb",
      "summary": "Canvas dot-cloud 'agent is thinking' indicator. Three generated modes (orbit / globe / mesh) drawn from pure math — no icon dependency, no animation library. Ink follows currentColor; size steps are separately tuned.",
      "keywords": [
        "thinking",
        "orb",
        "agent",
        "ai",
        "chat",
        "loading",
        "streaming",
        "indeterminate",
        "canvas"
      ],
      "usage": {
        "description": "Use ThinkingOrb while an AI agent is working and there is nothing specific to report yet — before the first token streams, or between tool calls. It is a richer, more characterful sibling of Spinner for the one place in a product where the wait is the experience.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Reserve it for the single active agent state — the composer, the streaming message header, a standalone thinking screen. One orb on screen reads as intent; several read as decoration."
          },
          {
            "guidance": "do",
            "description": "Switch mode to say what kind of work is happening: orbit for generic thinking, globe while searching or retrieving, mesh while relating sources or running tools. Pair it with a text status so the phase is legible without decoding the animation."
          },
          {
            "guidance": "do",
            "description": "Use size=\"sm\" inline in a message row or composer and size=\"lg\" only when the orb is the main thing on screen. The size steps are separately tuned, not scaled, so the small one stays legible."
          },
          {
            "guidance": "dont",
            "description": "Do not put one on every row of a list or in a repeated skeleton. Every orb shares one animation loop, but each still paints hundreds of arcs per frame; use Skeleton for content-shaped waits and Spinner inside buttons.",
            "instead": [
              "Skeleton",
              "Spinner"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not use it for a determinate wait. It carries no sense of how far along anything is — reach for Progress when a percentage exists.",
            "instead": [
              "Progress"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not rely on the animation alone to announce the wait. Give the label a short constant phrase (it is the role=status announcement) or place a status message next to it."
          },
          {
            "guidance": "dont",
            "description": "Do not pass a label that changes while the orb is up. It is the accessible name of a live region, so every change re-announces the whole thing — feed it a per-token phase and a screen reader interrupts on each delta: \"Chromatic drift\" → \"Chromatic drift · rgb-shift\" → \"Chromatic drift · rgb-shift → grain\", which is unusable. The label names the wait (\"Thinking\"); the phase belongs in adjacent text, as in the \"Inline with a status line\" example. If the phase must be announced, announce it once when the turn settles from a separate live region — not per update."
          }
        ]
      },
      "related": {
        "components": [
          "Spinner",
          "Skeleton",
          "Progress",
          "InlineStatus",
          "ChatComposer",
          "Message"
        ]
      },
      "props": [
        {
          "name": "mode",
          "type": "\"orbit\" | \"globe\" | \"mesh\"",
          "default": "\"orbit\"",
          "description": "Which cloud to draw. orbit = generic working, globe = searching/retrieving (a scan band sweeps pole to pole), mesh = relating things (nodes wire to near neighbours and signals run the edges)."
        },
        {
          "name": "size",
          "type": "\"sm\" | \"md\" | \"lg\"",
          "default": "\"md\"",
          "description": "Rendered box on the spacing scale: sm 5 units (20px at the default spacing; inline in a composer or message row), md 8 (32px; beside a status line), lg 16 (64px; standalone). The box moves with density like the text beside it, and the canvas re-measures it. Each step has its own dot density, dot size and speed."
        },
        {
          "name": "speed",
          "type": "number",
          "default": "1",
          "description": "Multiplier on top of the per-size tuned speed. Below ~0.5 the orb reads as stalled."
        },
        {
          "name": "paused",
          "type": "boolean",
          "default": "false",
          "description": "Freeze on a representative still frame without unmounting."
        },
        {
          "name": "label",
          "type": "string",
          "default": "\"Thinking\"",
          "description": "Accessible label announced by screen readers while visible (sets aria-label on the role=status element). Must stay constant for as long as the orb is mounted — it names the wait, it does not report progress."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Set the ink with a semantic text-* token (the dots are drawn from the element's computed color). The box is sized by the size prop, not by className."
        }
      ],
      "tokensUsed": [
        "foreground",
        "muted-foreground",
        "primary"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The orb appears when work starts, and the point cloud is already in motion on its first painted frame. There is nothing to stage."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Root",
          "why": "It reports state; it is not a control. A hover reaction would suggest the wait is something you can click your way out of."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "Changing `mode` swaps the renderer on the next frame: the cloud is redrawn as the new shape, not morphed into it. The phase change is carried by the status text beside the orb, which is what a reader actually reads; a per-particle morph would be decoration on top of it."
        },
        {
          "slot": "activity",
          "recipe": "custom",
          "part": "Root",
          "why": "The cloud is drawn per frame on a canvas by one requestAnimationFrame loop shared by every orb on the page — no CSS animation exists to name here. The loop reads the motion policy itself, which is the part worth checking when auditing: `custom` means the kill-switch is honoured in JS rather than by --motion-scale."
        }
      ],
      "a11y": [
        "Wrapped in role=status, a polite live region, with an aria-label (default 'Thinking'); the canvas itself is aria-hidden.",
        "Because that label is the live region's accessible name, it must not change while the orb is mounted — a name that churns re-announces on every change, so a phase recomputed per streamed delta becomes an interruption per delta. Keep the label constant and let the phase live in adjacent text; announce an outcome once when the work settles, from a separate region.",
        "Ink is the element's computed color, so contrast is the consumer's token choice — pair with foreground or muted-foreground rather than a decorative tint.",
        "Honours the motion policy: under prefers-reduced-motion or <MotionProvider> off, it paints one still frame and never starts an animation loop.",
        "The loop also stops when the orb scrolls out of view or the tab is backgrounded, so a forgotten orb cannot burn a CPU core."
      ],
      "examples": [
        {
          "label": "Default",
          "code": "<ThinkingOrb />",
          "imports": "import { ThinkingOrb } from \"@sableui/react\""
        },
        {
          "label": "Modes",
          "code": "<ThinkingOrb mode=\"orbit\" size=\"lg\" />\n<ThinkingOrb mode=\"globe\" size=\"lg\" />\n<ThinkingOrb mode=\"mesh\" size=\"lg\" />",
          "imports": "import { ThinkingOrb } from \"@sableui/react\""
        },
        {
          "label": "Inline with a status line (the label stays constant, the phase moves)",
          "code": "<InlineStatus icon={<ThinkingOrb mode=\"globe\" size=\"sm\" label=\"Searching\" />}>Searching your workspace…</InlineStatus>",
          "imports": "import { InlineStatus, ThinkingOrb } from \"@sableui/react\""
        },
        {
          "label": "Tinted and paused",
          "code": "<ThinkingOrb size=\"lg\" className=\"text-primary\" paused />",
          "imports": "import { ThinkingOrb } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Tilt",
      "status": "stable",
      "group": "Media & mockups",
      "register": "page",
      "path": "components/tilt",
      "summary": "Optional bounded mouse depth on a surface. Coalesces samples into one requestAnimationFrame and writes transform locally. Static on touch, subtle motion and reduced motion.",
      "keywords": [
        "tilt",
        "pointer depth",
        "3d card",
        "perspective",
        "mouse movement"
      ],
      "usage": {
        "description": "Use for one illustrative card or image whose content already works without the effect. The wrapper owns transform; put an independently transformed element inside it rather than overriding the wrapper's transform while tracking.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Keep maxAngle small, and inspect the full surface bounds next to neighboring content."
          },
          {
            "guidance": "do",
            "description": "Keep the actual action in a Button or link inside the surface. Tilt itself is decorative and never becomes a tab stop."
          },
          {
            "guidance": "dont",
            "description": "Do not enable pointer tracking for touch scrolling or when motion is subtle/off. No device-orientation access is required."
          },
          {
            "guidance": "dont",
            "description": "Do not apply it to dense reading surfaces or animate pointer samples through React state."
          }
        ]
      },
      "related": {
        "components": [
          "Card",
          "MediaImage",
          "Button"
        ]
      },
      "props": [
        {
          "name": "maxAngle",
          "type": "number",
          "default": "6",
          "description": "Maximum rotation per axis in degrees, bounded to 0–15. 0 turns the lean off; a surface that was leaning eases back to flat."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "description": "Only turns motion down. Pointer depth is expressive."
        }
      ],
      "tokensUsed": [],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The surface starts flat and still."
        },
        {
          "slot": "response",
          "recipe": "custom",
          "part": "Root",
          "why": "The lean ramps up over --motion-duration-base as the pointer arrives (it enters at an edge, where the lean is largest), then follows the pointer once per frame with no easing behind it. Leaving eases back to flat. The surface takes a compositor layer only while it leans, promoted and released while flat, so text and images neither pop mid-gesture nor sit soft at rest."
        }
      ],
      "a11y": [
        "No information or essential action depends on the tilt; touch and keyboard retain the same content.",
        "Respects full/subtle/off motion at the provider, scope and component levels. Adds no interactive role or tab stop."
      ],
      "examples": [
        {
          "label": "Illustrative surface",
          "code": "<Tilt><Card><CardContent>Studio membership</CardContent></Card></Tilt>",
          "imports": "import { Card, CardContent, Tilt } from \"@sableui/react\""
        },
        {
          "label": "Static equivalent",
          "code": "<Tilt motion=\"off\" maxAngle={3}><Card><CardContent>All content remains available</CardContent></Card></Tilt>",
          "imports": "import { Card, CardContent, Tilt } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Toast",
      "status": "stable",
      "system": true,
      "group": "Status",
      "register": "either",
      "path": "components/toast",
      "summary": "Imperative notification system over Base UI Toast — auto-dismiss timers, swipe-to-dismiss, focus management, ARIA live-region announcements, and a limit-aware stack. Wrap the app in ToastProvider, then push toasts from anywhere with the global, Sonner-shaped toast() (toast.success/error/info/warning/loading/promise/dismiss) or the useToast() hook inside components.",
      "keywords": [
        "toast",
        "notification",
        "snackbar",
        "feedback",
        "success",
        "error",
        "promise",
        "loading",
        "undo"
      ],
      "usage": {
        "description": "Use Toast for transient feedback caused by a user action: saved, failed, copied, queued, uploaded, or undone. Use Banner for persistent page/app state and InlineStatus or Field errors for feedback that must remain attached to content.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Mount one ToastProvider near the app root before any code calls toast() or useToast()."
          },
          {
            "guidance": "do",
            "description": "Use toast.promise for async actions so loading, success, and error states stay tied to one notification."
          },
          {
            "guidance": "do",
            "description": "Keep toast copy short and outcome-focused. Add an action only when it is immediately useful, such as Undo."
          },
          {
            "guidance": "dont",
            "description": "Use Toast for critical blockers or persistent outages. Use Banner or Dialog when the user must notice and act.",
            "instead": [
              "Banner",
              "Dialog"
            ]
          },
          {
            "guidance": "dont",
            "description": "Fire multiple toasts for one operation. Update the same toast when a task progresses."
          },
          {
            "guidance": "dont",
            "description": "Put the only path to an action in a toast that auto-dismisses. An Undo that expires on a timer is data loss on a schedule, so error toasts and any toast carrying actionProps default to timeout 0 and wait to be read — pass an explicit timeout only when the action is also reachable somewhere else. When a timeout exists at all, 5s is the floor: anything shorter cannot be read and acted on."
          }
        ],
        "anatomy": [
          {
            "name": "Viewport",
            "required": true,
            "description": "The positioned live-region stack rendered by ToastProvider."
          },
          {
            "name": "Surface",
            "required": true,
            "description": "The individual ToastRoot containing title, description, action, and close affordance."
          },
          {
            "name": "Title",
            "required": true,
            "description": "Short outcome text, used as the accessible name."
          },
          {
            "name": "Description",
            "required": false,
            "description": "Optional detail or context beneath the title."
          },
          {
            "name": "Action",
            "required": false,
            "description": "Optional inline action such as Undo or Retry."
          }
        ]
      },
      "related": {
        "components": [
          "Banner",
          "InlineStatus",
          "Button",
          "Progress"
        ],
        "patterns": [
          "DashboardPage",
          "SettingsPage"
        ]
      },
      "props": [
        {
          "name": "ToastProvider",
          "type": "{ children, timeout?, limit?, closeIcon?, dismissLabel?, position?, stacked?, viewportClassName? }",
          "default": "—",
          "description": "Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast()."
        },
        {
          "name": "position",
          "type": "\"top-left\" | \"top-center\" | \"top-right\" | \"bottom-left\" | \"bottom-center\" | \"bottom-right\"",
          "default": "\"top-right\"",
          "description": "Screen anchor for the toast stack."
        },
        {
          "name": "stacked",
          "type": "boolean",
          "default": "false",
          "description": "Stack the toasts like a deck of cards, the newest in front and the older ones peeking out behind it, a step smaller, instead of listing them one under another. Hovering or focusing the stack fans it out into the list. Use it when an app can raise several toasts in a row, so they don't take over the corner of the page."
        },
        {
          "name": "viewportClassName",
          "type": "string",
          "description": "Extra classes merged LAST onto the fixed viewport region — for safe-area insets or an offset (e.g. clearing a sidebar)."
        },
        {
          "name": "timeout",
          "type": "number",
          "default": "5000",
          "description": "Default auto-dismiss time in ms for toasts. 0 keeps a toast until it is dismissed. Error toasts, loading toasts, and any toast carrying actionProps default to 0 regardless of this value; a per-toast timeout overrides both."
        },
        {
          "name": "limit",
          "type": "number",
          "default": "3",
          "description": "Maximum toasts shown at once; older toasts are pushed out when the limit is exceeded."
        },
        {
          "name": "closeIcon",
          "type": "ReactNode",
          "default": "<Icon name=\"xmark\" />",
          "description": "Override the dismiss-button glyph. The default already follows the injected icon set."
        },
        {
          "name": "dismissLabel",
          "type": "string",
          "default": "\"Dismiss\"",
          "description": "Accessible name of every toast's dismiss button. Translate it here; ToastClose takes the same prop when composing by hand."
        },
        {
          "name": "useToast / useToastManager",
          "type": "() => { toasts, add, close, update, promise }",
          "default": "—",
          "description": "Manager hook for use inside components. add({ title, description, timeout?, type?, priority?, actionProps? }) returns the new toast id and applies the same persistence default as toast.* — an error, loading, or actionProps toast stays until dismissed unless you pass a timeout. close(id), update(id, opts), and promise(p, opts) round out the API, with the same default: an update that turns a toast into an error or gives it actionProps, and a promise that settles into an error (or a success with actionProps), persist unless that update or outcome names a timeout."
        },
        {
          "name": "toast",
          "type": "(message, options?) => string  &  { success, error, warning, info, message, loading, promise, dismiss, update, add, custom }",
          "default": "—",
          "description": "Imperative singleton callable OUTSIDE React (event handlers, utilities, non-React code) — the Sonner-shaped surface that makes migrating a lib/toast wrapper a near drop-in. Requires a mounted <ToastProvider> (it binds the shared manager). Each call returns the toast id; toast.dismiss(id?) closes one or all; toast.promise(p, { loading, success, error }) and toast.update(id, opts) handle async + in-place updates; a settled error, and an update into an error, persist like toast.error unless they name a timeout."
        },
        {
          "name": "type (toast option)",
          "type": "\"success\" | \"error\" | \"warning\" | \"info\" | \"loading\"",
          "default": "—",
          "description": "Set by the toast.* helpers. Drives a leading status glyph from the shared tone list, the same one Note and InlineStatus use (success→success, error→destructive, warning→warning, info→info), which blooms in as the toast lands; loading shows a spinner, and the glyph blooms in its place when the toast settles. Both loading and error persist until updated or dismissed unless the call supplies a timeout."
        }
      ],
      "subcomponents": [
        {
          "name": "ToastRoot",
          "type": "Base UI Toast.Root props + className (requires the `toast` object)",
          "description": "A single toast surface. Animates enter/leave via data-[starting-style]/data-[ending-style]; swipe-to-dismiss is wired by Base UI."
        },
        {
          "name": "ToastContent",
          "type": "Base UI Toast.Content props + className",
          "description": "The toast's contents as one row. In a stacked viewport it fades on the cards behind the front one and returns when the stack fans out. Wrap a hand-composed toast's parts in it so a stacked viewport can hide them."
        },
        {
          "name": "ToastTitle",
          "type": "Base UI Toast.Title props + className",
          "description": "The toast headline (text-title-sm). Auto-associated as the toast's accessible name."
        },
        {
          "name": "ToastDescription",
          "type": "Base UI Toast.Description props + className",
          "description": "Supporting body copy beneath the title (text-body-sm, muted). Auto-associated as the toast's accessible description."
        },
        {
          "name": "ToastClose",
          "type": "Base UI Toast.Close props + className",
          "description": "Dismiss button. Base UI handles the close and leave animation; labelled \"Dismiss\" by default (dismissLabel). Its 24px glyph box keeps a 44px target under a coarse pointer."
        },
        {
          "name": "ToastAction",
          "type": "Base UI Toast.Action props + className",
          "description": "Inline action button (e.g. Undo). The imperative path renders one on every toast and Base UI sources its label and handler from that toast's `actionProps`, rendering nothing when there are none — so `toast(msg, { actionProps })` is all an action needs. Reach for the component directly only when composing a toast by hand; compose with render={<Button … />}."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border",
        "muted-foreground",
        "accent",
        "accent-foreground",
        "secondary",
        "secondary-foreground",
        "ring",
        "success",
        "tone-warning",
        "tone-info",
        "destructive"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-slide-left",
          "part": "ToastRoot",
          "why": "A toast interrupts without being asked, so where it came from is the reader's first question. Sliding in from the viewport edge answers it and marks the toast as belonging to the edge rather than to whatever it happens to cover."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "ToastAction",
          "why": "Toasts are on a timer, so the action has to look actionable at a glance — there is no time to hunt for the hit target."
        },
        {
          "slot": "transition",
          "recipe": "motion-slide-left",
          "part": "ToastRoot",
          "why": "Leaving the same way it entered keeps the stack legible when several dismiss at once; toasts that fade in place leave the remaining ones jumping to fill gaps with no visible cause."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "ToastRoot (stacked)",
          "why": "A stacked toast arrives from the anchored edge in front of the others, which step back and shrink to make room; hovering fans the deck out into the list. Moving every card, rather than snapping them, shows that the new one went on top and the old ones are still there."
        },
        {
          "slot": "response",
          "recipe": "motion-bloom",
          "part": "Status glyph",
          "why": "The glyph is what says how it went, so it lands as its own beat: it blooms in 120ms after the card, and blooms again in the spinner's place when a loading toast settles. A 16px glyph needs that amplitude to read as an answer; the card itself only slides."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "ToastRoot",
          "why": "A toast reports a result that has already happened. Anything still in flight belongs in the surface that started it, where the reader is still looking."
        }
      ],
      "a11y": [
        "Base UI announces toasts through an ARIA live region — `low` priority is polite, `high` is assertive.",
        "Auto-dismiss timers pause on hover/focus and while the window is hidden.",
        "ToastClose is keyboard-focusable and labelled; Esc dismisses the focused toast.",
        "ToastClose draws a 24px box (21px against the desktop root) and carries a 24x24+ POINTER TARGET behind it, per WCAG 2.5.8 — the glyph stays quiet because a dismiss control should not be the loudest thing in a toast. Base UI keeps the button out of the accessibility tree until the toast is focused; the toast itself is the announced element.",
        "An action does NOT dismiss its toast — Base UI leaves that to the handler, so an action that opens a confirmation keeps the toast it is confirming. Call `toast.dismiss(id)` yourself when the action should close it.",
        "Animate enter/leave via data-[starting-style]/data-[ending-style] rather than mount/unmount flips."
      ],
      "examples": [
        {
          "label": "Imperative (from anywhere)",
          "code": "toast.success(\"Saved\", { description: \"Your post is live.\" })",
          "imports": "import { toast } from \"@sableui/react\""
        },
        {
          "label": "Promise (loading → success / error)",
          "code": "toast.promise(publish(), { loading: \"Publishing…\", success: \"Published\", error: \"Could not publish. Check your connection and try again.\" })",
          "imports": "import { toast } from \"@sableui/react\""
        },
        {
          "label": "Persistent loading, updated in place",
          "code": "const id = toast.loading(\"Uploading report…\"); /* later */ toast.update(id, { title: \"Uploaded\", type: \"success\", timeout: 4000 })",
          "imports": "import { toast } from \"@sableui/react\""
        },
        {
          "label": "Custom toast markup (composed parts)",
          "code": "const { toasts } = useToast()\n<ToastViewport>{toasts.map((t) => (<ToastRoot key={t.id} toast={t}><div className=\"flex min-w-0 flex-col gap-1\"><ToastTitle>{t.title}</ToastTitle><ToastDescription>{t.description}</ToastDescription></div><ToastClose><Icon name=\"xmark\" /></ToastClose></ToastRoot>))}</ToastViewport>",
          "imports": "import { Icon, toast, ToastClose, ToastDescription, ToastRoot, ToastTitle, ToastViewport, useToast } from \"@sableui/react\""
        },
        {
          "label": "Undo action",
          "code": "toast.message(\"Post archived\", { actionProps: { children: \"Undo\", onClick: () => restorePost() } })",
          "imports": "import { toast } from \"@sableui/react\""
        },
        {
          "label": "Stacked",
          "code": "<ToastProvider stacked position=\"bottom-right\">{children}</ToastProvider>",
          "imports": "import { ToastProvider } from \"@sableui/react\""
        },
        {
          "label": "Provider with app chrome",
          "code": "<ToastProvider position=\"bottom-right\" limit={3}><AppShell><Region max=\"feed\"><Button onClick={() => toast.success(\"Saved\")}>Save</Button></Region></AppShell></ToastProvider>",
          "imports": "import { AppShell, Button, Region, toast, ToastProvider } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Toggle",
      "status": "stable",
      "group": "Selection",
      "register": "either",
      "path": "components/toggle",
      "summary": "Pressed-state button over Base UI Toggle, plus ToggleGroup for shared single- or multi-select rows. Pressed styling reads from data-[pressed].",
      "keywords": [
        "toggle",
        "pressed",
        "button state",
        "toolbar",
        "segmented control",
        "segmented",
        "toggle group",
        "button group",
        "view switcher"
      ],
      "usage": {
        "description": "Use Toggle for button-like controls that can be pressed on or off within a toolbar or compact control set.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it for transient UI modes such as bold, preview, pin, or favorite."
          },
          {
            "guidance": "do",
            "description": "Make the pressed state visually and programmatically clear."
          },
          {
            "guidance": "do",
            "description": "Use ToggleGroup appearance=\"segmented\" for a single-select view switch (List / Grid). It is the same capsule ThemeSwitcher wears — do not hand-build a track around a row of toggles."
          },
          {
            "guidance": "do",
            "description": "Use ToggleGroup appearance=\"tiles\" when totals are the switch for what a chart plots: each Toggle a caption over a figure, square, edge to edge in the card and padded from its --card-p. Do not restyle Toggles with rounded-none, borders and padding to get there."
          },
          {
            "guidance": "dont",
            "description": "Do not use Toggle for persistent application settings; use Switch.",
            "instead": [
              "Switch"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not leave an icon-only Toggle without an accessible name. It announces as \"button, pressed\", which tells a screen-reader user the state but never what the state applies to."
          }
        ],
        "anatomy": [
          {
            "name": "Toggle",
            "required": true,
            "description": "A single pressed or unpressed control."
          },
          {
            "name": "ToggleGroup",
            "required": false,
            "description": "A coordinated group of toggle choices."
          },
          {
            "name": "ToggleGroupItem",
            "required": false,
            "description": "One toggle inside a group — an alias of Toggle, so <Toggle value=\"…\"> inside a ToggleGroup is the same thing."
          }
        ]
      },
      "related": {
        "components": [
          "Switch",
          "Button",
          "Tabs"
        ]
      },
      "props": [
        {
          "name": "appearance",
          "type": "\"default\" | \"segmented\" | \"tiles\"",
          "default": "\"default\"",
          "description": "On ToggleGroup: `default` is a loose row of toggles; `segmented` draws the capsule segmented control (one track, the pressed option filled) shared with ThemeSwitcher. Single-select segmented draws ONE fill that glides to the pressed option and resizes to its label, and always keeps an option chosen: pressing the chosen one does nothing. Multi-select keeps a fill per pressed option. `tiles` makes each toggle a stat tile (caption over figure), square and edge to edge, padded from the card's --card-p and divided by hairlines, with the pressed tile filled; single-select tiles also keep one chosen. Toggles inside inherit it."
        },
        {
          "name": "stretch",
          "type": "boolean",
          "default": "false",
          "description": "On ToggleGroup: run the whole width, sharing it equally between the toggles."
        },
        {
          "name": "multiple",
          "type": "boolean",
          "default": "false",
          "description": "On ToggleGroup: allow several toggles pressed at once. The default is single-select, which behaves like a radio group."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "On ToggleGroup: how much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the glide, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting."
        },
        {
          "name": "Toggle",
          "type": "Base UI Toggle props (pressed, defaultPressed, onPressedChange, disabled, value) + className",
          "default": "defaultPressed: false",
          "description": "A two-state button. Uncontrolled via defaultPressed; controlled via pressed + onPressedChange. Pass value to identify it inside a ToggleGroup."
        }
      ],
      "subcomponents": [
        {
          "name": "ToggleGroup",
          "type": "Base UI ToggleGroup props (value, defaultValue, onValueChange, multiple, disabled, orientation, loopFocus) + appearance?: \"default\" | \"segmented\" | \"tiles\" + motion?: \"full\" | \"subtle\" | \"off\" + className",
          "description": "Groups child Toggles and shares pressed state across them — each Toggle inside carries a value. Defaults to multiple: false (single-select) — the fit for view-mode switches and segmented controls; pass multiple to allow several pressed at once, e.g. a row of formatting toggles."
        },
        {
          "name": "ToggleGroupItem",
          "type": "Alias of Toggle",
          "description": "Re-export of Toggle for group composition — a Toggle carrying a value is the group item."
        }
      ],
      "variants": {
        "appearance": [
          "default",
          "segmented",
          "tiles"
        ]
      },
      "tokensUsed": [
        "muted-foreground",
        "foreground",
        "accent",
        "accent-foreground",
        "card",
        "border",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Toggle",
          "why": "Toggles arrive with the toolbar or header they sit in. Animating each one in would make a row of controls ripple for no reason."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Toggle",
          "why": "Hover and the pressed fill ease rather than flip, so pressing reads as the same button changing state, not a different button appearing."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Toggle",
          "why": "The small settle under the finger confirms the press landed before the state change is read — the difference matters most on touch, where there is no hover."
        },
        {
          "slot": "transition",
          "recipe": "motion-glide",
          "part": "Segmented fill",
          "why": "In a single-select segmented group one fill travels to the chosen option and stretches to its label, so a view switch reads as one control now pointing elsewhere. Measured, because labels differ in width. Expressive: motion=\"subtle\" lands it in place."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Toggle",
          "why": "A toggle commits instantly. Work that follows from the new state shows where its result appears, not on the control."
        }
      ],
      "a11y": [
        "Base UI sets aria-pressed on each Toggle and manages the pressed/disabled states.",
        "ToggleGroup provides arrow-key roving focus across its items; loopFocus wraps at the ends.",
        "Pressed styling reads from the data-[pressed] attribute; disabled items are dimmed and non-interactive.",
        "Always supply an aria-label (or visible text) when a Toggle holds only an icon."
      ],
      "examples": [
        {
          "label": "Standalone",
          "code": "<Toggle aria-label=\"Mute\">Mute</Toggle>",
          "imports": "import { Toggle } from \"@sableui/react\""
        },
        {
          "label": "Single-select group",
          "code": "<ToggleGroup defaultValue={[\"list\"]}><Toggle value=\"list\" aria-label=\"List view\"><Icon name=\"list\" /></Toggle><Toggle value=\"grid\" aria-label=\"Grid view\"><Icon name=\"grid\" /></Toggle></ToggleGroup>",
          "imports": "import { Icon, Toggle, ToggleGroup } from \"@sableui/react\""
        },
        {
          "label": "Segmented view switch",
          "code": "<ToggleGroup appearance=\"segmented\" defaultValue={[\"list\"]} aria-label=\"View\"><Toggle value=\"list\" aria-label=\"List view\"><Icon name=\"list\" /></Toggle><Toggle value=\"grid\" aria-label=\"Grid view\"><Icon name=\"grid\" /></Toggle></ToggleGroup>",
          "imports": "import { Icon, Toggle, ToggleGroup } from \"@sableui/react\""
        },
        {
          "label": "Segmented with labels, subtle motion",
          "code": "<ToggleGroup appearance=\"segmented\" motion=\"subtle\" defaultValue={[\"week\"]} aria-label=\"Range\"><Toggle value=\"day\">Day</Toggle><Toggle value=\"week\">Week</Toggle><Toggle value=\"month\">Month</Toggle></ToggleGroup>",
          "imports": "import { Toggle, ToggleGroup } from \"@sableui/react\""
        },
        {
          "label": "Stat tiles that switch a chart",
          "code": "<Card className=\"overflow-hidden\"><ToggleGroup appearance=\"tiles\" defaultValue={[\"desktop\"]} aria-label=\"Device\"><Toggle value=\"desktop\"><span className=\"text-caption text-muted-foreground\">Desktop</span><span className=\"text-mono-lg\">12,480</span></Toggle><Toggle value=\"mobile\"><span className=\"text-caption text-muted-foreground\">Mobile</span><span className=\"text-mono-lg\">9,215</span></Toggle></ToggleGroup></Card>",
          "imports": "import { Card, Toggle, ToggleGroup } from \"@sableui/react\""
        },
        {
          "label": "Multi-select group",
          "code": "<ToggleGroup multiple defaultValue={[\"bold\"]}><Toggle value=\"bold\">Bold</Toggle><Toggle value=\"italic\">Italic</Toggle></ToggleGroup>",
          "imports": "import { Toggle, ToggleGroup } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Toolbar",
      "status": "stable",
      "group": "Actions",
      "register": "either",
      "path": "components/toolbar",
      "summary": "A row or column of controls that is one tab stop, with arrow-key movement between its items (role=\"toolbar\"), over Base UI Toolbar. Items reuse Button's ghost variants and Input, so they follow density like every other control.",
      "keywords": [
        "toolbar",
        "action bar",
        "button row",
        "icon buttons",
        "formatting bar",
        "roving focus",
        "arrow keys",
        "tool chrome",
        "editor toolbar"
      ],
      "usage": {
        "description": "Use Toolbar when three or more related controls sit together and act on the same thing — a text selection, a canvas, a document, a table. Tab lands on the toolbar once and the arrow keys move along it, so a keyboard user crosses an editor's twelve buttons in one keystroke instead of twelve. It works in both registers: ghost sm buttons on a page, compact icon-xs buttons inside a Workspace.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give every Toolbar an aria-label that names what it acts on (\"Text formatting\", \"Canvas\"). With more than one toolbar on screen, that label is the only way a screen-reader user tells them apart."
          },
          {
            "guidance": "do",
            "description": "Use size=\"icon-sm\" (page) or size=\"icon-xs\" (workspace) with an aria-label for icon-only ToolbarButtons, and keep one size across the row so the controls line up."
          },
          {
            "guidance": "do",
            "description": "Split a long row into ToolbarGroups with a ToolbarSeparator between them — undo/redo, text style, insert. Groups give the eye the same structure the arrow keys already cross."
          },
          {
            "guidance": "do",
            "description": "Compose triggers and toggles through ToolbarButton's render prop — render={<MenuTrigger />}, render={<PopoverTrigger />}, or render={<Toggle value=\"bold\" />} inside a ToggleGroup — so they join the toolbar's arrow-key order."
          },
          {
            "guidance": "dont",
            "description": "Put a bare Button, Toggle or Input inside a Toolbar. It renders, but it is not a toolbar item: the arrow keys skip it and it takes its own tab stop, which is the inconsistency Toolbar exists to remove. Use ToolbarButton, ToolbarInput, or render through ToolbarButton."
          },
          {
            "guidance": "dont",
            "description": "Wrap one or two buttons, or a dialog's Cancel/Confirm pair, in a Toolbar. Those are independent actions; arrow-key movement there is a surprise, not a shortcut. A plain row of Buttons is right."
          },
          {
            "guidance": "dont",
            "description": "Use Toolbar for navigation between pages or views. Links that go somewhere are Tabs, SideNav or Breadcrumbs; ToolbarLink is for the odd link that sits among actions, like Help.",
            "instead": [
              "Tabs",
              "SideNav",
              "Breadcrumbs"
            ]
          },
          {
            "guidance": "dont",
            "description": "Give toolbar buttons primary or destructive fills by default. A toolbar is a quiet strip of tools; the ghost default keeps it from competing with the page's one primary action."
          }
        ],
        "anatomy": [
          {
            "name": "Toolbar",
            "required": true,
            "description": "The root (role=\"toolbar\"). Owns orientation, loopFocus and disabled for everything inside it."
          },
          {
            "name": "ToolbarButton",
            "required": true,
            "description": "An action. Button's ghost variants by default; `render` composes a menu trigger, popover trigger or Toggle into the toolbar."
          },
          {
            "name": "ToolbarGroup",
            "required": false,
            "description": "A run of related items. `disabled` disables the whole run."
          },
          {
            "name": "ToolbarSeparator",
            "required": false,
            "description": "A hairline between groups, oriented across the toolbar. Never a focus stop."
          },
          {
            "name": "ToolbarInput",
            "required": false,
            "description": "A compact Input that joins the arrow-key order — a search or find field in the bar."
          },
          {
            "name": "ToolbarLink",
            "required": false,
            "description": "An <a> styled like a ToolbarButton, for a link that sits among the actions."
          }
        ]
      },
      "related": {
        "components": [
          "Button",
          "Toggle",
          "Menu",
          "Popover",
          "Tooltip",
          "Workspace",
          "PanelSection",
          "Separator"
        ]
      },
      "props": [
        {
          "name": "orientation",
          "type": "\"horizontal\" | \"vertical\"",
          "default": "\"horizontal\"",
          "description": "Which arrow keys move focus (Left/Right or Up/Down) and which way the items stack. Separators turn to match."
        },
        {
          "name": "loopFocus",
          "type": "boolean",
          "default": "true",
          "description": "Arrowing past the last item wraps to the first, and back."
        },
        {
          "name": "disabled",
          "type": "boolean",
          "default": "false",
          "description": "Disables every item. Items stay focusable (aria-disabled) so the row keeps its shape under the keyboard."
        },
        {
          "name": "aria-label",
          "type": "string",
          "description": "Names the toolbar for assistive technology. Always set it."
        },
        {
          "name": "className",
          "type": "string",
          "description": "Layout overrides — e.g. `flex-1` to let the toolbar fill a bar."
        }
      ],
      "subcomponents": [
        {
          "name": "ToolbarButton",
          "type": "{ variant?: buttonVariants variant (default \"ghost\"); size?: buttonVariants size (default \"sm\"); disabled?: boolean; focusableWhenDisabled?: boolean (default true); render?: ReactElement } + Base UI Toolbar.Button props",
          "description": "A toolbar action, styled exactly like <Button>. Disabled buttons stay focusable by default and carry aria-disabled. Pass size=\"icon-sm\"/\"icon-xs\" plus aria-label for icon-only."
        },
        {
          "name": "ToolbarLink",
          "type": "{ href?: string; variant?: buttonVariants variant (default \"ghost\"); size?: buttonVariants size (default \"sm\"); render?: ReactElement } + Base UI Toolbar.Link props",
          "description": "An <a> in the toolbar's arrow-key order, styled like a ToolbarButton."
        },
        {
          "name": "ToolbarInput",
          "type": "{ disabled?: boolean; focusableWhenDisabled?: boolean (default true) } + Base UI Toolbar.Input / native input props",
          "description": "Sable's Input at the sm control height (w-40 by default; override with className). Arrow keys leave the field so it does not trap the row."
        },
        {
          "name": "ToolbarGroup",
          "type": "{ disabled?: boolean } + Base UI Toolbar.Group props",
          "description": "Groups related items; `disabled` disables all of them."
        },
        {
          "name": "ToolbarSeparator",
          "type": "Base UI Toolbar.Separator props + className",
          "description": "A hairline-strong rule across the toolbar's axis, exposed as role=\"separator\" and skipped by the arrow keys."
        }
      ],
      "variants": {
        "orientation": [
          "horizontal",
          "vertical"
        ],
        "variant": [
          "ghost",
          "secondary",
          "outline",
          "primary",
          "destructive",
          "link"
        ],
        "size": [
          "xs",
          "sm",
          "md",
          "icon",
          "icon-sm",
          "icon-xs"
        ]
      },
      "tokensUsed": [
        "foreground",
        "accent",
        "accent-foreground",
        "ring",
        "hairline-strong",
        "input",
        "card"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Toolbar",
          "why": "A toolbar is fixed chrome. It is present when its surface is; animating it in would leave the tools briefly unusable for no reason the user can see."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "ToolbarButton",
          "why": "Inherited from buttonVariants: hover fill, focus ring and disabled dim ease together, so the item under the arrow keys reads as the one that moved."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "ToolbarButton",
          "why": "Inherited from buttonVariants. Many toolbar actions change something off to the side (the canvas, the selection), so the settle on press is the confirmation that lands where the pointer is."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Toolbar",
          "why": "The toolbar has no state of its own. Pressed state belongs to a Toggle rendered through ToolbarButton, which carries its own transition."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Toolbar",
          "why": "A toolbar never works on its own. Pending work belongs to the surface the action targets, or to a Spinner in the button that started it."
        }
      ],
      "a11y": [
        "Base UI renders role=\"toolbar\" with aria-orientation, and a roving tabindex: the toolbar is one tab stop, the arrow keys move between items, Home/End jump to the ends.",
        "Disabled items stay focusable by default and announce as disabled (aria-disabled), so arrowing along the row never silently skips a control. Set focusableWhenDisabled={false} on an item to opt out.",
        "ToolbarSeparator is role=\"separator\" with the orientation opposite the toolbar's, and is not a focus stop.",
        "ToolbarInput lets the arrow keys move the caret and only leaves the field at either end of its text.",
        "Always set aria-label on the Toolbar, and on every icon-only ToolbarButton.",
        "A Toggle rendered through ToolbarButton keeps aria-pressed; a MenuTrigger keeps aria-haspopup/aria-expanded."
      ],
      "examples": [
        {
          "label": "Formatting toolbar",
          "code": "<Toolbar aria-label=\"Text formatting\">\n  <ToolbarGroup aria-label=\"History\">\n    <ToolbarButton size=\"icon-sm\" aria-label=\"Undo\">\n      <Icon name=\"arrow-left\" />\n    </ToolbarButton>\n    <ToolbarButton size=\"icon-sm\" aria-label=\"Redo\">\n      <Icon name=\"arrow-right\" />\n    </ToolbarButton>\n  </ToolbarGroup>\n  <ToolbarSeparator />\n  <ToggleGroup multiple aria-label=\"Style\">\n    <ToolbarButton size=\"icon-sm\" aria-label=\"Bold\" render={<Toggle value=\"bold\" />}>\n      <Icon name=\"bold\" />\n    </ToolbarButton>\n    <ToolbarButton size=\"icon-sm\" aria-label=\"Italic\" render={<Toggle value=\"italic\" />}>\n      <Icon name=\"italic\" />\n    </ToolbarButton>\n  </ToggleGroup>\n  <ToolbarSeparator />\n  <ToolbarLink href=\"/help\">Help</ToolbarLink>\n</Toolbar>",
          "imports": "import { Icon, Toggle, ToggleGroup, Toolbar, ToolbarButton, ToolbarGroup, ToolbarLink, ToolbarSeparator } from \"@sableui/react\""
        },
        {
          "label": "With a menu trigger and a search field",
          "code": "<Toolbar aria-label=\"Table\">\n  <ToolbarButton>Export</ToolbarButton>\n  <Menu>\n    <ToolbarButton render={<MenuTrigger />}>View</ToolbarButton>\n    <MenuContent>\n      <MenuItem>Compact rows</MenuItem>\n      <MenuItem>Comfortable rows</MenuItem>\n    </MenuContent>\n  </Menu>\n  <ToolbarSeparator />\n  <ToolbarInput aria-label=\"Search rows\" placeholder=\"Search\" />\n</Toolbar>",
          "imports": "import { Menu, MenuContent, MenuItem, MenuTrigger, Toolbar, ToolbarButton, ToolbarInput, ToolbarSeparator } from \"@sableui/react\""
        },
        {
          "label": "Vertical tool rail",
          "code": "<Toolbar orientation=\"vertical\" aria-label=\"Tools\">\n  <ToolbarButton size=\"icon-sm\" aria-label=\"Select\">\n    <Icon name=\"arrow-up\" />\n  </ToolbarButton>\n  <ToolbarButton size=\"icon-sm\" aria-label=\"Draw\">\n    <Icon name=\"edit\" />\n  </ToolbarButton>\n  <ToolbarSeparator />\n  <ToolbarButton size=\"icon-sm\" aria-label=\"Delete\" disabled>\n    <Icon name=\"trash\" />\n  </ToolbarButton>\n</Toolbar>",
          "imports": "import { Icon, Toolbar, ToolbarButton, ToolbarSeparator } from \"@sableui/react\""
        },
        {
          "label": "In a workspace bar",
          "code": "<WorkspaceBar>\n  <Toolbar aria-label=\"Document\" className=\"flex-1\">\n    <ToolbarButton size=\"xs\">File</ToolbarButton>\n    <ToolbarButton size=\"xs\">Edit</ToolbarButton>\n    <ToolbarButton size=\"icon-xs\" aria-label=\"Share\" className=\"ms-auto\">\n      <Icon name=\"share\" />\n    </ToolbarButton>\n  </Toolbar>\n</WorkspaceBar>",
          "imports": "import { Icon, Toolbar, ToolbarButton, WorkspaceBar } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "ToolCall",
      "status": "stable",
      "group": "Chat & AI",
      "register": "either",
      "path": "components/tool-call",
      "summary": "One tool an agent called, as a quiet row inside its turn: a status glyph, what it did, the tool's name and where it is — with the arguments and result behind a disclosure.",
      "keywords": [
        "tool call",
        "function call",
        "tool use",
        "agent step",
        "mcp",
        "ai",
        "tool result",
        "agent activity"
      ],
      "usage": {
        "description": "Use it for each tool call in an assistant's turn, so the person can see what the agent did and check any step. The row is the summary — glyph, a plain-words title, the tool's name, the status — and stays one line, so a turn with ten calls is still scannable. Input and output sit behind the disclosure, because they are read rarely and, when they are, in full.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give it a `title` in plain words, in the tense of the status: \"Searching the docs\" while running, \"Searched the docs\" once done. The `name` stays beside it in mono for the person who wants to know exactly which tool ran."
          },
          {
            "guidance": "do",
            "description": "Drive `status` from the call's real state and keep the same element mounted as it changes. The spinner swaps for the outcome in place, and the change is announced to screen readers once."
          },
          {
            "guidance": "do",
            "description": "Pass `error` with `status=\"error\"`. It shows under the row without opening anything, because a failure is the one result everyone needs to read."
          },
          {
            "guidance": "do",
            "description": "Pass a rendered result as `children` when the output is something to look at — a list of hits, a diff — rather than data to inspect. It replaces the output's code view, and `input` still shows above it."
          },
          {
            "guidance": "dont",
            "description": "Do not put the approve and deny buttons in a ToolCall. A call held for permission is `status=\"awaiting\"` here, and the decision itself is ApprovalBlock, which says what will happen and asks once."
          },
          {
            "guidance": "dont",
            "description": "Do not use it for the agent's thinking or a progress note. A wait with no tool behind it is ThinkingOrb or a Spinner with a status line, and a row that claims a tool ran when none did makes every other row less trustworthy.",
            "instead": [
              "ThinkingOrb",
              "Spinner"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not open every call by default. A turn whose calls all show their JSON buries the answer; leave `defaultOpen` for the one call the person is likely to check, if any."
          }
        ],
        "anatomy": [
          {
            "name": "Status glyph",
            "required": true,
            "description": "Spinner while running, then the outcome: check, warning, clock (awaiting approval) or ×. The only part that moves."
          },
          {
            "name": "Title",
            "required": false,
            "description": "What the call does, in plain words. Without one, the tool's name leads."
          },
          {
            "name": "Name",
            "required": true,
            "description": "The tool's own name in mono, after the title. Hidden below the sm breakpoint when a title is present."
          },
          {
            "name": "Status",
            "required": true,
            "description": "One word for where the call is: Running, Needs approval, Done, Failed, Denied."
          },
          {
            "name": "Error line",
            "required": false,
            "description": "The failure message, under the row and always visible."
          },
          {
            "name": "Details",
            "required": false,
            "description": "Input and output as code, or a rendered result. A disclosure; the row is its trigger."
          }
        ]
      },
      "related": {
        "components": [
          "Message",
          "ThinkingOrb",
          "StreamingText",
          "CodeBlock",
          "Collapsible",
          "InlineStatus"
        ]
      },
      "props": [
        {
          "name": "name",
          "type": "string",
          "description": "The tool's own name, as the model called it (`search_docs`). Shown in mono."
        },
        {
          "name": "title",
          "type": "ReactNode",
          "description": "What the call does, in words a person reads. Leads the row; omit it and `name` leads."
        },
        {
          "name": "status",
          "type": "\"running\" | \"awaiting\" | \"complete\" | \"error\" | \"denied\"",
          "default": "\"running\"",
          "description": "Where the call is. `awaiting` is held for the person's approval; `denied` is one they declined."
        },
        {
          "name": "statusLabel",
          "type": "string",
          "description": "Overrides the status word, for another language or a more specific phrase."
        },
        {
          "name": "input",
          "type": "unknown",
          "description": "The arguments. A string shows as is; anything else as formatted JSON."
        },
        {
          "name": "output",
          "type": "unknown",
          "description": "The result, shown the same way as `input`."
        },
        {
          "name": "error",
          "type": "ReactNode",
          "description": "What went wrong, for `status=\"error\"`. Always visible under the row."
        },
        {
          "name": "children",
          "type": "ReactNode",
          "description": "A rendered result in place of `output`'s code view."
        },
        {
          "name": "defaultOpen",
          "type": "boolean",
          "default": "false",
          "description": "Open the details on mount."
        },
        {
          "name": "open",
          "type": "boolean",
          "description": "Controlled open state of the details."
        },
        {
          "name": "onOpenChange",
          "type": "(open: boolean) => void",
          "description": "Called when the details open or close."
        }
      ],
      "variants": {
        "status": [
          "running",
          "awaiting",
          "complete",
          "error",
          "denied"
        ]
      },
      "tokensUsed": [
        "card",
        "border",
        "destructive",
        "muted",
        "muted-foreground",
        "foreground",
        "tone-warning",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "It arrives as part of the assistant's turn, and the turn's own arrival covers it. A second entrance per call would make a busy turn twitch."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Header",
          "why": "The header is the disclosure trigger but reads as a status row. The hover step is what tells the person it opens."
        },
        {
          "slot": "transition",
          "recipe": "motion-icon-swap",
          "part": "Status glyph",
          "why": "The spinner becoming a check or a warning is the moment the call settles, and it is the one change in the row worth catching from the corner of the eye. The swap reads as one mark replaced, not a flicker."
        },
        {
          "slot": "transition",
          "recipe": "motion-disclosure",
          "part": "Details",
          "why": "The height change connects the code that appears to the row that was pressed, in a thread where several rows look alike."
        },
        {
          "slot": "activity",
          "recipe": "motion-spin",
          "part": "Status glyph",
          "why": "While the call runs, the spinner is what separates working from stuck. It pauses once the call settles, so a long thread of finished calls costs nothing."
        }
      ],
      "a11y": [
        "With details, the header is a button with aria-expanded (Base UI Collapsible); its name is the title, the tool name and the status word, so it reads as one sentence.",
        "A status change after mount is announced once through a polite role=status region (\"Searched the docs: Done\"). The status a call mounts with is not announced, so a thread restored from history stays quiet.",
        "The glyph is aria-hidden: the status word beside it carries the meaning, so colour and shape are never the only signal."
      ],
      "examples": [
        {
          "label": "A finished call",
          "code": "<ToolCall\n\tname=\"search_docs\"\n\ttitle=\"Searched the docs\"\n\tstatus=\"complete\"\n\tinput={{ query: \"date range picker\" }}\n\toutput={{ hits: [\"DatePicker\", \"Calendar\", \"DateTile\"] }}\n/>",
          "imports": "import { ToolCall } from \"@sableui/react\""
        },
        {
          "label": "Running, then failed",
          "code": "<div className=\"flex flex-col gap-2\">\n\t<ToolCall name=\"read_file\" title=\"Reading package.json\" status=\"running\" input={{ path: \"package.json\" }} />\n\t<ToolCall\n\t\tname=\"run_tests\"\n\t\ttitle=\"Ran the tests\"\n\t\tstatus=\"error\"\n\t\terror=\"3 of 412 tests failed in date-picker.test.tsx.\"\n\t\tinput={{ filter: \"date-picker\" }}\n\t/>\n</div>",
          "imports": "import { ToolCall } from \"@sableui/react\""
        },
        {
          "label": "Waiting for approval",
          "code": "<ToolCall name=\"send_email\" title=\"Send the invoice to Ada\" status=\"awaiting\" input={{ to: \"ada@example.com\", subject: \"INV-1042\" }} />",
          "imports": "import { ToolCall } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Tooltip",
      "status": "stable",
      "group": "Overlays",
      "register": "either",
      "path": "components/tooltip",
      "summary": "Hover/focus label over Base UI Tooltip (collision-aware positioning, ARIA wiring, delay grouping via TooltipProvider). Compact popover surface.",
      "keywords": [
        "tooltip",
        "hint",
        "hover",
        "assistive"
      ],
      "usage": {
        "description": "Use Tooltip for brief nonessential hints tied to a specific control or piece of text.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use it to name icon-only controls or clarify compact UI when the label cannot be visible."
          },
          {
            "guidance": "do",
            "description": "Keep tooltip content short and noninteractive."
          },
          {
            "guidance": "dont",
            "description": "Do not put critical instructions, errors, or interactive content inside Tooltip.",
            "instead": [
              "Popover",
              "InlineStatus"
            ]
          },
          {
            "guidance": "dont",
            "description": "Do not let a tooltip serve as an icon button's accessible name. A tooltip is not a name — without its own aria-label the button announces as \"button\", and the tooltip never opens for a screen reader at all."
          }
        ],
        "anatomy": [
          {
            "name": "TooltipProvider",
            "required": false,
            "description": "Optional provider for shared tooltip timing."
          },
          {
            "name": "TooltipTrigger",
            "required": true,
            "description": "The element that owns the hint."
          },
          {
            "name": "TooltipContent",
            "required": true,
            "description": "The short hint content."
          },
          {
            "name": "TooltipArrow",
            "required": false,
            "description": "An optional pointer toward the trigger."
          },
          {
            "name": "SimpleTooltip",
            "required": false,
            "description": "A convenience wrapper for common tooltip usage."
          }
        ]
      },
      "related": {
        "components": [
          "Popover",
          "ContextCard"
        ]
      },
      "props": [
        {
          "name": "side",
          "type": "\"top\" | \"right\" | \"bottom\" | \"left\"",
          "default": "\"top\"",
          "description": "On TooltipContent: which side of the trigger to render against. Flips automatically when there is no room."
        },
        {
          "name": "Tooltip (Root)",
          "type": "Base UI Tooltip.Root props (open, defaultOpen, onOpenChange, disabled)",
          "description": "Groups the trigger and content. Uncontrolled by default."
        }
      ],
      "subcomponents": [
        {
          "name": "TooltipProvider",
          "type": "Base UI Tooltip.Provider props (delay, closeDelay, timeout)",
          "description": "Wraps an app or group of Tooltips to share open/close delays. Once one tooltip is open, adjacent tooltips open instantly."
        },
        {
          "name": "TooltipTrigger",
          "type": "Base UI Trigger props + render",
          "description": "The anchor element. Use render={<Button/>} to compose with another component."
        },
        {
          "name": "TooltipContent",
          "type": "Base UI Popup props + side | align | sideOffset + className",
          "description": "Portals + positions + paints the popup. side (\"top\" | \"bottom\" | \"left\" | \"right\" | \"inline-*\") picks which side of the trigger to render against, defaults to \"top\", and auto-flips on collision; align (\"start\" | \"center\" | \"end\") defaults to \"center\"; sideOffset (gap between trigger and popup, in pixels) defaults to 6. The popup caps its width at 20rem (a step inside a narrow screen) and wraps long content with text-pretty; SimpleTooltip and TooltipGroup share the cap."
        },
        {
          "name": "TooltipArrow",
          "type": "Base UI Arrow props + className",
          "description": "Optional pointer connecting the popup to its trigger — a popover-coloured square turned 45° that carries the border on its outward edges. Place inside TooltipContent."
        },
        {
          "name": "SimpleTooltip",
          "type": "Base UI Tooltip.Root props + content: ReactNode + children: ReactElement + side | align | sideOffset",
          "description": "Shorthand wrapping Root + Trigger + Content for the common case. The single child becomes the trigger (via Base UI render); content sets the body; side / align / sideOffset forward to the content with the same defaults. Composition parts remain for advanced use. Inside a TooltipGroup it becomes a trigger of the group's shared tooltip instead."
        },
        {
          "name": "TooltipGroup",
          "type": "{ children: ReactNode; motion?: \"full\" | \"subtle\" | \"off\" }",
          "description": "One tooltip shared by every SimpleTooltip inside it — for a toolbar or a row of icon buttons. Moving the pointer along the row glides the tooltip to the next trigger and swaps its label (old fades out, new fades in, each sliding toward the direction of travel), instead of closing one tooltip and opening another a few pixels away. Renders no element. Each SimpleTooltip keeps its own content / side / align / sideOffset and `disabled`; root props such as open / onOpenChange belong to the shared tooltip and are ignored inside a group. `motion` turns it down: `subtle` jumps between triggers and only cross-fades the label. The composable Tooltip parts are unaffected."
        }
      ],
      "tokensUsed": [
        "popover",
        "popover-foreground",
        "border-floating"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-pop",
          "part": "Content",
          "why": "The transform-origin follows the anchor, so the tooltip appears to grow out of the element it describes. That is what binds it to its trigger — a bubble that materialises at full size near two possible triggers belongs to neither."
        },
        {
          "slot": "response",
          "recipe": "none",
          "part": "Content",
          "why": "The tooltip is not a hover target; pointing at it is how you dismiss it. Styling it for the pointer would suggest otherwise."
        },
        {
          "slot": "transition",
          "recipe": "motion-pop",
          "part": "Content",
          "why": "Same recipe, exit direction — it collapses back toward the anchor. Content that fades from a fixed size on close reads as a second, unrelated element disappearing."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Content",
          "why": "Tooltip copy is resident before the tooltip opens. Anything that has to be fetched is a Popover with its own loading state."
        },
        {
          "slot": "transition",
          "recipe": "custom",
          "part": "TooltipGroup",
          "why": "Moving between triggers in a group, the one tooltip glides to the next trigger, resizes to its label and cross-fades the text with a short slide toward the direction of travel. Separate tooltips would close here and open there, two surfaces blinking side by side; the glide says it is the same hint following the pointer. Base UI's handle + Viewport supply the shared popup and the previous/current content; the timing is the expressive glide (slow, emphasized), so `subtle` keeps only the cross-fade."
        }
      ],
      "a11y": [
        "Base UI wires aria-describedby from trigger to popup and manages hover + focus open.",
        "Opens on keyboard focus, not just hover; dismisses on Esc and blur.",
        "Animate via data-[starting-style]/data-[ending-style] opacity attributes.",
        "Tooltip text is supplementary — never put essential-only actions inside a tooltip."
      ],
      "examples": [
        {
          "label": "Basic",
          "code": "<TooltipProvider><Tooltip><TooltipTrigger render={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Info\"><Icon name=\"info\" /></Button>} /><TooltipContent>Saved to your workspace.</TooltipContent></Tooltip></TooltipProvider>",
          "imports": "import { Button, Icon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"@sableui/react\""
        },
        {
          "label": "Sides",
          "code": "<Tooltip><TooltipTrigger render={<Button variant=\"secondary\">Right</Button>} /><TooltipContent side=\"right\">Opens to the right</TooltipContent></Tooltip>",
          "imports": "import { Button, Tooltip, TooltipContent, TooltipTrigger } from \"@sableui/react\""
        },
        {
          "label": "Shorthand (SimpleTooltip)",
          "code": "<SimpleTooltip content=\"Saved to your workspace.\"><Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Info\"><Icon name=\"info\" /></Button></SimpleTooltip>",
          "imports": "import { Button, Icon, SimpleTooltip } from \"@sableui/react\""
        },
        {
          "label": "One tooltip gliding along a toolbar (TooltipGroup)",
          "code": "<TooltipGroup><Toolbar aria-label=\"Formatting\"><SimpleTooltip content=\"Bold\"><ToolbarButton size=\"icon-sm\" aria-label=\"Bold\"><Icon name=\"bold\" /></ToolbarButton></SimpleTooltip><SimpleTooltip content=\"Italic\"><ToolbarButton size=\"icon-sm\" aria-label=\"Italic\"><Icon name=\"italic\" /></ToolbarButton></SimpleTooltip><SimpleTooltip content=\"Insert link\"><ToolbarButton size=\"icon-sm\" aria-label=\"Insert link\"><Icon name=\"link\" /></ToolbarButton></SimpleTooltip></Toolbar></TooltipGroup>",
          "imports": "import { Icon, SimpleTooltip, Toolbar, ToolbarButton, TooltipGroup } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Tree",
      "status": "stable",
      "group": "Navigation",
      "register": "workspace",
      "path": "components/tree",
      "summary": "The object list a tool is built around — layers, scene graph, outline — on one shared grid, so every left edge in the panel resolves to the rail or an exact multiple of the indent step.",
      "keywords": [
        "tree",
        "layers",
        "outline",
        "scene graph",
        "hierarchy",
        "nesting",
        "indent",
        "disclosure",
        "workspace",
        "panel",
        "file tree",
        "files",
        "folders",
        "explorer",
        "treeview"
      ],
      "usage": {
        "description": "Use Tree for the hierarchy panel in a workspace: layers, objects, an inspector outline. It owns the geometry that makes nesting legible — the rail, the disclosure and type columns, and the indent step — via the density ladder (scope the panel with data-density, e.g. data-density=\"compact\"), so nothing in the panel computes its own inset. It is also the file tree: nest rows with `subtree`, let folders manage their own open state with `defaultExpanded`, and mark kind with the `icon` convention (folder for a row with a subtree, file for a leaf). Reach for Accordion when the content is prose sections rather than nodes in a hierarchy.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Give Tree an aria-label naming the hierarchy (\"Layers\", \"Files\"). It is a role=\"tree\", and an unnamed tree is announced as just \"tree\"."
          },
          {
            "guidance": "do",
            "description": "In a layers panel, where the arrows should select, set `selectionFollowsFocus` (and aria-multiselectable when Shift extends) instead of handling ArrowUp/Down on the rows: the tree keeps Home/End, ←/→ and the tab stop, and the row's onClick stays the one selection path."
          },
          {
            "guidance": "do",
            "description": "For a file tree, nest with `subtree` and use the icon convention: `icon={<Icon name=\"folder\" />}` on a row with a subtree, `icon={<Icon name=\"file\" />}` on a leaf. There are no folder/file presets — they would only bind those two props."
          },
          {
            "guidance": "do",
            "description": "Give TreeAddRow the same depth as the rows it adds to, so its mark lands in their type column: one deeper than the parent for a child list, the parent's own depth for a sibling list."
          },
          {
            "guidance": "do",
            "description": "Put mutable per-row state (visibility, solo, a row menu) in `actions`, on the right rail. Show it on hover with `reveal-on-hover` (the row is its `group`), and at rest only when its value is the non-default one."
          },
          {
            "guidance": "do",
            "description": "Let section headers sit on the rail at the same height as a depth-0 row. Space and a hairline separate sections; TreeSection handles both, including dropping the divider on the first."
          },
          {
            "guidance": "dont",
            "description": "Hardcode a left inset anywhere in the panel. Use treeIndent(depth) or var(--tree-rail); a hand-written px value is how a tree ends up with four different left edges."
          },
          {
            "guidance": "dont",
            "description": "Redefine --tree-indent to anything other than --tree-column. A step smaller than the column puts a child's content left of its parent's and the nesting reads inverted."
          },
          {
            "guidance": "dont",
            "description": "Put the visibility toggle before the name. A leading toggle makes each row's visual start depend on its depth, so no two rows share an edge."
          },
          {
            "guidance": "dont",
            "description": "Hand-copy icon paths into a tree row. Use Icon and the shared semantic set, or provide an app-specific icon through the supported slot."
          },
          {
            "guidance": "dont",
            "description": "Use EmptyState inside a panel. It is page-register furniture (px-6 py-12 around a size-12 disc) and in 240px it spends 24px of inset and ~96px of height on nothing. Use TreeEmpty."
          },
          {
            "guidance": "dont",
            "description": "Show explanatory prose AND an add row in an empty section. That is two things to read where one carries the affordance; give TreeEmpty a one-line message and pass the add row as its action."
          },
          {
            "guidance": "dont",
            "description": "Leave a section actionable when its action cannot do anything yet — a document-level effect list with no content to apply to, for instance. Hide the section or its affordance until the thing it operates on exists."
          }
        ],
        "anatomy": [
          {
            "name": "Tree",
            "required": true,
            "description": "The container. Does not scroll itself — put it in a scrolling Panel, or make it the scrolling region with className."
          },
          {
            "name": "TreeSection",
            "required": false,
            "description": "A titled group. Header on the rail, hairline above, divider suppressed on the first section."
          },
          {
            "name": "TreeRow",
            "required": true,
            "description": "One node: rail, disclosure column, type column, name, right-rail actions."
          },
          {
            "name": "TreeAddRow",
            "required": false,
            "description": "The affordance that ends a branch. Mark in the type column, label in the name column."
          },
          {
            "name": "TreeEmpty",
            "required": false,
            "description": "A section's empty state at panel scale: one line, one action, optionally a dashed drop region."
          }
        ]
      },
      "related": {
        "components": [
          "Panel",
          "PanelSection",
          "Workspace",
          "Accordion",
          "SideNav"
        ]
      },
      "props": [
        {
          "name": "depth",
          "type": "number",
          "default": "0",
          "description": "Nesting level, on TreeRow and TreeAddRow. 0 sits on the rail; each level adds one --tree-indent."
        },
        {
          "name": "expandable",
          "type": "boolean",
          "default": "true with subtree, else false",
          "description": "Whether TreeRow renders a disclosure control. The column is reserved either way, so leaf and parent names stay aligned."
        },
        {
          "name": "expanded",
          "type": "boolean",
          "description": "Controlled open state for a TreeRow. Pair with onExpandedChange; omit both for an uncontrolled row."
        },
        {
          "name": "defaultExpanded",
          "type": "boolean",
          "default": "true",
          "description": "Uncontrolled initial open state, used when `expanded` is not passed. Pass false for a file tree's closed folders."
        },
        {
          "name": "onExpandedChange",
          "type": "(expanded: boolean) => void",
          "description": "Called when a TreeRow opens or closes — from the disclosure, ArrowRight/ArrowLeft, or activating a row that has no onClick. Fires in both controlled and uncontrolled use."
        },
        {
          "name": "subtree",
          "type": "ReactNode",
          "description": "The rows nested under a TreeRow, rendered after it while it is expanded. Nested rows inherit depth + 1 unless they pass their own `depth`, so a file tree never computes depth by hand."
        },
        {
          "name": "selected",
          "type": "boolean",
          "default": "false",
          "description": "Selection fill and accent bar on a TreeRow. Inside a Tree it is exposed as aria-selected on the treeitem; a row rendered outside a Tree is a plain div and exposes aria-current instead."
        },
        {
          "name": "toggleLabel",
          "type": "string",
          "description": "Names the thing being disclosed, for the toggle's accessible label — \"Expand Background\" rather than \"Expand group\". Every example passes it; a screen-reader user hearing twenty identical \"Expand group\" buttons has no way to tell them apart."
        },
        {
          "name": "expandLabel",
          "type": "(name?: string) => string",
          "default": "(name = \"group\") => `Expand ${name}`",
          "description": "The disclosure's accessible name while collapsed, built from toggleLabel. Replace it to translate the verb (\"Développer Background\")."
        },
        {
          "name": "collapseLabel",
          "type": "(name?: string) => string",
          "default": "(name = \"group\") => `Collapse ${name}`",
          "description": "The disclosure's accessible name while expanded, built from toggleLabel."
        },
        {
          "name": "icon",
          "type": "ReactNode",
          "description": "The kind marker for a TreeRow, rendered in the type column at 1em. Use a semantic Icon so it follows the app icon set."
        },
        {
          "name": "disclosureIcon",
          "type": "ReactNode",
          "description": "Replaces TreeRow's semantic chevron-down icon. Omit to use the chevron-down from the app's IconProvider set."
        },
        {
          "name": "actions",
          "type": "ReactNode",
          "description": "Right-rail controls for a TreeRow: visibility, solo, a row menu."
        },
        {
          "name": "label",
          "type": "ReactNode",
          "description": "TreeAddRow's visible label. Name what gets added — 'Add effect', not 'Add'."
        },
        {
          "name": "motion",
          "type": "\"full\" | \"subtle\" | \"off\"",
          "default": "\"full\"",
          "description": "On Tree. How much motion this component uses: `full` (default) inherits the app's policy, `subtle` keeps feedback and drops the flourish, `off` stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Under `subtle` expanded rows appear at once instead of unfolding; the chevron still turns."
        },
        {
          "name": "selectionFollowsFocus",
          "type": "boolean",
          "default": "false",
          "description": "On Tree. The arrow keys select the row they land on, as a layers panel does, instead of only moving focus. The row is activated as a click carrying the key's Shift, so its own onClick (reading event.shiftKey for a range) extends the selection on Shift+Arrow; Ctrl/⌘+Arrow moves without selecting. Only rows with an onClick are selected — a disclosure-only row, a TreeAddRow or a row with selectOnFocus={false} is just focused. Pass aria-multiselectable on the Tree when more than one row can be selected."
        },
        {
          "name": "selectOnFocus",
          "type": "boolean",
          "default": "true",
          "description": "On TreeRow. Pass false for a row whose click does more than select — it switches the active document, or opens itself — so the Tree's selectionFollowsFocus only focuses it as the arrows pass and the tree doesn't reshape under the cursor. Enter/Space and a pointer click still activate it."
        }
      ],
      "subcomponents": [
        {
          "name": "TreeSection",
          "type": "{ title: ReactNode; hint?: string; action?: ReactNode }",
          "description": "A titled group of rows, with the header on the rail."
        },
        {
          "name": "TreeRow",
          "type": "{ depth?: number; selected?: boolean; accent?: boolean; dimmed?: boolean; expandable?: boolean; expanded?: boolean; defaultExpanded?: boolean; onExpandedChange?: (expanded: boolean) => void; subtree?: ReactNode; toggleLabel?: string; expandLabel?: (name?: string) => string; collapseLabel?: (name?: string) => string; disclosureIcon?: ReactNode; icon?: ReactNode; actions?: ReactNode }",
          "description": "One node in the hierarchy (role=treeitem inside a Tree). Controlled via expanded/onExpandedChange or uncontrolled via defaultExpanded; nest children with subtree. Always reserves both leading columns (disclosure and type), so a leaf's name lines up with its expandable siblings."
        },
        {
          "name": "TreeAddRow",
          "type": "{ depth?: number; label: ReactNode; icon?: ReactNode }",
          "description": "The add affordance, shaped as a row and aligned to the branch it adds to. Its mark sits in the type column (level with the siblings' kind markers), not the name column. `icon` replaces the built-in add mark."
        },
        {
          "name": "TreeEmpty",
          "type": "{ message: ReactNode; action?: ReactNode; dropTarget?: boolean; depth?: number }",
          "description": "A section's or a branch's empty state, at panel scale rather than page scale. One-line message, one action slot; dropTarget renders it as a dashed drop region and sets data-drop-target for styling. `depth` (inherited inside a subtree) starts the line on the edge of the rows that branch would hold."
        },
        {
          "name": "treeIndent",
          "type": "(depth: number) => string",
          "description": "The left inset for a depth, as a calc() expression reading the density ladder. Use this rather than computing pixels."
        }
      ],
      "tokensUsed": [
        "panel-raised",
        "hairline",
        "foreground",
        "muted-foreground",
        "primary",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "motion-arrive",
          "part": "TreeRow",
          "why": "Rows a user's expand reveals fade down into place in document order (a capped 18ms stagger), so the eye can follow where the children came from. An animation (motion-arrive) rather than a transition, because the rows already wear motion-interactive and a second transition list would fight it. Only on a user expand of a `subtree` — a tree that mounts open shows its rows at once, and rows added later to an open folder do not cascade. Expressive: `subtle` shows them at once."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "TreeRow",
          "why": "Hover and selection fills ease, so sweeping the pointer down a dense panel reads as a highlight following it rather than rows flickering."
        },
        {
          "slot": "transition",
          "recipe": "motion-interactive",
          "part": "Disclosure",
          "why": "The chevron turns with the rows arriving under it; motion-interactive lists `rotate`, which is what -rotate-90 writes, so it no longer flips in one frame."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Tree",
          "why": "A tree has no indeterminate state of its own; a branch that loads its children should render a TreeEmpty or a loading row inside it."
        }
      ],
      "a11y": [
        "Tree implements the ARIA tree view pattern: Tree is role=\"tree\", each TreeRow and TreeAddRow is role=\"treeitem\" with aria-level, expandable rows carry aria-expanded, and a TreeSection is a role=\"group\" labelled by its heading. Rows stay flat in the DOM — hierarchy is aria-level — so the fills span the panel's full width.",
        "Keyboard: exactly one row is in the tab order (roving tabindex, seeded on the selected row, else the first). ArrowUp/Down move between visible rows; ArrowRight expands a collapsed row, then steps to its first child; ArrowLeft collapses an expanded row, else steps to its parent; Home/End jump to the ends; Enter/Space activate the row — its onClick, or toggling it when it has none. Keys pressed inside a row's own controls (an action button, a rename field) are left to that control. Every key the tree handles is preventDefault-ed, so a page-wide arrow binding (a canvas nudge) should skip an event whose defaultPrevented is true rather than stopping propagation row by row.",
        "With `selectionFollowsFocus`, selection moves with the arrows (Shift extends, Ctrl/⌘ moves focus only), matching the ARIA multi-select tree model; announce it with aria-multiselectable on the Tree.",
        "Selection has one mapping: inside a Tree, `selected` is aria-selected on the treeitem; outside a Tree the row is a plain div, where aria-selected is invalid, so it falls back to aria-current. A navigation tree that wants aria-current=\"page\" passes it through props.",
        "Each treeitem is named by its own label (aria-labelledby the name), never by the text of its icon or action buttons.",
        "The disclosure is a real button with aria-expanded and a label naming what it discloses, and it stops propagation so collapsing a group never changes the selection. Inside a Tree the treeitem carries aria-expanded and the arrow keys, so the button becomes a pointer target only: aria-hidden, out of the tab order, and it leaves focus where it was when clicked.",
        "The disclosure's POINTER TARGET is bigger than the mark it draws. `--tree-column` is 20px comfortable and 18px compact, both under WCAG 2.5.8's 24x24 floor, so a centred pseudo-element takes the hit at `--control-xs` (28/24) instead. The drawn box stays on the column, because that column is also the indent step — growing the button would push every name in the tree one column right.",
        "Right-rail actions stay in the tab order, so a row with actions costs extra Tab stops. Keep actions few and reveal them with `reveal-on-hover`, which also shows them on focus and always on touch.",
        "`dimmed` is presentation only. A row switched off must also say so in its actions' aria-pressed or its accessible name; opacity alone is invisible to a screen reader and fails contrast.",
        "Right-rail controls that appear on hover must also appear on focus-visible, or they are unreachable by keyboard."
      ],
      "examples": [
        {
          "label": "File tree",
          "code": "// Nest with subtree; folders own their open state via defaultExpanded.\n// A row with no onClick toggles when clicked or activated, like a folder in\n// a file explorer. Depth is inherited — never computed by hand.\n<Tree aria-label=\"Files\" className=\"max-w-xs\">\n  <TreeRow\n    icon={<Icon name=\"folder\" />}\n    toggleLabel=\"src\"\n    subtree={\n      <>\n        <TreeRow icon={<Icon name=\"file\" />} onClick={() => open(\"index.ts\")}>index.ts</TreeRow>\n        <TreeRow\n          icon={<Icon name=\"folder\" />}\n          toggleLabel=\"components\"\n          defaultExpanded={false}\n          subtree={\n            <TreeRow icon={<Icon name=\"file\" />} selected onClick={() => open(\"button.tsx\")}>\n              button.tsx\n            </TreeRow>\n          }\n        >\n          components\n        </TreeRow>\n      </>\n    }\n  >\n    src\n  </TreeRow>\n  <TreeRow icon={<Icon name=\"file\" />} onClick={() => open(\"README.md\")}>README.md</TreeRow>\n</Tree>",
          "imports": "import { Icon, Tree, TreeRow } from \"@sableui/react\""
        },
        {
          "label": "Layer tree with per-node effects",
          "code": "<Tree aria-label=\"Layers\" className=\"min-h-0 flex-1 overflow-y-auto scrollbar-quiet\">\n  <TreeSection title=\"Document effects\" hint=\"Applied to the flattened composite\">\n    <TreeRow depth={0} icon={<Icon name=\"sparkles\" />}>Channel shift</TreeRow>\n    <TreeAddRow depth={0} label=\"Add effect\" />\n  </TreeSection>\n\n  <TreeSection title=\"Layers\" action={<span className=\"text-ui-num text-muted-foreground\">2</span>}>\n    <TreeRow\n      depth={0}\n      expandable\n      expanded\n      toggleLabel=\"Backdrop\"\n      icon={<Icon name=\"image-stack\" />}\n      actions={<Button size=\"icon-xs\" variant=\"ghost\" aria-label=\"Hide Backdrop\"><Icon name=\"eye\" /></Button>}\n    >\n      Backdrop\n    </TreeRow>\n    <TreeRow depth={1} icon={<Icon name=\"sparkles\" />}>Block displacement</TreeRow>\n    <TreeAddRow depth={1} label=\"Add effect\" />\n\n    <TreeRow depth={0} icon={<Icon name=\"image-stack\" />} dimmed>Overlay</TreeRow>\n    <TreeAddRow depth={0} label=\"Add image\" />\n  </TreeSection>\n</Tree>",
          "imports": "import { Button, Icon, Tree, TreeAddRow, TreeRow, TreeSection } from \"@sableui/react\""
        },
        {
          "label": "Empty state — one line, one action",
          "code": "// A section with nothing in it offers exactly ONE way forward. Not EmptyState:\n// that is page-register (px-6 py-12 around a size-12 disc) and in a 240px panel\n// it spends 24px of inset and ~96px of height on nothing.\n<TreeSection title=\"Layers\">\n  <TreeEmpty message=\"No images yet\" action={<TreeAddRow depth={0} label=\"Add image\" />} />\n</TreeSection>\n\n// As a drop region — the app owns the drag handlers; TreeEmpty owns the frame\n// and sets data-drop-target so a data-[drop-active] style can respond.\n<TreeEmpty\n  dropTarget\n  message=\"Drop an image\"\n  data-drop-active={dragging || undefined}\n  onDragOver={(e) => { e.preventDefault(); setDragging(true) }}\n  onDragLeave={() => setDragging(false)}\n  onDrop={handleDrop}\n  className=\"data-[drop-active]:border-primary\"\n/>",
          "imports": "import { TreeAddRow, TreeEmpty, TreeSection } from \"@sableui/react\""
        },
        {
          "label": "Selection and disclosure",
          "code": "<Tree aria-label=\"Layers\">\n  <TreeRow\n    depth={0}\n    expandable\n    expanded={open}\n    onExpandedChange={setOpen}\n    toggleLabel=\"Group 1\"\n    icon={<Icon name=\"folder\" />}\n    selected\n    onClick={() => select(\"group-1\")}\n  >\n    Group 1\n  </TreeRow>\n  {open ? <TreeRow depth={1} icon={<Icon name=\"file\" />}>Child</TreeRow> : null}\n</Tree>",
          "imports": "import { Icon, Tree, TreeRow } from \"@sableui/react\""
        },
        {
          "label": "Selection follows the arrows, Shift extends",
          "code": "// A layers panel: the arrows select as they move. The row's own onClick is\n// the one selection path; Shift+Arrow arrives as a click with shiftKey.\n<Tree aria-label=\"Layers\" aria-multiselectable selectionFollowsFocus>\n  {layers.map((layer) => (\n    <TreeRow\n      key={layer.id}\n      icon={<Icon name=\"image-stack\" />}\n      selected={selection.includes(layer.id)}\n      onClick={(event) => (event.shiftKey ? extendTo(layer.id) : selectOnly(layer.id))}\n    >\n      {layer.name}\n    </TreeRow>\n  ))}\n</Tree>",
          "imports": "import { Icon, Tree, TreeRow } from \"@sableui/react\""
        },
        {
          "label": "An empty branch",
          "code": "// A layer with no effects: TreeEmpty at the branch's depth lands on the\n// same edge its effect rows would — no hand-computed inset.\n<TreeRow depth={0} icon={<Icon name=\"image-stack\" />} toggleLabel=\"Overlay\" subtree={\n  <>\n    <TreeEmpty message=\"No effects yet\" />\n    <TreeAddRow label=\"Add effect\" />\n  </>\n}>\n  Overlay\n</TreeRow>",
          "imports": "import { Icon, TreeAddRow, TreeEmpty, TreeRow } from \"@sableui/react\""
        },
        {
          "label": "Aligning a custom affordance",
          "code": "// Anything else that needs a tree inset reads it from the same place the rows do.\n<div style={{ paddingInlineStart: treeIndent(1) }} className=\"flex h-(--control-xs) items-center\">\n  <span className=\"text-ui-body text-muted-foreground\">Drag a layer here</span>\n</div>",
          "imports": "import { treeIndent } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Video",
      "status": "stable",
      "group": "Media & mockups",
      "register": "page",
      "path": "components/video",
      "summary": "Styled 16:9 video player frame. Mounts a native <video> when given a src, or shows a poster/placeholder with a centered play overlay.",
      "keywords": [
        "video",
        "media",
        "player",
        "demo"
      ],
      "usage": {
        "description": "Use Video to embed playable or previewable video media inside a page.",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Use captions, poster imagery, and controls when the video carries information."
          },
          {
            "guidance": "do",
            "description": "Keep the surrounding layout stable while media loads."
          },
          {
            "guidance": "dont",
            "description": "Do not autoplay important audio or make video the only way to access required information."
          },
          {
            "guidance": "dont",
            "description": "Do not ship it without captions or a transcript. Captions are what make video usable for deaf users and searchable for everyone; a video with neither is inaccessible content you also cannot index."
          }
        ]
      },
      "related": {
        "components": [
          "Carousel",
          "Dialog",
          "Badge"
        ]
      },
      "props": [
        {
          "name": "onRequestPlay",
          "type": "() => void",
          "description": "Placeholder only (no src): renders the play mark as a real button labelled by playLabel that calls this — e.g. to load the source. Without it the mark is decorative."
        },
        {
          "name": "playLabel",
          "type": "string",
          "default": "\"Play video\"",
          "description": "Accessible name of the placeholder play button (with onRequestPlay)."
        },
        {
          "name": "src",
          "type": "string",
          "description": "Video source URL. When omitted, a poster/placeholder with a play overlay renders."
        },
        {
          "name": "poster",
          "type": "string",
          "description": "Poster image shown before playback (and as the placeholder backdrop)."
        },
        {
          "name": "controls",
          "type": "boolean",
          "default": "true",
          "description": "Show native playback controls."
        }
      ],
      "tokensUsed": [
        "border",
        "overlay",
        "overlay-foreground",
        "ring"
      ],
      "motion": [
        {
          "slot": "arrival",
          "recipe": "none",
          "part": "Root",
          "why": "The frame arrives with its page. Once there is a source, the poster and controls are the browser's."
        },
        {
          "slot": "response",
          "recipe": "motion-interactive",
          "part": "Play button",
          "why": "With `onRequestPlay`, the play disc firms its scrim on hover, eased, so the mark reads as pressable over any image."
        },
        {
          "slot": "response",
          "recipe": "motion-press",
          "part": "Play button",
          "why": "Loading a source can take a moment; the settle on press confirms the tap before the player appears."
        },
        {
          "slot": "transition",
          "recipe": "none",
          "part": "Root",
          "why": "Placeholder to player is a swap of elements: the native video mounts where the poster was. Animating the swap would delay the playback the person just asked for."
        },
        {
          "slot": "activity",
          "recipe": "none",
          "part": "Root",
          "why": "Buffering belongs to the native controls, which draw their own indicator. A second loader over the frame would compete with the browser's."
        }
      ],
      "a11y": [
        "Mounts a native <video> element, preserving built-in keyboard controls when controls is enabled.",
        "Without onRequestPlay the placeholder play mark is decorative (aria-hidden) — nothing on the frame pretends to be pressable. With it, the mark is a native button named \"Play video\"."
      ],
      "examples": [
        {
          "label": "With a poster",
          "code": "<Video poster=\"/cover.jpg\" src=\"/clip.mp4\" />",
          "imports": "import { Video } from \"@sableui/react\""
        },
        {
          "label": "Placeholder (no src)",
          "code": "<Video poster=\"/cover.jpg\" />",
          "imports": "import { Video } from \"@sableui/react\""
        },
        {
          "label": "Placeholder that loads on play",
          "code": "<Video poster=\"/cover.jpg\" src={src} onRequestPlay={() => setSrc(\"/clip.mp4\")} />",
          "imports": "import { Video } from \"@sableui/react\""
        }
      ]
    },
    {
      "name": "Workspace",
      "status": "stable",
      "group": "Layout",
      "register": "workspace",
      "path": "components/workspace",
      "summary": "The shell for a tool: a fixed viewport partitioned into independently scrolling regions, with a compact density scope, a skip link, and a canvas landmark.",
      "keywords": [
        "workspace",
        "tool",
        "editor",
        "shell",
        "frame",
        "canvas",
        "chrome",
        "panels",
        "density",
        "viewport",
        "issue tracker",
        "tracker",
        "inspector",
        "reading view",
        "mobile",
        "responsive",
        "bottom nav",
        "media query",
        "breakpoint",
        "top bar",
        "topbar"
      ],
      "usage": {
        "description": "Use Workspace as the outer frame for a tool — an editor, a console, a canvas app. It owns the viewport, scopes the compact control density, and guarantees a skip link plus a main landmark on the canvas. Reach for AppShell instead for page-register products: it is built around a scrolling document, where a workspace is built around a fixed one. Workspace fills the viewport (h-dvh) by design; to embed one in a page (a docs preview, a modal-sized demo), wrap it in a bounded container and pass className=\"h-full\".",
        "bestPractices": [
          {
            "guidance": "do",
            "description": "Put a PanelGroup in the body and a WorkspaceCanvas inside it, so panels are aside chrome and the work surface is the main landmark."
          },
          {
            "guidance": "do",
            "description": "Let each panel own its scrolling. The shell never scrolls, and the canvas clips rather than scrolls — panning is the viewport's job."
          },
          {
            "guidance": "do",
            "description": "Keep the density scope at compact unless you have a specific reason; the workspace register's measured control ladder is what makes tool chrome read as tool chrome."
          },
          {
            "guidance": "do",
            "description": "Put a WorkspaceBar inside a column when the bar belongs to that column only. An issue tracker's bar (breadcrumb, view tabs, filters) sits above the list, while the sidebar and the inspector beside it run the full height: put the WorkspaceBar first inside the WorkspaceCanvas, not in the `toolbar` slot, which spans every panel. Don't hand-build a fixed-height header for it."
          },
          {
            "guidance": "do",
            "description": "Wrap a reading view inside the workspace (a project overview, an update, a doc, release notes) in <Density value=\"comfortable\">. The compact scope maps body text to the 11–12px UI tiers, which is right for chrome and too small for paragraphs; the comfortable scope gives prose its page size again while the chrome around it stays compact."
          },
          {
            "guidance": "do",
            "description": "Plan the phone layout with the shell rather than around it: pass a BottomNav to `bottomNav`, and give docked Panels `narrow=\"sheet\"` (an inspector, a navigation rail) or `narrow=\"hidden\"`. Don't measure the viewport with a resize listener, render the inspector twice, or subtract the nav's height from 100dvh."
          },
          {
            "guidance": "dont",
            "description": "Nest a Region or Page inside it to set a width. Region caps are a page-register idea; a workspace is edge-to-edge and its panels are fixed-width chrome outside the content grid."
          },
          {
            "guidance": "dont",
            "description": "Hardcode a control height (h-[32px]). CI rejects it (raw-control-height); read the ladder instead, e.g. h-(--control-sm), so the density scope can size it."
          },
          {
            "guidance": "dont",
            "description": "Put a Card in the chrome. Use PanelSection — a card inside a narrow panel spends its border and inset on nothing."
          },
          {
            "guidance": "dont",
            "description": "Use it for a dashboard that scrolls. If the primary interaction is reading down a page, that's AppShell plus a Region, not a workspace."
          }
        ],
        "anatomy": [
          {
            "name": "WorkspaceBar",
            "required": false,
            "description": "Top chrome at --chrome-bar-height with a hairline beneath: toolbar, document tabs, menubar row."
          },
          {
            "name": "Body",
            "required": true,
            "description": "The flexible middle row, normally a PanelGroup. Constrained so its children can shrink and scroll."
          },
          {
            "name": "WorkspaceCanvas",
            "required": false,
            "description": "The work surface and the main#main-content landmark the skip link targets. Clips rather than scrolls."
          },
          {
            "name": "StatusBar",
            "required": false,
            "description": "Bottom chrome for ambient document facts."
          },
          {
            "name": "BottomNav",
            "required": false,
            "description": "Phone navigation in the `bottomNav` slot. Its row is reserved below lg and gone above it, so the body ends where the nav begins."
          }
        ]
      },
      "related": {
        "components": [
          "PanelGroup",
          "PanelSection",
          "StatusBar",
          "ScrubField",
          "AppShell"
        ]
      },
      "props": [
        {
          "name": "toolbar",
          "type": "ReactNode",
          "description": "Top chrome, normally a WorkspaceBar."
        },
        {
          "name": "statusBar",
          "type": "ReactNode",
          "description": "Bottom chrome, normally a StatusBar."
        },
        {
          "name": "bottomNav",
          "type": "ReactNode",
          "description": "Phone navigation, normally a BottomNav. Below lg (BottomNav's own breakpoint) the shell reserves the nav's height as its last row, so the body and the status bar end above the nav instead of under it; above lg the row is gone. Every slot is optional: the body is the shell's one growing row whichever of toolbar, statusBar and bottomNav are present."
        },
        {
          "name": "density",
          "type": "\"compact\" | \"comfortable\"",
          "default": "\"compact\"",
          "description": "Density scope for everything inside. Sets the --control-* ladder via data-density; compact is the workspace register. Nothing hardcodes a height, so the same size=\"md\" Button is 40px on a page and 32px inside a compact Workspace. A Dialog opened from inside resets to comfortable, because a modal is a page-register surface even when a tool launched it."
        },
        {
          "name": "skipLinkLabel",
          "type": "string",
          "default": "\"Skip to canvas\"",
          "description": "Text for the skip link that targets the canvas landmark."
        },
        {
          "name": "mainId",
          "type": "string",
          "default": "\"main-content\"",
          "description": "The id the skip link targets, which the WorkspaceCanvas inside takes unless it has an id of its own. Change it when the page already has a main-content (an AppShell around the tool), so the ids do not collide."
        }
      ],
      "subcomponents": [
        {
          "name": "WorkspaceBar",
          "type": "ComponentProps<'header'>",
          "description": "The top chrome strip, sized to --chrome-bar-height with a hairline beneath."
        },
        {
          "name": "WorkspaceCanvas",
          "type": "ComponentProps<'main'>",
          "description": "The work surface: renders the main landmark with Workspace's mainId (main-content by default; an id passed here wins) and tabIndex={-1} so the skip link can move focus into it, fills the body, clips its overflow."
        },
        {
          "name": "useMediaQuery",
          "type": "(query: string, options?: { serverValue?: boolean }) => boolean",
          "description": "True while a media query matches, read through useSyncExternalStore: no resize listener, no setState in an effect, no hydration mismatch (the server reports serverValue, default false). Use it to branch structure a class cannot express; style-only changes stay as lg: classes."
        },
        {
          "name": "useBelowBreakpoint",
          "type": "(breakpoint?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\", options?: { serverValue?: boolean }) => boolean",
          "description": "True below a named breakpoint (default lg), flipping at the width where that breakpoint's classes start to apply (Tailwind's sm 40 / md 48 / lg 64 / xl 80 / 2xl 96rem). Panel's `narrow` uses it; reach for it instead of a hand-rolled window.innerWidth check."
        }
      ],
      "tokensUsed": [
        "canvas",
        "canvas-foreground",
        "panel",
        "hairline",
        "popover",
        "popover-foreground",
        "ring"
      ],
      "a11y": [
        "Renders a skip link to the canvas (#main-content unless mainId says otherwise) as the first focusable element, even though there is no scrolling document.",
        "WorkspaceCanvas is the <main> landmark and takes focus from the skip link (tabIndex -1, out of the tab order); Panels are <aside> chrome with their own names.",
        "Density only changes control sizes, never hit-target rules — an icon button at the 24px floor still needs a padded 44px hit area."
      ],
      "examples": [
        {
          "label": "Editor shell",
          "code": "<Workspace\n  toolbar={\n    <WorkspaceBar>\n      <span className=\"px-1 text-ui-md text-foreground\">Studio</span>\n      <Separator orientation=\"vertical\" className=\"mx-1 h-4\" />\n      <Button size=\"xs\" variant=\"ghost\">Open</Button>\n    </WorkspaceBar>\n  }\n  statusBar={\n    <StatusBar>\n      <span className=\"text-ui-num\">1024 × 768</span>\n      <StatusBarSeparator />\n      <span>3 layers</span>\n      <StatusBarGroup align=\"end\"><span>Saved</span></StatusBarGroup>\n    </StatusBar>\n  }\n>\n  <PanelGroup>\n    <Panel label=\"Layers\" width={240}>\n      <PanelSection title=\"Layers\">\n        <PropertyRow label=\"Background\"><Switch defaultChecked /></PropertyRow>\n      </PanelSection>\n    </Panel>\n    <WorkspaceCanvas>\n      <div className=\"grid h-full place-items-center text-ui-body text-muted-foreground\">Canvas</div>\n    </WorkspaceCanvas>\n    <Panel label=\"Properties\" width={256}>\n      <PanelSection title=\"Blending\">\n        <PropertyPair>\n          <ScrubField label=\"Opacity\" icon=\"grid\" suffix=\"%\" value={100} min={0} max={100} />\n          <ScrubField label=\"Blur\" value={0} min={0} max={64} suffix=\"px\" />\n        </PropertyPair>\n      </PanelSection>\n    </Panel>\n  </PanelGroup>\n</Workspace>",
          "imports": "import { Button, Panel, PanelGroup, PanelSection, PropertyPair, PropertyRow, ScrubField, Separator, StatusBar, StatusBarGroup, StatusBarSeparator, Switch, Workspace, WorkspaceBar, WorkspaceCanvas } from \"@sableui/react\""
        },
        {
          "label": "Console shell (no canvas)",
          "code": "<Workspace statusBar={<StatusBar><span>Connected</span></StatusBar>}>\n  <PanelGroup>\n    <Panel label=\"Sources\" width={240}>\n      <PanelSection title=\"Sources\">\n        <PropertyRow label=\"Filter\"><Input placeholder=\"Search\" /></PropertyRow>\n      </PanelSection>\n    </Panel>\n    <WorkspaceCanvas className=\"overflow-y-auto scrollbar-quiet\">\n      <div className=\"p-3 text-ui-num text-muted-foreground\">log output…</div>\n    </WorkspaceCanvas>\n  </PanelGroup>\n</Workspace>",
          "imports": "import { Input, Panel, PanelGroup, PanelSection, PropertyRow, StatusBar, Workspace, WorkspaceCanvas } from \"@sableui/react\""
        },
        {
          "label": "Issue tracker: column bar, docked inspector, phone sheet",
          "code": "function Tracker() {\n  const [selected, setSelected] = useState<string | null>(\"AES-104\")\n  return (\n    <Workspace\n      bottomNav={\n        <BottomNav>\n          <BottomNavItem showLabel label=\"Issues\" icon={<Icon name=\"list\" />} active />\n          <BottomNavItem showLabel label=\"Inbox\" icon={<Icon name=\"inbox\" />} />\n        </BottomNav>\n      }\n      statusBar={<StatusBar><span>12 issues</span></StatusBar>}\n    >\n      <PanelGroup>\n        <Panel label=\"Navigation\" width={220} narrow=\"hidden\">\n          <PanelSection title=\"Workspace\">\n            <PropertyRow label=\"Team\"><Input defaultValue=\"Studio\" /></PropertyRow>\n          </PanelSection>\n        </Panel>\n        <WorkspaceCanvas className=\"flex flex-col\">\n          <WorkspaceBar>\n            <Breadcrumbs>\n              <BreadcrumbItem><BreadcrumbLink href=\"#\">Studio</BreadcrumbLink></BreadcrumbItem>\n              <BreadcrumbSeparator />\n              <BreadcrumbItem><BreadcrumbPage>Digital flagship</BreadcrumbPage></BreadcrumbItem>\n            </Breadcrumbs>\n          </WorkspaceBar>\n          <div className=\"min-h-0 flex-1 overflow-y-auto scrollbar-quiet\">\n            <Button size=\"xs\" variant=\"ghost\" onClick={() => setSelected(\"AES-104\")}>AES-104 Refine product page</Button>\n          </div>\n        </WorkspaceCanvas>\n        <Panel\n          label=\"Issue details\"\n          width={320}\n          narrow=\"sheet\"\n          open={selected !== null}\n          onOpenChange={(open) => !open && setSelected(null)}\n        >\n          <PanelSection title={selected ?? \"\"}>\n            <PropertyRow label=\"Status\"><Input defaultValue=\"In progress\" /></PropertyRow>\n          </PanelSection>\n        </Panel>\n      </PanelGroup>\n    </Workspace>\n  )\n}",
          "imports": "import { BottomNav, BottomNavItem, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, Breadcrumbs, BreadcrumbSeparator, Button, Icon, Input, Panel, PanelGroup, PanelSection, PropertyRow, StatusBar, Workspace, WorkspaceBar, WorkspaceCanvas } from \"@sableui/react\""
        },
        {
          "label": "Reading view inside a workspace",
          "code": "<Workspace>\n  <PanelGroup>\n    <WorkspaceCanvas className=\"overflow-y-auto scrollbar-quiet\">\n      <Density value=\"comfortable\">\n        <article className=\"max-w-prose p-6\">\n          <h2 className=\"text-heading-3\">Project overview</h2>\n          <p className=\"mt-3 text-body-md text-muted-foreground\">\n            Paragraphs keep their page size here, while the chrome around the canvas stays compact.\n          </p>\n        </article>\n      </Density>\n    </WorkspaceCanvas>\n  </PanelGroup>\n</Workspace>",
          "imports": "import { Density, PanelGroup, Workspace, WorkspaceCanvas } from \"@sableui/react\""
        },
        {
          "label": "Comfortable density",
          "code": "<Workspace density=\"comfortable\" toolbar={<WorkspaceBar><span className=\"text-ui-md\">Review</span></WorkspaceBar>}>\n  <PanelGroup>\n    <WorkspaceCanvas>\n      <div className=\"grid h-full place-items-center text-body-md text-muted-foreground\">Touch-friendly review mode</div>\n    </WorkspaceCanvas>\n  </PanelGroup>\n</Workspace>",
          "imports": "import { PanelGroup, Workspace, WorkspaceBar, WorkspaceCanvas } from \"@sableui/react\""
        }
      ]
    }
  ],
  "motionLayer": {
    "note": "Owned, zero-dependency motion. Policy controls drive the CSS --motion-scale switch; browser-native primitives cover the JS-only cases. Richer physics (drag, FLIP, velocity springs) is the future optional @sableui/motion adapter (peer-dep motion), not core.",
    "policy": [
      "MotionProvider",
      "useMotion",
      "useReducedMotion"
    ],
    "primitives": [
      "Presence",
      "Reveal",
      "useInView",
      "TextReveal",
      "startViewTransition",
      "ViewTransitionName"
    ],
    "docs": "foundations/motion"
  },
  "patterns": {
    "about": "Canonical full-page compositions. Copy the code as a route starting point (imports included), or import the same component from `@sableui/react/patterns` to preview it before diverging. Reuse when the information architecture fits; original compositions built from layout primitives are equally valid. Pattern resemblance does not establish design quality.",
    "items": [
      {
        "name": "AuthPage",
        "path": "patterns/auth-page.tsx",
        "summary": "Split sign-in page: a form column (brand mark, heading, email + password, primary sign-in, passkey and email-link alternatives, sign-up switch, terms) beside a brand panel painted from the theme's tones with a customer story card. Below lg the panel drops away and the form is the whole screen.",
        "intent": "Reach for this for sign-in, sign-up, forgot-password, and any single-purpose one-column form route (invite accept, unsubscribe). Not for multi-section forms (use SettingsPage).",
        "notes": [
          "The form column is a `form`-capped Region (480px), so the controls keep the same measure whether the panel is present or not.",
          "No card around the form: the page itself is the surface, and the brand panel carries the identity. A card on a blank page reads as a template.",
          "The heading is `text-heading-1` in an h1 — it is the page outline, so it takes a heading tier, not a card title.",
          "Brand mark, form and terms are a three-part column: mark pinned to the top, form vertically centred in the remaining space, terms pinned to the bottom.",
          "Forgot password sits under the password field, right-aligned, before the submit button — so it comes right after the field in tab order. Field has no label-row action slot yet.",
          "One primary action. Passkey and email link are outline buttons under an `or` Separator; switching to sign-up is a quiet `link-underline` link.",
          "Validation uses Field `validate` for product copy instead of the browser's generic required message. A rejected sign-in comes back through Form `errors` on the password field; the submit Button shows `loading` while the request is in flight.",
          "The brand panel artwork is a mesh of the theme's decorative tones over `--primary`, so it re-paints for every theme and mode. The relative-colour `oklch(from var(--tone-*) …)` lift needs an `inline-color` disable with a reason.",
          "The panel is `hidden lg:flex`: on a phone the form is the whole screen, with no decorative scroll above it."
        ],
        "a11y": [
          "The route renders inside <main> with one h1; the brand panel is an <aside> labelled \"Customer story\".",
          "Field auto-wires labels, describedby, and invalid state onto the inputs; on submit, the first invalid field is focused.",
          "Autocomplete attributes (`email webauthn`, `current-password`) keep password managers and passkey autofill working.",
          "The Forgot password and Create one links use `hit-target` to meet the 44px touch floor without changing layout.",
          "The artwork swatches are aria-hidden decoration; the brand link's accessible name is the wordmark."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Avatar, Badge, Button, Card, CardContent, Entity, Field, Form, GradientArt, Icon, Input, Region, Separator, Stack } from \"@sableui/react\"",
        "code": "export function AuthPage() {\n\tconst [pending, setPending] = useState(false)\n\tconst [errors, setErrors] = useState<Record<string, string>>({})\n\n\treturn (\n\t\t<main className=\"grid min-h-dvh bg-background lg:grid-cols-[minmax(0,1fr)_minmax(0,1.1fr)]\">\n\t\t\t<Region max=\"form\" safeArea={[\"top\", \"bottom\"]} className=\"flex flex-col\">\n\t\t\t\t{/* safeArea owns the region's own padding, so the breathing room sits one level in. */}\n\t\t\t\t<Stack gap={0} className=\"flex-1 py-8 sm:py-10\">\n\t\t\t\t\t<a href=\"/\" className=\"flex items-center gap-2.5 self-start rounded-sm motion-interactive motion-press\">\n\t\t\t\t\t\t{/* The same mark the app shell's sidebar and header carry. */}\n\t\t\t\t\t\t<Icon name=\"gem\" variant=\"solid\" className=\"text-2xl\" />\n\t\t\t\t\t\t<span className=\"text-title-lg\">Atelier</span>\n\t\t\t\t\t</a>\n\n\t\t\t\t\t<Stack gap={4} justify=\"center\" className=\"flex-1 py-12\">\n\t\t\t\t\t\t<Stack gap={1.5}>\n\t\t\t\t\t\t\t<h1 className=\"text-heading-1\">Welcome back</h1>\n\t\t\t\t\t\t\t<p className=\"text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\tSign in to pick up where you and your team left off.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</Stack>\n\n\t\t\t\t\t\t<Form\n\t\t\t\t\t\t\tclassName=\"gap-5\"\n\t\t\t\t\t\t\terrors={errors}\n\t\t\t\t\t\t\tonFormSubmit={() => {\n\t\t\t\t\t\t\t\tsetPending(true)\n\t\t\t\t\t\t\t\t// Replace with your auth call; a rejected sign-in comes back as a field error.\n\t\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\t\tsetPending(false)\n\t\t\t\t\t\t\t\t\tsetErrors({ password: \"That email and password don’t match. Try again or reset your password.\" })\n\t\t\t\t\t\t\t\t}, 900)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Field label=\"Email\" name=\"email\" validate={(value) => (value ? null : \"Enter your email address.\")}>\n\t\t\t\t\t\t\t\t<Input type=\"email\" autoComplete=\"email webauthn\" placeholder=\"you@example.com\" />\n\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t<Stack gap={1.5}>\n\t\t\t\t\t\t\t\t<Field label=\"Password\" name=\"password\" validate={(value) => (value ? null : \"Enter your password.\")}>\n\t\t\t\t\t\t\t\t\t<Input type=\"password\" autoComplete=\"current-password\" />\n\t\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t\t<a href=\"/forgot-password\" className=\"hit-target self-end text-body-sm text-muted-foreground link-underline motion-interactive\">\n\t\t\t\t\t\t\t\t\tForgot password?\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t<Button type=\"submit\" size=\"cta\" loading={pending} loadingLabel=\"Signing in\" className=\"w-full\">\n\t\t\t\t\t\t\t\tSign in\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Form>\n\n\t\t\t\t\t\t<Separator label=\"or\" />\n\n\t\t\t\t\t\t<Stack gap={1.5}>\n\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"cta\" className=\"w-full\" iconStart={<Icon name=\"key\" />}>\n\t\t\t\t\t\t\t\tSign in with a passkey\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"cta\" className=\"w-full\" iconStart={<Icon name=\"mail\" />}>\n\t\t\t\t\t\t\t\tEmail me a sign-in link\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Stack>\n\n\t\t\t\t\t\t<p className=\"text-body-md text-muted-foreground\">\n\t\t\t\t\t\t\tNo account?{\" \"}\n\t\t\t\t\t\t\t<a href=\"/signup\" className=\"hit-target link-underline motion-interactive text-foreground\">\n\t\t\t\t\t\t\t\tCreate one\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</Stack>\n\n\t\t\t\t\t<p className=\"text-body-xs text-muted-foreground\">\n\t\t\t\t\t\tBy signing in you agree to the{\" \"}\n\t\t\t\t\t\t<a href=\"/terms\" className=\"link-underline motion-interactive\">\n\t\t\t\t\t\t\tTerms\n\t\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\t\tand{\" \"}\n\t\t\t\t\t\t<a href=\"/privacy\" className=\"link-underline motion-interactive\">\n\t\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t.\n\t\t\t\t\t</p>\n\t\t\t\t</Stack>\n\t\t\t</Region>\n\n\t\t\t{/* The brand panel is decoration: on a phone the form is the whole screen. */}\n\t\t\t<aside aria-label=\"Customer story\" className=\"hidden p-3 lg:flex\">\n\t\t\t\t{/* Art painted from the theme's tones over its brand, so it follows every look. */}\n\t\t\t\t<GradientArt seed=\"Untitled (gold rush)\" className=\"flex flex-1 flex-col justify-end rounded-xl p-8\">\n\t\t\t\t\t<Card className=\"max-w-md\">\n\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t\t<Badge tone=\"1\" className=\"self-start\">\n\t\t\t\t\t\t\t\t\tCustomer story\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t<p className=\"text-title-lg\">\n\t\t\t\t\t\t\t\t\t“We moved three teams over in a week, and nobody asked for the old tool back.”\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\tclassName=\"p-0\"\n\t\t\t\t\t\t\t\t\tleading={<Avatar variant=\"art\" fallback=\"MO\" />}\n\t\t\t\t\t\t\t\t\ttitle=\"Mara Okafor\"\n\t\t\t\t\t\t\t\t\tsubtitle=\"Head of Design, Northwind\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\t\t\t\t</GradientArt>\n\t\t\t</aside>\n\t\t</main>\n\t)\n}"
      },
      {
        "name": "BrandLandingPage",
        "path": "patterns/brand-landing-page.tsx",
        "summary": "High-fidelity brand/product landing page: pill navigation, editorial hero type, a dark product scene, a value section, a how-it-works sequence, a customer story with outcomes, a closing CTA band, and a complete branded footer.",
        "intent": "Use this for a polished product marketing route that still needs to show a credible app surface. It is warmer and more tactile than the canonical LandingPage, but avoids trend-driven neon and generic hype cues.",
        "notes": [
          "The story runs promise → product → value → process → proof → ask: hero, product scene, 'Why Cove' value cards, a three-step how-it-works list, a customer story with outcome figures, then one closing CTA. Each section adds new evidence; no number is repeated from the product scene.",
          "One display headline owns the first viewport; supporting copy stays in body-lg at prose measure. Section headings are heading-1 under a `text-overline` eyebrow.",
          "The nav spends one compact pill surface, with a clear brand signal and two primary paths: sign in and request access.",
          "The product scene and the closing CTA band are dark islands: a `dark` class on the wrapper re-scopes every semantic token, so surfaces, muted ink, Badge tones and Buttons take the theme's own dark values in either page mode. Never fake a dark panel with overlay ink at reduced opacity — status tones tuned for a light page vanish on it.",
          "The scene is a picture of the product: `aria-hidden` + `inert` keep its sample button and figures out of the tab order and the outline. On narrow screens it drops the side column and keeps the signal map, so it scales instead of stacking into a second page.",
          "The chart keeps past weeks on the quiet `secondary` fill and gives the current week the one accent, so the signal reads at a glance.",
          "Value cards are real Cards with a neutral `sable-well` icon tile; the customer story is a Card rendered as a figure, with outcome figures split by Separator. The scene's nested panels take `rounded-concentric-xl/<inset>` from the shell's radius, so the corners stay parallel at any radius preset.",
          "The footer closes the page with brand reassurance, a plain status Badge, a three-column sitemap (three columns at every width), a digest signup, and legal links.",
          "All figures, names and the testimonial are sample content; replace them with real, verifiable claims."
        ],
        "a11y": [
          "The brand nav is a labeled nav landmark with real links and visible text.",
          "Each content section is a labelled region (by its h2, or aria-label for the customer story); the decorative product scene is hidden from assistive tech and inert.",
          "The how-it-works steps are an ordered list; the testimonial is a figure with a blockquote and a figcaption naming the speaker.",
          "The footer is a real footer landmark with a labeled footer nav, visible link text, and a labeled email field.",
          "TextReveal preserves the full headline as one accessible label and honors reduced-motion policy; Reveal shows the value cards immediately when motion is off.",
          "Status dots and the status Badge are paired with visible text labels so color is never the only signal."
        ],
        "imports": "import { Avatar, Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Grid, Icon, Input, Region, Reveal, Row, Separator, Stack, StatusDot, TextReveal } from \"@sableui/react\"",
        "code": "const navItems = [\n\t{ label: \"Platform\", href: \"#platform\" },\n\t{ label: \"How it works\", href: \"#how-it-works\" },\n\t{ label: \"Customers\", href: \"#customers\" },\n\t{ label: \"Pricing\", href: \"/pricing\" },\n]\n\nconst spaces = [\n\t{ name: \"Waypoint\", value: \"98.4%\", label: \"clear routes\" },\n\t{ name: \"Fielddesk\", value: \"12\", label: \"open holds\" },\n\t{ name: \"Archive\", value: \"4.8k\", label: \"sealed records\" },\n]\n\nconst routes = [\n\t{ label: \"Intake\", state: \"Open\", tone: \"info\" as const },\n\t{ label: \"Review\", state: \"Live\", tone: \"1\" as const },\n\t{ label: \"Archive\", state: \"Safe\", tone: \"success\" as const },\n]\n\n// Weekly approvals: past weeks recede, the current week carries the signal.\nconst bars = [\n\t{ week: \"w1\", height: \"38%\", current: false },\n\t{ week: \"w2\", height: \"56%\", current: false },\n\t{ week: \"w3\", height: \"44%\", current: false },\n\t{ week: \"w4\", height: \"68%\", current: false },\n\t{ week: \"w5\", height: \"52%\", current: false },\n\t{ week: \"w6\", height: \"78%\", current: false },\n\t{ week: \"w7\", height: \"60%\", current: false },\n\t{ week: \"w8\", height: \"72%\", current: false },\n\t{ week: \"w9\", height: \"88%\", current: true },\n]\n\nconst sceneMetrics = [\n\t{ label: \"Cleared\", value: \"1.8M\", detail: \"last 30 days\" },\n\t{ label: \"Review\", value: \"42s\", detail: \"median path\" },\n\t{ label: \"Spaces\", value: \"284\", detail: \"active teams\" },\n]\n\nconst values = [\n\t{\n\t\ticon: \"lock\" as const,\n\t\ttitle: \"Private by default\",\n\t\tbody: \"Roles, approvals, and handoff history stay with the people who need them. No shared inboxes, no forwarded screenshots.\",\n\t},\n\t{\n\t\ticon: \"bell\" as const,\n\t\ttitle: \"Signals before surprises\",\n\t\tbody: \"Cove watches every route and surfaces stalled reviews and expiring approvals while there is still time to act.\",\n\t},\n\t{\n\t\ticon: \"clock\" as const,\n\t\ttitle: \"A trail for every decision\",\n\t\tbody: \"Each approval keeps its context, reviewer, and timestamp, so an audit takes an afternoon instead of a quarter.\",\n\t},\n]\n\nconst steps = [\n\t{\n\t\tnumber: \"01\",\n\t\ttitle: \"Connect your spaces\",\n\t\tbody: \"Bring teams, vendors, and record stores into one workspace, with roles that mirror how you already work.\",\n\t},\n\t{\n\t\tnumber: \"02\",\n\t\ttitle: \"Route every approval\",\n\t\tbody: \"Requests follow the path you define, with reviewers, deadlines, and escalation built in from the start.\",\n\t},\n\t{\n\t\tnumber: \"03\",\n\t\ttitle: \"Seal the record\",\n\t\tbody: \"Approved work is archived with its full context and is ready for review the moment it closes.\",\n\t},\n]\n\nconst outcomes = [\n\t{ value: \"3.2×\", label: \"faster approvals in the first quarter\" },\n\t{ value: \"68%\", label: \"fewer follow-ups on handoffs\" },\n\t{ value: \"1 day\", label: \"to prepare a quarterly audit\" },\n]\n\nconst footerGroups = [\n\t{\n\t\ttitle: \"Platform\",\n\t\tlinks: [\n\t\t\t{ label: \"Overview\", href: \"#platform\" },\n\t\t\t{ label: \"Signals\", href: \"/signals\" },\n\t\t\t{ label: \"Approvals\", href: \"/approvals\" },\n\t\t\t{ label: \"Records\", href: \"/records\" },\n\t\t],\n\t},\n\t{\n\t\ttitle: \"Company\",\n\t\tlinks: [\n\t\t\t{ label: \"About\", href: \"/about\" },\n\t\t\t{ label: \"Security\", href: \"/security\" },\n\t\t\t{ label: \"Customers\", href: \"#customers\" },\n\t\t\t{ label: \"Careers\", href: \"/careers\" },\n\t\t],\n\t},\n\t{\n\t\ttitle: \"Resources\",\n\t\tlinks: [\n\t\t\t{ label: \"Guides\", href: \"/guides\" },\n\t\t\t{ label: \"Status\", href: \"/status\" },\n\t\t\t{ label: \"Changelog\", href: \"/changelog\" },\n\t\t\t{ label: \"Docs\", href: \"/docs\" },\n\t\t],\n\t},\n]\n\nconst legalLinks = [\n\t{ label: \"Privacy\", href: \"/privacy\" },\n\t{ label: \"Terms\", href: \"/terms\" },\n\t{ label: \"Contact\", href: \"/contact\" },\n]\n\nexport function BrandLandingPage() {\n\treturn (\n\t\t<div className=\"min-h-dvh overflow-hidden bg-background text-foreground\">\n\t\t\t<header className=\"relative z-10 pt-4\">\n\t\t\t\t<Region max=\"wide\">\n\t\t\t\t\t<nav\n\t\t\t\t\t\taria-label=\"Main\"\n\t\t\t\t\t\tclassName=\"flex min-h-15 items-center justify-between gap-3 rounded-full border border-border bg-card/90 px-3 py-2 shadow-sm backdrop-blur\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<a href=\"/\" className=\"flex items-center gap-2 rounded-full px-2 motion-interactive motion-press\">\n\t\t\t\t\t\t\t<span className=\"grid size-8 place-items-center rounded-full bg-primary text-primary-foreground\">\n\t\t\t\t\t\t\t\t<Icon name=\"sparkles\" className=\"text-sm\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"text-title-lg\">Cove</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<div className=\"hidden lg:block\">\n\t\t\t\t\t\t\t<Row gap={1}>\n\t\t\t\t\t\t\t\t{navItems.map((item) => (\n\t\t\t\t\t\t\t\t\t<Button key={item.label} variant=\"ghost\" size=\"sm\" render={<a href={item.href} />}>\n\t\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Row gap={1}>\n\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" className=\"max-sm:hidden\" render={<a href=\"/login\" />}>\n\t\t\t\t\t\t\t\tSign in\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button size=\"sm\" render={<a href=\"/demo\" />}>\n\t\t\t\t\t\t\t\tRequest access\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</nav>\n\t\t\t\t</Region>\n\t\t\t</header>\n\n\t\t\t<main>\n\t\t\t\t<Region as=\"section\" max=\"wide\" className=\"pb-20 pt-14 sm:pt-20 lg:pb-28\">\n\t\t\t\t\t<div className=\"grid items-center gap-12 lg:grid-cols-[1fr_1.1fr] lg:gap-10\">\n\t\t\t\t\t\t<Stack gap={3} className=\"max-w-2xl\">\n\t\t\t\t\t\t\t<Badge appearance=\"outline\" icon={<Icon name=\"lock\" className=\"text-sm\" />}>\n\t\t\t\t\t\t\t\tPrivate operations, made legible\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t<TextReveal\n\t\t\t\t\t\t\t\tas=\"h1\"\n\t\t\t\t\t\t\t\ttext=\"A calmer command center for high-trust work\"\n\t\t\t\t\t\t\t\tclassName=\"text-balance text-display-lg sm:text-display-2xl\"\n\t\t\t\t\t\t\t\tonce\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<p className=\"max-w-(--measure-prose) text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\tCove gives teams a polished front door and a serious operating\n\t\t\t\t\t\t\t\tsurface: approvals, signals, records, and handoffs in one\n\t\t\t\t\t\t\t\tunderstandable flow.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<Row gap={2} wrap className=\"pt-3\">\n\t\t\t\t\t\t\t\t<Button size=\"cta\" render={<a href=\"/demo\" />}>\n\t\t\t\t\t\t\t\t\tBook a walkthrough\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button size=\"cta\" variant=\"outline\" render={<a href=\"#platform\" />}>\n\t\t\t\t\t\t\t\t\tExplore the platform\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Stack>\n\n\t\t\t\t\t\t{/* The product scene is a dark island: `dark` re-scopes every\n\t\t\t\t\t\t    semantic token, so its surfaces, muted ink and status tones\n\t\t\t\t\t\t    are the theme's own dark values in either page mode. It is a\n\t\t\t\t\t\t    picture of the product, so it stays out of the tab order and\n\t\t\t\t\t\t    the accessibility tree; the hero copy carries its meaning. */}\n\t\t\t\t\t\t<div className=\"dark\" aria-hidden inert>\n\t\t\t\t\t\t\t<div className=\"overflow-hidden rounded-xl border border-border-floating bg-popover p-3 text-popover-foreground shadow-xl\">\n\t\t\t\t\t\t\t\t{/* Nested surfaces take concentric corners: each level's radius is\n\t\t\t\t\t\t\t\t    the shell's xl minus every inset between it and the shell edge. */}\n\t\t\t\t\t\t\t\t<div className=\"rounded-concentric-xl/3 border border-border bg-card\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-between border-b border-border px-4 py-3\">\n\t\t\t\t\t\t\t\t\t\t<Row gap={1}>\n\t\t\t\t\t\t\t\t\t\t\t<StatusDot tone=\"warning\" />\n\t\t\t\t\t\t\t\t\t\t\t<StatusDot tone=\"1\" />\n\t\t\t\t\t\t\t\t\t\t\t<StatusDot tone=\"success\" />\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-label-sm text-muted-foreground\">Live workspace</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"grid gap-3 p-3 md:grid-cols-[0.7fr_1.3fr]\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-3 max-md:hidden\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-concentric-xl/6 border border-border bg-background p-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-label-sm text-muted-foreground\">Spaces</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-4 space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{spaces.map((space) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div key={space.name} className=\"rounded-concentric-xl/10 bg-card p-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Row justify=\"between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-title-sm\">{space.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-mono-sm\">{space.value}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-body-xs text-muted-foreground\">{space.label}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-concentric-xl/6 border border-border bg-background p-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Row justify=\"between\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-title-sm\">Route status</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge tone=\"success\" size=\"sm\" dot>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tHealthy\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-4 space-y-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{routes.map((route) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Row key={route.label} justify=\"between\" className=\"rounded-full bg-card px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Row gap={1}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<StatusDot tone={route.tone} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-body-sm\">{route.label}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-label-sm text-muted-foreground\">{route.state}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded-concentric-xl/6 border border-border bg-background p-4\">\n\t\t\t\t\t\t\t\t\t\t\t<Row justify=\"between\" className=\"border-b border-border pb-4\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-label-sm text-muted-foreground\">Signal map</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-heading-4 sm:text-heading-3\">Every approval path in view</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"secondary\" size=\"sm\">Review</Button>\n\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-5 grid gap-4 sm:mt-6 sm:gap-5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Grid cols={9} gap={0.75} className=\"items-end rounded-concentric-xl/10 bg-card p-4 sm:gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{bars.map((bar) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div key={bar.week} className=\"flex h-36 items-end sm:h-56\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`w-full rounded-full ${bar.current ? \"bg-success\" : \"bg-secondary\"}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{ height: bar.height }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t\t\t\t\t<Grid cols={3} gap={1}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{sceneMetrics.map((metric) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div key={metric.label} className=\"rounded-concentric-xl/10 border border-border bg-card p-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"truncate text-label-sm text-muted-foreground\">{metric.label}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-2 text-heading-4 sm:text-heading-3\">{metric.value}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-body-xs text-muted-foreground max-sm:hidden\">{metric.detail}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Region>\n\n\t\t\t\t<section id=\"platform\" aria-labelledby=\"brand-platform-title\" className=\"border-y border-border bg-muted/40 py-20 lg:py-28\">\n\t\t\t\t\t<Region max=\"wide\">\n\t\t\t\t\t\t<Stack gap={6}>\n\t\t\t\t\t\t\t<Stack gap={2} className=\"max-w-2xl\">\n\t\t\t\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">Why Cove</p>\n\t\t\t\t\t\t\t\t<h2 id=\"brand-platform-title\" className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t\t\t\tOne private workspace for the decisions that matter.\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t<p className=\"max-w-(--measure-prose) text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tMost operations work lives in threads, spreadsheets, and memory.\n\t\t\t\t\t\t\t\t\tCove gives it a home: every request routed, every signal visible,\n\t\t\t\t\t\t\t\t\tevery outcome on the record.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t<Reveal>\n\t\t\t\t\t\t\t\t<Grid minItemWidth=\"calc(var(--spacing) * 64)\" gap={2}>\n\t\t\t\t\t\t\t\t\t{values.map((value) => (\n\t\t\t\t\t\t\t\t\t\t<Card key={value.title} render={<article />} className=\"h-full\">\n\t\t\t\t\t\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"mb-4 grid size-11 place-items-center rounded-md border border-border sable-well\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon name={value.icon} className=\"text-xl\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-title-lg\">{value.title}</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{value.body}</p>\n\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t</Reveal>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</Region>\n\t\t\t\t</section>\n\n\t\t\t\t<Region as=\"section\" id=\"how-it-works\" aria-labelledby=\"brand-steps-title\" max=\"wide\" className=\"py-20 lg:py-28\">\n\t\t\t\t\t<div className=\"grid gap-12 lg:grid-cols-[1fr_2fr] lg:gap-16\">\n\t\t\t\t\t\t<Stack gap={2} className=\"max-w-md\">\n\t\t\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">How it works</p>\n\t\t\t\t\t\t\t<h2 id=\"brand-steps-title\" className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t\t\tFrom request to sealed record.\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t<p className=\"text-body-md text-muted-foreground\">\n\t\t\t\t\t\t\t\tTeams are usually live within a week. Cove adapts to the routes\n\t\t\t\t\t\t\t\tyou already run instead of asking you to start over.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<div className=\"pt-3\">\n\t\t\t\t\t\t\t\t<Button variant=\"outline\" iconEnd={<Icon name=\"arrow-right\" />} render={<a href=\"/guides/rollout\" />}>\n\t\t\t\t\t\t\t\t\tRead the rollout guide\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t<ol className=\"grid gap-10 sm:grid-cols-3 sm:gap-6\">\n\t\t\t\t\t\t\t{steps.map((step) => (\n\t\t\t\t\t\t\t\t<li key={step.number} className=\"flex flex-col gap-2 border-t border-border-strong pt-6\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-mono-sm text-muted-foreground\">{step.number}</span>\n\t\t\t\t\t\t\t\t\t<h3 className=\"mt-3 text-title-lg sm:mt-6\">{step.title}</h3>\n\t\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{step.body}</p>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ol>\n\t\t\t\t\t</div>\n\t\t\t\t</Region>\n\n\t\t\t\t<Region as=\"section\" id=\"customers\" aria-label=\"Customer story\" max=\"wide\" className=\"pb-20 lg:pb-28\">\n\t\t\t\t\t<Card render={<figure />}>\n\t\t\t\t\t\t<div className=\"grid lg:grid-cols-[1.5fr_1fr]\">\n\t\t\t\t\t\t\t<CardContent className=\"flex flex-col justify-between gap-10 sm:p-10\">\n\t\t\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">Customer story</p>\n\t\t\t\t\t\t\t\t\t<blockquote className=\"text-balance text-heading-3 sm:text-heading-2\">\n\t\t\t\t\t\t\t\t\t\t“We used to chase approvals across four tools. Now every request\n\t\t\t\t\t\t\t\t\t\thas an owner, a deadline, and a record, and our auditors stopped\n\t\t\t\t\t\t\t\t\t\tasking for screenshots.”\n\t\t\t\t\t\t\t\t\t</blockquote>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t<figcaption className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t<Avatar variant=\"art\" size=\"lg\" fallback=\"MO\" />\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-title-sm\">Maya Okafor</p>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">Head of operations, Fielddesk</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</figcaption>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t<div className=\"border-border max-lg:border-t lg:border-s\">\n\t\t\t\t\t\t\t\t<CardContent className=\"flex h-full flex-col justify-center gap-6 sm:p-10\">\n\t\t\t\t\t\t\t\t\t{outcomes.map((outcome, index) => (\n\t\t\t\t\t\t\t\t\t\t<Stack key={outcome.label} gap={3}>\n\t\t\t\t\t\t\t\t\t\t\t{index > 0 && <Separator />}\n\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-heading-1 sm:text-display-lg\">{outcome.value}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-body-sm text-muted-foreground\">{outcome.label}</p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Card>\n\t\t\t\t</Region>\n\n\t\t\t\t<Region as=\"section\" aria-labelledby=\"brand-cta-title\" max=\"wide\" className=\"pb-20 lg:pb-28\">\n\t\t\t\t\t<div className=\"dark\">\n\t\t\t\t\t\t<div className=\"rounded-xl border border-border bg-card px-6 py-12 text-card-foreground sm:px-12 sm:py-16\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col gap-8 lg:flex-row lg:items-end lg:justify-between\">\n\t\t\t\t\t\t\t\t<Stack gap={3} className=\"max-w-2xl\">\n\t\t\t\t\t\t\t\t\t<h2 id=\"brand-cta-title\" className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t\t\t\t\tSee your own approval paths in Cove.\n\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t<p className=\"text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tA 30-minute walkthrough with your routes, your roles, and your\n\t\t\t\t\t\t\t\t\t\trecords. No slides.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t<Row gap={2} wrap>\n\t\t\t\t\t\t\t\t\t<Button size=\"cta\" render={<a href=\"/demo\" />}>\n\t\t\t\t\t\t\t\t\t\tBook a walkthrough\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button size=\"cta\" variant=\"ghost\" render={<a href=\"/pricing\" />}>\n\t\t\t\t\t\t\t\t\t\tView pricing\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Region>\n\t\t\t</main>\n\n\t\t\t<footer className=\"border-t border-border bg-muted/35\">\n\t\t\t\t<Region max=\"wide\" className=\"py-12 sm:py-16\">\n\t\t\t\t\t<div className=\"grid gap-10 lg:grid-cols-[1fr_1.35fr_1fr] lg:gap-8\">\n\t\t\t\t\t\t<Stack gap={4} className=\"max-w-sm\">\n\t\t\t\t\t\t\t<a href=\"/\" className=\"flex w-fit items-center gap-2 rounded-full motion-interactive motion-press\">\n\t\t\t\t\t\t\t\t<span className=\"grid size-9 place-items-center rounded-full bg-primary text-primary-foreground\">\n\t\t\t\t\t\t\t\t\t<Icon name=\"sparkles\" className=\"text-sm\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span className=\"text-title-lg\">Cove</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tA calm operating surface for teams that need trust, speed, and\n\t\t\t\t\t\t\t\tcontext without the noise.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<Badge appearance=\"plain\" tone=\"success\" dot>\n\t\t\t\t\t\t\t\tAll systems normal\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t</Stack>\n\n\t\t\t\t\t\t<nav aria-label=\"Footer\" className=\"grid grid-cols-3 gap-6\">\n\t\t\t\t\t\t\t{footerGroups.map((group) => (\n\t\t\t\t\t\t\t\t<div key={group.title}>\n\t\t\t\t\t\t\t\t\t<h2 className=\"text-label-md\">{group.title}</h2>\n\t\t\t\t\t\t\t\t\t<ul className=\"mt-3 space-y-1\">\n\t\t\t\t\t\t\t\t\t\t{group.links.map((link) => (\n\t\t\t\t\t\t\t\t\t\t\t<li key={link.label}>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref={link.href}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex min-h-9 items-center text-body-sm text-muted-foreground motion-interactive hover:text-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{link.label}\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</nav>\n\n\t\t\t\t\t\t<Card className=\"h-fit\">\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t{/* CardTitle carries the type; the h2 inside it keeps the outline. */}\n\t\t\t\t\t\t\t\t<CardTitle>\n\t\t\t\t\t\t\t\t\t<h2>The Cove digest</h2>\n\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\tOne note a month on trusted workflows and product releases.\n\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t<form action=\"/newsletter\" className=\"grid gap-2 sm:grid-cols-[1fr_auto]\">\n\t\t\t\t\t\t\t\t\t<label htmlFor=\"brand-footer-email\" className=\"sr-only\">\n\t\t\t\t\t\t\t\t\t\tWork email\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\tid=\"brand-footer-email\"\n\t\t\t\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"you@company.com\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" className=\"w-full sm:w-auto\">\n\t\t\t\t\t\t\t\t\t\tSubscribe\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"mt-12 flex flex-col gap-3 border-t border-border pt-6 text-caption text-muted-foreground sm:flex-row sm:items-center sm:justify-between\">\n\t\t\t\t\t\t<p>© 2026 Cove. All rights reserved.</p>\n\t\t\t\t\t\t<Row gap={4} wrap>\n\t\t\t\t\t\t\t{legalLinks.map((link) => (\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tkey={link.label}\n\t\t\t\t\t\t\t\t\thref={link.href}\n\t\t\t\t\t\t\t\t\tclassName=\"flex min-h-9 min-w-9 items-center motion-interactive hover:text-foreground\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{link.label}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t</Region>\n\t\t\t</footer>\n\t\t</div>\n\t)\n}"
      },
      {
        "name": "ChatPanel",
        "path": "patterns/chat-panel.tsx",
        "summary": "A full-height conversation surface: titled header, scrolling transcript, and a composer pinned to the bottom — the assembled shape of an AI assistant, a support thread, or a DM.",
        "intent": "Reach for this for any conversation that owns its screen — an assistant, a support inbox thread, a DM. Not for a chat docked beside other work (compose the same three parts inside a Sheet or a PanelGroup instead), and not for a comment thread under an article, which is a FeedPage concern.",
        "notes": [
          "This is the assembled screen with sample data. To wire it to a real streaming source (a hook such as useChat, or your own transport), read `sable docs building-a-chat`: who owns what, the turn lifecycle mapped to props, and every failure state.",
          "The panel is a fixed-height column, not a growing page. `h-[calc(100dvh_-_--spacing(12))]` on the Card (the viewport minus the Page's py-6, in spacing units so density moves both together — a fixed `3rem` drifts the moment density moves the padding) and `flex-1 min-h-0` on the MessageScroller are what make the transcript scroll instead of the document — the single most common thing to get wrong here, and it fails by pushing the composer off the bottom of the screen.",
          "The panel is a Card, not a hand-built bordered section: CardHeader (title, description, CardAction), the MessageScroller and a CardFooter all inset by the card's own `--card-p`, so the three regions share one edge at any card density.",
          "`dvh` rather than `vh`: on mobile the URL bar collapses, and a `vh`-sized panel puts the composer under it exactly when someone is trying to type.",
          "Region cap is `feed` (640px) — a conversation is a reading column, and the Bubble measure cap is tuned to the same assumption.",
          "The composer sits outside the scroll region, in a bordered CardFooter, so it stays put while the transcript moves.",
          "Grouping is derived from the data (`turns[i - 1].mine === turn.mine`) rather than hand-set, and the tail is dropped on continuations — that pairing is what makes a run read as one block.",
          "What the assistant did before answering — a doc it read, a tool it ran — is a `Marker variant=\"note\"` in that message's `header`, so it reads as part of the turn rather than as an event between turns.",
          "The assistant's long-form answer uses `variant=\"plain\"` and continues the same grouped run. A tinted box around a code block reads as a quote rather than as a turn. A plain Bubble sizes to its content with no measure cap, so it takes `max-w-full` here: bounded by the column, a wide code line scrolls inside the CodeBlock instead of pushing the transcript sideways on a phone.",
          "A settled answer carries its actions (copy, regenerate) in the Message `footer` as a `Toolbar` of icon `ToolbarButton`s with tooltips — one tab stop, arrow keys between them. The answer still streaming has none: there is nothing to copy or regenerate until it settles, and Stop lives in the composer.",
          "One turn, one Message: the reader's question and the file it refers to stack inside a single end-aligned Message rather than being sent as two.",
          "Assistant turns use `AgentAvatar` — initials like \"AI\" read as a person called A. I. Settled turns pass `live={false}` and rest; only the turn in flight is live, so the transcript is not a column of eyes following the reader.",
          "The answer in flight is a `StreamingText` in a `plain` Bubble, and ONE `pending` flag drives it, its AgentAvatar's `state` and the composer's `busy`. They are the same wait reported across the panel; letting them drift gives you a composer still saying 'sending' under an answer that already finished.",
          "The in-flight avatar's `thinking` state is the wait before the first token, so the row needs no spinner `Marker` or `ThinkingOrb` of its own. Two indicators for one wait read as two things happening — which is also why `StreamingText` takes `caret={false}` when something adjacent already reports it.",
          "MessageScroller needs no configuring for this: it re-follows on \"a message grew\" (ResizeObserver) as well as \"a message arrived\", so the newest token stays pinned while a reader who has scrolled up is left alone.",
          "For a new thread, swap the transcript's children for an `<EmptyState>` inside the same MessageScroller — the panel, header and composer are unchanged, which is the point of keeping them separate."
        ],
        "a11y": [
          "The panel header's title is the page's <h1> (an h1 inside CardTitle, which carries the type); the transcript is a scroll region with native overflow, so keyboard scrolling works unchanged.",
          "The answer in flight carries `aria-busy` rather than sitting in a live region. That is deliberate: a live region around streamed text announces every token, which is unusable. Announce once when the turn settles, from whatever owns the turn — the incomplete state is still exposed, just not narrated.",
          "The composer is a real <form> whose Enter handling skips IME composition, and every icon-only control in the panel carries an accessible label — the answer actions also carry a tooltip, and the stop control is named for what it stops (`stopLabel=\"Stop answering\"`)."
        ],
        "imports": "\"use client\"\n\nimport { AgentAvatar, Attachment, Bubble, Button, Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle, ChatComposer, CodeBlock, Icon, Marker, MenuRadioGroup, MenuRadioItem, Message, MessageScroller, Page, SettingsMenu, SettingsRow, SimpleTooltip, StreamingText, Toolbar, ToolbarButton } from \"@sableui/react\"",
        "code": "/**\n * The request is in flight. In an app this is your send state — from `useChat`,\n * a fetch, whatever owns the turn — and it is deliberately ONE flag driving three\n * places: the composer's `busy`, the answer's `streaming` and its avatar's\n * `state`. They are the same wait reported across the panel, and letting them\n * drift is how you get a composer that still says \"sending\" under an answer that\n * already finished.\n */\nconst pending = true\n\n/** The answer so far. Append tokens to this; `StreamingText` assumes it only grows. */\nconst streamed =\n\t\"Yes, appends are already safe: your layout effect measures before paint. The jump is on the prepend path, which reads scrollHeight after the new rows\"\n\n/**\n * The opening exchange. `step` is what the assistant did before answering — a\n * doc it read, a tool it ran — and it rides in that message's header, so it\n * reads as part of the turn rather than as an event between turns.\n */\nconst turns: { id: string; mine: boolean; step?: string; body: string }[] = [\n\t{\n\t\tid: \"t_01\",\n\t\tmine: true,\n\t\tbody: \"Our chat scroll jumps every time older messages load. What are we doing wrong?\",\n\t},\n\t{\n\t\tid: \"t_02\",\n\t\tmine: false,\n\t\tstep: \"Read message-scroller.md\",\n\t\tbody: \"Almost always the anchor. If you preserve the scroll position by measuring the container, prepending history moves everything under the reader.\",\n\t},\n\t{\n\t\tid: \"t_03\",\n\t\tmine: false,\n\t\tbody: \"Anchor on the oldest rendered message instead and add back however far it moved. Appends leave it alone, so the same rule covers both.\",\n\t},\n]\n\nexport function ChatPanel() {\n\t// One identity for every assistant turn: AgentAvatar, not initials (\"AI\" in\n\t// a circle reads as a person called A. I.). Settled turns are not `live`, so\n\t// they rest and stop watching the pointer; only the turn in flight moves. A\n\t// transcript where every row followed the reader would be a wall of eyes.\n\tconst assistant = <AgentAvatar size=\"sm\" live={false} />\n\n\treturn (\n\t\t<Page as=\"main\" max=\"feed\" gap={0} className=\"py-6\">\n\t\t\t{/* h-dvh minus the page's own padding (py-6 = 12 spacing units, in\n\t\t\t    spacing units so density moves both together): the panel owns the\n\t\t\t    viewport, and the transcript — not the page — is the thing that\n\t\t\t    scrolls. The panel is a Card; its parts inset by the card's own\n\t\t\t    --card-p, so header, transcript and composer share one edge. */}\n\t\t\t<Card\n\t\t\t\trender={<section aria-labelledby=\"chat-title\" />}\n\t\t\t\tclassName=\"flex h-[calc(100dvh_-_--spacing(12))] flex-col overflow-hidden\"\n\t\t\t>\n\t\t\t\t<CardHeader divided>\n\t\t\t\t\t{/* CardTitle carries the type; the h1 inside it is the page heading. */}\n\t\t\t\t\t<CardTitle>\n\t\t\t\t\t\t<h1 id=\"chat-title\">Scroll behaviour</h1>\n\t\t\t\t\t</CardTitle>\n\t\t\t\t\t<CardDescription>Assistant · answers from your team's docs</CardDescription>\n\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t{/* Labelled, not a bare plus: the composer already has a plus\n\t\t\t\t\t\t    (attach), and two identical glyphs a panel apart that do\n\t\t\t\t\t\t    different things is a guessing game. */}\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\">\n\t\t\t\t\t\t\t<Icon name=\"edit\" />\n\t\t\t\t\t\t\tNew chat\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</CardAction>\n\t\t\t\t</CardHeader>\n\n\t\t\t\t{/* flex-1 min-h-0 is the whole layout: it bounds the scroll region\n\t\t\t\t    against the panel instead of letting the transcript grow the page. */}\n\t\t\t\t<MessageScroller className=\"min-h-0 flex-1 p-(--card-p)\">\n\t\t\t\t\t<Marker variant=\"separator\">Today</Marker>\n\n\t\t\t\t\t{turns.map((turn, i) => {\n\t\t\t\t\t\t// Derived, not hand-set: a turn continues a run when the one\n\t\t\t\t\t\t// before it has the same author. A continuation drops its\n\t\t\t\t\t\t// avatar (Message keeps the column) AND its tail (Bubble keeps\n\t\t\t\t\t\t// the ear's space) — together, that makes the run one block.\n\t\t\t\t\t\tconst continues = i > 0 && turns[i - 1].mine === turn.mine\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Message\n\t\t\t\t\t\t\t\tkey={turn.id}\n\t\t\t\t\t\t\t\tmessageId={turn.id}\n\t\t\t\t\t\t\t\talign={turn.mine ? \"end\" : \"start\"}\n\t\t\t\t\t\t\t\tgrouped={continues}\n\t\t\t\t\t\t\t\tavatar={turn.mine ? undefined : assistant}\n\t\t\t\t\t\t\t\theader={\n\t\t\t\t\t\t\t\t\tturn.step ? (\n\t\t\t\t\t\t\t\t\t\t<Marker variant=\"note\" icon=\"book\" className=\"justify-start\">\n\t\t\t\t\t\t\t\t\t\t\t{turn.step}\n\t\t\t\t\t\t\t\t\t\t</Marker>\n\t\t\t\t\t\t\t\t\t) : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Bubble\n\t\t\t\t\t\t\t\t\tvariant={turn.mine ? \"primary\" : \"muted\"}\n\t\t\t\t\t\t\t\t\talign={turn.mine ? \"end\" : \"start\"}\n\t\t\t\t\t\t\t\t\ttail={!continues}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{turn.body}\n\t\t\t\t\t\t\t\t</Bubble>\n\t\t\t\t\t\t\t</Message>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\n\t\t\t\t\t{/* The same run, continued: long-form output with no bubble,\n\t\t\t\t\t    because a tinted box around a code block reads as a quote\n\t\t\t\t\t    rather than as a turn. Its footer carries what the reader does\n\t\t\t\t\t    WITH a settled answer, as a Toolbar: one tab stop, arrow keys\n\t\t\t\t\t    between the actions. */}\n\t\t\t\t\t<Message\n\t\t\t\t\t\tmessageId=\"t_04\"\n\t\t\t\t\t\tgrouped\n\t\t\t\t\t\tavatar={assistant}\n\t\t\t\t\t\tfooter={\n\t\t\t\t\t\t\t<Toolbar aria-label=\"Answer actions\">\n\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Copy answer\">\n\t\t\t\t\t\t\t\t\t<ToolbarButton size=\"icon-sm\" aria-label=\"Copy answer\">\n\t\t\t\t\t\t\t\t\t\t<Icon name=\"copy\" />\n\t\t\t\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Regenerate\">\n\t\t\t\t\t\t\t\t\t<ToolbarButton size=\"icon-sm\" aria-label=\"Regenerate answer\">\n\t\t\t\t\t\t\t\t\t\t<Icon name=\"refresh\" />\n\t\t\t\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t\t\t</Toolbar>\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* max-w-full: a plain Bubble sizes to its content with no\n\t\t\t\t\t\t    measure cap, and a code line is wider than a phone. Bounded\n\t\t\t\t\t\t    by the column, the CodeBlock scrolls inside itself instead of\n\t\t\t\t\t\t    pushing the whole transcript sideways. */}\n\t\t\t\t\t\t<Bubble variant=\"plain\" className=\"max-w-full\">\n\t\t\t\t\t\t\t<p className=\"text-body-md text-foreground\">\n\t\t\t\t\t\t\t\tHere is the shape of it:\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<CodeBlock\n\t\t\t\t\t\t\t\tcode={\n\t\t\t\t\t\t\t\t\t\"const shift = anchor.offsetTop - lastTop\\nif (shift !== 0) viewport.scrollTop += shift\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfilename=\"preserve.ts\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Bubble>\n\t\t\t\t\t</Message>\n\n\t\t\t\t\t{/* The reader's follow-up is one turn: the question and the file\n\t\t\t\t\t    it refers to stack in a single Message, so they share a side, an\n\t\t\t\t\t    edge and a timestamp rather than reading as two sends. */}\n\t\t\t\t\t<Message messageId=\"t_05\" align=\"end\">\n\t\t\t\t\t\t<Bubble variant=\"tint\" align=\"end\">\n\t\t\t\t\t\t\tHere's ours. Does the same fix cover new messages arriving?\n\t\t\t\t\t\t</Bubble>\n\t\t\t\t\t\t<Attachment\n\t\t\t\t\t\t\tname=\"scroller.tsx\"\n\t\t\t\t\t\t\tmeta=\"4.2 KB · TSX\"\n\t\t\t\t\t\t\tonOpen={() => undefined}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Message>\n\n\t\t\t\t\t{/* The answer arriving. Its avatar is the one live AgentAvatar in\n\t\t\t\t\t    the transcript: `thinking` before the first token, `speaking`\n\t\t\t\t\t    while tokens land, so the row needs no spinner of its own — two\n\t\t\t\t\t    indicators for one wait read as two things happening. What\n\t\t\t\t\t    stays is the step it took, as a finished note in the header.\n\n\t\t\t\t\t    No bubble, same as the long-form answer above: a tinted box\n\t\t\t\t\t    around a growing paragraph makes the reflow look like the box\n\t\t\t\t\t    breathing. And no answer actions yet — there is nothing to copy\n\t\t\t\t\t    or regenerate until it settles; Stop lives in the composer.\n\n\t\t\t\t\t    MessageScroller needs no help with this — it already re-follows on\n\t\t\t\t\t    \"a message grew\" (ResizeObserver), not just on \"a message arrived\",\n\t\t\t\t\t    so the newest token stays pinned while the reader can still scroll\n\t\t\t\t\t    up without being yanked back. */}\n\t\t\t\t\t<Message\n\t\t\t\t\t\tmessageId=\"t_06\"\n\t\t\t\t\t\tavatar={<AgentAvatar size=\"sm\" state={pending ? \"speaking\" : \"idle\"} />}\n\t\t\t\t\t\theader={\n\t\t\t\t\t\t\t<Marker variant=\"note\" icon=\"file\" className=\"justify-start\">\n\t\t\t\t\t\t\t\tRead scroller.tsx\n\t\t\t\t\t\t\t</Marker>\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Bubble variant=\"plain\">\n\t\t\t\t\t\t\t<StreamingText text={streamed} streaming={pending} />\n\t\t\t\t\t\t</Bubble>\n\t\t\t\t\t</Message>\n\t\t\t\t</MessageScroller>\n\n\t\t\t\t<CardFooter className=\"pt-(--card-p) shadow-[inset_0_1px_0_var(--border)]\">\n\t\t\t\t\t<ChatComposer\n\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\tplaceholder=\"Ask a follow-up…\"\n\t\t\t\t\t\t// Same flag as the answer's `streaming`, which is what turns Send\n\t\t\t\t\t\t// into Stop. A composer that stays sendable mid-answer invites a\n\t\t\t\t\t\t// second request on top of the one still running.\n\t\t\t\t\t\tbusy={pending}\n\t\t\t\t\t\tonStop={() => undefined}\n\t\t\t\t\t\tstopLabel=\"Stop answering\"\n\t\t\t\t\t\tonAttach={() => undefined}\n\t\t\t\t\t\t// A keyboard hint, so only where Enter sends: on touch Return\n\t\t\t\t\t\t// breaks the line and the button sends, and the row goes away.\n\t\t\t\t\t\tfooter={({ sendOn }) => (sendOn === \"enter\" ? \"Enter to send · Shift+Enter for a new line\" : null)}\n\t\t\t\t\t\t// Model and effort sit in `actions`, at the send end of the row:\n\t\t\t\t\t\t// they qualify the message about to be sent, so they belong beside\n\t\t\t\t\t\t// the button that sends it rather than next to the attach control.\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t<SettingsMenu\n\t\t\t\t\t\t\t\tvariant=\"subtle\"\n\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\tlabel=\"Change model and effort\"\n\t\t\t\t\t\t\t\tsummary={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-foreground\">5.6 Sol</span>{\" \"}\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">High</span>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<SettingsRow label=\"Model\" value=\"5.6 Sol\">\n\t\t\t\t\t\t\t\t\t<MenuRadioGroup defaultValue=\"sol\">\n\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"sol\">5.6 Sol</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"lite\">5.6 Lite</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t</MenuRadioGroup>\n\t\t\t\t\t\t\t\t</SettingsRow>\n\t\t\t\t\t\t\t\t<SettingsRow label=\"Effort\" value=\"High\">\n\t\t\t\t\t\t\t\t\t<MenuRadioGroup defaultValue=\"high\">\n\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"low\">Low</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"standard\">Standard</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"high\">High</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t</MenuRadioGroup>\n\t\t\t\t\t\t\t\t</SettingsRow>\n\t\t\t\t\t\t\t\t<SettingsRow label=\"Speed\" value=\"Standard\">\n\t\t\t\t\t\t\t\t\t<MenuRadioGroup defaultValue=\"standard\">\n\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"standard\">Standard</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"priority\">Priority</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t</MenuRadioGroup>\n\t\t\t\t\t\t\t\t</SettingsRow>\n\t\t\t\t\t\t\t</SettingsMenu>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</CardFooter>\n\t\t\t</Card>\n\t\t</Page>\n\t)\n}"
      },
      {
        "name": "DashboardPage",
        "path": "patterns/dashboard-page.tsx",
        "summary": "App-shell admin dashboard: a branded Sidebar with an account footer (AppHeader + BottomNav below lg), a KPI row, an edge-to-edge accounts table with seat-usage Meters, and supporting payout, top-customer, release and activity cards — the default shape for an operator or analytics home route.",
        "intent": "Reach for this when a route's job is monitoring or managing many records (sales, orders, accounts, posts) with a few headline numbers. Not for reading-focused routes (use FeedPage) or single-record routes (use ListDetailPage's detail side).",
        "notes": [
          "Region cap is `wide` (1280px): dashboards hold tables and multi-column grids, never a reading column.",
          "Hierarchy runs headline → records → context: KPI row, then the primary table beside its two closest companions (payout, top customers), then the lower-priority lists (upcoming, activity). Every row of the grid is filled so the route ends on content, not empty canvas.",
          "Stat cards: CardHeader carries the label (CardDescription) and the value; KPI values are `text-mono-xl` — the metric mono tier, tabular figures — never a heading tier. The trend Badge sits with its comparison note in CardContent, so the value keeps the full card width when the row folds to 2×2 on a phone.",
          "Stat cards use an explicit cols map (2 → 4) — a 4-stat row must fold to 2×2, never strand an orphan the way auto-fit can.",
          "The table runs flush to the card edges with `<CardContent flush>`, which hands the card's padding to the table (`--table-edge-px`), so the first and last columns line up with the CardHeader at any card density — never hand-set pl-6/pr-6. Numeric columns align end in mono; Table scrolls horizontally inside the card on narrow screens.",
          "Seats used / seats is a `Meter` (how full a known range is), not `Progress` (task progress). Status is `Badge appearance=\"plain\" dot`, with the app's own states mapped to tones once at the top of the file.",
          "Lists are Entity rows in CardList, inset to the card padding and divided by hairlines — never CardContent with hand-tuned px. A card that shares a grid row with a taller one becomes `flex flex-col` and pins its CardFooter with `mt-auto`.",
          "Brand and account live in the Sidebar: SidebarHeader holds the mark + wordmark, SidebarFooter holds the signed-in Entity with an OverflowMenu. Sidebar rebinds the page ink tokens to its own, so the Entity and OverflowMenu read correctly even when a theme paints the rail dark on a light page.",
          "The page has exactly one heading-1 (PageHeader); card titles are Title tier, not headings.",
          "Chrome (Sidebar) is outside the content grid; the Page region caps only content.",
          "Sidebar hides below lg, so the shell's header carries an AppHeader (brand + account) and its footer a BottomNav with the same destinations — never strand mobile users without navigation."
        ],
        "a11y": [
          "AppShell provides the skip link and <main id=\"main-content\"> landmark.",
          "The active SidebarItem and BottomNavItem carry aria-current via `active`.",
          "DataTable headers are real <th>; sortable columns are announced.",
          "Each seat-usage Meter has an aria-label naming the account and aria-valuetext reading \"184 of 250 seats used\".",
          "Avatars beside a visible name use an empty alt so the name is not read twice."
        ],
        "imports": "import { AppHeader, AppShell, Avatar, Badge, BottomNav, BottomNavItem, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, DataTable, Entity, Grid, Icon, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, Meter, NotificationBadge, Page, PageHeader, RelativeTime, Row, Sidebar, SidebarAccount, SidebarBrand, SidebarFooter, SidebarHeader, SidebarItem, SidebarNav, Stack } from \"@sableui/react\"",
        "code": "// Account status → Badge tone. Sable has no status vocabulary of its own;\n// an app maps ITS states onto tones once, here, and every badge follows.\nconst STATUS_TONE = { active: \"success\", onboarding: \"info\", full: \"1\", cancelled: \"neutral\" } as const\nconst STATUS_LABEL = { active: \"Active\", onboarding: \"Onboarding\", full: \"Seats full\", cancelled: \"Cancelled\" } as const\ntype AccountStatus = keyof typeof STATUS_TONE\n\nconst MIN = 60 * 1000\nconst HOUR = 60 * MIN\nconst DAY = 24 * HOUR\n\nconst usd = new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\", maximumFractionDigits: 0 })\nconst usdCents = new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\nconst shortDate = (offset: number) =>\n\tnew Date(Date.now() + offset).toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\" })\n\nconst stats = [\n\t{ label: \"Revenue\", value: \"$18,240\", delta: \"+8.2%\", up: true, note: \"vs. $16,857\" },\n\t{ label: \"Active seats\", value: \"1,284\", delta: \"+3.1%\", up: true, note: \"182 added\" },\n\t{ label: \"Accounts\", value: \"312\", delta: \"+12.4%\", up: true, note: \"Best month yet\" },\n\t{ label: \"Seat usage\", value: \"64%\", delta: \"−1.8%\", up: false, note: \"6 near their limit\" },\n]\n\nconst accounts = [\n\t{ id: \"ac_01\", title: \"Northwind\", status: \"active\" as const, used: 184, seats: 250, price: 16, started: -6 * DAY },\n\t{ id: \"ac_02\", title: \"Harbor Labs\", status: \"full\" as const, used: 100, seats: 100, price: 20, started: -19 * DAY },\n\t{ id: \"ac_03\", title: \"Brightline\", status: \"active\" as const, used: 61, seats: 150, price: 16, started: -2 * DAY },\n\t{ id: \"ac_04\", title: \"Tidewater Co.\", status: \"active\" as const, used: 212, seats: 300, price: 12, started: -27 * DAY },\n\t{ id: \"ac_05\", title: \"Saltworks\", status: \"cancelled\" as const, used: 38, seats: 75, price: 20, started: -44 * DAY },\n\t{ id: \"ac_06\", title: \"Paper Moon\", status: \"full\" as const, used: 50, seats: 50, price: 24, started: -58 * DAY },\n\t{ id: \"ac_07\", title: \"Signal Studio\", status: \"onboarding\" as const, used: 0, seats: 200, price: 16, started: 3 * DAY },\n\t{ id: \"ac_08\", title: \"Bluewater\", status: \"cancelled\" as const, used: 72, seats: 120, price: 12, started: -71 * DAY },\n\t{ id: \"ac_09\", title: \"Ember & Field\", status: \"full\" as const, used: 80, seats: 80, price: 20, started: -86 * DAY },\n]\nconst accountCount = 312\n\nconst payout = {\n\tamount: 8862.64,\n\tdate: 5 * DAY,\n\tlines: [\n\t\t{ label: \"Subscriptions\", value: 9127.33 },\n\t\t{ label: \"Processing (2.9%)\", value: -264.69 },\n\t\t{ label: \"Deposits to\", value: \"Checking ••4821\" },\n\t],\n}\n\nconst customers = [\n\t{ id: \"cu_01\", name: \"Northwind\", handle: \"northwind.io\", initials: \"NW\", seats: 184, spent: 2944 },\n\t{ id: \"cu_02\", name: \"Tidewater Co.\", handle: \"tidewater.co\", initials: \"TC\", seats: 212, spent: 2544 },\n\t{ id: \"cu_03\", name: \"Harbor Labs\", handle: \"harborlabs.com\", initials: \"HL\", seats: 100, spent: 2000 },\n\t{ id: \"cu_04\", name: \"Ember & Field\", handle: \"emberfield.com\", initials: \"EF\", seats: 80, spent: 1600 },\n]\n\nconst upcoming = [\n\t{ id: \"up_01\", title: \"Version 2.4\", detail: \"Shared reports · All plans\", at: 3 * DAY },\n\t{ id: \"up_02\", title: \"Audit log export\", detail: \"Business plan · Beta\", at: 12 * DAY },\n\t{ id: \"up_03\", title: \"Version 2.5\", detail: \"Offline mode · All plans\", at: 26 * DAY },\n\t{ id: \"up_04\", title: \"Usage-based billing\", detail: \"Studio and Business · Beta\", at: 34 * DAY },\n]\n\nconst activity = [\n\t{ id: \"ev_01\", who: \"Nina Simone\", initials: \"NS\", what: \"added 12 seats to Northwind · 184 of 250\", when: 2 * MIN },\n\t{ id: \"ev_02\", who: \"Grace Hopper\", initials: \"GH\", what: \"upgraded Brightline to Studio\", when: 26 * MIN },\n\t{ id: \"ev_03\", who: \"Frida Kahlo\", initials: \"FK\", what: \"paid invoice INV-0042 for Tidewater Co.\", when: 1 * HOUR },\n\t{ id: \"ev_04\", who: \"Mary Shelley\", initials: \"MS\", what: \"joined the Harbor Labs workspace\", when: 3 * HOUR },\n\t{ id: \"ev_05\", who: \"Nina Simone\", initials: \"NS\", what: \"booked onboarding for Signal Studio\", when: 6 * HOUR },\n]\n\nexport function DashboardPage() {\n\treturn (\n\t\t<AppShell\n\t\t\t// Sidebar hides below lg, so the same destinations ride in the shell's\n\t\t\t// mobile slots — without them the route has no navigation under 1024px.\n\t\t\theader={\n\t\t\t\t<AppHeader\n\t\t\t\t\ttitle={\n\t\t\t\t\t\t<Row gap={1} align=\"center\">\n\t\t\t\t\t\t\t<Icon name=\"gem\" variant=\"solid\" className=\"text-xl\" />\n\t\t\t\t\t\t\t<span className=\"text-title-sm\">Atelier</span>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t}\n\t\t\t\t\tactions={<Avatar variant=\"art\" size=\"sm\" fallback=\"AL\" alt=\"Ada Lovelace\" />}\n\t\t\t\t/>\n\t\t\t}\n\t\t\tbottomNav={\n\t\t\t\t<BottomNav aria-label=\"Primary\">\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"grid\" />} label=\"Overview\" showLabel active render={<a href=\"/\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"folder\" />} label=\"Accounts\" showLabel render={<a href=\"/accounts\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"user\" />} label=\"Customers\" showLabel render={<a href=\"/customers\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"bell\" />} label=\"Activity\" showLabel render={<a href=\"/activity\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"gear\" />} label=\"Settings\" showLabel render={<a href=\"/settings\" />} />\n\t\t\t\t</BottomNav>\n\t\t\t}\n\t\t\tsidebar={\n\t\t\t\t<Sidebar>\n\t\t\t\t\t<SidebarHeader>\n\t\t\t\t\t\t<SidebarBrand mark={<Icon name=\"gem\" variant=\"solid\" />} label=\"Atelier\" render={<a href=\"/\" />} />\n\t\t\t\t\t</SidebarHeader>\n\t\t\t\t\t<SidebarNav>\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"grid\" />} label=\"Overview\" active render={<a href=\"/\" />} />\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"folder\" />} label=\"Accounts\" render={<a href=\"/accounts\" />} />\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"user\" />} label=\"Customers\" render={<a href=\"/customers\" />} />\n\t\t\t\t\t\t<SidebarItem\n\t\t\t\t\t\t\ticon={<Icon name=\"bell\" />}\n\t\t\t\t\t\t\tlabel=\"Activity\"\n\t\t\t\t\t\t\tbadge={<NotificationBadge count={4} tone=\"neutral\" />}\n\t\t\t\t\t\t\trender={<a href=\"/activity\" />}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"gear\" />} label=\"Settings\" render={<a href=\"/settings\" />} />\n\t\t\t\t\t</SidebarNav>\n\t\t\t\t\t<SidebarFooter>\n\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t<MenuTrigger\n\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t<SidebarAccount\n\t\t\t\t\t\t\t\t\t\tavatar={<Avatar variant=\"art\" size=\"xs\" fallback=\"AL\" alt=\"\" />}\n\t\t\t\t\t\t\t\t\t\tlabel=\"Ada Lovelace\"\n\t\t\t\t\t\t\t\t\t\tdetail=\"@ada\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuContent side=\"top\" align=\"start\">\n\t\t\t\t\t\t\t\t<MenuItem render={<a href=\"/@ada\" />}>View profile</MenuItem>\n\t\t\t\t\t\t\t\t<MenuItem render={<a href=\"/settings\" />}>Settings</MenuItem>\n\t\t\t\t\t\t\t\t<MenuSeparator />\n\t\t\t\t\t\t\t\t<MenuItem>Sign out</MenuItem>\n\t\t\t\t\t\t\t</MenuContent>\n\t\t\t\t\t\t</Menu>\n\t\t\t\t\t</SidebarFooter>\n\t\t\t\t</Sidebar>\n\t\t\t}\n\t\t>\n\t\t\t<Page max=\"wide\" gap={4} className=\"py-6\">\n\t\t\t\t<PageHeader\n\t\t\t\t\ttitle=\"Overview\"\n\t\t\t\t\tdescription=\"Revenue and account activity for the last 30 days.\"\n\t\t\t\t\tactions={\n\t\t\t\t\t\t<Row gap={2}>\n\t\t\t\t\t\t\t<Button variant=\"outline\">\n\t\t\t\t\t\t\t\t<Icon name=\"download\" />\n\t\t\t\t\t\t\t\tExport\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button>\n\t\t\t\t\t\t\t\t<Icon name=\"plus\" />\n\t\t\t\t\t\t\t\tNew account\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<Grid cols={{ base: 2, xl: 4 }} gap={3}>\n\t\t\t\t\t{stats.map((stat) => (\n\t\t\t\t\t\t<Card key={stat.label}>\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t<CardDescription>{stat.label}</CardDescription>\n\t\t\t\t\t\t\t\t<CardTitle className=\"text-mono-xl\">{stat.value}</CardTitle>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t<Row gap={1} wrap>\n\t\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\t\ttone={stat.up ? \"success\" : \"warning\"}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\ticon={<Icon name={stat.up ? \"arrow-up\" : \"arrow-down\"} />}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{stat.delta}\n\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t<span className=\"text-caption text-muted-foreground\">{stat.note}</span>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t))}\n\t\t\t\t</Grid>\n\t\t\t\t<Grid cols={{ base: 1, xl: 3 }} gap={3}>\n\t\t\t\t\t<Card className=\"flex flex-col xl:col-span-2\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Accounts</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>Seats across your customers, newest first.</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardContent flush className=\"flex-1\">\n\t\t\t\t\t\t\t<DataTable\n\t\t\t\t\t\t\t\tdata={accounts}\n\t\t\t\t\t\t\t\trowKey={(row) => row.id}\n\t\t\t\t\t\t\t\tdefaultSort={{ key: \"started\", direction: \"desc\" }}\n\t\t\t\t\t\t\t\tcolumns={[\n\t\t\t\t\t\t\t\t\t{ key: \"title\", header: \"Account\", sortable: true, className: \"text-label-md whitespace-nowrap\" },\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: \"status\",\n\t\t\t\t\t\t\t\t\t\theader: \"Status\",\n\t\t\t\t\t\t\t\t\t\tcell: (row) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge appearance=\"plain\" tone={STATUS_TONE[row.status as AccountStatus]} dot>\n\t\t\t\t\t\t\t\t\t\t\t\t{STATUS_LABEL[row.status as AccountStatus]}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: \"used\",\n\t\t\t\t\t\t\t\t\t\theader: \"Seats\",\n\t\t\t\t\t\t\t\t\t\tsortable: true,\n\t\t\t\t\t\t\t\t\t\tsortValue: (row) => row.used / row.seats,\n\t\t\t\t\t\t\t\t\t\tcell: (row) => (\n\t\t\t\t\t\t\t\t\t\t\t<Row gap={3} align=\"center\" className=\"min-w-40\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Meter\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={row.used}\n\t\t\t\t\t\t\t\t\t\t\t\t\tmax={row.seats}\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttone={row.used === row.seats ? \"success\" : \"primary\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label={`${row.title} seats used`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tgetAriaValueText={(_, v) => `${v} of ${row.seats} seats used`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-mono-caption whitespace-nowrap text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{row.used}/{row.seats}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: \"revenue\",\n\t\t\t\t\t\t\t\t\t\theader: \"Revenue\",\n\t\t\t\t\t\t\t\t\t\talign: \"end\",\n\t\t\t\t\t\t\t\t\t\tsortable: true,\n\t\t\t\t\t\t\t\t\t\tsortValue: (row) => row.used * row.price,\n\t\t\t\t\t\t\t\t\t\tcell: (row) =>\n\t\t\t\t\t\t\t\t\t\t\trow.used > 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-mono-md\">{usd.format(row.used * row.price)}</span>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-mono-md text-muted-foreground\">—</span>\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: \"started\",\n\t\t\t\t\t\t\t\t\t\theader: \"Started\",\n\t\t\t\t\t\t\t\t\t\talign: \"end\",\n\t\t\t\t\t\t\t\t\t\tsortable: true,\n\t\t\t\t\t\t\t\t\t\tcell: (row) => (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-body-sm whitespace-nowrap text-muted-foreground\">{shortDate(row.started)}</span>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t<CardFooter className=\"justify-between\">\n\t\t\t\t\t\t\t<span className=\"text-caption text-muted-foreground\">\n\t\t\t\t\t\t\t\tShowing {accounts.length} of {accountCount} accounts\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"end\" render={<a href=\"/accounts\" />}>\n\t\t\t\t\t\t\t\tView all accounts\n\t\t\t\t\t\t\t\t<Icon name=\"arrow-right\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t<CardDescription>Next payout</CardDescription>\n\t\t\t\t\t\t\t\t<CardTitle className=\"text-mono-xl\">{usdCents.format(payout.amount)}</CardTitle>\n\t\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t\t<Badge tone=\"info\" size=\"sm\" icon={<Icon name=\"calendar\" />}>\n\t\t\t\t\t\t\t\t\t\t{shortDate(payout.date)}\n\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t<dl className=\"sable-list-dl text-body-sm\">\n\t\t\t\t\t\t\t\t\t{payout.lines.map((line) => (\n\t\t\t\t\t\t\t\t\t\t<div key={line.label} className=\"contents\">\n\t\t\t\t\t\t\t\t\t\t\t<dt>{line.label}</dt>\n\t\t\t\t\t\t\t\t\t\t\t<dd className={typeof line.value === \"number\" ? \"text-end text-mono-md\" : \"text-end\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t{typeof line.value === \"number\" ? usdCents.format(line.value) : line.value}\n\t\t\t\t\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</dl>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t<CardTitle>Top customers</CardTitle>\n\t\t\t\t\t\t\t\t<CardDescription>By spend this month.</CardDescription>\n\t\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" render={<a href=\"/customers\" />}>\n\t\t\t\t\t\t\t\t\t\tView all\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t\t{customers.map((person) => (\n\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\tkey={person.id}\n\t\t\t\t\t\t\t\t\t\tleading={<Avatar variant=\"art\" size=\"sm\" fallback={person.initials} alt=\"\" />}\n\t\t\t\t\t\t\t\t\t\ttitle={person.name}\n\t\t\t\t\t\t\t\t\t\tsubtitle={`${person.handle} · ${person.seats} seats`}\n\t\t\t\t\t\t\t\t\t\taction={<span className=\"text-mono-md\">{usd.format(person.spent)}</span>}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Stack>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid cols={{ base: 1, xl: 3 }} gap={3}>\n\t\t\t\t\t<Card className=\"flex flex-col\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Upcoming releases</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>Scheduled to ship to customers.</CardDescription>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t{upcoming.map((release) => (\n\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\tkey={release.id}\n\t\t\t\t\t\t\t\t\ttitle={release.title}\n\t\t\t\t\t\t\t\t\tsubtitle={release.detail}\n\t\t\t\t\t\t\t\t\taction={<RelativeTime date={Date.now() + release.at} className=\"text-caption text-muted-foreground\" />}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t<CardFooter className=\"mt-auto\">\n\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" render={<a href=\"/releases/new\" />}>\n\t\t\t\t\t\t\t\t<Icon name=\"calendar\" />\n\t\t\t\t\t\t\t\tSchedule a release\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t\t<Card className=\"xl:col-span-2\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle>Activity</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>Seats, upgrades, and invoices.</CardDescription>\n\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" render={<a href=\"/activity\" />}>\n\t\t\t\t\t\t\t\t\tView all\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t{activity.map((item) => (\n\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\t\tleading={<Avatar variant=\"art\" size=\"sm\" fallback={item.initials} alt=\"\" />}\n\t\t\t\t\t\t\t\t\ttitle={item.who}\n\t\t\t\t\t\t\t\t\tsubtitle={item.what}\n\t\t\t\t\t\t\t\t\taction={<RelativeTime date={Date.now() - item.when} className=\"text-caption text-muted-foreground\" />}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</CardList>\n\t\t\t\t\t</Card>\n\t\t\t\t</Grid>\n\t\t\t</Page>\n\t\t</AppShell>\n\t)\n}"
      },
      {
        "name": "FeedPage",
        "path": "patterns/feed-page.tsx",
        "summary": "Social reading feed with a side rail: a feed-width main column (composer, For you / Following Tabs, one Card per post, an event post with price, capacity Meter and Register, a Skeleton for the next page) beside a sticky rail of who-to-follow and upcoming events that drops away below lg.",
        "intent": "Reach for this for timelines, activity streams, and any reverse-chronological reading surface where people also act on what they read. Not for record management (DashboardPage) or side-by-side browsing (ListDetailPage).",
        "notes": [
          "The main column is capped at `--region-feed` (640px) inside a `wide` page, so posts keep a reading measure while the rail fills the desktop width. The rail is a fixed `w-80` aside, `sticky` at lg and `hidden` below it — its content is supplementary, so nothing is lost on mobile.",
          "Feed scope is `Tabs` (underline, stretched to the column with `flex`): peer views of the same feed. The composer sits above them because posting applies to both.",
          "The composer is a Card holding `Textarea autoResize` plus ghost icon Buttons and a secondary `Post` — not ChatComposer, which submits on Enter and is for conversations.",
          "Each post is a Card: an Entity byline in a CardList (with an OverflowMenu for post actions), body copy, then media in an AspectBox at the asset's own ratio, inset with `rounded-concentric-lg/6` so its corners follow the card's in every theme.",
          "An event post adds a `Badge appearance=\"overlay\"` on the image, title and price, the one primary Button on the page (`Register`), and a `Meter` for capacity — seats taken against a known maximum is a level, not task progress.",
          "Actions are ghost sm Buttons (icon + count) in a Row pulled out by the button's own padding (`-ms-3`) so the first icon sits on the text edge.",
          "Loading the next page shows a Skeleton post in the shape the post will land in, above the explicit load-more Button in its `loading` state — predictable for keyboard and AT users, unlike infinite scroll."
        ],
        "a11y": [
          "Each post is an <article>, so AT users can jump between posts; the rail is a labelled <aside> landmark.",
          "Rail card titles render as h2 (CardTitle `render={<h2 />}`) under the page's one h1.",
          "Icon-only buttons and every Follow / Remind button carry aria-labels naming their target; counts stay in the accessible name.",
          "The capacity Meter is role=meter with a getAriaValueText reading (\"28 of 40 seats taken\").",
          "The Skeleton card is aria-busy; the loading Button keeps its label (\"Loading posts\")."
        ],
        "imports": "import { AspectBox, Avatar, Badge, Button, Card, CardContent, CardHeader, CardList, CardTitle, Entity, Icon, MediaImage, MenuItem, MenuSeparator, Meter, MeterLabel, MeterTrack, MeterValue, OverflowMenu, Page, PageHeader, Row, Skeleton, Stack, Tabs, TabsList, TabsPanel, TabsTrigger, Textarea } from \"@sableui/react\"",
        "code": "type Post = {\n\tid: string\n\tauthor: string\n\thandle: string\n\tinitials: string\n\ttime: string\n\tfollowing: boolean\n\tbody: string\n\tmedia?: { src: string; alt: string }\n\tevent?: { title: string; price: string; registered: number; capacity: number }\n\tlikes: number\n\tcomments: number\n}\n\nconst posts: Post[] = [\n\t{\n\t\tid: \"p_01\",\n\t\tauthor: \"Ada Lovelace\",\n\t\thandle: \"@ada\",\n\t\tinitials: \"AL\",\n\t\ttime: \"2h\",\n\t\tfollowing: true,\n\t\tbody: \"Registration for the spring workshop is open. Two days of plotter drawing in a small group. See you there.\",\n\t\tmedia: { src: \"/media/edition-cover.svg\", alt: \"Workshop poster, a gold-leaf study in overlapping arcs\" },\n\t\tevent: { title: \"Spring plotter workshop\", price: \"$120\", registered: 28, capacity: 40 },\n\t\tlikes: 128,\n\t\tcomments: 24,\n\t},\n\t{\n\t\tid: \"p_02\",\n\t\tauthor: \"Grace Hopper\",\n\t\thandle: \"@grace\",\n\t\tinitials: \"GH\",\n\t\ttime: \"5h\",\n\t\tfollowing: true,\n\t\tbody: \"Process shot from this week. Compilers and copper ink — the plotter ran for eleven hours on this one.\",\n\t\tmedia: { src: \"/media/process-shot.svg\", alt: \"Work-in-progress plotter drawing in copper ink\" },\n\t\tlikes: 86,\n\t\tcomments: 9,\n\t},\n\t{\n\t\tid: \"p_03\",\n\t\tauthor: \"Nina Simone\",\n\t\thandle: \"@nina\",\n\t\tinitials: \"NS\",\n\t\ttime: \"8h\",\n\t\tfollowing: false,\n\t\tbody: \"Thanks to everyone at the Dusk listening session — the full recording is now in your library. Headphones on.\",\n\t\tlikes: 214,\n\t\tcomments: 31,\n\t},\n]\n\nconst suggestions = [\n\t{ id: \"u_01\", name: \"Mary Shelley\", handle: \"@mary\", initials: \"MS\" },\n\t{ id: \"u_02\", name: \"Nina Simone\", handle: \"@nina\", initials: \"NS\" },\n]\n\nconst upcoming = [\n\t{ id: \"e_01\", title: \"Quiet Harbor talk\", host: \"Mary Shelley\", initials: \"MS\", date: \"Sat, Oct 12\" },\n\t{ id: \"e_02\", title: \"Dusk, live\", host: \"Nina Simone\", initials: \"NS\", date: \"Tue, Oct 15\" },\n]\n\nconst renderPost = (post: Post) => (\n\t<article key={post.id}>\n\t\t<Card>\n\t\t\t<CardList>\n\t\t\t\t<Entity\n\t\t\t\t\tleading={<Avatar variant=\"art\" fallback={post.initials} alt={post.author} />}\n\t\t\t\t\ttitle={post.author}\n\t\t\t\t\tsubtitle={`${post.handle} · ${post.time}`}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<OverflowMenu label={`Post options for ${post.author}`} size=\"icon-sm\">\n\t\t\t\t\t\t\t<MenuItem>Copy link</MenuItem>\n\t\t\t\t\t\t\t<MenuItem>Mute {post.handle}</MenuItem>\n\t\t\t\t\t\t\t<MenuSeparator />\n\t\t\t\t\t\t\t<MenuItem variant=\"destructive\">Report post</MenuItem>\n\t\t\t\t\t\t</OverflowMenu>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</CardList>\n\t\t\t<CardContent className=\"flex flex-col gap-4 pt-0\">\n\t\t\t\t<p className=\"text-body-md text-foreground\">{post.body}</p>\n\t\t\t\t{post.media ? (\n\t\t\t\t\t<AspectBox ratio={16 / 9} className=\"overflow-hidden rounded-concentric-lg/6 bg-muted\">\n\t\t\t\t\t\t{/* MediaImage, not a bare img: an image that fails to load paints\n\t\t\t\t\t\t    art seeded by its alt instead of a broken-image glyph. */}\n\t\t\t\t\t\t<MediaImage src={post.media.src} alt={post.media.alt} />\n\t\t\t\t\t\t{post.event ? (\n\t\t\t\t\t\t\t<div className=\"absolute start-3 top-3\">\n\t\t\t\t\t\t\t\t<Badge appearance=\"overlay\" size=\"sm\" dot>\n\t\t\t\t\t\t\t\t\tOpen now\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t</AspectBox>\n\t\t\t\t) : null}\n\t\t\t\t{post.event ? (\n\t\t\t\t\t<Stack gap={1.5}>\n\t\t\t\t\t\t<Row gap={2} align=\"center\" justify=\"between\">\n\t\t\t\t\t\t\t<div className=\"min-w-0\">\n\t\t\t\t\t\t\t\t<p className=\"text-title-md text-foreground\">{post.event.title}</p>\n\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t{`${post.event.price} · ${post.event.capacity} seats`}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button>{`Register for ${post.event.price}`}</Button>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t<Meter\n\t\t\t\t\t\t\tvalue={post.event.registered}\n\t\t\t\t\t\t\tmax={post.event.capacity}\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tgetAriaValueText={(_, value) => `${value} of ${post.event?.capacity} seats taken`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Row gap={2} align=\"center\" justify=\"between\" className=\"mb-2\">\n\t\t\t\t\t\t\t\t<MeterLabel>{`${post.event.registered} registered`}</MeterLabel>\n\t\t\t\t\t\t\t\t<MeterValue>{(_, value) => `${(post.event?.capacity ?? 0) - value} left`}</MeterValue>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t<MeterTrack />\n\t\t\t\t\t\t</Meter>\n\t\t\t\t\t</Stack>\n\t\t\t\t) : null}\n\t\t\t\t{/* bleed=\"start\" pulls the first button out by exactly its own\n\t\t\t\t    padding, so its icon lands on the text edge above it. */}\n\t\t\t\t<Row gap={0.5}>\n\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"start\" aria-label={`Like, ${post.likes} likes`}>\n\t\t\t\t\t\t<Icon name=\"heart\" />\n\t\t\t\t\t\t{post.likes}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" aria-label={`Comment, ${post.comments} comments`}>\n\t\t\t\t\t\t<Icon name=\"comment\" />\n\t\t\t\t\t\t{post.comments}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" aria-label=\"Share\">\n\t\t\t\t\t\t<Icon name=\"share\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</Row>\n\t\t\t</CardContent>\n\t\t</Card>\n\t</article>\n)\n\nexport function FeedPage() {\n\treturn (\n\t\t<Page as=\"main\" max=\"wide\" gap={4} className=\"py-6\">\n\t\t\t<Row gap={4} align=\"start\" justify=\"center\">\n\t\t\t\t<Stack gap={3} className=\"min-w-0 max-w-(--region-feed) flex-1\">\n\t\t\t\t\t<PageHeader title=\"Home\" />\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t<Row gap={1.5} align=\"start\">\n\t\t\t\t\t\t\t\t<Avatar variant=\"art\" fallback=\"AL\" alt=\"Ada Lovelace\" />\n\t\t\t\t\t\t\t\t<Stack gap={1.5} className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\tautoResize\n\t\t\t\t\t\t\t\t\t\trows={2}\n\t\t\t\t\t\t\t\t\t\taria-label=\"New post\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Share a process shot or an upcoming event\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Row gap={1} align=\"center\" justify=\"between\">\n\t\t\t\t\t\t\t\t\t\t<Row gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Add images\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"image-stack\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Add an event\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"calendar\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t<Button variant=\"secondary\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\tPost\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</Card>\n\t\t\t\t\t<Tabs defaultValue=\"for-you\">\n\t\t\t\t\t\t<TabsList className=\"flex\">\n\t\t\t\t\t\t\t<TabsTrigger value=\"for-you\">For you</TabsTrigger>\n\t\t\t\t\t\t\t<TabsTrigger value=\"following\">Following</TabsTrigger>\n\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t<TabsPanel value=\"for-you\">\n\t\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t\t{posts.map(renderPost)}\n\t\t\t\t\t\t\t\t{/* The next page, in the shape it will land in, while it fetches. */}\n\t\t\t\t\t\t\t\t<Card aria-busy=\"true\">\n\t\t\t\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t\t\t<Row gap={1.5} align=\"center\">\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"size-10 rounded-full\" />\n\t\t\t\t\t\t\t\t\t\t\t<Stack gap={1}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-3 w-32\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-3 w-20\" />\n\t\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-3 w-full\" />\n\t\t\t\t\t\t\t\t\t\t<Skeleton className=\"h-3 w-2/3\" />\n\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t<Button variant=\"secondary\" loading loadingLabel=\"Loading posts\">\n\t\t\t\t\t\t\t\t\tLoad more posts\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t\t<TabsPanel value=\"following\">\n\t\t\t\t\t\t\t<Stack gap={3}>{posts.filter((post) => post.following).map(renderPost)}</Stack>\n\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t</Tabs>\n\t\t\t\t</Stack>\n\t\t\t\t<aside aria-label=\"Suggestions\" className=\"sticky top-6 hidden w-80 shrink-0 lg:block\">\n\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>Who to follow</CardTitle>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t\t{suggestions.map((person) => (\n\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\tkey={person.id}\n\t\t\t\t\t\t\t\t\t\tleading={<Avatar variant=\"art\" fallback={person.initials} alt={person.name} />}\n\t\t\t\t\t\t\t\t\t\ttitle={person.name}\n\t\t\t\t\t\t\t\t\t\tsubtitle={person.handle}\n\t\t\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"secondary\" size=\"sm\" aria-label={`Follow ${person.name}`}>\n\t\t\t\t\t\t\t\t\t\t\t\tFollow\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>Upcoming events</CardTitle>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t\t{upcoming.map((event) => (\n\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\tkey={event.id}\n\t\t\t\t\t\t\t\t\t\tleading={<Avatar variant=\"art\" fallback={event.initials} alt={event.host} />}\n\t\t\t\t\t\t\t\t\t\ttitle={event.title}\n\t\t\t\t\t\t\t\t\t\tsubtitle={`${event.host} · ${event.date}`}\n\t\t\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label={`Remind me about ${event.title}`}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"bell\" />\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Stack>\n\t\t\t\t</aside>\n\t\t\t</Row>\n\t\t</Page>\n\t)\n}"
      },
      {
        "name": "LandingPage",
        "path": "patterns/landing-page.tsx",
        "summary": "Product / open-source landing page: a centered hero with an eyebrow Badge, one display headline, lede, two CTAs and a copyable install command; a Browser-framed product preview composed from real components; a six-up feature grid; a setup section with tabbed code; an agent-workflow section with terminal output; a CTA card; and a link-column footer.",
        "intent": "Reach for this for the marketing route of a developer product, library, or tool: the page where the product shows itself working and the reader installs or signs up. For a branded, editorial marketing site use BrandLandingPage. Not for product UI (display type and one-per-view rules forbid it inside the app).",
        "notes": [
          "Display type is the marketing voice: exactly one display headline per page (`text-display-lg` on phones, `text-display-2xl` from `sm`). Every section below uses `text-heading-1` with a `text-overline` kicker.",
          "The eyebrow is a small outline Badge (`size=\"sm\"`): the badge's own size, never a type class forced onto its label. Hierarchy above the fold is eyebrow, display, lede, CTAs, install command.",
          "The lede is body-lg capped at the prose measure. The headline may be wide; reading text may not.",
          "Two CTAs max per row: one primary, one quiet outline. The install line is a `CodeBlock` with `prompt=\"$\"`, so it truncates on one line and copy takes only the command.",
          "Show the product instead of describing it. The preview is real components (PageHeader, metric Cards, a Meter, a CardList of Entity rows, Message and Bubble, ChatComposer) inside `Browser`, wrapped in an `inert` div so the picture's controls never take focus. Secondary columns hide on small screens rather than stacking into a long mock.",
          "Features are Cards in a fixed `Grid cols={{ base: 1, sm: 2, lg: 3 }}`, so six items always land as full rows (3 x 2, 2 x 3, 1 x 6) without an orphan.",
          "Multi-line code uses `CodeBlock` with a filename; switch related snippets with `Tabs`, defaulting to the most complete one. Terminal output passes `highlight={false}` so a code highlighter does not colour prose.",
          "Reveal wraps below-the-fold blocks only (features, code, CTA). It no-ops under reduced motion via the motion policy.",
          "Hide nav groups on narrow screens by wrapping them in a `max-md:hidden` div: a `Row` or `Button` sets its own display, which a `hidden` class on the same element does not reliably override."
        ],
        "a11y": [
          "The hero headline is the page h1; section titles are h2s and feature and step titles are h3s. Footer column labels are h2s inside the footer nav.",
          "The product preview is a `figure` with a visible figcaption. Its content is `inert`, which removes it from the tab order and the accessibility tree, so its headings and buttons do not pollute the outline.",
          "Reveal renders content immediately (no animation) when prefers-reduced-motion is set.",
          "CTA buttons are real links with visible text, with no icon-only CTAs. Footer links keep a 36px minimum row height for touch."
        ],
        "imports": "import { Avatar, Badge, Browser, Bubble, Button, Card, CardAction, CardContent, CardDescription, CardHeader, CardList, CardTitle, ChatComposer, Code, CodeBlock, Entity, Grid, Icon, IconTile, Message, Meter, MeterLabel, MeterTrack, MeterValue, PageHeader, Region, Reveal, Row, Stack, Tabs, TabsList, TabsPanel, TabsTrigger } from \"@sableui/react\"",
        "code": "const navLinks = [\n\t{ label: \"Docs\", href: \"/docs\" },\n\t{ label: \"Components\", href: \"/components\" },\n\t{ label: \"Patterns\", href: \"/patterns\" },\n\t{ label: \"Themes\", href: \"/themes\" },\n]\n\nconst deploys = [\n\t{\n\t\tinitials: \"MO\",\n\t\tname: \"Maya Ortiz\",\n\t\ttitle: \"Add usage-based billing\",\n\t\tmeta: \"main · a3f9c21 · 2m ago\",\n\t\tstatus: \"Building\",\n\t\ttone: \"info\" as const,\n\t\tpulse: true,\n\t},\n\t{\n\t\tinitials: \"SR\",\n\t\tname: \"Sam Reyes\",\n\t\ttitle: \"Fix search ranking for long queries\",\n\t\tmeta: \"main · 81be04d · 18m ago\",\n\t\tstatus: \"Ready\",\n\t\ttone: \"success\" as const,\n\t\tpulse: false,\n\t},\n\t{\n\t\tinitials: \"JL\",\n\t\tname: \"Jun Lee\",\n\t\ttitle: \"Rotate webhook signing keys\",\n\t\tmeta: \"main · 5c7e9aa · 1h ago\",\n\t\tstatus: \"Ready\",\n\t\ttone: \"success\" as const,\n\t\tpulse: false,\n\t},\n]\n\nconst features = [\n\t{\n\t\ticon: \"component\" as const,\n\t\ttitle: \"Behavior built in\",\n\t\tbody: \"Focus management, keyboard navigation, and ARIA come from Base UI primitives under every control.\",\n\t},\n\t{\n\t\ticon: \"eyedropper\" as const,\n\t\ttitle: \"Semantic tokens end to end\",\n\t\tbody: \"Re-theme the whole product, light and dark, from one preset without touching a component.\",\n\t},\n\t{\n\t\ticon: \"layout\" as const,\n\t\ttitle: \"Pages, not just parts\",\n\t\tbody: \"Landing, dashboard, settings, auth, and list-detail shells to copy and adapt.\",\n\t},\n\t{\n\t\ticon: \"book\" as const,\n\t\ttitle: \"A contract agents can read\",\n\t\tbody: \"registry.json, llms.txt, and a CLI hand agents the exact props, examples, and rules.\",\n\t},\n\t{\n\t\ticon: \"circle-check\" as const,\n\t\ttitle: \"Lint that knows the design\",\n\t\tbody: \"sable-lint flags raw colors, hand-built controls, and motion that ignores reduced motion.\",\n\t},\n\t{\n\t\ticon: \"play\" as const,\n\t\ttitle: \"Motion with an off switch\",\n\t\tbody: \"Named recipes run on one scale variable, so reduced motion stops every transition at once.\",\n\t},\n]\n\nconst steps = [\n\t{\n\t\ttitle: \"Install the package\",\n\t\tbody: \"One dependency. React 19 and Tailwind v4 are the only peers.\",\n\t},\n\t{\n\t\ttitle: \"Import the styles\",\n\t\tbody: \"Tailwind first, then Sable's tokens, then a source glob over the package.\",\n\t},\n\t{\n\t\ttitle: \"Compose your screens\",\n\t\tbody: \"Build from components and layout primitives. Your theme does the rest.\",\n\t},\n]\n\nconst stylesCode = `@import \"tailwindcss\";\n@import \"@sableui/react/styles.css\";\n@source \"../node_modules/@sableui/react/dist/**/*.{js,mjs}\";`\n\n// design-lint-disable-next-line self-import -- a consumer code sample displayed on the page, not an import\nconst composeCode = `import { Button, Card, CardContent, CardHeader, CardTitle } from \"@sableui/react\"\n\nexport function DeployCard() {\n  return (\n    <Card>\n      <CardHeader>\n        <CardTitle>Production</CardTitle>\n      </CardHeader>\n      <CardContent>\n        <Button>Deploy</Button>\n      </CardContent>\n    </Card>\n  )\n}`\n\nconst terminalCode = `$ npx sable search \"confirm before deleting\"\ncomponent  DestructiveActionModal\ncomponent  Dialog\n\n$ npx sable component DestructiveActionModal --props\nprops, a11y contract, composed examples\n\n$ npx sable lint src\n0 findings in 42 files`\n\nconst agentPoints = [\n\t\"Search ranks components, patterns, tokens, and docs for a plain-language need.\",\n\t\"Every component ships its props, accessibility contract, and composed examples.\",\n\t\"The same lint runs in the editor, in CI, and inside the agent's own loop.\",\n]\n\nconst footerGroups = [\n\t{\n\t\ttitle: \"Product\",\n\t\tlinks: [\n\t\t\t{ label: \"Components\", href: \"/components\" },\n\t\t\t{ label: \"Patterns\", href: \"/patterns\" },\n\t\t\t{ label: \"Themes\", href: \"/themes\" },\n\t\t\t{ label: \"Canvas\", href: \"/canvas\" },\n\t\t],\n\t},\n\t{\n\t\ttitle: \"Resources\",\n\t\tlinks: [\n\t\t\t{ label: \"Documentation\", href: \"/docs\" },\n\t\t\t{ label: \"Changelog\", href: \"/changelog\" },\n\t\t\t{ label: \"llms.txt\", href: \"/llms.txt\" },\n\t\t\t{ label: \"registry.json\", href: \"/registry.json\" },\n\t\t],\n\t},\n\t{\n\t\ttitle: \"Community\",\n\t\tlinks: [\n\t\t\t{ label: \"GitHub\", href: \"/github\" },\n\t\t\t{ label: \"npm\", href: \"/npm\" },\n\t\t\t{ label: \"Discussions\", href: \"/discussions\" },\n\t\t],\n\t},\n]\n\nexport function LandingPage() {\n\treturn (\n\t\t<div className=\"min-h-dvh bg-background text-foreground\">\n\t\t\t<header className=\"border-b border-border\">\n\t\t\t\t<Region as=\"nav\" aria-label=\"Main\" max=\"wide\" className=\"grid h-16 grid-cols-[1fr_auto_1fr] items-center\">\n\t\t\t\t\t<a href=\"/\" className=\"justify-self-start text-title-lg motion-interactive hover:text-muted-foreground\">\n\t\t\t\t\t\tSable\n\t\t\t\t\t</a>\n\t\t\t\t\t<div className=\"justify-self-center max-md:hidden\">\n\t\t\t\t\t\t<Row gap={1}>\n\t\t\t\t\t\t\t{navLinks.map((link) => (\n\t\t\t\t\t\t\t\t<Button key={link.label} variant=\"ghost\" size=\"sm\" render={<a href={link.href} />}>\n\t\t\t\t\t\t\t\t\t{link.label}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Row gap={1} className=\"col-start-3 justify-self-end\">\n\t\t\t\t\t\t<div className=\"max-sm:hidden\">\n\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" render={<a href=\"/github\" />}>\n\t\t\t\t\t\t\t\tGitHub\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Button size=\"sm\" render={<a href=\"/docs/getting-started\" />}>\n\t\t\t\t\t\t\tGet started\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Row>\n\t\t\t\t</Region>\n\t\t\t</header>\n\n\t\t\t<main>\n\t\t\t\t<Region as=\"section\" max=\"wide\" className=\"pb-16 pt-16 sm:pt-24\">\n\t\t\t\t\t<Stack gap={8} align=\"center\">\n\t\t\t\t\t\t<Stack gap={4} align=\"center\" className=\"text-center\">\n\t\t\t\t\t\t\t<Badge appearance=\"outline\" size=\"sm\" icon={<Icon name=\"sparkles\" />}>\n\t\t\t\t\t\t\t\tOpen source · MIT licensed\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t<h1 className=\"max-w-4xl text-balance text-display-lg sm:text-display-2xl\">\n\t\t\t\t\t\t\t\tProduct UI your agents can't get wrong\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"max-w-(--measure-prose) text-pretty text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\tSable is a themeable React component library with enforced tokens,\n\t\t\t\t\t\t\t\ttypography, and motion, documented for coding agents as carefully\n\t\t\t\t\t\t\t\tas for people.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<Row gap={2} justify=\"center\" wrap className=\"pt-2\">\n\t\t\t\t\t\t\t\t<Button size=\"cta\" render={<a href=\"/docs/getting-started\" />}>\n\t\t\t\t\t\t\t\t\tGet started\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<Button size=\"cta\" variant=\"outline\" render={<a href=\"/components\" />}>\n\t\t\t\t\t\t\t\t\tBrowse components\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t<div className=\"w-full max-w-sm\">\n\t\t\t\t\t\t\t<CodeBlock prompt=\"$\" code=\"pnpm add @sableui/react\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Stack>\n\t\t\t\t</Region>\n\n\t\t\t\t<Region as=\"section\" aria-label=\"Product preview\" max=\"wide\" className=\"pb-20 sm:pb-28\">\n\t\t\t\t\t<figure>\n\t\t\t\t\t\t<Browser url=\"atlas.example/deploys\" elevation=\"hero\">\n\t\t\t\t\t\t\t{/* A picture of software, not live UI: inert keeps its controls\n\t\t\t\t\t\t\t    out of the tab order and the accessibility tree. */}\n\t\t\t\t\t\t\t<div inert className=\"grid gap-4 p-4 sm:p-6 lg:grid-cols-[minmax(0,1fr)_20rem]\">\n\t\t\t\t\t\t\t\t<Stack gap={4} className=\"min-w-0\">\n\t\t\t\t\t\t\t\t\t<PageHeader\n\t\t\t\t\t\t\t\t\t\ttitleAs=\"h2\"\n\t\t\t\t\t\t\t\t\t\ttitle=\"Deployments\"\n\t\t\t\t\t\t\t\t\t\tdescription=\"atlas-web · production\"\n\t\t\t\t\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t\t\t\t\t<Row gap={2}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tView logs\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button size=\"sm\" iconStart={<Icon name=\"upload\" />}>\n\t\t\t\t\t\t\t\t\t\t\t\t\tDeploy\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Grid cols={{ base: 2, md: 3 }} gap={3}>\n\t\t\t\t\t\t\t\t\t\t<Card density=\"compact\">\n\t\t\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle>Uptime</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t<CardDescription>Last 30 days</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-heading-3\">99.98%</p>\n\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t\t<Card density=\"compact\">\n\t\t\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle>p95 latency</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t<CardDescription>Edge, all regions</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-heading-3\">182 ms</p>\n\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t\t<Card density=\"compact\" className=\"max-md:hidden\">\n\t\t\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle>Build minutes</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t<CardDescription>Team plan</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t\t\t\t<Meter value={64} tone=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Row justify=\"between\" wrap className=\"mb-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MeterLabel>Used</MeterLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MeterValue>{(_, value) => `${(value * 30).toLocaleString(\"en-US\")} of 3,000`}</MeterValue>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MeterTrack />\n\t\t\t\t\t\t\t\t\t\t\t\t</Meter>\n\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t<CardTitle>Recent deploys</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t<CardDescription>Production branch</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge appearance=\"plain\" tone=\"success\" dot>\n\t\t\t\t\t\t\t\t\t\t\t\t\tHealthy\n\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t\t\t\t\t{deploys.map((deploy) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={deploy.meta}\n\t\t\t\t\t\t\t\t\t\t\t\t\tleading={<Avatar variant=\"art\" size=\"sm\" fallback={deploy.initials} alt={deploy.name} />}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={deploy.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\tsubtitle={deploy.meta}\n\t\t\t\t\t\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Badge appearance=\"plain\" tone={deploy.tone} dot pulse={deploy.pulse}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{deploy.status}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t<Card className=\"max-lg:hidden\">\n\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t<CardTitle>Release assistant</CardTitle>\n\t\t\t\t\t\t\t\t\t\t<CardDescription>Summaries from today's deploys</CardDescription>\n\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t\t\t<Message align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t<Bubble variant=\"tint\" align=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t\tWhat shipped to production today?\n\t\t\t\t\t\t\t\t\t\t\t</Bubble>\n\t\t\t\t\t\t\t\t\t\t</Message>\n\t\t\t\t\t\t\t\t\t\t<Message>\n\t\t\t\t\t\t\t\t\t\t\t<Bubble variant=\"outline\">\n\t\t\t\t\t\t\t\t\t\t\t\tThree deploys. Search ranking is fixed, webhook keys are\n\t\t\t\t\t\t\t\t\t\t\t\trotated, and usage-based billing is building now.\n\t\t\t\t\t\t\t\t\t\t\t</Bubble>\n\t\t\t\t\t\t\t\t\t\t</Message>\n\t\t\t\t\t\t\t\t\t\t<ChatComposer placeholder=\"Ask about a deploy\" />\n\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Browser>\n\t\t\t\t\t\t<figcaption className=\"mt-4 text-center text-body-sm text-muted-foreground\">\n\t\t\t\t\t\t\tEvery surface in this preview is a Sable component, styled by the active theme.\n\t\t\t\t\t\t</figcaption>\n\t\t\t\t\t</figure>\n\t\t\t\t</Region>\n\n\t\t\t\t<section aria-labelledby=\"landing-features\" className=\"border-y border-border bg-muted/40 py-20 sm:py-28\">\n\t\t\t\t\t<Region max=\"wide\">\n\t\t\t\t\t\t<Stack gap={10}>\n\t\t\t\t\t\t\t<Stack gap={3} className=\"max-w-2xl\">\n\t\t\t\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">Why Sable</p>\n\t\t\t\t\t\t\t\t<h2 id=\"landing-features\" className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t\t\t\tA design system with the rules written down\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t<p className=\"text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\t\tThe decisions a senior designer would make are encoded once, so every\n\t\t\t\t\t\t\t\t\tscreen your team or your agent builds starts from them.\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t<Reveal>\n\t\t\t\t\t\t\t\t<Grid cols={{ base: 1, sm: 2, lg: 3 }} gap={4}>\n\t\t\t\t\t\t\t\t\t{features.map((feature) => (\n\t\t\t\t\t\t\t\t\t\t<Card key={feature.title} render={<article />} className=\"h-full\">\n\t\t\t\t\t\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t<IconTile icon={feature.icon} />\n\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"pt-2 text-title-lg\">{feature.title}</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{feature.body}</p>\n\t\t\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t</Reveal>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</Region>\n\t\t\t\t</section>\n\n\t\t\t\t<Region as=\"section\" aria-labelledby=\"landing-setup\" max=\"wide\" className=\"py-20 sm:py-28\">\n\t\t\t\t\t<div className=\"grid items-start gap-10 lg:grid-cols-[minmax(0,5fr)_minmax(0,7fr)] lg:gap-16\">\n\t\t\t\t\t\t<Stack gap={8}>\n\t\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">Setup</p>\n\t\t\t\t\t\t\t\t<h2 id=\"landing-setup\" className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t\t\t\tFrom install to first screen in three steps\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t<ol className=\"flex flex-col gap-6\">\n\t\t\t\t\t\t\t\t{steps.map((step, index) => (\n\t\t\t\t\t\t\t\t\t<li key={step.title} className=\"grid grid-cols-[auto_1fr] gap-4\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"pt-0.5 text-mono-md text-muted-foreground\">0{index + 1}</span>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-title-lg\">{step.title}</h3>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-body-md text-muted-foreground\">{step.body}</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t<Reveal className=\"min-w-0\">\n\t\t\t\t\t\t\t<Tabs defaultValue=\"compose\">\n\t\t\t\t\t\t\t\t<TabsList>\n\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"install\">Install</TabsTrigger>\n\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"styles\">Styles</TabsTrigger>\n\t\t\t\t\t\t\t\t\t<TabsTrigger value=\"compose\">Compose</TabsTrigger>\n\t\t\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t\t\t<TabsPanel value=\"install\" className=\"pt-4\">\n\t\t\t\t\t\t\t\t\t<CodeBlock prompt=\"$\" code=\"pnpm add @sableui/react\" />\n\t\t\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t\t\t\t<TabsPanel value=\"styles\" className=\"pt-4\">\n\t\t\t\t\t\t\t\t\t<CodeBlock filename=\"app.css\" code={stylesCode} />\n\t\t\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t\t\t\t<TabsPanel value=\"compose\" className=\"pt-4\">\n\t\t\t\t\t\t\t\t\t<CodeBlock filename=\"deploy-card.tsx\" code={composeCode} />\n\t\t\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t\t</Reveal>\n\t\t\t\t\t</div>\n\t\t\t\t</Region>\n\n\t\t\t\t<section aria-labelledby=\"landing-agents\" className=\"border-t border-border py-20 sm:py-28\">\n\t\t\t\t\t<Region max=\"wide\">\n\t\t\t\t\t\t<div className=\"grid items-center gap-10 lg:grid-cols-2 lg:gap-16\">\n\t\t\t\t\t\t\t<Stack gap={5}>\n\t\t\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">Built for agents</p>\n\t\t\t\t\t\t\t\t\t<h2 id=\"landing-agents\" className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t\t\t\t\tYour agent reads the same contract you do\n\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t<p className=\"text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tPoint Claude Code, Codex, or Cursor at the installed package. The{\" \"}\n\t\t\t\t\t\t\t\t\t\t<Code>sable</Code> CLI answers what to use, how to use it, and whether\n\t\t\t\t\t\t\t\t\t\tthe result holds up.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t<ul className=\"sable-list\">\n\t\t\t\t\t\t\t\t\t{agentPoints.map((point) => (\n\t\t\t\t\t\t\t\t\t\t<li key={point}>{point}</li>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t<Reveal className=\"min-w-0\">\n\t\t\t\t\t\t\t\t<CodeBlock filename=\"Terminal\" code={terminalCode} highlight={false} />\n\t\t\t\t\t\t\t</Reveal>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Region>\n\t\t\t\t</section>\n\n\t\t\t\t<Region as=\"section\" aria-labelledby=\"landing-cta\" max=\"wide\" className=\"pb-20 sm:pb-28\">\n\t\t\t\t\t<Reveal>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t<Stack gap={4} align=\"center\" className=\"py-8 text-center sm:py-12\">\n\t\t\t\t\t\t\t\t\t<h2 id=\"landing-cta\" className=\"max-w-2xl text-balance text-heading-1\">\n\t\t\t\t\t\t\t\t\t\tBuild the product, not another component library\n\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t<p className=\"max-w-(--measure-prose) text-body-lg text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tInstall Sable, pick a preset, and ship the first screen today.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<Row gap={2} justify=\"center\" wrap className=\"pt-2\">\n\t\t\t\t\t\t\t\t\t\t<Button size=\"cta\" render={<a href=\"/docs/getting-started\" />}>\n\t\t\t\t\t\t\t\t\t\t\tGet started\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button size=\"cta\" variant=\"outline\" render={<a href=\"/github\" />}>\n\t\t\t\t\t\t\t\t\t\t\tStar on GitHub\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Reveal>\n\t\t\t\t</Region>\n\t\t\t</main>\n\n\t\t\t<footer className=\"border-t border-border\">\n\t\t\t\t<Region max=\"wide\" className=\"py-12\">\n\t\t\t\t\t<div className=\"grid gap-10 md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]\">\n\t\t\t\t\t\t<Stack gap={3} className=\"max-w-xs\">\n\t\t\t\t\t\t\t<a href=\"/\" className=\"w-fit text-title-lg motion-interactive hover:text-muted-foreground\">\n\t\t\t\t\t\t\t\tSable\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\tReact components, patterns, and tokens for products built with AI agents.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t<nav aria-label=\"Footer\" className=\"grid grid-cols-2 gap-8 sm:grid-cols-3\">\n\t\t\t\t\t\t\t{footerGroups.map((group) => (\n\t\t\t\t\t\t\t\t<div key={group.title}>\n\t\t\t\t\t\t\t\t\t<h2 className=\"text-label-md text-muted-foreground\">{group.title}</h2>\n\t\t\t\t\t\t\t\t\t<ul className=\"mt-3 flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t\t{group.links.map((link) => (\n\t\t\t\t\t\t\t\t\t\t\t<li key={link.label}>\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref={link.href}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex min-h-9 items-center text-body-sm motion-interactive hover:text-muted-foreground\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{link.label}\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</nav>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"mt-12 border-t border-border pt-6\">\n\t\t\t\t\t\t<p className=\"text-caption text-muted-foreground\">© 2026 Sable. Released under the MIT license.</p>\n\t\t\t\t\t</div>\n\t\t\t\t</Region>\n\t\t\t</footer>\n\t\t</div>\n\t)\n}"
      },
      {
        "name": "ListDetailPage",
        "path": "patterns/list-detail-page.tsx",
        "summary": "Searchable list beside the selected record's detail: interactive Entity rows in a CardList (5 of 12 columns) and a sticky detail pane (7) with an editable field, a label/value list, record actions with a destructive confirmation, and recent activity. Below lg it becomes a drill-in.",
        "intent": "Reach for this when a route lists records AND works on one at a time (members + member, inbox + message, orders + order). For pure browsing with no selection, a single-column FeedPage or a DashboardPage table is simpler.",
        "notes": [
          "Region cap is `wide`; Columns 12 → Col 5 (list) + Col 7 (detail). Below lg the list and detail share one column as a drill-in: selecting a row shows the detail with an `All members` back button (lg:hidden), and the back button returns to the list. The panes swap with `max-lg:hidden`, so desktop always shows both.",
          "Rows are interactive Entity inside one Card + CardList. Selection is Entity `selected`; `sable-surface` on the list card makes its selected step 12% ink off the card, so a selected row stays distinct from its muted avatar.",
          "Search filters the list in place (name, email, role). No matches swap the CardList for an EmptyState with a Clear search action; the selected detail stays open.",
          "A pending invite lives in the same list: a mail glyph in the Avatar, an `Invited` Badge, and an invite-specific detail (role on joining, sent, expires, invited by; Resend and Revoke actions).",
          "The role Select edits the record in place; its Field description states what the role can do. The owner's role is read-only and the owner has no remove action.",
          "Read-only facts are a native `<dl className=\"sable-list-dl sable-list-dl-2\">` inside an `@container`, so pairs go two-up only when the pane is wide enough.",
          "Remove / revoke run through DestructiveActionModal; on confirm the next row is selected. Page-level counts (members, pending, seats) live in the PageHeader description and update with the list.",
          "The detail pane is sticky (lg:top-6) so it stays in view while a long list scrolls."
        ],
        "a11y": [
          "Each row is a real button (Entity `interactive` + `onSelect`): Tab moves through rows, Enter/Space selects. The selected row is Entity `selected`, which paints the selected fill and sets aria-current; list avatars are aria-hidden so initials are not read before the name.",
          "The detail pane is a labelled region (`Member details`) whose title is a level-2 heading.",
          "On a phone, drilling in moves focus to the back button; going back returns focus to the row that was open. After a remove, focus lands on the newly selected row; after Clear search, on the search field."
        ],
        "imports": "\"use client\"\n\nimport { useState, useEffect, useRef } from \"react\"\nimport { Avatar, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, Col, Columns, DestructiveActionModal, EmptyState, Entity, Field, Icon, Page, PageHeader, Row, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, Stack, StatusDot } from \"@sableui/react\"",
        "code": "type Role = \"owner\" | \"admin\" | \"editor\" | \"viewer\"\n\nconst roles: { value: Role; label: string }[] = [\n\t{ value: \"owner\", label: \"Owner\" },\n\t{ value: \"admin\", label: \"Admin\" },\n\t{ value: \"editor\", label: \"Editor\" },\n\t{ value: \"viewer\", label: \"Viewer\" },\n]\n\nconst roleLabel: Record<Role, string> = {\n\towner: \"Owner\",\n\tadmin: \"Admin\",\n\teditor: \"Editor\",\n\tviewer: \"Viewer\",\n}\n\nconst roleSummary: Record<Role, string> = {\n\towner: \"Full access, including payouts and billing. Transfer ownership in studio settings.\",\n\tadmin: \"Manages members, projects and billing.\",\n\teditor: \"Drafts, edits and publishes projects.\",\n\tviewer: \"Sees projects and reports, but can't change them.\",\n}\n\ntype Activity = { id: string; icon: string; text: string; when: string }\n\ntype Member = {\n\tid: string\n\tname: string\n\temail: string\n\tinitials: string\n\trole: Role\n\tpending: boolean\n\thandle?: string\n\tjoined?: string\n\tlastActive?: string\n\tprojects?: number\n\tinvitedBy?: string\n\tsent?: string\n\texpires?: string\n\tresent?: boolean\n\tactivity: Activity[]\n}\n\nconst seats = 10\n\nconst initialMembers: Member[] = [\n\t{\n\t\tid: \"u_01\", name: \"Ada Lovelace\", handle: \"@ada\", email: \"ada@atelier.art\", initials: \"AL\", role: \"owner\", pending: false,\n\t\tjoined: \"Mar 4, 2024\", lastActive: \"Online now\", projects: 12,\n\t\tactivity: [\n\t\t\t{ id: \"a1\", icon: \"file\", text: \"Published the Analytical Engine No. 3 roadmap\", when: \"2 hours ago\" },\n\t\t\t{ id: \"a2\", icon: \"mail\", text: \"Invited louise@bourgeois.studio as Editor\", when: \"2 days ago\" },\n\t\t],\n\t},\n\t{\n\t\tid: \"u_02\", name: \"Grace Hopper\", handle: \"@grace\", email: \"grace@atelier.art\", initials: \"GH\", role: \"admin\", pending: false,\n\t\tjoined: \"Mar 9, 2024\", lastActive: \"20 minutes ago\", projects: 4,\n\t\tactivity: [\n\t\t\t{ id: \"a1\", icon: \"user\", text: \"Changed Frida Kahlo's role to Viewer\", when: \"Yesterday\" },\n\t\t\t{ id: \"a2\", icon: \"edit\", text: \"Updated the budget on First Compiler\", when: \"3 days ago\" },\n\t\t\t{ id: \"a3\", icon: \"file\", text: \"Created the First Compiler project\", when: \"Sep 28\" },\n\t\t],\n\t},\n\t{\n\t\tid: \"u_03\", name: \"Mary Shelley\", handle: \"@mary\", email: \"mary@atelier.art\", initials: \"MS\", role: \"editor\", pending: false,\n\t\tjoined: \"Jun 18, 2024\", lastActive: \"3 hours ago\", projects: 7,\n\t\tactivity: [\n\t\t\t{ id: \"a1\", icon: \"calendar\", text: \"Scheduled Frankenstein Studies for Oct 14\", when: \"3 hours ago\" },\n\t\t\t{ id: \"a2\", icon: \"file\", text: \"Published The Last Man report\", when: \"Sep 21\" },\n\t\t],\n\t},\n\t{\n\t\tid: \"u_04\", name: \"Nina Simone\", handle: \"@nina\", email: \"nina@atelier.art\", initials: \"NS\", role: \"editor\", pending: false,\n\t\tjoined: \"Jan 12, 2025\", lastActive: \"Yesterday\", projects: 3,\n\t\tactivity: [\n\t\t\t{ id: \"a1\", icon: \"upload\", text: \"Uploaded files for Little Girl Blue\", when: \"Yesterday\" },\n\t\t\t{ id: \"a2\", icon: \"file\", text: \"Published the Feeling Good brief\", when: \"Aug 30\" },\n\t\t],\n\t},\n\t{\n\t\tid: \"u_05\", name: \"Frida Kahlo\", handle: \"@frida\", email: \"frida@atelier.art\", initials: \"FK\", role: \"viewer\", pending: false,\n\t\tjoined: \"Jul 2, 2025\", lastActive: \"4 days ago\", projects: 0,\n\t\tactivity: [{ id: \"a1\", icon: \"comment\", text: \"Commented on the Las Dos Fridas draft\", when: \"4 days ago\" }],\n\t},\n\t{\n\t\tid: \"i_01\", name: \"louise@bourgeois.studio\", email: \"louise@bourgeois.studio\", initials: \"\", role: \"editor\", pending: true,\n\t\tinvitedBy: \"Ada Lovelace\", sent: \"2 days ago\", expires: \"In 5 days\",\n\t\tactivity: [],\n\t},\n]\n\nexport function ListDetailPage() {\n\tconst [members, setMembers] = useState(initialMembers)\n\tconst [selectedId, setSelectedId] = useState<string | null>(\"u_02\")\n\tconst [query, setQuery] = useState(\"\")\n\t// Below lg the list and the detail share one column: selecting drills in.\n\tconst [showDetail, setShowDetail] = useState(false)\n\tconst [confirming, setConfirming] = useState(false)\n\tconst listRef = useRef<HTMLDivElement>(null)\n\tconst backRef = useRef<HTMLButtonElement>(null)\n\tconst searchRef = useRef<HTMLInputElement>(null)\n\n\tconst needle = query.trim().toLowerCase()\n\tconst visible = members.filter((m) =>\n\t\t[m.name, m.email, m.handle ?? \"\", roleLabel[m.role]].some((v) => v.toLowerCase().includes(needle)),\n\t)\n\tconst selected = members.find((m) => m.id === selectedId) ?? null\n\tconst active = members.filter((m) => !m.pending).length\n\tconst pending = members.length - active\n\n\t// Drilling in on a phone moves focus to the detail's back control; the\n\t// control is display:none at lg, so desktop focus stays on the list.\n\tuseEffect(() => {\n\t\tif (showDetail && backRef.current?.offsetParent) backRef.current.focus()\n\t}, [showDetail, selectedId])\n\n\tfunction select(id: string) {\n\t\tsetSelectedId(id)\n\t\tsetShowDetail(true)\n\t}\n\n\tfunction focusRow(id: string | undefined) {\n\t\trequestAnimationFrame(() => {\n\t\t\tlistRef.current?.querySelector<HTMLButtonElement>(`[data-member-id=\"${id}\"] button`)?.focus()\n\t\t})\n\t}\n\n\tfunction backToList() {\n\t\tsetShowDetail(false)\n\t\tfocusRow(selectedId ?? undefined)\n\t}\n\n\tfunction setRole(id: string, role: Role) {\n\t\tsetMembers((list) => list.map((m) => (m.id === id ? { ...m, role } : m)))\n\t}\n\n\tfunction resend(id: string) {\n\t\tsetMembers((list) =>\n\t\t\tlist.map((m) => (m.id === id ? { ...m, sent: \"Just now\", expires: \"In 7 days\", resent: true } : m)),\n\t\t)\n\t}\n\n\tfunction remove(id: string) {\n\t\tconst index = members.findIndex((m) => m.id === id)\n\t\tconst rest = members.filter((m) => m.id !== id)\n\t\tsetMembers(rest)\n\t\tconst next = rest[Math.min(index, rest.length - 1)]?.id\n\t\tsetSelectedId(next ?? null)\n\t\tsetShowDetail(false)\n\t\t// The control that opened the confirmation is gone; land on the next row.\n\t\tfocusRow(next)\n\t}\n\n\treturn (\n\t\t<Page as=\"main\" max=\"wide\" gap={4} className=\"py-6\">\n\t\t\t<PageHeader\n\t\t\t\ttitle=\"Members\"\n\t\t\t\tdescription={`${active} members · ${pending} pending ${pending === 1 ? \"invite\" : \"invites\"} · ${members.length} of ${seats} seats used`}\n\t\t\t\tactions={<Button iconStart={<Icon name=\"plus\" />}>Invite member</Button>}\n\t\t\t/>\n\t\t\t<Columns count={{ base: 1, lg: 12 }}>\n\t\t\t\t<Col span={{ base: 1, lg: 5 }} className={showDetail ? \"max-lg:hidden\" : undefined}>\n\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t<SearchInput\n\t\t\t\t\t\t\tref={searchRef}\n\t\t\t\t\t\t\tvalue={query}\n\t\t\t\t\t\t\tonValueChange={setQuery}\n\t\t\t\t\t\t\tplaceholder=\"Search name, email or role\"\n\t\t\t\t\t\t\taria-label=\"Search members\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{/* sable-surface derives the rows' selected step from the card (12% ink),\n\t\t\t\t\t\t    so a selected row stays distinct from its muted avatar. */}\n\t\t\t\t\t\t<Card ref={listRef} className=\"sable-surface\">\n\t\t\t\t\t\t\t{visible.length > 0 ? (\n\t\t\t\t\t\t\t\t<CardList aria-label=\"Members\">\n\t\t\t\t\t\t\t\t\t{visible.map((m) => {\n\t\t\t\t\t\t\t\t\t\tconst isSelected = m.id === selectedId\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\t\t\tkey={m.id}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-member-id={m.id}\n\t\t\t\t\t\t\t\t\t\t\t\tinteractive\n\t\t\t\t\t\t\t\t\t\t\t\tselected={isSelected}\n\t\t\t\t\t\t\t\t\t\t\t\tonSelect={() => select(m.id)}\n\t\t\t\t\t\t\t\t\t\t\t\tleading={\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar variant=\"art\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tseed={m.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfallback={m.pending ? <Icon name=\"mail\" className=\"size-5\" /> : m.initials}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatus={m.lastActive === \"Online now\" ? <StatusDot tone=\"success\" /> : undefined}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The row's title already names it: keep the initials out of the row's name.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\ttitle={m.name}\n\t\t\t\t\t\t\t\t\t\t\t\tsubtitle={\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.pending\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `${roleLabel[m.role]} · invite sent ${m.sent?.toLowerCase()}`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: `${roleLabel[m.role]} · ${m.handle}`\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\taction={m.pending ? <Badge tone=\"info\">Invited</Badge> : undefined}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t<EmptyState\n\t\t\t\t\t\t\t\t\t\ticon={<Icon name=\"search\" />}\n\t\t\t\t\t\t\t\t\t\ttitle=\"No members found\"\n\t\t\t\t\t\t\t\t\t\tdescription={`Nobody matches “${query.trim()}”. Try a name, email or role.`}\n\t\t\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"secondary\" size=\"sm\" onClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tsetQuery(\"\")\n\t\t\t\t\t\t\t\t\t\t\t\tsearchRef.current?.focus()\n\t\t\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t\t\t\tClear search\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Stack>\n\t\t\t\t</Col>\n\t\t\t\t<Col span={{ base: 1, lg: 7 }} className={showDetail ? undefined : \"max-lg:hidden\"}>\n\t\t\t\t\t<Stack role=\"region\" aria-label=\"Member details\" gap={3} className=\"lg:sticky lg:top-6\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tref={backRef}\n\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tbleed=\"start\"\n\t\t\t\t\t\t\ticonStart={<Icon name=\"chevron-left\" />}\n\t\t\t\t\t\t\tonClick={backToList}\n\t\t\t\t\t\t\tclassName=\"self-start lg:hidden\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tAll members\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{selected === null ? (\n\t\t\t\t\t\t\t<EmptyState\n\t\t\t\t\t\t\t\tsurface=\"card\"\n\t\t\t\t\t\t\t\ticon={<Icon name=\"user\" />}\n\t\t\t\t\t\t\t\ttitle=\"No member selected\"\n\t\t\t\t\t\t\t\tdescription=\"Choose someone from the list to see their role and activity.\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t<Row gap={2}>\n\t\t\t\t\t\t\t\t\t\t\t<Avatar variant=\"art\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t\t\t\t\t\t\t\tfallback={selected.pending ? <Icon name=\"mail\" className=\"size-6\" /> : selected.initials}\n\t\t\t\t\t\t\t\t\t\t\t\tstatus={selected.lastActive === \"Online now\" ? <StatusDot tone=\"success\" /> : undefined}\n\t\t\t\t\t\t\t\t\t\t\t\talt={selected.pending ? \"Pending invite\" : selected.name}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<Stack gap={0} className=\"min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t<CardTitle render={<h2 />} className=\"truncate\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selected.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t<CardDescription className=\"truncate\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selected.pending ? \"Hasn't joined yet\" : `${selected.handle} · ${selected.email}`}\n\t\t\t\t\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t{selected.pending ? (\n\t\t\t\t\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t\t\t\t\t<Badge tone=\"info\">Invited</Badge>\n\t\t\t\t\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t\t<Stack gap={5}>\n\t\t\t\t\t\t\t\t\t\t\t<Field\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={selected.pending ? \"Role on joining\" : \"Role\"}\n\t\t\t\t\t\t\t\t\t\t\t\tdescription={roleSummary[selected.role]}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\t\t\t\t\t\titems={roles}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={selected.role}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonValueChange={(value) => setRole(selected.id, value as Role)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={selected.role === \"owner\"}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger className=\"max-w-72\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{roles\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter((r) => r.value !== \"owner\" || selected.role === \"owner\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map((r) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={r.value} value={r.value}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{r.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"@container\">\n\t\t\t\t\t\t\t\t\t\t\t\t{selected.pending ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<dl className=\"sable-list-dl sable-list-dl-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>Sent</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd>{selected.sent}</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>Expires</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd>{selected.expires}</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>Invited by</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd>{selected.invitedBy}</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</dl>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<dl className=\"sable-list-dl sable-list-dl-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>Email</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd>{selected.email}</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>Joined</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd>{selected.joined}</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>Last active</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd className={selected.lastActive === \"Online now\" ? \"text-success\" : undefined}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{selected.lastActive}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>Projects owned</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd>{selected.projects}</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</dl>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t{selected.role !== \"owner\" ? (\n\t\t\t\t\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t\t\t\t\t<Row gap={2} wrap>\n\t\t\t\t\t\t\t\t\t\t\t\t{selected.pending ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ticonStart={<Icon name={selected.resent ? \"check\" : \"send\"} />}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={selected.resent}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => resend(selected.id)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{selected.resent ? \"Invite resent\" : \"Resend invite\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" onClick={() => setConfirming(true)}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{selected.pending ? \"Revoke invite\" : \"Remove from studio\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t{selected.activity.length > 0 ? (\n\t\t\t\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t\t\t<CardTitle render={<h3 />}>\n\t\t\t\t\t\t\t\t\t\t\t\tRecent activity\n\t\t\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t\t\t\t\t{selected.activity.map((a) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={a.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tleading={<Icon name={a.icon} className=\"text-muted-foreground\" />}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={a.text}\n\t\t\t\t\t\t\t\t\t\t\t\t\tsubtitle={a.when}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t<DestructiveActionModal\n\t\t\t\t\t\t\t\t\topen={confirming}\n\t\t\t\t\t\t\t\t\tonOpenChange={setConfirming}\n\t\t\t\t\t\t\t\t\ttitle={selected.pending ? \"Revoke this invite?\" : `Remove ${selected.name}?`}\n\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\tselected.pending\n\t\t\t\t\t\t\t\t\t\t\t? `${selected.email} won't be able to join with the link they were sent.`\n\t\t\t\t\t\t\t\t\t\t\t: \"They lose access to the workspace right away. Projects they own stay with the team.\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tconfirmLabel={selected.pending ? \"Revoke invite\" : \"Remove member\"}\n\t\t\t\t\t\t\t\t\tonConfirm={() => remove(selected.id)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t</Col>\n\t\t\t</Columns>\n\t\t</Page>\n\t)\n}"
      },
      {
        "name": "SettingsPage",
        "path": "patterns/settings-page.tsx",
        "summary": "Account settings inside the app shell: a sticky SideNav section rail beside a column of section Cards — a Profile form with the page's one explicit save, Card + CardList + Entity rows with Switches that apply instantly, a read-only payouts summary, account rows, and a delete card confirmed through DestructiveActionModal.",
        "intent": "Reach for this for account/profile/workspace settings and any 'edit a handful of grouped preferences' route. Not for a single short form (use AuthPage's centered form shape) or bulk record editing (use DashboardPage + DataTable).",
        "notes": [
          "Region cap is `wide`, split on a 12-column track: a 3-column SideNav rail and a 9-column section column. The rail fills the space a lone content-width column would leave empty and gives the page its table of contents.",
          "The rail is `SideNav` (the documented settings sub-nav), sticky, with in-page anchor items; it hides below lg, where the sections simply stack and the shell's BottomNav carries app navigation.",
          "One save model, stated in the copy: drafted text (the Profile form) commits through its single footer save; toggles apply the moment they change, and the Notifications description says so. Never pair a Switch with a Save button.",
          "Settings rows are Card + CardList + Entity with the Switch in `action` — the row owns its title and one-line description; keep descriptions short, because Entity truncates its subtitle.",
          "Each section is a Card whose CardTitle holds an h2, so the page has a real heading outline under PageHeader's h1; Cards carry the anchor id and `scroll-mt-*` so anchor jumps clear the top edge.",
          "Field wires label/description/error a11y automatically; never hand-roll <label> + <input> pairs. Pair fields side by side with Grid cols={{ base: 1, sm: 2 }}.",
          "The destructive action is last and isolated in its own Card, and it never acts directly: it opens DestructiveActionModal with type-to-confirm on the handle.",
          "Lives in the same AppShell as DashboardPage: Sidebar from lg up, AppHeader + BottomNav below it, with Settings marked active in both."
        ],
        "a11y": [
          "AppShell provides the skip link and <main id=\"main-content\"> landmark; the active SidebarItem and BottomNavItem carry aria-current.",
          "The section rail is a labelled <nav> (\"Settings sections\") distinct from the primary navigation; its active item carries aria-current.",
          "Every section has an h2, so screen-reader heading navigation mirrors the rail.",
          "Each Switch takes its row title as aria-label, since the Entity title is not a <label>.",
          "Field auto-wires htmlFor/id, aria-describedby (description + error), aria-invalid, and required.",
          "DestructiveActionModal is an alertdialog: focus opens on Cancel, the backdrop does not dismiss, and the confirm stays disabled until the handle is typed."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { AppHeader, AppShell, Avatar, BottomNav, BottomNavItem, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, Col, Columns, DestructiveActionModal, Entity, Field, Form, Grid, Icon, Input, MenuItem, MenuSeparator, NotificationBadge, OverflowMenu, Page, PageHeader, Row, Select, SelectContent, SelectItem, SelectTrigger, Sidebar, SidebarBrand, SidebarFooter, SidebarHeader, SidebarItem, SidebarNav, SideNav, SideNavItem, Stack, Switch, Textarea } from \"@sableui/react\"",
        "code": "const sections = [\n\t{ id: \"profile\", label: \"Profile\" },\n\t{ id: \"notifications\", label: \"Notifications\" },\n\t{ id: \"payouts\", label: \"Payouts\" },\n\t{ id: \"account\", label: \"Account\" },\n]\n\nconst timezones = [\n\t{ value: \"europe-london\", label: \"London (GMT+1)\" },\n\t{ value: \"europe-paris\", label: \"Paris (GMT+2)\" },\n\t{ value: \"america-new-york\", label: \"New York (GMT−4)\" },\n\t{ value: \"america-los-angeles\", label: \"Los Angeles (GMT−7)\" },\n\t{ value: \"asia-tokyo\", label: \"Tokyo (GMT+9)\" },\n]\n\nconst notifications = [\n\t{ name: \"notifyComments\", title: \"New comments\", description: \"When someone comments on your work\", on: true },\n\t{ name: \"notifyInvoicePaid\", title: \"Invoice paid\", description: \"When a customer pays an invoice\", on: true },\n\t{ name: \"notifyMembers\", title: \"New members\", description: \"When someone joins your workspace\", on: false },\n\t{ name: \"notifyDigest\", title: \"Weekly digest\", description: \"Activity and usage, every Monday\", on: true },\n\t{ name: \"notifyProduct\", title: \"Product updates\", description: \"New Atelier features\", on: false },\n]\n\nconst payouts = [\n\t{ label: \"Next payout\", value: \"$1,284.60\", note: \"Friday, Oct 16\" },\n\t{ label: \"Pending\", value: \"$412.00\", note: \"Clears in 7 days\" },\n\t{ label: \"Paid this year\", value: \"$18,920.00\", note: \"Across 214 invoices\" },\n]\n\nexport function SettingsPage() {\n\tconst [activeSection, setActiveSection] = useState(\"profile\")\n\tconst [deleteOpen, setDeleteOpen] = useState(false)\n\n\treturn (\n\t\t<AppShell\n\t\t\t// Sidebar hides below lg, so the same destinations ride in the shell's\n\t\t\t// mobile slots — without them the route has no navigation under 1024px.\n\t\t\theader={\n\t\t\t\t<AppHeader\n\t\t\t\t\ttitle={\n\t\t\t\t\t\t<Row gap={1} align=\"center\">\n\t\t\t\t\t\t\t<Icon name=\"gem\" variant=\"solid\" className=\"text-xl\" />\n\t\t\t\t\t\t\t<span className=\"text-title-sm\">Atelier</span>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t}\n\t\t\t\t\tactions={<Avatar variant=\"art\" size=\"sm\" fallback=\"AL\" alt=\"Ada Lovelace\" />}\n\t\t\t\t/>\n\t\t\t}\n\t\t\tbottomNav={\n\t\t\t\t<BottomNav aria-label=\"Primary\">\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"grid\" />} label=\"Overview\" showLabel render={<a href=\"/\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"folder\" />} label=\"Accounts\" showLabel render={<a href=\"/accounts\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"user\" />} label=\"Customers\" showLabel render={<a href=\"/customers\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"bell\" />} label=\"Activity\" showLabel render={<a href=\"/activity\" />} />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"gear\" />} label=\"Settings\" showLabel active render={<a href=\"/settings\" />} />\n\t\t\t\t</BottomNav>\n\t\t\t}\n\t\t\tsidebar={\n\t\t\t\t<Sidebar>\n\t\t\t\t\t<SidebarHeader>\n\t\t\t\t\t\t<SidebarBrand mark={<Icon name=\"gem\" variant=\"solid\" />} label=\"Atelier\" render={<a href=\"/\" />} />\n\t\t\t\t\t</SidebarHeader>\n\t\t\t\t\t<SidebarNav>\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"grid\" />} label=\"Overview\" render={<a href=\"/\" />} />\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"folder\" />} label=\"Accounts\" render={<a href=\"/accounts\" />} />\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"user\" />} label=\"Customers\" render={<a href=\"/customers\" />} />\n\t\t\t\t\t\t<SidebarItem\n\t\t\t\t\t\t\ticon={<Icon name=\"bell\" />}\n\t\t\t\t\t\t\tlabel=\"Activity\"\n\t\t\t\t\t\t\tbadge={<NotificationBadge count={4} tone=\"neutral\" />}\n\t\t\t\t\t\t\trender={<a href=\"/activity\" />}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<SidebarItem icon={<Icon name=\"gear\" />} label=\"Settings\" active render={<a href=\"/settings\" />} />\n\t\t\t\t\t</SidebarNav>\n\t\t\t\t\t<SidebarFooter>\n\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\tclassName=\"[--entity-py:0]\"\n\t\t\t\t\t\t\tleading={<Avatar variant=\"art\" size=\"sm\" fallback=\"AL\" alt=\"\" />}\n\t\t\t\t\t\t\ttitle=\"Ada Lovelace\"\n\t\t\t\t\t\t\tsubtitle=\"@ada\"\n\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t<OverflowMenu label=\"Account\" size=\"icon-sm\">\n\t\t\t\t\t\t\t\t\t<MenuItem render={<a href=\"/@ada\" />}>View profile</MenuItem>\n\t\t\t\t\t\t\t\t\t<MenuItem render={<a href=\"/settings\" />}>Settings</MenuItem>\n\t\t\t\t\t\t\t\t\t<MenuSeparator />\n\t\t\t\t\t\t\t\t\t<MenuItem>Sign out</MenuItem>\n\t\t\t\t\t\t\t\t</OverflowMenu>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SidebarFooter>\n\t\t\t\t</Sidebar>\n\t\t\t}\n\t\t>\n\t\t\t{/* No `as=\"main\"`: AppShell already renders <main id=\"main-content\">. */}\n\t\t\t<Page max=\"wide\" gap={4} className=\"py-6\">\n\t\t\t\t<PageHeader\n\t\t\t\t\ttitle=\"Settings\"\n\t\t\t\t\tdescription=\"Manage your profile, notifications, and payouts.\"\n\t\t\t\t/>\n\t\t\t\t<Columns gap={4}>\n\t\t\t\t\t{/* The section rail is a desktop aid; on mobile the sections simply stack. */}\n\t\t\t\t\t<Col span={{ base: 12, lg: 3 }} className=\"hidden lg:block\">\n\t\t\t\t\t\t<SideNav aria-label=\"Settings sections\" className=\"sticky top-6\">\n\t\t\t\t\t\t\t{sections.map((section) => (\n\t\t\t\t\t\t\t\t<SideNavItem\n\t\t\t\t\t\t\t\t\tkey={section.id}\n\t\t\t\t\t\t\t\t\tlabel={section.label}\n\t\t\t\t\t\t\t\t\tactive={activeSection === section.id}\n\t\t\t\t\t\t\t\t\tonClick={() => setActiveSection(section.id)}\n\t\t\t\t\t\t\t\t\trender={<a href={`#${section.id}`} />}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SideNav>\n\t\t\t\t\t</Col>\n\t\t\t\t\t<Col span={{ base: 12, lg: 9 }}>\n\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t<Card id=\"profile\" className=\"scroll-mt-6\">\n\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>Profile</CardTitle>\n\t\t\t\t\t\t\t\t\t<CardDescription>How your team sees you on Atelier.</CardDescription>\n\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t{/* The one explicit save on the page: profile text is drafted, then\n\t\t\t\t\t\t\t\t    committed. Toggles below apply the moment they change. */}\n\t\t\t\t\t\t\t\t<Form onSubmit={(event) => event.preventDefault()} className=\"gap-0\">\n\t\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t\t\t\t\t<Row gap={2}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Avatar variant=\"art\" size=\"lg\" fallback=\"AL\" alt=\"Ada Lovelace\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<Stack gap={0.5} align=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Row gap={1}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button type=\"button\" variant=\"outline\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUpload photo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Button type=\"button\" variant=\"ghost\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-caption text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSquare PNG or JPG, at least 400 px.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t\t\t<Grid cols={{ base: 1, sm: 2 }} gap={3}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Field label=\"Display name\" name=\"displayName\" required>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input defaultValue=\"Ada Lovelace\" autoComplete=\"name\" />\n\t\t\t\t\t\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t\t\t\t\t\t<Field label=\"Handle\" name=\"handle\" description=\"atelier.com/@ada\" required>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Input defaultValue=\"ada\" autoComplete=\"username\" spellCheck={false} />\n\t\t\t\t\t\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t\t\t\t<Field label=\"Bio\" name=\"bio\" description=\"Shown on your profile and in comments.\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\trows={3}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultValue=\"Product designer working on tools for small teams. Writing about process every month.\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t\t\t\t\t<Grid cols={{ base: 1, sm: 2 }} gap={3}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Field label=\"Timezone\" name=\"timezone\" description=\"Due dates use this zone.\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Select defaultValue=\"europe-london\" items={timezones}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectTrigger />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{timezones.map((zone) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={zone.value} value={zone.value}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{zone.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t\t<CardFooter className=\"justify-end\">\n\t\t\t\t\t\t\t\t\t\t<Button type=\"submit\">Save profile</Button>\n\t\t\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t\t\t</Form>\n\t\t\t\t\t\t\t</Card>\n\n\t\t\t\t\t\t\t<Card id=\"notifications\" className=\"scroll-mt-6\">\n\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>Notifications</CardTitle>\n\t\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\t\tEmail updates about your projects. Changes save automatically.\n\t\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t\t\t{notifications.map((item) => (\n\t\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\t\tkey={item.name}\n\t\t\t\t\t\t\t\t\t\t\ttitle={item.title}\n\t\t\t\t\t\t\t\t\t\t\tsubtitle={item.description}\n\t\t\t\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\t\t\tname={item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultChecked={item.on}\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label={item.title}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t\t</Card>\n\n\t\t\t\t\t\t\t<Card id=\"payouts\" className=\"scroll-mt-6\">\n\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>Payouts</CardTitle>\n\t\t\t\t\t\t\t\t\t<CardDescription>Paid in USD every Friday to Chase checking ••4821.</CardDescription>\n\t\t\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" render={<a href=\"/settings/payouts\" />}>\n\t\t\t\t\t\t\t\t\t\t\tManage payouts\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t<Grid cols={{ base: 1, sm: 3 }} gap={3}>\n\t\t\t\t\t\t\t\t\t\t{payouts.map((stat) => (\n\t\t\t\t\t\t\t\t\t\t\t<Stack key={stat.label} gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{stat.label}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-mono-lg text-foreground\">{stat.value}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-caption text-muted-foreground\">{stat.note}</p>\n\t\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t</Card>\n\n\t\t\t\t\t\t\t<Card id=\"account\" className=\"scroll-mt-6\">\n\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>Account</CardTitle>\n\t\t\t\t\t\t\t\t\t<CardDescription>Sign-in details and your data.</CardDescription>\n\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t<CardList>\n\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\tleading={<Icon name=\"mail\" className=\"text-lg text-muted-foreground\" />}\n\t\t\t\t\t\t\t\t\t\ttitle=\"Email\"\n\t\t\t\t\t\t\t\t\t\tsubtitle=\"ada@atelier.art\"\n\t\t\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\t\tChange\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\t\t\tleading={<Icon name=\"download\" className=\"text-lg text-muted-foreground\" />}\n\t\t\t\t\t\t\t\t\t\ttitle=\"Export data\"\n\t\t\t\t\t\t\t\t\t\tsubtitle=\"Projects, invoices, and members\"\n\t\t\t\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\t\tExport\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</CardList>\n\t\t\t\t\t\t\t</Card>\n\n\t\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>Delete account</CardTitle>\n\t\t\t\t\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\t\t\t\t\tPermanently remove your profile, projects, and billing history. Files you shared\n\t\t\t\t\t\t\t\t\t\tstay with your team.\n\t\t\t\t\t\t\t\t\t</CardDescription>\n\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t<CardFooter className=\"justify-end\">\n\t\t\t\t\t\t\t\t\t<Button variant=\"destructive\" onClick={() => setDeleteOpen(true)}>\n\t\t\t\t\t\t\t\t\t\tDelete account\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</Col>\n\t\t\t\t</Columns>\n\t\t\t</Page>\n\t\t\t<DestructiveActionModal\n\t\t\t\topen={deleteOpen}\n\t\t\t\tonOpenChange={setDeleteOpen}\n\t\t\t\ttitle=\"Delete your account?\"\n\t\t\t\tdescription=\"This permanently removes your profile, 12 projects, and billing history. Your final invoice is still sent. This can't be undone.\"\n\t\t\t\tconfirmLabel=\"Delete account\"\n\t\t\t\tconfirmingLabel=\"Deleting…\"\n\t\t\t\tconfirmText=\"ada\"\n\t\t\t\tonConfirm={() => setDeleteOpen(false)}\n\t\t\t/>\n\t\t</AppShell>\n\t)\n}"
      },
      {
        "name": "TrackerPage",
        "path": "patterns/tracker-page.tsx",
        "summary": "Records workspace in the tool register: a Sidebar rail of grouped views ending in an account menu, a WorkspaceBar of Breadcrumbs over pill Tabs, a filter row, one grouped DataTable, and a docked inspector of PanelSection property rows with a pinned comment form. Below lg the rail and the inspector become sheets and a BottomNav takes the last row.",
        "intent": "Reach for this when a team works through records in a dense tool — an issue tracker, a support queue, a pipeline: a grouped list, a docked inspector for the selected record, and a rail of views. For records a person reads and edits one at a time on a page, ListDetailPage is the page-register shape; for monitoring with headline numbers, DashboardPage.",
        "keywords": [
          "issue tracker",
          "tracker",
          "linear",
          "like linear",
          "jira",
          "project management",
          "task manager",
          "support queue",
          "triage",
          "crm",
          "pipeline",
          "records workspace",
          "inspector",
          "backlog"
        ],
        "notes": [
          "Workspace sets the compact density for everything inside: 32px rail rows, 28px tables, 24px property fields. Nothing in the pattern sizes a control or a row by hand. The Overview tab is a reading view, so it sits in `<Density value=\"comfortable\">` and its prose gets page type back.",
          "The rail is Sable's own parts on one grid: SidebarBrand, SidebarGroup, SidebarItem and SidebarAccount share the icon and label columns. The account row is the trigger of the account Menu, which holds Settings, an Appearance submenu wired to useSableTheme (light, dark, system) and Sign out. No Settings button or badge sits in the footer.",
          "There is no Workspace `toolbar`: the bars belong to the list column, so the inspector runs the full height beside them. The first WorkspaceBar carries Breadcrumbs; the second carries pill Tabs, a view switch in chrome, which sits beside the bar's other controls rather than drawing a rule.",
          "One DataTable groups the rows (`groupBy`, `groups`): one header for every group, a StatusDot, a count and an add action per group header, and Done starting closed. The segmented ToggleGroup switches the grouping between status and assignee. Filtering to nothing swaps the table for an EmptyState with a Clear filters action.",
          "Workflow states map onto StatusDot tones once (`STATUSES`), so group headers and the status Select read from one place. A product with a richer status glyph keeps that one mapping and swaps the icon.",
          "The inspector is a Panel with `narrow=\"sheet\"`: docked at 320px from lg, a right sheet below it, its content rendered once. Below lg it opens only when a row is picked (`inspecting`), so a phone never loads with a sheet over the list. Properties are PanelSection + PropertyRow with xs Select triggers and an xs DatePicker; Activity uses RelativeTime; the comment Form is pinned under the scrolling body.",
          "The rail is a Panel with `narrow=\"sheet\" side=\"left\"`, opened from a `lg:hidden` menu button in the first bar; in the sheet the Sidebar fills its width. Workspace `bottomNav` reserves the BottomNav's row below lg, so the status bar ends above it."
        ],
        "a11y": [
          "Workspace renders a skip link to the canvas (`Skip to issues`) and WorkspaceCanvas is the main landmark; the rail and the inspector are labelled complementary regions (`Workspace navigation`, `Issue details`), and as sheets they keep those labels as their dialog titles.",
          "The page has one level-1 heading (visually hidden; the breadcrumb shows the place) and the inspector's title is a level-2 heading.",
          "Group header rows are real buttons with aria-expanded; rows open the inspector from the keyboard (DataTable's row activation). Every icon-only action has an accessible name and a tooltip.",
          "Each SidebarGroup is a named group; the account row names the person, and its menu is a standard Menu with a radio group for the colour mode."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Avatar, Badge, BottomNav, BottomNavItem, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, Breadcrumbs, BreadcrumbSeparator, Button, DataTable, DatePicker, Density, EmptyState, Form, Icon, Kbd, Menu, MenuContent, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Panel, PanelGroup, PanelSection, PropertyRow, RelativeTime, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, Sidebar, SidebarAccount, SidebarBrand, SidebarFooter, SidebarGroup, SidebarHeader, SidebarItem, SidebarNav, SimpleTooltip, StatusBar, StatusBarGroup, StatusDot, Tabs, TabsList, TabsPanel, TabsTrigger, Textarea, Toggle, ToggleGroup, useBelowBreakpoint, useSableTheme, Workspace, WorkspaceBar, WorkspaceCanvas, type DataTableColumn } from \"@sableui/react\"",
        "code": "// Workflow states → StatusDot tones, mapped once here so every group header,\n// row and select follows. Sable has no status vocabulary of its own.\nconst STATUSES = [\n\t{ key: \"progress\", label: \"In progress\", tone: \"warning\" },\n\t{ key: \"review\", label: \"In review\", tone: \"2\" },\n\t{ key: \"todo\", label: \"Todo\", tone: \"neutral\" },\n\t{ key: \"done\", label: \"Done\", tone: \"success\" },\n] as const\ntype Status = (typeof STATUSES)[number][\"key\"]\n\nconst PRIORITIES = [\"Urgent\", \"High\", \"Medium\", \"Low\"] as const\ntype Priority = (typeof PRIORITIES)[number]\n\nconst people: Record<string, string> = {\n\tAK: \"Ama Kusi\",\n\tJR: \"Jonas Reiter\",\n\tLM: \"Lena Moreau\",\n\tTO: \"Tomás Ortega\",\n}\n\nconst MIN = 60 * 1000\nconst HOUR = 60 * MIN\nconst DAY = 24 * HOUR\nconst isoDay = (offset: number) => {\n\tconst d = new Date(Date.now() + offset)\n\treturn new Date(d.getFullYear(), d.getMonth(), d.getDate())\n}\n\ntype Note = { id: string; who: string; text: string; at: number }\ntype Issue = {\n\tid: string\n\ttitle: string\n\tdetail: string\n\tstatus: Status\n\tpriority: Priority\n\tassignee: string\n\tlabel: string\n\tdue: Date\n\tnotes: Note[]\n}\n\nconst initialIssues: Issue[] = [\n\t{ id: \"FW-104\", title: \"Sync offline edits when the app reconnects\", detail: \"Edits made offline are queued but replayed out of order after a reconnect. Replay them by timestamp and surface conflicts.\", status: \"progress\", priority: \"Urgent\", assignee: \"AK\", label: \"Sync\", due: isoDay(2 * DAY), notes: [{ id: \"n1\", who: \"JR\", text: \"Repro steps are in the test plan. It only happens after a cold start.\", at: -3 * HOUR }] },\n\t{ id: \"FW-105\", title: \"Onboarding checklist on first launch\", detail: \"Three steps: connect a calendar, invite a teammate, create a first project.\", status: \"progress\", priority: \"Medium\", assignee: \"LM\", label: \"Onboarding\", due: isoDay(5 * DAY), notes: [] },\n\t{ id: \"FW-108\", title: \"Push notification settings per project\", detail: \"Let people mute a project without muting the workspace.\", status: \"review\", priority: \"High\", assignee: \"TO\", label: \"Notifications\", due: isoDay(1 * DAY), notes: [] },\n\t{ id: \"FW-110\", title: \"Crash when attaching a large photo\", detail: \"Photos over 20 MB crash the uploader on older devices.\", status: \"review\", priority: \"Urgent\", assignee: \"JR\", label: \"Bug\", due: isoDay(-1 * DAY), notes: [] },\n\t{ id: \"FW-112\", title: \"Search across archived projects\", detail: \"Archived projects are left out of search today.\", status: \"todo\", priority: \"Low\", assignee: \"AK\", label: \"Search\", due: isoDay(9 * DAY), notes: [] },\n\t{ id: \"FW-113\", title: \"Keyboard shortcuts for the board view\", detail: \"J and K move between cards; C creates an issue in the focused column.\", status: \"todo\", priority: \"Medium\", assignee: \"LM\", label: \"Board\", due: isoDay(12 * DAY), notes: [] },\n\t{ id: \"FW-114\", title: \"Export a project as CSV\", detail: \"One row per issue, with status, assignee and dates.\", status: \"todo\", priority: \"Low\", assignee: \"TO\", label: \"Export\", due: isoDay(14 * DAY), notes: [] },\n\t{ id: \"FW-101\", title: \"Dark mode for the widget\", detail: \"The home-screen widget ignores the system appearance.\", status: \"done\", priority: \"Medium\", assignee: \"JR\", label: \"Widget\", due: isoDay(-4 * DAY), notes: [] },\n]\n\nconst MODE_LABEL = { light: \"Light\", dark: \"Dark\", system: \"System\" } as const\n\n/** One icon-only action with a visible name on hover and focus. */\nexport function TrackerPage() {\n\tconst [issues, setIssues] = useState(initialIssues)\n\tconst [selectedId, setSelectedId] = useState<string | null>(\"FW-104\")\n\t// Below lg the inspector is a sheet; it opens only when someone picks a row,\n\t// so a phone does not load with a sheet over the list.\n\tconst [inspecting, setInspecting] = useState(false)\n\tconst [navOpen, setNavOpen] = useState(false)\n\tconst [query, setQuery] = useState(\"\")\n\tconst [priority, setPriority] = useState<\"all\" | Priority>(\"all\")\n\tconst [groupBy, setGroupBy] = useState<\"status\" | \"assignee\">(\"status\")\n\tconst [tab, setTab] = useState(\"issues\")\n\tconst [draft, setDraft] = useState(\"\")\n\tconst narrow = useBelowBreakpoint(\"lg\")\n\tconst { preference, setPreference } = useSableTheme()\n\n\tconst needle = query.trim().toLowerCase()\n\tconst visible = issues.filter(\n\t\t(i) =>\n\t\t\t(priority === \"all\" || i.priority === priority) &&\n\t\t\t`${i.id} ${i.title} ${i.label}`.toLowerCase().includes(needle),\n\t)\n\tconst selected = issues.find((i) => i.id === selectedId) ?? null\n\tconst done = issues.filter((i) => i.status === \"done\").length\n\n\tfunction update(id: string, patch: Partial<Issue>) {\n\t\tsetIssues((all) => all.map((i) => (i.id === id ? { ...i, ...patch } : i)))\n\t}\n\tfunction open(id: string) {\n\t\tsetSelectedId(id)\n\t\tsetInspecting(true)\n\t}\n\tfunction close() {\n\t\tsetInspecting(false)\n\t\tif (!narrow) setSelectedId(null)\n\t}\n\tfunction addIssue(status: Status = \"todo\") {\n\t\tconst id = `FW-${115 + issues.length}`\n\t\tsetIssues((all) => [\n\t\t\t...all,\n\t\t\t{ id, title: \"New issue\", detail: \"\", status, priority: \"Medium\", assignee: \"AK\", label: \"Triage\", due: isoDay(7 * DAY), notes: [] },\n\t\t])\n\t\topen(id)\n\t}\n\tfunction addNote() {\n\t\tif (!selected || !draft.trim()) return\n\t\tupdate(selected.id, { notes: [...selected.notes, { id: `n${Date.now()}`, who: \"AK\", text: draft.trim(), at: 0 }] })\n\t\tsetDraft(\"\")\n\t}\n\n\tconst columns: DataTableColumn<Issue>[] = [\n\t\t{ key: \"id\", header: \"ID\", className: \"w-20 whitespace-nowrap\", cell: (i) => <span className=\"text-ui-num text-muted-foreground\">{i.id}</span> },\n\t\t{ key: \"title\", header: \"Issue\", className: \"w-full max-w-0\", cell: (i) => <span className=\"block truncate\">{i.title}</span> },\n\t\t{ key: \"label\", header: \"Label\", className: \"w-28 max-sm:hidden\", cell: (i) => <Badge appearance=\"outline\" size=\"sm\">{i.label}</Badge> },\n\t\t{ key: \"due\", header: \"Due\", className: \"w-20 whitespace-nowrap max-sm:hidden\", sortValue: (i) => i.due.getTime(), cell: (i) => <span className=\"text-muted-foreground\">{i.due.toLocaleDateString(\"en-US\", { month: \"short\", day: \"numeric\" })}</span> },\n\t\t{ key: \"assignee\", header: <span className=\"sr-only\">Assignee</span>, className: \"w-10\", cell: (i) => <Avatar size=\"2xs\" fallback={i.assignee} alt={people[i.assignee]} /> },\n\t]\n\n\tconst groups =\n\t\tgroupBy === \"status\"\n\t\t\t? STATUSES.map((s) => ({\n\t\t\t\t\tkey: s.key,\n\t\t\t\t\tlabel: s.label,\n\t\t\t\t\ticon: <StatusDot tone={s.tone} />,\n\t\t\t\t\taction: <SimpleTooltip content={`Add to ${s.label}`}><Button size=\"icon-xs\" variant=\"ghost\" aria-label={`Add to ${s.label}`} onClick={() => addIssue(s.key)}><Icon name=\"plus\" /></Button></SimpleTooltip>,\n\t\t\t\t\tdefaultExpanded: s.key !== \"done\",\n\t\t\t\t}))\n\t\t\t: Object.entries(people).map(([key, name]) => ({\n\t\t\t\t\tkey,\n\t\t\t\t\tlabel: name,\n\t\t\t\t\ticon: <Avatar size=\"2xs\" fallback={key} alt=\"\" />,\n\t\t\t\t}))\n\n\tconst sidebar = (\n\t\t<Sidebar variant=\"inline\" className=\"h-full w-full\">\n\t\t\t<SidebarHeader>\n\t\t\t\t<SidebarBrand mark={<Avatar shape=\"square\" size=\"2xs\" tone=\"teal\" fallback=\"F\" alt=\"\" />} label=\"Fieldwork\" />\n\t\t\t\t<Button variant=\"outline\" size=\"sm\" className=\"basis-full justify-between\">\n\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Icon name=\"search\" />\n\t\t\t\t\t\tSearch\n\t\t\t\t\t</span>\n\t\t\t\t\t<Kbd>Ctrl K</Kbd>\n\t\t\t\t</Button>\n\t\t\t</SidebarHeader>\n\t\t\t<SidebarNav aria-label=\"Workspace\">\n\t\t\t\t<SidebarItem icon={<Icon name=\"inbox\" />} label=\"Inbox\" badge={<span className=\"text-ui-num text-muted-foreground\">3</span>} />\n\t\t\t\t<SidebarItem icon={<Icon name=\"circle-check\" />} label=\"My issues\" />\n\t\t\t\t<SidebarGroup label=\"Mobile app\">\n\t\t\t\t\t<SidebarItem icon={<Icon name=\"layers\" />} label=\"Issues\" active />\n\t\t\t\t\t<SidebarItem icon={<Icon name=\"refresh\" />} label=\"Cycles\" />\n\t\t\t\t\t<SidebarItem icon={<Icon name=\"archive\" />} label=\"Backlog\" />\n\t\t\t\t</SidebarGroup>\n\t\t\t\t<SidebarGroup label=\"Workspace\">\n\t\t\t\t\t<SidebarItem icon={<Icon name=\"folder\" />} label=\"Projects\" />\n\t\t\t\t\t<SidebarItem icon={<Icon name=\"users\" />} label=\"Members\" />\n\t\t\t\t</SidebarGroup>\n\t\t\t</SidebarNav>\n\t\t\t<SidebarFooter>\n\t\t\t\t<Menu>\n\t\t\t\t\t<MenuTrigger\n\t\t\t\t\t\trender={<SidebarAccount avatar={<Avatar size=\"2xs\" fallback=\"AK\" alt=\"\" />} label=\"Ama Kusi\" detail=\"Fieldwork · Admin\" />}\n\t\t\t\t\t/>\n\t\t\t\t\t<MenuContent side=\"top\" align=\"start\">\n\t\t\t\t\t\t<MenuItem icon={<Icon name=\"gear\" />}>Settings</MenuItem>\n\t\t\t\t\t\t<MenuSubmenu>\n\t\t\t\t\t\t\t<MenuSubmenuTrigger\n\t\t\t\t\t\t\t\ticon={<Icon name={preference === \"dark\" ? \"moon\" : preference === \"light\" ? \"sun\" : \"desktop\"} />}\n\t\t\t\t\t\t\t\tvalue={MODE_LABEL[preference]}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tAppearance\n\t\t\t\t\t\t\t</MenuSubmenuTrigger>\n\t\t\t\t\t\t\t<MenuContent side=\"inline-end\">\n\t\t\t\t\t\t\t\t<MenuRadioGroup value={preference} onValueChange={(v) => setPreference(v as typeof preference)}>\n\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"light\">Light</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"dark\">Dark</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"system\">System</MenuRadioItem>\n\t\t\t\t\t\t\t\t</MenuRadioGroup>\n\t\t\t\t\t\t\t</MenuContent>\n\t\t\t\t\t\t</MenuSubmenu>\n\t\t\t\t\t\t<MenuSeparator />\n\t\t\t\t\t\t<MenuItem icon={<Icon name=\"logout\" />}>Sign out</MenuItem>\n\t\t\t\t\t</MenuContent>\n\t\t\t\t</Menu>\n\t\t\t</SidebarFooter>\n\t\t</Sidebar>\n\t)\n\n\tconst list =\n\t\tvisible.length === 0 ? (\n\t\t\t<EmptyState\n\t\t\t\ticon={<Icon name=\"search\" />}\n\t\t\t\ttitle=\"No issues match\"\n\t\t\t\tdescription=\"Try another search, or clear the priority filter.\"\n\t\t\t\taction={\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tsetQuery(\"\")\n\t\t\t\t\t\t\tsetPriority(\"all\")\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tClear filters\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\t\t\t/>\n\t\t) : (\n\t\t\t<DataTable\n\t\t\t\tcolumns={columns}\n\t\t\t\tdata={visible}\n\t\t\t\trowKey={(i) => i.id}\n\t\t\t\tgroupBy={(i) => (groupBy === \"status\" ? i.status : i.assignee)}\n\t\t\t\tgroups={groups}\n\t\t\t\tonRowClick={(i) => open(i.id)}\n\t\t\t\t// A phone shows the selection only while its sheet is open.\n\t\t\t\tisRowSelected={(i) => i.id === selectedId && (!narrow || inspecting)}\n\t\t\t/>\n\t\t)\n\n\tconst inspector = selected ? (\n\t\t<div className=\"flex h-full min-h-0 flex-col\">\n\t\t\t<WorkspaceBar className=\"justify-between\">\n\t\t\t\t<span className=\"text-ui-num text-muted-foreground\">{selected.id}</span>\n\t\t\t\t<SimpleTooltip content=\"Close issue\"><Button size=\"icon-xs\" variant=\"ghost\" aria-label=\"Close issue\" onClick={close}><Icon name=\"xmark\" /></Button></SimpleTooltip>\n\t\t\t</WorkspaceBar>\n\t\t\t<div className=\"min-h-0 flex-1 overflow-y-auto scrollbar-quiet\">\n\t\t\t\t<div className=\"flex flex-col gap-2 px-2 pt-4 pb-3\">\n\t\t\t\t\t<h2 className=\"text-title-lg\">{selected.title}</h2>\n\t\t\t\t\t<p className=\"text-ui-body text-muted-foreground\">{selected.detail || \"Add the details the team needs.\"}</p>\n\t\t\t\t</div>\n\t\t\t\t<PanelSection title=\"Properties\">\n\t\t\t\t\t<PropertyRow label=\"Status\">\n\t\t\t\t\t\t<Select value={selected.status} items={STATUSES.map((s) => ({ value: s.key, label: s.label }))} onValueChange={(v) => v && update(selected.id, { status: v as Status })}>\n\t\t\t\t\t\t\t<SelectTrigger size=\"xs\" aria-label=\"Status\" />\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{STATUSES.map((s) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={s.key} value={s.key}>{s.label}</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</PropertyRow>\n\t\t\t\t\t<PropertyRow label=\"Priority\">\n\t\t\t\t\t\t<Select value={selected.priority} onValueChange={(v) => v && update(selected.id, { priority: v as Priority })}>\n\t\t\t\t\t\t\t<SelectTrigger size=\"xs\" aria-label=\"Priority\" />\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{PRIORITIES.map((p) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={p} value={p}>{p}</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</PropertyRow>\n\t\t\t\t\t<PropertyRow label=\"Assignee\">\n\t\t\t\t\t\t<Select value={selected.assignee} items={people} onValueChange={(v) => v && update(selected.id, { assignee: v })}>\n\t\t\t\t\t\t\t<SelectTrigger size=\"xs\" aria-label=\"Assignee\" />\n\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t{Object.entries(people).map(([key, name]) => (\n\t\t\t\t\t\t\t\t\t<SelectItem key={key} value={key}>{name}</SelectItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t</Select>\n\t\t\t\t\t</PropertyRow>\n\t\t\t\t\t<PropertyRow label=\"Due date\">\n\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\taria-label=\"Due date\"\n\t\t\t\t\t\t\tvalue={selected.due}\n\t\t\t\t\t\t\tformatOptions={{ month: \"short\", day: \"numeric\", year: \"numeric\" }}\n\t\t\t\t\t\t\tonValueChange={(d) => d && update(selected.id, { due: d })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PropertyRow>\n\t\t\t\t</PanelSection>\n\t\t\t\t<PanelSection title=\"Activity\">\n\t\t\t\t\t<div className=\"flex flex-col gap-3 pb-4\">\n\t\t\t\t\t\t<div className=\"flex items-center gap-2 text-ui-sm text-muted-foreground\">\n\t\t\t\t\t\t\t<Icon name=\"plus\" />\n\t\t\t\t\t\t\t<span>Created in Mobile app</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{selected.notes.map((n) => (\n\t\t\t\t\t\t\t<div key={n.id} className=\"flex items-start gap-2\">\n\t\t\t\t\t\t\t\t<Avatar size=\"2xs\" fallback={n.who} alt=\"\" />\n\t\t\t\t\t\t\t\t<div className=\"min-w-0\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-ui-md\">{people[n.who]}</span>\n\t\t\t\t\t\t\t\t\t\t<RelativeTime date={new Date(Date.now() + n.at)} className=\"text-ui-sm text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-ui-body\">{n.text}</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</PanelSection>\n\t\t\t</div>\n\t\t\t<Form\n\t\t\t\tclassName=\"flex shrink-0 flex-col gap-2 border-t border-hairline p-2\"\n\t\t\t\tonSubmit={(e) => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\taddNote()\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<Textarea aria-label=\"Add a comment\" placeholder=\"Leave a comment…\" rows={2} value={draft} onChange={(e) => setDraft(e.target.value)} />\n\t\t\t\t<Button size=\"xs\" variant=\"secondary\" type=\"submit\" className=\"self-end\" disabled={!draft.trim()} iconStart={<Icon name=\"arrow-up\" />}>\n\t\t\t\t\tComment\n\t\t\t\t</Button>\n\t\t\t</Form>\n\t\t</div>\n\t) : null\n\n\treturn (\n\t\t<Workspace\n\t\t\tskipLinkLabel=\"Skip to issues\"\n\t\t\tstatusBar={\n\t\t\t\t<StatusBar>\n\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<StatusDot tone=\"success\" size=\"sm\" />\n\t\t\t\t\t\tSaved\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"max-sm:hidden\">\n\t\t\t\t\t\t{issues.length} issues · {done} done\n\t\t\t\t\t</span>\n\t\t\t\t\t<StatusBarGroup align=\"end\">\n\t\t\t\t\t\t<span className=\"max-sm:hidden\">Ctrl K to search</span>\n\t\t\t\t\t</StatusBarGroup>\n\t\t\t\t</StatusBar>\n\t\t\t}\n\t\t\tbottomNav={\n\t\t\t\t<BottomNav aria-label=\"Primary\">\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"inbox\" />} label=\"Inbox\" showLabel />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"layers\" />} label=\"Issues\" showLabel active />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"folder\" />} label=\"Projects\" showLabel />\n\t\t\t\t\t<BottomNavItem icon={<Icon name=\"users\" />} label=\"Members\" showLabel />\n\t\t\t\t</BottomNav>\n\t\t\t}\n\t\t>\n\t\t\t<PanelGroup>\n\t\t\t\t{/* Docked from lg; below it the same rail is a left sheet. */}\n\t\t\t\t<Panel label=\"Workspace navigation\" width={232} narrow=\"sheet\" side=\"left\" open={narrow ? navOpen : true} onOpenChange={setNavOpen} scroll={false}>\n\t\t\t\t\t{sidebar}\n\t\t\t\t</Panel>\n\t\t\t\t<WorkspaceCanvas className=\"flex flex-col\">\n\t\t\t\t\t<WorkspaceBar className=\"gap-2 px-3\">\n\t\t\t\t\t\t<span className=\"lg:hidden\">\n\t\t\t\t\t\t\t<SimpleTooltip content=\"Open navigation\"><Button size=\"icon-xs\" variant=\"ghost\" aria-label=\"Open navigation\" onClick={() => setNavOpen(true)}><Icon name=\"bars\" /></Button></SimpleTooltip>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<h1 className=\"sr-only\">Mobile app issues</h1>\n\t\t\t\t\t\t<Breadcrumbs className=\"min-w-0\">\n\t\t\t\t\t\t\t<BreadcrumbItem className=\"max-sm:hidden\">\n\t\t\t\t\t\t\t\t<BreadcrumbLink href=\"#\">Fieldwork</BreadcrumbLink>\n\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t\t<BreadcrumbSeparator className=\"max-sm:hidden\" />\n\t\t\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t\t\t<BreadcrumbPage>Mobile app</BreadcrumbPage>\n\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t</Breadcrumbs>\n\t\t\t\t\t</WorkspaceBar>\n\t\t\t\t\t<Tabs value={tab} onValueChange={(v) => setTab(String(v))} className=\"flex min-h-0 flex-1 flex-col\">\n\t\t\t\t\t\t{/* A view switch in tool chrome: pill, beside the bar's other controls. */}\n\t\t\t\t\t\t<WorkspaceBar className=\"px-3\">\n\t\t\t\t\t\t\t<TabsList variant=\"pill\">\n\t\t\t\t\t\t\t\t<TabsTrigger value=\"issues\">\n\t\t\t\t\t\t\t\t\tIssues <span className=\"text-ui-num text-muted-foreground\">{issues.length}</span>\n\t\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t\t<TabsTrigger value=\"overview\">Overview</TabsTrigger>\n\t\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t</WorkspaceBar>\n\t\t\t\t\t\t<TabsPanel value=\"issues\" className=\"flex min-h-0 flex-1 flex-col\">\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-2 border-b border-hairline px-3 py-2\">\n\t\t\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t\t\t<MenuTrigger render={<Button variant=\"ghost\" size=\"xs\" iconStart={<Icon name=\"filter\" />}>{priority === \"all\" ? \"Filter\" : priority}</Button>} />\n\t\t\t\t\t\t\t\t\t<MenuContent>\n\t\t\t\t\t\t\t\t\t\t<MenuRadioGroup value={priority} onValueChange={(v) => setPriority(v as typeof priority)}>\n\t\t\t\t\t\t\t\t\t\t\t<MenuRadioItem value=\"all\">All priorities</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t\t\t{PRIORITIES.map((p) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<MenuRadioItem key={p} value={p}>{p}</MenuRadioItem>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</MenuRadioGroup>\n\t\t\t\t\t\t\t\t\t</MenuContent>\n\t\t\t\t\t\t\t\t</Menu>\n\t\t\t\t\t\t\t\t<SearchInput size=\"xs\" value={query} onValueChange={setQuery} placeholder=\"Find issue…\" aria-label=\"Find issue\" className=\"w-40\" />\n\t\t\t\t\t\t\t\t<ToggleGroup appearance=\"segmented\" value={[groupBy]} onValueChange={(v) => v[0] && setGroupBy(v[0] as typeof groupBy)} aria-label=\"Group by\" className=\"ms-auto\">\n\t\t\t\t\t\t\t\t\t<Toggle value=\"status\">Status</Toggle>\n\t\t\t\t\t\t\t\t\t<Toggle value=\"assignee\">Assignee</Toggle>\n\t\t\t\t\t\t\t\t</ToggleGroup>\n\t\t\t\t\t\t\t\t<Button size=\"xs\" iconStart={<Icon name=\"plus\" />} onClick={() => addIssue()}>\n\t\t\t\t\t\t\t\t\tNew issue\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"min-h-0 flex-1 overflow-y-auto scrollbar-quiet\">{list}</div>\n\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t\t<TabsPanel value=\"overview\" className=\"flex min-h-0 flex-1 flex-col\">\n\t\t\t\t\t\t\t{/* A reading view: page type comes back inside the compact workspace. */}\n\t\t\t\t\t\t\t<Density value=\"comfortable\" className=\"min-h-0 flex-1 overflow-y-auto scrollbar-quiet\">\n\t\t\t\t\t\t\t\t<article className=\"flex max-w-prose flex-col gap-4 p-8 max-sm:p-5\">\n\t\t\t\t\t\t\t\t\t<h2 className=\"text-heading-3\">Mobile app</h2>\n\t\t\t\t\t\t\t\t\t<p className=\"text-body-md text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\tThe phone app for field teams: capture work on site, sync it when the signal comes back, and hand it to the office without retyping anything.\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<dl className=\"sable-list-dl\">\n\t\t\t\t\t\t\t\t\t\t<dt>Lead</dt>\n\t\t\t\t\t\t\t\t\t\t<dd>{people.AK}</dd>\n\t\t\t\t\t\t\t\t\t\t<dt>Open issues</dt>\n\t\t\t\t\t\t\t\t\t\t<dd>{issues.length - done}</dd>\n\t\t\t\t\t\t\t\t\t\t<dt>Target</dt>\n\t\t\t\t\t\t\t\t\t\t<dd>{isoDay(30 * DAY).toLocaleDateString(\"en-US\", { month: \"long\", day: \"numeric\" })}</dd>\n\t\t\t\t\t\t\t\t\t</dl>\n\t\t\t\t\t\t\t\t</article>\n\t\t\t\t\t\t\t</Density>\n\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t</Tabs>\n\t\t\t\t</WorkspaceCanvas>\n\t\t\t\t{/* Docked beside the list from lg; a sheet below it. Its content renders once. */}\n\t\t\t\t<Panel\n\t\t\t\t\tlabel=\"Issue details\"\n\t\t\t\t\twidth={320}\n\t\t\t\t\tnarrow=\"sheet\"\n\t\t\t\t\topen={narrow ? inspecting && selected !== null : selected !== null}\n\t\t\t\t\tonOpenChange={(next) => !next && close()}\n\t\t\t\t\tscroll={false}\n\t\t\t\t\tclassName=\"border-s border-hairline\"\n\t\t\t\t>\n\t\t\t\t\t{inspector}\n\t\t\t\t</Panel>\n\t\t\t</PanelGroup>\n\t\t</Workspace>\n\t)\n}"
      }
    ]
  },
  "blocks": {
    "about": "Section-sized compositions — a sign-in card, a pricing card, an order tracker — smaller than a page shell, with only enough local state to show themselves. Copy the code (imports included) and edit the content constants at the top, or import the same component from `@sableui/react/blocks` to see it in place first. Props are the block contract only: `className` (a card block fills its container up to its designed `width.max`; size it from the parent or with className), `framed` on Card-built blocks (false drops the surface for a Sheet, Dialog or section that already frames it), and callbacks for the outcomes the block produces (one per action an app must handle: `on<Verb>(payload)`, `on<State>Change(next)` for a toggle, `on<Item>Action(id, action)` for a list row). Content is never a prop; the one exception is media a block exists to work on (PhotoAdjustBlock's `image`).",
    "retrieve": "sable block <Name>",
    "items": [
      {
        "name": "AgentRunBlock",
        "path": "blocks/agent-run-block.tsx",
        "summary": "One agent turn from question to answer: the person's Bubble, an AgentAvatar that thinks and speaks, a ToolCall, the reply as StreamingText, and a ChatComposer whose send becomes stop while the turn runs.",
        "intent": "Reach for this to show an assistant at work in a card — a help widget, a copilot preview, a dashboard's ask-anything tile. Send a follow-up and the turn plays through thinking, a tool call and a streamed answer. A full conversation with history and scrolling is the ChatPanel page shell; a call that waits on the person is ApprovalBlock.",
        "family": "AI & agents",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "One phase value drives the avatar's state, the status line and the composer's busy state, so the three never disagree about whether the agent is still working.",
          "The agent's reply is prose on the surface, not a Bubble: a bubble is a person's message, and a long answer with tool calls in it does not fit one.",
          "The wait is named in words (\"Thinking…\", the ToolCall's own status), with the ThinkingOrb and the avatar as the motion beside them. Neither animation is the only signal.",
          "Stop keeps what has arrived and says \"Stopped.\"; a tool that was still running is marked stopped, not complete.",
          "The stages advance on timers here. Replace the effect with your model's events: first token, tool start, tool result, end of stream."
        ],
        "a11y": [
          "One role=status region is mounted from the start and only its text changes (\"Thinking…\", then \"Stopped.\" if the turn is stopped); the visible lines are hidden from assistive technology so nothing is read twice. ToolCall announces its own status change.",
          "StreamingText sets aria-busy while the answer arrives, so a screen reader reads the settled reply once.",
          "The composer's send button becomes a labelled stop button while the turn runs."
        ],
        "imports": "\"use client\"\n\nimport { useState, useEffect } from \"react\"\nimport { AgentAvatar, Bubble, Card, CardContent, CardFooter, ChatComposer, cn, InlineStatus, Message, StreamingText, ThinkingOrb, ToolCall } from \"@sableui/react\"",
        "code": "const run = {\n\tquestion: \"Why did checkout fail last night?\",\n\ttool: { name: \"search_logs\", running: \"Searching the logs\", done: \"Searched the logs\" },\n\tanswer: \"The payment webhook timed out 14 times between 02:10 and 02:40. Retries are on now, and all 14 orders went through.\",\n}\nconst words = run.answer.split(\" \")\n\n// The turn's stages, in order. Here they advance on timers, as a stand-in for\n// your model's events: first token, tool start, tool result, end of stream.\ntype Phase = \"thinking\" | \"tool\" | \"writing\" | \"done\"\n\nexport interface AgentRunBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a chat column that already frames it. */\n\tframed?: boolean\n\t/** Called with the follow-up the person sent. */\n\tonSend?: (text: string) => void\n}\n\nexport function AgentRunBlock({ className, framed = true, onSend }: AgentRunBlockProps) {\n\tconst [question, setQuestion] = useState(run.question)\n\tconst [phase, setPhase] = useState<Phase>(\"done\")\n\t// How many words of the answer have arrived.\n\tconst [shown, setShown] = useState(words.length)\n\t// The stage the person stopped the turn at, if they did.\n\tconst [halted, setHalted] = useState<Phase | null>(null)\n\n\tuseEffect(() => {\n\t\tif (phase === \"done\") return\n\t\tconst timer =\n\t\t\tphase === \"thinking\"\n\t\t\t\t? setTimeout(() => setPhase(\"tool\"), 1200)\n\t\t\t\t: phase === \"tool\"\n\t\t\t\t\t? setTimeout(() => setPhase(\"writing\"), 1600)\n\t\t\t\t\t: setTimeout(() => {\n\t\t\t\t\t\t\tsetShown(shown + 1)\n\t\t\t\t\t\t\tif (shown + 1 >= words.length) setPhase(\"done\")\n\t\t\t\t\t\t}, 70)\n\t\treturn () => clearTimeout(timer)\n\t}, [phase, shown])\n\n\tconst send = (text: string) => {\n\t\tsetQuestion(text)\n\t\tsetShown(0)\n\t\tsetHalted(null)\n\t\tsetPhase(\"thinking\")\n\t\tonSend?.(text)\n\t}\n\tconst stop = () => {\n\t\tsetHalted(phase)\n\t\tsetPhase(\"done\")\n\t}\n\n\tconst working = phase !== \"done\"\n\tconst called = phase === \"tool\" || phase === \"writing\" || (phase === \"done\" && halted !== \"thinking\")\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardContent className=\"flex flex-col gap-3\">\n\t\t\t\t<Message messageId=\"question\" align=\"end\">\n\t\t\t\t\t<Bubble variant=\"tint\" align=\"end\">\n\t\t\t\t\t\t{question}\n\t\t\t\t\t</Bubble>\n\t\t\t\t</Message>\n\t\t\t\t{/* One flag drives the avatar, the status line and the composer, so\n\t\t\t\t    they never disagree about whether the agent is still working. */}\n\t\t\t\t<Message\n\t\t\t\t\tmessageId=\"answer\"\n\t\t\t\t\tavatar={<AgentAvatar size=\"sm\" state={phase === \"writing\" ? \"speaking\" : working ? \"thinking\" : \"idle\"} />}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t{called ? (\n\t\t\t\t\t\t\t<ToolCall\n\t\t\t\t\t\t\t\tname={run.tool.name}\n\t\t\t\t\t\t\t\ttitle={phase === \"tool\" ? run.tool.running : run.tool.done}\n\t\t\t\t\t\t\t\tstatus={phase === \"tool\" ? \"running\" : halted === \"tool\" ? \"denied\" : \"complete\"}\n\t\t\t\t\t\t\t\tstatusLabel={halted === \"tool\" ? \"Stopped\" : undefined}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{/* The lines a reader sees. They come and go with the phase, so they\n\t\t\t\t\t\t    are not the live region: the one below is. */}\n\t\t\t\t\t\t{phase === \"thinking\" ? (\n\t\t\t\t\t\t\t<InlineStatus aria-hidden icon={<ThinkingOrb size=\"sm\" />}>\n\t\t\t\t\t\t\t\tThinking…\n\t\t\t\t\t\t\t</InlineStatus>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{shown > 0 ? (\n\t\t\t\t\t\t\t<StreamingText className=\"text-body-md\" text={words.slice(0, shown).join(\" \")} streaming={phase === \"writing\"} />\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{!working && halted ? <InlineStatus aria-hidden>Stopped.</InlineStatus> : null}\n\t\t\t\t\t</div>\n\t\t\t\t</Message>\n\t\t\t\t{/* One live region, there from the first render and only its text\n\t\t\t\t    changing: a status inserted together with its words is announced\n\t\t\t\t    unreliably, or not at all. */}\n\t\t\t\t<p role=\"status\" className=\"sr-only\">\n\t\t\t\t\t{phase === \"thinking\" ? \"Thinking…\" : !working && halted ? \"Stopped.\" : \"\"}\n\t\t\t\t</p>\n\t\t\t</CardContent>\n\t\t\t<CardFooter>\n\t\t\t\t<ChatComposer className=\"w-full\" placeholder=\"Ask a follow-up…\" busy={working} onStop={stop} onSend={send} />\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ApiKeysBlock",
        "path": "blocks/api-keys-block.tsx",
        "summary": "An API keys card: each key's name with its masked hint in Code, when it was created and last used, and an OverflowMenu to rename, roll or revoke.",
        "intent": "Reach for this for developer settings — API keys, access tokens, webhook secrets. Show a newly created key once, in a Dialog with a copy button; this list only ever shows the masked hint.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "42rem"
        },
        "notes": [
          "Only the last four characters are shown. A full key never appears in a list, so there is no copy action here.",
          "\"Last used\" sits in the detail line: it is what tells someone a key is safe to revoke.",
          "Revoke is the destructive item, last and after a separator; confirm it in your handler with DestructiveActionModal."
        ],
        "a11y": [
          "Each OverflowMenu is labelled with the key's name, so the triggers are distinguishable.",
          "The masked hint is a Code element inside the title, read after the key's name."
        ],
        "imports": "\"use client\"\n\nimport { Button, Card, CardAction, CardDescription, CardHeader, CardList, CardTitle, cn, Code, Entity, Icon, MenuItem, MenuSeparator, OverflowMenu } from \"@sableui/react\"",
        "code": "const keys = [\n\t{ id: \"k1\", name: \"Production\", hint: \"sk_live_••••4f2a\", detail: \"Created Mar 2 · used 4 minutes ago\" },\n\t{ id: \"k2\", name: \"Staging\", hint: \"sk_test_••••91cd\", detail: \"Created Feb 11 · used yesterday\" },\n\t{ id: \"k3\", name: \"CI deploys\", hint: \"sk_live_••••0b7e\", detail: \"Created Jan 5 · never used\" },\n]\n\nexport interface ApiKeysBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\tonCreate?: () => void\n\t/** Called with the key's id and the action chosen from its menu. */\n\tonKeyAction?: (id: string, action: \"rename\" | \"roll\" | \"revoke\") => void\n}\n\nexport function ApiKeysBlock({ className, framed = true, onCreate, onKeyAction }: ApiKeysBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-2xl\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>API keys</CardTitle>\n\t\t\t\t<CardDescription>A key is shown once, when you create it. Store it somewhere safe.</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<Button size=\"sm\" variant=\"outline\" iconStart={<Icon name=\"key\" />} onClick={onCreate}>\n\t\t\t\t\t\tCreate key\n\t\t\t\t\t</Button>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardList>\n\t\t\t\t{keys.map((k) => (\n\t\t\t\t\t<Entity\n\t\t\t\t\t\tkey={k.id}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t<span className=\"flex flex-wrap items-center gap-x-2\">\n\t\t\t\t\t\t\t\t{k.name}\n\t\t\t\t\t\t\t\t<Code>{k.hint}</Code>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsubtitle={k.detail}\n\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t<OverflowMenu label={`Manage the ${k.name} key`} size=\"icon-sm\">\n\t\t\t\t\t\t\t\t<MenuItem onClick={() => onKeyAction?.(k.id, \"rename\")}>Rename</MenuItem>\n\t\t\t\t\t\t\t\t<MenuItem onClick={() => onKeyAction?.(k.id, \"roll\")}>Roll key</MenuItem>\n\t\t\t\t\t\t\t\t<MenuSeparator />\n\t\t\t\t\t\t\t\t<MenuItem variant=\"destructive\" onClick={() => onKeyAction?.(k.id, \"revoke\")}>\n\t\t\t\t\t\t\t\t\tRevoke\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</OverflowMenu>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</CardList>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ApprovalBlock",
        "path": "blocks/approval-block.tsx",
        "summary": "An agent asking permission for one tool call: the question, what is at stake, the call itself as a ToolCall with its exact input, and Deny / Always allow / Allow once.",
        "intent": "Reach for this in a chat or agent run when a tool call waits on the person — running a command, sending, paying, deleting, publishing. It wraps the call's own ToolCall, which shows status=\"awaiting\" until the person answers and then \"complete\" or \"denied\". A destructive action outside an agent is DestructiveActionModal.",
        "family": "AI & agents",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "28rem"
        },
        "notes": [
          "The title is the question in plain words (\"Run this command?\"); the description says what is at stake. That sentence is what the person is deciding on.",
          "The call is shown as the agent made it — tool name and raw input, open on arrival — because the exact arguments are what a careful person checks. Do not paraphrase them into a form.",
          "Three answers, as agent products settle on: Deny on the start edge, then Always allow and Allow once, the primary on the end. Neither is focused on arrival: an approval that a stray Enter can grant is not an approval.",
          "After a decision the buttons give way to one InlineStatus line saying what happened, and the ToolCall shows the outcome, so the thread keeps a record of the answer."
        ],
        "a11y": [
          "Focus moves to the outcome line when the buttons leave, instead of dropping to the page; the line is a role=status region, so the decision is announced.",
          "The ToolCall announces its own status change, and its input is a labelled code view."
        ],
        "imports": "\"use client\"\n\nimport { useState, useEffect, useRef } from \"react\"\nimport { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, InlineStatus, ToolCall } from \"@sableui/react\"",
        "code": "const request = {\n\ttitle: \"Run this command?\",\n\tdescription: \"The agent wants to migrate the production database in acme/api. It changes live data.\",\n\ttool: \"run_command\",\n\taction: \"Run a command\",\n\t// A command reads as the command; a structured call would pass its arguments object.\n\tinput: \"pnpm db:migrate --env production\",\n\tallowed: \"Allowed. Running the migration.\",\n\tdenied: \"Denied. The agent won't run it.\",\n}\n\nexport interface ApprovalBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a chat column that already frames it. */\n\tframed?: boolean\n\t/** The person allowed the call. `remember` is true for \"Always allow\". */\n\tonApprove?: (options: { remember: boolean }) => void\n\t/** The person declined the call. */\n\tonDeny?: () => void\n}\n\nexport function ApprovalBlock({ className, framed = true, onApprove, onDeny }: ApprovalBlockProps) {\n\tconst [decision, setDecision] = useState<\"allowed\" | \"denied\" | null>(null)\n\tconst outcome = useRef<HTMLDivElement>(null)\n\t// The buttons leave with the decision, so focus moves to the line that\n\t// replaces them instead of falling back to the top of the page.\n\tuseEffect(() => {\n\t\tif (decision) outcome.current?.focus()\n\t}, [decision])\n\n\tconst approve = (remember: boolean) => {\n\t\tsetDecision(\"allowed\")\n\t\tonApprove?.({ remember })\n\t}\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"@container/approval w-full max-w-md\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{request.title}</CardTitle>\n\t\t\t\t<CardDescription>{request.description}</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t{/* The call itself, exactly as the agent made it. It answers with the\n\t\t\t\t    person: held, then done or denied. */}\n\t\t\t\t<ToolCall\n\t\t\t\t\tname={request.tool}\n\t\t\t\t\ttitle={request.action}\n\t\t\t\t\tstatus={decision === \"allowed\" ? \"complete\" : decision === \"denied\" ? \"denied\" : \"awaiting\"}\n\t\t\t\t\tstatusLabel={decision === \"allowed\" ? \"Allowed\" : undefined}\n\t\t\t\t\tinput={request.input}\n\t\t\t\t\tdefaultOpen\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t\t{/* Three answers fit one row at the designed width. Narrower, they stack\n\t\t\t    full width with the primary on top, rather than run out of the card. */}\n\t\t\t<CardFooter actions className=\"@max-md/approval:flex-col-reverse @max-md/approval:items-stretch\">\n\t\t\t\t{decision ? (\n\t\t\t\t\t<InlineStatus\n\t\t\t\t\t\tref={outcome}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\trole=\"status\"\n\t\t\t\t\t\ttone={decision === \"allowed\" ? \"success\" : \"neutral\"}\n\t\t\t\t\t\tclassName=\"me-auto outline-none\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{decision === \"allowed\" ? request.allowed : request.denied}\n\t\t\t\t\t</InlineStatus>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\tclassName=\"me-auto @max-md/approval:me-0\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetDecision(\"denied\")\n\t\t\t\t\t\t\t\tonDeny?.()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tDeny\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button variant=\"outline\" onClick={() => approve(true)}>\n\t\t\t\t\t\t\tAlways allow\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button onClick={() => approve(false)}>Allow once</Button>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "CartBlock",
        "path": "blocks/cart-block.tsx",
        "summary": "A cart and its order summary: a CardList of lines, each a thumbnail, a NumberField for the quantity and a remove button, over a subtotal, shipping and a total that rolls, and Check out.",
        "intent": "Reach for this as a cart drawer, the cart page's summary column, or the review step before payment. One product to buy is ProductCardBlock; choosing how it arrives is DeliveryOptionsBlock, the step after this one.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "24rem"
        },
        "notes": [
          "Lines are Entity rows in a CardList, so they inset to the card's padding at any density and the thumbnails line up with the title above.",
          "Quantity is a NumberField with steppers, floored at 1: taking a line out is the remove button, a separate decision with its own name, not a quantity of zero.",
          "The summary is a description list (Subtotal, Shipping, Total), and the total is a NumberTicker, so the cost of a change is seen changing.",
          "Shipping says how far the cart is from free, in one templated sentence, until it is free.",
          "An empty cart is an EmptyState in place of the lines, and the summary and Check out leave with them.",
          "`onCheckout` receives the lines (id and quantity) and the total; price them again on the server."
        ],
        "a11y": [
          "Each quantity field and remove button is named for its product (\"Quantity of Stoneware mug\", \"Remove Stoneware mug\").",
          "Removing a line moves focus to the cart's heading, since the row and its button are gone, and a status region mounted from the start says what was removed.",
          "The product thumbnails are decorative beside their titles."
        ],
        "imports": "\"use client\"\n\nimport { useState, useRef } from \"react\"\nimport { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardList, CardTitle, cn, EmptyState, Entity, Icon, MediaImage, NumberField, NumberTicker } from \"@sableui/react\"",
        "code": "// `image` is the product photo URL; left empty, it paints art seeded by the title.\nconst lines = [\n\t{ id: \"throw\", title: \"Linen throw blanket\", detail: \"Oat · 130 × 170 cm\", price: 64, quantity: 1, image: \"\" },\n\t{ id: \"mug\", title: \"Stoneware mug\", detail: \"Speckled white\", price: 18, quantity: 2, image: \"\" },\n\t{ id: \"candle\", title: \"Cedar candle\", detail: \"220 g\", price: 24, quantity: 1, image: \"\" },\n]\n\n// Shipping is free from `free` up; below it costs `cost`.\nconst shipping = { free: 150, cost: 8 }\nconst maxQuantity = 10\n\nconst money = new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\n\ntype Line = (typeof lines)[number]\n\nexport interface CartBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or checkout column that already frames it. */\n\tframed?: boolean\n\t/** Called with the line's id and its new quantity. */\n\tonQuantityChange?: (id: string, quantity: number) => void\n\t/** Called with the line's id when it is removed. */\n\tonRemove?: (id: string) => void\n\t/** Called with what is in the cart when the person checks out. */\n\tonCheckout?: (cart: { lines: { id: string; quantity: number }[]; total: number }) => void\n}\n\nexport function CartBlock({ className, framed = true, onQuantityChange, onRemove, onCheckout }: CartBlockProps) {\n\tconst [cart, setCart] = useState<Line[]>(lines)\n\t// What the last removal was, for the live region below.\n\tconst [removed, setRemoved] = useState(\"\")\n\n\tconst count = cart.reduce((sum, line) => sum + line.quantity, 0)\n\tconst subtotal = cart.reduce((sum, line) => sum + line.price * line.quantity, 0)\n\tconst delivery = subtotal >= shipping.free || subtotal === 0 ? 0 : shipping.cost\n\tconst total = subtotal + delivery\n\n\tconst setQuantity = (id: string, quantity: number) => {\n\t\tsetCart((current) => current.map((line) => (line.id === id ? { ...line, quantity } : line)))\n\t\tonQuantityChange?.(id, quantity)\n\t}\n\t// The removed row takes its button with it, so focus goes to the cart's\n\t// title rather than falling back to the top of the page.\n\tconst title = useRef<HTMLHeadingElement>(null)\n\tconst remove = (line: Line) => {\n\t\ttitle.current?.focus()\n\t\tsetCart((current) => current.filter((item) => item.id !== line.id))\n\t\tsetRemoved(`Removed ${line.title}`)\n\t\tonRemove?.(line.id)\n\t}\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 ref={title} tabIndex={-1} className=\"outline-none\" />}>Your cart</CardTitle>\n\t\t\t\t<CardDescription>{count === 1 ? \"1 item\" : `${count} items`}</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t{cart.length ? (\n\t\t\t\t<CardList divided={false}>\n\t\t\t\t\t{cart.map((line) => (\n\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\tkey={line.id}\n\t\t\t\t\t\t\tleading={<MediaImage src={line.image} seed={line.title} className=\"size-14 shrink-0 rounded-md\" />}\n\t\t\t\t\t\t\ttitle={line.title}\n\t\t\t\t\t\t\tsubtitle={`${line.detail} · ${money.format(line.price)}`}\n\t\t\t\t\t\t\tsubtitleWrap\n\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t<NumberField\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tmin={1}\n\t\t\t\t\t\t\t\t\t\tmax={maxQuantity}\n\t\t\t\t\t\t\t\t\t\tvalue={line.quantity}\n\t\t\t\t\t\t\t\t\t\tonValueChange={(next: number | null) => setQuantity(line.id, next ?? 1)}\n\t\t\t\t\t\t\t\t\t\taria-label={`Quantity of ${line.title}`}\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-24\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" bleed=\"end\" aria-label={`Remove ${line.title}`} onClick={() => remove(line)}>\n\t\t\t\t\t\t\t\t\t\t<Icon name=\"trash\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</CardList>\n\t\t\t) : (\n\t\t\t\t<CardContent>\n\t\t\t\t\t<EmptyState icon={<Icon name=\"inbox\" />} title=\"Your cart is empty\" description=\"Items you add show up here.\" />\n\t\t\t\t</CardContent>\n\t\t\t)}\n\t\t\t{/* Mounted from the start, so a removal is announced: the row it was on is gone. */}\n\t\t\t<p role=\"status\" className=\"sr-only\">\n\t\t\t\t{removed}\n\t\t\t</p>\n\t\t\t{cart.length ? (\n\t\t\t\t<CardFooter className=\"flex-col items-stretch gap-4\">\n\t\t\t\t\t<dl className=\"flex flex-col gap-2 text-body-sm\">\n\t\t\t\t\t\t<div className=\"flex items-baseline justify-between gap-3\">\n\t\t\t\t\t\t\t<dt className=\"text-muted-foreground\">Subtotal</dt>\n\t\t\t\t\t\t\t<dd className=\"text-mono-md\">{money.format(subtotal)}</dd>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-baseline justify-between gap-3\">\n\t\t\t\t\t\t\t<dt className=\"text-muted-foreground\">Shipping</dt>\n\t\t\t\t\t\t\t<dd className=\"text-mono-md\">{delivery ? money.format(delivery) : \"Free\"}</dd>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex items-baseline justify-between gap-3 pt-1\">\n\t\t\t\t\t\t\t<dt className=\"text-label-lg\">Total</dt>\n\t\t\t\t\t\t\t{/* The total rolls as quantities change, so the cost of a change is seen. */}\n\t\t\t\t\t\t\t<dd>\n\t\t\t\t\t\t\t\t<NumberTicker className=\"text-mono-lg\" value={total} format={{ style: \"currency\", currency: \"USD\" }} />\n\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</dl>\n\t\t\t\t\t{/* The nudge is a note on the action, not a fourth line of the sum:\n\t\t\t\t\t    above the button it read as part of the total it sat under. */}\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<Button onClick={() => onCheckout?.({ lines: cart.map(({ id, quantity }) => ({ id, quantity })), total })}>Check out</Button>\n\t\t\t\t\t\t{delivery ? (\n\t\t\t\t\t\t\t<p className=\"text-center text-caption text-muted-foreground\">{`Add ${money.format(shipping.free - subtotal)} more for free shipping.`}</p>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t</div>\n\t\t\t\t</CardFooter>\n\t\t\t) : null}\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ChatThreadBlock",
        "path": "blocks/chat-thread-block.tsx",
        "summary": "A short message thread on a card: Message rows with incoming muted Bubbles on the start side and your own primary Bubbles on the end.",
        "intent": "Reach for this to show a conversation excerpt — a support preview, a comment thread on a dashboard, a recent-DM card. A working chat with a composer, streaming and history is the ChatPanel page shell.",
        "family": "Social & messaging",
        "kind": "card",
        "width": {
          "min": "16rem",
          "max": "20rem"
        },
        "notes": [
          "Sit it on a card, not straight on a muted page: incoming bubbles are the muted surface, and would vanish into it.",
          "Your own messages align to the end with the primary Bubble; everyone else's align to the start."
        ],
        "a11y": [
          "Each Message carries a messageId, so a thread can be addressed and announced item by item.",
          "Direction is shown by alignment and colour; when senders matter, add the sender's name to each Message."
        ],
        "imports": "import { Bubble, Card, CardContent, cn, Message } from \"@sableui/react\"",
        "code": "const messages = [\n\t{ id: \"m1\", text: \"Is the new cover ready?\", mine: false },\n\t{ id: \"m2\", text: \"Uploading it now 🎉\", mine: true },\n\t{ id: \"m3\", text: \"Perfect, thank you!\", mine: false },\n]\n\nexport interface ChatThreadBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border. for a panel or sheet that already frames it. */\n\tframed?: boolean\n}\n\nexport function ChatThreadBlock({ className, framed = true }: ChatThreadBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardContent className=\"flex flex-col gap-2\">\n\t\t\t\t{messages.map((m) => (\n\t\t\t\t\t<Message key={m.id} messageId={m.id} align={m.mine ? \"end\" : undefined}>\n\t\t\t\t\t\t<Bubble variant={m.mine ? \"tint\" : \"outline\"} align={m.mine ? \"end\" : undefined}>\n\t\t\t\t\t\t\t{m.text}\n\t\t\t\t\t\t</Bubble>\n\t\t\t\t\t</Message>\n\t\t\t\t))}\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "CitedAnswerBlock",
        "path": "blocks/cited-answer-block.tsx",
        "summary": "An assistant's answer with its sources: the question as the title, the answer with numbered citations where each claim is made (a ContextCard previews the passage), and the sources as a list below.",
        "intent": "Reach for this when an answer is grounded in documents: help-centre search, a research assistant, an internal knowledge tool. An agent turn with tool calls and a composer is AgentRunBlock; a full conversation is the ChatPanel page shell.",
        "family": "AI & agents",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "28rem"
        },
        "notes": [
          "Citations sit where the claim is made, not only in a list at the end, so the reader checks the sentence they doubt.",
          "A citation is a link to its source; hovering or focusing it opens a ContextCard with the title, the site and the passage, so checking does not cost a page load.",
          "The sources list repeats the numbers as square Avatars, so a citation and its row match at a glance.",
          "A citation and a source row both report through `onOpen(sourceId)`, and both are real links (`href`), so they still work without it.",
          "The answer is runs of text, each with the sources it rests on: replace them with your model's output and its source ids."
        ],
        "a11y": [
          "Each citation is named \"Source 1: Refund policy\", not a bare \"[1]\".",
          "The preview opens on focus as well as hover, and the source row says the same, so nothing lives only in the popup.",
          "The number marks in the list are decorative; the row's title names the source."
        ],
        "imports": "\"use client\"\n\nimport { AgentAvatar, Avatar, Badge, Card, CardContent, CardDescription, CardHeader, CardList, CardListLabel, CardTitle, cn, ContextCard, ContextCardContent, ContextCardTrigger, Entity } from \"@sableui/react\"",
        "code": "const question = \"How long do refunds take?\"\n\n// `n` is the number the answer cites a source by.\nconst sources = [\n\t{ id: \"policy\", n: 1, title: \"Refund policy\", site: \"help.atlas.example\", url: \"https://help.atlas.example/refunds\", excerpt: \"Approved refunds go back to the original payment method within 5 business days.\" },\n\t{ id: \"cards\", n: 2, title: \"When will I see my refund?\", site: \"help.atlas.example\", url: \"https://help.atlas.example/refunds/cards\", excerpt: \"Card issuers can take up to 10 days to post a refund to a statement.\" },\n\t{ id: \"store\", n: 3, title: \"Store credit and gift cards\", site: \"atlas.example\", url: \"https://atlas.example/store-credit\", excerpt: \"Refunds to store credit are instant and never expire.\" },\n]\n\n// The answer as runs of text, each ending in the sources it rests on. A run\n// keeps its closing punctuation, so a citation follows the comma or the stop.\nconst answer = [\n\t{ text: \"Approved refunds go back to the original payment method within five business days,\", cites: [\"policy\"] },\n\t{ text: \" though some card issuers take up to ten days to show them on a statement.\", cites: [\"cards\"] },\n\t{ text: \" If you chose store credit instead, it arrives at once.\", cites: [\"store\"] },\n]\n\nconst byId = Object.fromEntries(sources.map((source) => [source.id, source]))\n\nexport interface CitedAnswerBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for an assistant panel that already frames it. */\n\tframed?: boolean\n\t/** Called with the source's id when a citation or a source is opened. */\n\tonOpen?: (sourceId: string) => void\n}\n\nexport function CitedAnswerBlock({ className, framed = true, onOpen }: CitedAnswerBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-md\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{question}</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tAnswered from {sources.length === 1 ? \"1 source\" : `${sources.length} sources`}\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex gap-3\">\n\t\t\t\t<AgentAvatar size=\"sm\" />\n\t\t\t\t{/* Each claim carries its citation where it is made, not in a list at\n\t\t\t\t    the end: the reader checks the sentence they doubt. A citation is a\n\t\t\t\t    link to its source, and hovering or focusing it previews the passage. */}\n\t\t\t\t<p className=\"min-w-0 flex-1 text-body-md\">\n\t\t\t\t\t{answer.map((run) => (\n\t\t\t\t\t\t<span key={run.text}>\n\t\t\t\t\t\t\t{run.text}\n\t\t\t\t\t\t\t{run.cites.map((id) => {\n\t\t\t\t\t\t\t\tconst source = byId[id]\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<ContextCard key={id}>\n\t\t\t\t\t\t\t\t\t\t{/* A no-break space, so a citation never starts a line apart from its claim. */}\n\t\t\t\t\t\t\t\t\t\t{\" \"}\n\t\t\t\t\t\t\t\t\t\t<ContextCardTrigger\n\t\t\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t\t\t// The number is the chip the source wears in the list\n\t\t\t\t\t\t\t\t\t\t\t\t// below, so the eye matches the two without reading.\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\thref={source.url}\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label={`Source ${source.n}: ${source.title}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => onOpen?.(source.id)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"inline-flex rounded-full align-[0.1em] outline-none motion-interactive focus-visible:ring-2 focus-visible:ring-ring\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Badge size=\"sm\" className=\"tabular-nums\">\n\t\t\t\t\t\t\t\t\t\t\t\t{source.n}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t</ContextCardTrigger>\n\t\t\t\t\t\t\t\t\t\t<ContextCardContent>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-label-md\">{source.title}</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-caption text-muted-foreground\">{source.site}</p>\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"mt-2 text-body-sm\">{source.excerpt}</p>\n\t\t\t\t\t\t\t\t\t\t</ContextCardContent>\n\t\t\t\t\t\t\t\t\t</ContextCard>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t))}\n\t\t\t\t</p>\n\t\t\t</CardContent>\n\t\t\t{/* The same sources as a list, numbered as the answer cites them. */}\n\t\t\t<CardList divided={false}>\n\t\t\t\t<CardListLabel render={<h3 />}>Sources</CardListLabel>\n\t\t\t\t{sources.map((source) => (\n\t\t\t\t\t<Entity\n\t\t\t\t\t\tkey={source.id}\n\t\t\t\t\t\tinteractive\n\t\t\t\t\t\trender={<a href={source.url} />}\n\t\t\t\t\t\tonSelect={() => onOpen?.(source.id)}\n\t\t\t\t\t\tleading={<Avatar shape=\"square\" size=\"sm\" fallback={String(source.n)} alt=\"\" aria-hidden />}\n\t\t\t\t\t\ttitle={source.title}\n\t\t\t\t\t\tsubtitle={source.site}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</CardList>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "CommandPaletteBlock",
        "path": "blocks/command-palette-block.tsx",
        "summary": "An inline command palette: CommandMenuPanel with a filter field and a group of actions, each with an icon and its keyboard shortcut.",
        "intent": "Reach for this to show a command list in place — an empty state that teaches shortcuts, an onboarding step, a quick-actions card. The ⌘K palette that opens over the app is CommandMenu; this is its panel without the dialog.",
        "family": "Navigation",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Each command shows its shortcut as a Kbd hint, so the palette also teaches the keys.",
          "`onCommand` receives the command's id; ids also key the rows, so two commands may share a label.",
          "No card around it: the panel is its own surface, lifted with `shadow-sm` when it sits on a muted section."
        ],
        "a11y": [
          "CommandMenuPanel wires the filter input to the list as a combobox, with arrow-key navigation and the active row announced.",
          "Shortcut hints are Kbd elements, read as keys."
        ],
        "imports": "import { cn, CommandMenuPanel, Kbd, type CommandItem } from \"@sableui/react\"",
        "code": "const commands = [\n\t{ id: \"new-project\", icon: \"plus\", label: \"New project\", key: \"N\" },\n\t{ id: \"invite\", icon: \"user\", label: \"Invite teammate\", key: \"I\" },\n\t{ id: \"settings\", icon: \"gear\", label: \"Open settings\", key: \",\" },\n]\n\nexport interface CommandPaletteBlockProps {\n\tclassName?: string\n\t/** Called with the chosen command's id. */\n\tonCommand?: (id: string) => void\n}\n\nexport function CommandPaletteBlock({ className, onCommand }: CommandPaletteBlockProps) {\n\tconst items: CommandItem[] = commands.map((c) => ({\n\t\tid: c.id,\n\t\tgroup: \"Actions\",\n\t\ticon: c.icon,\n\t\tlabel: c.label,\n\t\thint: <Kbd>{c.key}</Kbd>,\n\t\tonSelect: () => onCommand?.(c.id),\n\t}))\n\treturn <CommandMenuPanel elevation=\"raised\" className={cn(\"w-full max-w-xs\", className)} placeholder=\"Type a command…\" items={items} />\n}"
      },
      {
        "name": "CommentThreadBlock",
        "path": "blocks/comment-thread-block.tsx",
        "summary": "A comment thread on a document or post: comments with an Avatar, RelativeTime, a LikeButton and Reply, replies one level in, and a Textarea composer that knows what it is replying to.",
        "intent": "Reach for this under a post, beside a document or on a task: asynchronous discussion that keeps its shape. A real-time conversation between people is ChatThreadBlock; one post with its counts is PostBlock.",
        "family": "Social & messaging",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "28rem"
        },
        "notes": [
          "Replies sit one level in, on a rule. A reply to a reply joins the same level: past one indent a narrow card runs out of width and the thread stops reading as a conversation.",
          "Reply moves focus to the composer and labels it \"Reply to Ana Chen\"; a cancel button above it drops back to a new comment.",
          "The composer is a Textarea that grows with its text (autoResize). Comment is disabled while it is empty, and Cmd or Ctrl + Enter sends.",
          "`onComment` receives `{ text, replyTo? }`; likes report through `onLikeChange(commentId, liked)`.",
          "Times are RelativeTime, timed from the page load in the sample."
        ],
        "a11y": [
          "The thread is an ordered list, replies a nested one, and each comment an article named for its author.",
          "Each Reply button names whom it replies to, and the composer's name changes with it.",
          "Avatars are decorative beside the author's name."
        ],
        "imports": "\"use client\"\n\nimport { useState, useRef } from \"react\"\nimport { Avatar, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, Icon, LikeButton, RelativeTime, Textarea } from \"@sableui/react\"",
        "code": "// Times are relative to the page load — replace with each comment's own timestamp.\nconst MINUTE = 60_000\nconst thread = [\n\t{\n\t\tid: \"c1\",\n\t\tauthor: { name: \"Ana Chen\", initials: \"AC\" },\n\t\tpostedAt: Date.now() - 95 * MINUTE,\n\t\ttext: \"The new onboarding flow cut our setup time in half. Can we ship the checklist to everyone next week?\",\n\t\tlikes: 6,\n\t\treplies: [\n\t\t\t{\n\t\t\t\tid: \"c2\",\n\t\t\t\tauthor: { name: \"Kofi Mensah\", initials: \"KM\" },\n\t\t\t\tpostedAt: Date.now() - 70 * MINUTE,\n\t\t\t\ttext: \"Yes, once the empty states are in. I'll have them ready by Thursday.\",\n\t\t\t\tlikes: 2,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: \"c3\",\n\t\tauthor: { name: \"Amira Haddad\", initials: \"AH\" },\n\t\tpostedAt: Date.now() - 20 * MINUTE,\n\t\ttext: \"Research has three sessions booked on the checklist. Notes go in the shared folder as they land.\",\n\t\tlikes: 3,\n\t\treplies: [],\n\t},\n]\nconst me = { name: \"You\", initials: \"YO\" }\n\ntype Reply = (typeof thread)[number][\"replies\"][number]\ntype Comment = Reply & { replies: Reply[] }\n\nexport interface CommentThreadBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a document side panel that already frames it. */\n\tframed?: boolean\n\t/** Called with the comment, and the id of the comment it replies to if it is a reply. */\n\tonComment?: (comment: { text: string; replyTo?: string }) => void\n\t/** Called with the comment's id and the new state when the reader likes or unlikes it. */\n\tonLikeChange?: (commentId: string, liked: boolean) => void\n}\n\nexport function CommentThreadBlock({ className, framed = true, onComment, onLikeChange }: CommentThreadBlockProps) {\n\tconst [comments, setComments] = useState<Comment[]>(thread)\n\tconst [draft, setDraft] = useState(\"\")\n\t// The comment being replied to, if any, and the top-level comment its reply joins.\n\tconst [replyTo, setReplyTo] = useState<{ id: string; name: string; threadId: string } | null>(null)\n\tconst field = useRef<HTMLTextAreaElement>(null)\n\n\tconst send = () => {\n\t\tconst text = draft.trim()\n\t\tif (!text) return\n\t\tconst added: Reply = { id: `c${Date.now()}`, author: me, postedAt: Date.now(), text, likes: 0 }\n\t\tsetComments((current) =>\n\t\t\treplyTo\n\t\t\t\t? current.map((comment) => (comment.id === replyTo.threadId ? { ...comment, replies: [...comment.replies, added] } : comment))\n\t\t\t\t: [...current, { ...added, replies: [] }],\n\t\t)\n\t\tonComment?.(replyTo ? { text, replyTo: replyTo.id } : { text })\n\t\tsetDraft(\"\")\n\t\tsetReplyTo(null)\n\t}\n\n\tconst count = comments.reduce((sum, comment) => sum + 1 + comment.replies.length, 0)\n\n\t// One comment: who, when, what, and its two actions. A reply is the same, one level in.\n\tconst renderComment = (comment: Reply, parent: Comment) => (\n\t\t<article className=\"flex gap-3\" aria-label={`${comment.author.name}'s comment`}>\n\t\t\t<Avatar variant=\"art\" size=\"sm\" fallback={comment.author.initials} alt=\"\" />\n\t\t\t<div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n\t\t\t\t<div className=\"flex flex-wrap items-baseline gap-x-2\">\n\t\t\t\t\t<span className=\"text-title-sm\">{comment.author.name}</span>\n\t\t\t\t\t<span className=\"text-caption text-muted-foreground\">\n\t\t\t\t\t\t<RelativeTime date={comment.postedAt} />\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<p className=\"text-body-sm\">{comment.text}</p>\n\t\t\t\t<div className=\"flex items-center gap-1\">\n\t\t\t\t\t<LikeButton bleed=\"start\" size=\"sm\" count={comment.likes} onPressedChange={(liked) => onLikeChange?.(comment.id, liked)} />\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\taria-label={`Reply to ${comment.author.name}`}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tsetReplyTo({ id: comment.id, name: comment.author.name, threadId: parent.id })\n\t\t\t\t\t\t\tfield.current?.focus()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tReply\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</article>\n\t)\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-md\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Comments</CardTitle>\n\t\t\t\t<CardDescription>{count === 1 ? \"1 comment\" : `${count} comments`}</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<ol className=\"flex flex-col gap-5\">\n\t\t\t\t\t{comments.map((comment) => (\n\t\t\t\t\t\t<li key={comment.id} className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t{renderComment(comment, comment)}\n\t\t\t\t\t\t\t{/* Replies sit one level in, on a rule that ties them to the comment. */}\n\t\t\t\t\t\t\t{comment.replies.length ? (\n\t\t\t\t\t\t\t\t<ol className=\"ms-4 flex flex-col gap-4 border-s border-border ps-4\">\n\t\t\t\t\t\t\t\t\t{comment.replies.map((reply) => (\n\t\t\t\t\t\t\t\t\t\t<li key={reply.id}>{renderComment(reply, comment)}</li>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ol>\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"flex-col items-stretch gap-2\">\n\t\t\t\t{replyTo ? (\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 text-body-sm text-muted-foreground\">\n\t\t\t\t\t\t<span>Replying to {replyTo.name}</span>\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" bleed=\"end\" aria-label=\"Cancel reply\" onClick={() => setReplyTo(null)}>\n\t\t\t\t\t\t\t<Icon name=\"xmark\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t\t<Textarea\n\t\t\t\t\tref={field}\n\t\t\t\t\tautoResize\n\t\t\t\t\trows={2}\n\t\t\t\t\tvalue={draft}\n\t\t\t\t\tonChange={(event) => setDraft(event.target.value)}\n\t\t\t\t\tonKeyDown={(event) => {\n\t\t\t\t\t\tif (event.key === \"Enter\" && (event.metaKey || event.ctrlKey)) send()\n\t\t\t\t\t}}\n\t\t\t\t\tplaceholder={replyTo ? `Reply to ${replyTo.name}…` : \"Add a comment…\"}\n\t\t\t\t\taria-label={replyTo ? `Reply to ${replyTo.name}` : \"Add a comment\"}\n\t\t\t\t/>\n\t\t\t\t<Button className=\"self-end\" disabled={!draft.trim()} onClick={send}>\n\t\t\t\t\t{replyTo ? \"Reply\" : \"Comment\"}\n\t\t\t\t</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "CtaBandBlock",
        "path": "blocks/cta-band-block.tsx",
        "summary": "A closing call to action: a centred h2 and one-line lede on a card, with a primary and an outline action.",
        "intent": "Reach for this as the last section before the footer, repeating the hero's primary action once the reader has seen the case. Mid-page prompts to sign up belong inline, not in a band.",
        "family": "Marketing",
        "kind": "section",
        "notes": [
          "Copied from the LandingPage page shell's closing call to action.",
          "The primary action matches the hero's, so the page asks for one thing twice rather than two things once.",
          "Sitting on a Card lifts it from the page without a coloured band, so it follows any preset."
        ],
        "a11y": [
          "The section is labelled by its h2.",
          "Both actions are links styled as Buttons, because they navigate."
        ],
        "imports": "\"use client\"\n\nimport { useId } from \"react\"\nimport { Button, Card, CardContent, cn, Region, Row, Stack } from \"@sableui/react\"",
        "code": "const cta = {\n\ttitle: \"Build the product, not another component library\",\n\tlede: \"Install Sable, pick a preset, and ship the first screen today.\",\n\tprimary: { label: \"Get started\", href: \"/docs/getting-started\" },\n\tsecondary: { label: \"Star on GitHub\", href: \"/github\" },\n}\n\nexport interface CtaBandBlockProps {\n\tclassName?: string\n}\n\nexport function CtaBandBlock({ className }: CtaBandBlockProps) {\n\tconst titleId = useId()\n\treturn (\n\t\t<Region as=\"section\" aria-labelledby={titleId} max=\"wide\" className={cn(\"w-full py-16\", className)}>\n\t\t\t<Card>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<Stack gap={4} align=\"center\" className=\"py-8 text-center sm:py-12\">\n\t\t\t\t\t\t<h2 id={titleId} className=\"max-w-2xl text-balance text-heading-1\">\n\t\t\t\t\t\t\t{cta.title}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<p className=\"max-w-(--measure-prose) text-body-lg text-muted-foreground\">{cta.lede}</p>\n\t\t\t\t\t\t<Row gap={2} justify=\"center\" wrap className=\"pt-2\">\n\t\t\t\t\t\t\t<Button size=\"cta\" render={<a href={cta.primary.href} />}>\n\t\t\t\t\t\t\t\t{cta.primary.label}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button size=\"cta\" variant=\"outline\" render={<a href={cta.secondary.href} />}>\n\t\t\t\t\t\t\t\t{cta.secondary.label}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</Stack>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "DangerZoneBlock",
        "path": "blocks/danger-zone-block.tsx",
        "summary": "A delete-account card: what deleting removes and what survives, one destructive Button, and a DestructiveActionModal that asks for the handle to be typed before it acts.",
        "intent": "Reach for this as the last section of account, workspace or project settings. Deleting a single record from a list is an OverflowMenu item that opens DestructiveActionModal directly, not a card.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "42rem"
        },
        "notes": [
          "Copied from the SettingsPage page shell's Delete account section.",
          "The button never acts directly: it opens the modal, whose confirm stays disabled until the handle is typed.",
          "The description says what is lost AND what is kept (\"Files you shared stay with your team\"), which is what people want to know before they decide."
        ],
        "a11y": [
          "DestructiveActionModal is an alertdialog: focus opens on Cancel and the backdrop does not dismiss it.",
          "The CardTitle is an h2, so the section is reachable by heading."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Button, Card, CardDescription, CardFooter, CardHeader, CardTitle, cn, DestructiveActionModal } from \"@sableui/react\"",
        "code": "const account = { handle: \"ada\", projects: 12 }\n\nexport interface DangerZoneBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\t/** Called once the person has typed the handle and confirmed. */\n\tonDelete?: () => void\n}\n\nexport function DangerZoneBlock({ className, framed = true, onDelete }: DangerZoneBlockProps) {\n\tconst [open, setOpen] = useState(false)\n\treturn (\n\t\t<>\n\t\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-2xl\", className)}>\n\t\t\t\t<CardHeader>\n\t\t\t\t\t<CardTitle render={<h2 />}>Delete account</CardTitle>\n\t\t\t\t\t<CardDescription>\n\t\t\t\t\t\tPermanently remove your profile, projects, and billing history. Files you shared stay with your team.\n\t\t\t\t\t</CardDescription>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardFooter actions className=\"justify-end\">\n\t\t\t\t\t<Button variant=\"destructive\" onClick={() => setOpen(true)}>\n\t\t\t\t\t\tDelete account\n\t\t\t\t\t</Button>\n\t\t\t\t</CardFooter>\n\t\t\t</Card>\n\t\t\t<DestructiveActionModal\n\t\t\t\topen={open}\n\t\t\t\tonOpenChange={setOpen}\n\t\t\t\ttitle=\"Delete your account?\"\n\t\t\t\tdescription={`This permanently removes your profile, ${account.projects} projects, and billing history. Your final invoice is still sent. This can't be undone.`}\n\t\t\t\tconfirmLabel=\"Delete account\"\n\t\t\t\tconfirmingLabel=\"Deleting…\"\n\t\t\t\tconfirmText={account.handle}\n\t\t\t\tonConfirm={() => {\n\t\t\t\t\tsetOpen(false)\n\t\t\t\t\tonDelete?.()\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t)\n}"
      },
      {
        "name": "DeliveryOptionsBlock",
        "path": "blocks/delivery-options-block.tsx",
        "summary": "A checkout step for choosing delivery: a RadioGroup of RadioCards, each with its arrival and price, over a total that rolls to the new amount and a Continue button.",
        "intent": "Reach for this when one of a few options must be picked and each needs a line of explanation and a price — delivery, a plan, a seat class, a payment schedule. More than five or six options is a Select; options with no description are a plain RadioGroup.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Each option is a RadioCard: the whole card is the target, with the price in `trailing` on the title's line so the prices scan as a column.",
          "A free option says \"Free\" rather than $0.00.",
          "The first option is selected on arrival, so Continue always has an answer and the total is never blank. List the options cheapest first, so that default is the cheapest.",
          "The total is a NumberTicker: choosing Express rolls it up by the fee instead of swapping the number."
        ],
        "a11y": [
          "The cards are one radio group with a name: arrow keys move the choice, and Tab leaves the group in one step.",
          "Each card's description and price are part of its accessible name's context, read with the option."
        ],
        "imports": "\"use client\"\n\nimport { useState, useMemo } from \"react\"\nimport { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, NumberTicker, RadioCard, RadioGroup, useToday } from \"@sableui/react\"",
        "code": "const order = { summary: \"Linen throw blanket · 1 item\", subtotal: 64 }\n\n// Arrival days count from today, so the sample never promises a date that has passed.\nconst day = new Intl.DateTimeFormat(\"en-US\", { month: \"short\", day: \"numeric\" })\nconst inDays = (today: Date, n: number) => day.format(new Date(today.getFullYear(), today.getMonth(), today.getDate() + n))\n\n// Listed cheapest first: the first option is the one selected on arrival.\nconst optionsFrom = (today: Date) => [\n\t{ id: \"standard\", title: \"Standard\", detail: `Arrives ${inDays(today, 5)}–${inDays(today, 7)}`, price: 0 },\n\t{ id: \"express\", title: \"Express\", detail: `Arrives ${inDays(today, 2)}`, price: 12 },\n\t{ id: \"pickup\", title: \"Store pickup\", detail: \"Ready today from 4 pm\", price: 0 },\n]\n\nconst money = new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\n\nexport interface DeliveryOptionsBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the chosen option's id when the person continues. */\n\tonContinue?: (optionId: string) => void\n}\n\nexport function DeliveryOptionsBlock({ className, framed = true, onContinue }: DeliveryOptionsBlockProps) {\n\t// useToday, not new Date(): the server and the reader may be on different days.\n\tconst today = useToday()\n\tconst options = useMemo(() => optionsFrom(today), [today])\n\tconst [chosen, setChosen] = useState(\"standard\")\n\tconst option = options.find((item) => item.id === chosen) ?? options[0]\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Delivery</CardTitle>\n\t\t\t\t<CardDescription>{order.summary}</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<RadioGroup aria-label=\"Delivery method\" value={chosen} onValueChange={(value: unknown) => setChosen(String(value))}>\n\t\t\t\t\t{options.map((item) => (\n\t\t\t\t\t\t<RadioCard\n\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\tvalue={item.id}\n\t\t\t\t\t\t\ttitle={item.title}\n\t\t\t\t\t\t\tdescription={item.detail}\n\t\t\t\t\t\t\ttrailing={<span className=\"text-mono-md\">{item.price ? money.format(item.price) : \"Free\"}</span>}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</RadioGroup>\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"flex-col items-stretch gap-4\">\n\t\t\t\t<div className=\"flex items-baseline justify-between\">\n\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">Total</span>\n\t\t\t\t\t{/* The total rolls to its new value, so the cost of a choice is seen changing. */}\n\t\t\t\t\t<NumberTicker\n\t\t\t\t\t\tclassName=\"text-mono-lg\"\n\t\t\t\t\t\tvalue={order.subtotal + option.price}\n\t\t\t\t\t\tformat={{ style: \"currency\", currency: \"USD\" }}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button onClick={() => onContinue?.(chosen)}>Continue to payment</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "DeviceComparisonBlock",
        "path": "blocks/device-comparison-block.tsx",
        "summary": "A comparison card: each series' total sits in the header as a pressable tile, and the one pressed is plotted below as a daily BarChart.",
        "intent": "Reach for this when two or three measures share a page and the reader looks at one at a time — devices, regions, plans. To see them together, plot both in one BarChart or LineChart instead.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "48rem"
        },
        "notes": [
          "The totals are the switch: Toggles in a labelled ToggleGroup, so the number and the control are one thing, with the group's own pressed and hover states.",
          "Switching eases every bar to its new height rather than redrawing.",
          "Below sm the tiles stack under the title and divide with a top rule instead of a side rule."
        ],
        "a11y": [
          "Each total is a Toggle (aria-pressed) named by its label and value, in a ToggleGroup labelled \"Device\" with arrow-key movement between tiles.",
          "The chart's name says which series is plotted, so the data table is unambiguous."
        ],
        "imports": "\"use client\"\n\nimport { useState, useMemo } from \"react\"\nimport { BarChart, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Toggle, ToggleGroup, useToday } from \"@sableui/react\"",
        "code": "/** The 30 days to today — replace with your own rows ({ date, desktop, mobile }). */\nconst daysTo = (today: Date) =>\n\tArray.from({ length: 30 }, (_, i) => ({\n\t\tdate: new Date(Date.UTC(today.getFullYear(), today.getMonth(), today.getDate() - 29 + i)).toISOString().slice(0, 10),\n\t\tdesktop: Math.round(320 + Math.sin(i / 3) * 90 + (i % 5) * 14),\n\t\tmobile: Math.round(260 + Math.cos(i / 4) * 80 + (i % 4) * 18),\n\t}))\n\nconst series = [\n\t{ key: \"desktop\", label: \"Desktop\" },\n\t{ key: \"mobile\", label: \"Mobile\" },\n] as const\n\n// One formatter, built once: toLocaleDateString builds a new one per call,\n// and a chart formats every tick on every render.\nconst SHORT_DATE = new Intl.DateTimeFormat(\"en-US\", { month: \"short\", day: \"numeric\" })\nconst shortDate = (iso: string) => SHORT_DATE.format(new Date(`${iso}T00:00:00`))\n\nexport interface DeviceComparisonBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n}\n\nexport function DeviceComparisonBlock({ className, framed = true }: DeviceComparisonBlockProps) {\n\tconst [active, setActive] = useState<string>(\"desktop\")\n\t// useToday, not new Date(): the server and the reader may be on different days.\n\tconst today = useToday()\n\tconst days = useMemo(() => daysTo(today), [today])\n\tconst totals = Object.fromEntries(series.map((s) => [s.key, days.reduce((sum, d) => sum + d[s.key], 0)]))\n\tconst current = series.find((s) => s.key === active) ?? series[0]\n\treturn (\n\t\t// overflow-hidden: the square tiles meet the card's rounded corner.\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"@container/devices w-full max-w-3xl overflow-hidden\", className)}>\n\t\t\t<div className=\"flex flex-col border-b border-border @lg/devices:flex-row\">\n\t\t\t\t<CardHeader className=\"flex-1 pb-[var(--card-p,--spacing(6))]\">\n\t\t\t\t\t<CardTitle render={<h2 />}>Visitors by device</CardTitle>\n\t\t\t\t\t<CardDescription>The last 30 days. Pick a device to plot it.</CardDescription>\n\t\t\t\t</CardHeader>\n\t\t\t\t{/* The totals ARE the switch: one pressed tile per series. The tiles\n\t\t\t\t    divide themselves; this edge sets them off from the header, under\n\t\t\t\t    it when narrow and beside it when wide. */}\n\t\t\t\t<div className=\"border-t border-border @lg/devices:border-t-0 @lg/devices:border-s\">\n\t\t\t\t\t<ToggleGroup\n\t\t\t\t\t\tappearance=\"tiles\"\n\t\t\t\t\t\tvalue={[active]}\n\t\t\t\t\t\tonValueChange={(v: unknown[]) => v[0] && setActive(String(v[0]))}\n\t\t\t\t\t\taria-label=\"Device\"\n\t\t\t\t\t\tclassName=\"h-full\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{series.map((s) => (\n\t\t\t\t\t\t\t<Toggle key={s.key} value={s.key}>\n\t\t\t\t\t\t\t\t<span className=\"text-caption text-muted-foreground\">{s.label}</span>\n\t\t\t\t\t\t\t\t<span className=\"text-mono-lg\">{totals[s.key].toLocaleString(\"en-US\")}</span>\n\t\t\t\t\t\t\t</Toggle>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ToggleGroup>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<CardContent>\n\t\t\t\t<BarChart\n\t\t\t\t\tlabel={`${current.label} visitors per day, last 30 days`}\n\t\t\t\t\tdata={days}\n\t\t\t\t\tindex=\"date\"\n\t\t\t\t\tseries={[current]}\n\t\t\t\t\tindexFormatter={shortDate}\n\t\t\t\t\tradius={3}\n\t\t\t\t\tclassName=\"h-64\"\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "EventCardBlock",
        "path": "blocks/event-card-block.tsx",
        "summary": "An upcoming-event card: a DateTile beside the title and time, a \"starts in\" Badge, attendees as an AvatarGroup, and Decline / Join.",
        "intent": "Reach for this for the next meeting, booking or live session on a dashboard or home screen. For a list of many upcoming events, use Entity rows with a DateTile as `leading`.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The DateTile names the day; the full weekday and time range sit in text beside it.",
          "The Badge is one title line tall and wraps under the title rather than squeezing it onto two lines.",
          "AvatarGroup `fit` trades avatars for the +N count before it pushes the actions to their own line."
        ],
        "a11y": [
          "DateTile is a <time> with a machine-readable date; the time range is plain text read in order after the title.",
          "The AvatarGroup's aria-label states the total attendee count."
        ],
        "imports": "\"use client\"\n\nimport { Avatar, AvatarGroup, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardTitle, cn, DateTile, useToday } from \"@sableui/react\"",
        "code": "const event = {\n\ttitle: \"Design review\",\n\twhen: \"Today, 2:00 – 2:45 PM\",\n\tstarts: \"In 10 min\",\n\tattendees: [\"MO\", \"SR\", \"JL\"],\n\ttotal: 7,\n}\n\nexport interface EventCardBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\t/** Called when the person joins the event. */\n\tonJoin?: () => void\n\t/** Called when the person declines it. */\n\tonDecline?: () => void\n}\n\nexport function EventCardBlock({ className, framed = true, onJoin, onDecline }: EventCardBlockProps) {\n\t// Today, so the \"starts in\" badge is never on a day that has passed.\n\t// useToday, not new Date(): the server and the reader may be on different days.\n\tconst today = useToday()\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardContent className=\"flex gap-4\">\n\t\t\t\t<DateTile date={today} />\n\t\t\t\t<div className=\"flex min-w-0 flex-1 flex-col\">\n\t\t\t\t\t{/* The row carries the title's type, so the badge's box is exactly\n\t\t\t\t\t    one title line (`h-[1lh]`): it centres on the title and never\n\t\t\t\t\t    makes the row taller than the title alone. When a bolder or\n\t\t\t\t\t    roomier look leaves no space beside the title, the badge wraps\n\t\t\t\t\t    to its own line instead of squeezing the title onto two. */}\n\t\t\t\t\t<div className=\"flex flex-wrap items-start justify-between gap-x-2 text-title-lg\">\n\t\t\t\t\t\t<CardTitle render={<h2 />}>{event.title}</CardTitle>\n\t\t\t\t\t\t<span className=\"flex h-[1lh] shrink-0 items-center\">\n\t\t\t\t\t\t\t<Badge tone=\"info\" size=\"sm\">\n\t\t\t\t\t\t\t\t{event.starts}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<CardDescription>{event.when}</CardDescription>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t\t{/* `fit`: when a roomy look tightens the row, the stack gives up\n\t\t\t    avatars to the count instead of pushing the actions to a new line. */}\n\t\t\t<CardFooter className=\"flex-wrap justify-between gap-3\">\n\t\t\t\t<AvatarGroup aria-label={`${event.total} attendees`} total={event.total} size=\"sm\" surface={framed ? \"card\" : undefined} fit>\n\t\t\t\t\t{event.attendees.map((initials) => (\n\t\t\t\t\t\t<Avatar variant=\"art\" key={initials} fallback={initials} alt={initials} />\n\t\t\t\t\t))}\n\t\t\t\t</AvatarGroup>\n\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" onClick={onDecline}>\n\t\t\t\t\t\tDecline\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button size=\"sm\" onClick={onJoin}>\n\t\t\t\t\t\tJoin\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "FaqBlock",
        "path": "blocks/faq-block.tsx",
        "summary": "A FAQ section: the heading and a way to ask beside an Accordion of questions, each answer one or two sentences.",
        "intent": "Reach for this near pricing or at the end of a landing page, for the questions that block a decision. Long help content belongs in docs, not an accordion.",
        "family": "Marketing",
        "kind": "section",
        "notes": [
          "Every question starts closed: the list of questions is itself the useful summary.",
          "The way to ask a human sits beside the heading, so it is found before the reader scrolls the list.",
          "Capped at the `content` region width; questions wider than that are hard to scan."
        ],
        "a11y": [
          "Accordion triggers are buttons with aria-expanded, inside headings, so the questions are navigable by heading and operable by keyboard.",
          "The contact link is a real <a> inside the lede sentence."
        ],
        "imports": "\"use client\"\n\nimport { useId } from \"react\"\nimport { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, cn, Region, Stack } from \"@sableui/react\"",
        "code": "const intro = {\n\ttitle: \"Questions, answered\",\n\tlede: \"Can't find what you need?\",\n\tcontact: { label: \"Write to us\", href: \"/contact\" },\n}\n\nconst questions = [\n\t{ q: \"Is there a free plan?\", a: \"Yes. Starter is free forever for three active projects, with no card needed to sign up.\" },\n\t{ q: \"Can I change plans later?\", a: \"Any time. Upgrades apply immediately and are prorated; downgrades take effect at the end of the billing period.\" },\n\t{ q: \"Who owns the data I add?\", a: \"You do. You can export everything in your workspace at any time, and we never sell it.\" },\n\t{ q: \"How does billing work?\", a: \"Plans are billed per seat at the start of each period, to the card or account you add in settings.\" },\n]\n\nexport interface FaqBlockProps {\n\tclassName?: string\n}\n\nexport function FaqBlock({ className }: FaqBlockProps) {\n\tconst titleId = useId()\n\treturn (\n\t\t<Region as=\"section\" aria-labelledby={titleId} max=\"content\" className={cn(\"w-full py-16\", className)}>\n\t\t\t<div className=\"grid gap-10 md:grid-cols-[1fr_2fr]\">\n\t\t\t\t<Stack gap={2}>\n\t\t\t\t\t<h2 id={titleId} className=\"text-balance text-heading-2\">\n\t\t\t\t\t\t{intro.title}\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"text-body-md text-muted-foreground\">\n\t\t\t\t\t\t{intro.lede}{\" \"}\n\t\t\t\t\t\t<a href={intro.contact.href} className=\"text-foreground underline underline-offset-4 motion-interactive hover:text-muted-foreground\">\n\t\t\t\t\t\t\t{intro.contact.label}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t.\n\t\t\t\t\t</p>\n\t\t\t\t</Stack>\n\t\t\t\t<Accordion>\n\t\t\t\t\t{questions.map((item) => (\n\t\t\t\t\t\t<AccordionItem key={item.q} value={item.q}>\n\t\t\t\t\t\t\t<AccordionTrigger>{item.q}</AccordionTrigger>\n\t\t\t\t\t\t\t<AccordionPanel>{item.a}</AccordionPanel>\n\t\t\t\t\t\t</AccordionItem>\n\t\t\t\t\t))}\n\t\t\t\t</Accordion>\n\t\t\t</div>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "FeatureGridBlock",
        "path": "blocks/feature-grid-block.tsx",
        "summary": "A feature section: an overline, an h2 and a lede over a grid of article cards, each with an icon in a well, a title and one sentence — 1, 2 then 3 columns.",
        "intent": "Reach for this to explain what a product does in six or fewer points. For a sequence (first this, then that), use StepsBlock; for one proof point with numbers, TestimonialBlock.",
        "family": "Marketing",
        "kind": "section",
        "notes": [
          "Copied from the LandingPage page shell's features section.",
          "Six features fill 3 × 2 evenly; keep the count a multiple of three, or drop to cols={{ lg: 2 }}.",
          "Each body is one sentence. A feature that needs a paragraph needs its own section.",
          "Icons sit in a `sable-well`, which derives its fill from the card surface it is on."
        ],
        "a11y": [
          "Each feature is an <article> with an h3 under the section's h2.",
          "The icons are decorative; each title says what the feature is."
        ],
        "imports": "\"use client\"\n\nimport { useId } from \"react\"\nimport { Card, CardContent, cn, Grid, IconTile, Region, Stack } from \"@sableui/react\"",
        "code": "const intro = {\n\teyebrow: \"Why Sable\",\n\ttitle: \"A design system with the rules written down\",\n\tlede: \"The decisions a senior designer would make are encoded once, so every screen your team or your agent builds starts from them.\",\n}\n\nconst features = [\n\t{ icon: \"component\", title: \"Behavior built in\", body: \"Focus management, keyboard navigation, and ARIA come from Base UI primitives under every control.\" },\n\t{ icon: \"eyedropper\", title: \"Semantic tokens end to end\", body: \"Re-theme the whole product, light and dark, from one preset without touching a component.\" },\n\t{ icon: \"layout\", title: \"Pages, not just parts\", body: \"Landing, dashboard, settings, auth, and list-detail shells to copy and adapt.\" },\n\t{ icon: \"book\", title: \"A contract agents can read\", body: \"registry.json, llms.txt, and a CLI hand agents the exact props, examples, and rules.\" },\n\t{ icon: \"circle-check\", title: \"Lint that knows the design\", body: \"sable-lint flags raw colors, hand-built controls, and motion that ignores reduced motion.\" },\n\t{ icon: \"play\", title: \"Motion with an off switch\", body: \"Named recipes run on one scale variable, so reduced motion stops every transition at once.\" },\n]\n\nexport interface FeatureGridBlockProps {\n\tclassName?: string\n}\n\nexport function FeatureGridBlock({ className }: FeatureGridBlockProps) {\n\tconst titleId = useId()\n\treturn (\n\t\t<Region as=\"section\" aria-labelledby={titleId} max=\"wide\" className={cn(\"w-full py-16 sm:py-24\", className)}>\n\t\t\t<Stack gap={10}>\n\t\t\t\t<Stack gap={3} className=\"max-w-2xl\">\n\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">{intro.eyebrow}</p>\n\t\t\t\t\t<h2 id={titleId} className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t{intro.title}\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"text-body-lg text-muted-foreground\">{intro.lede}</p>\n\t\t\t\t</Stack>\n\t\t\t\t<Grid cols={{ base: 1, sm: 2, lg: 3 }} gap={4}>\n\t\t\t\t\t{features.map((feature) => (\n\t\t\t\t\t\t<Card key={feature.title} render={<article />} className=\"h-full\">\n\t\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t\t<IconTile icon={feature.icon} />\n\t\t\t\t\t\t\t\t<h3 className=\"pt-2 text-title-lg\">{feature.title}</h3>\n\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{feature.body}</p>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t))}\n\t\t\t\t</Grid>\n\t\t\t</Stack>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "FeedbackFormBlock",
        "path": "blocks/feedback-form-block.tsx",
        "summary": "A feedback card: a one-to-five rating as a full-width ToggleGroup, an optional notes field, and Skip / Send feedback.",
        "intent": "Reach for this for a post-session or post-purchase survey in a Sheet, Dialog or end-of-flow screen. For a feedback control anchored to a button in the app chrome, use the Feedback component (a popover).",
        "family": "Social & messaging",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The rating is preselected, so one tap on Send is a complete answer; the notes are optional and say so.",
          "Skip is a ghost Button before the primary, so dismissing is always available and never competes with sending.",
          "Skip and Send are two callbacks, `onSkip()` and `onSend({ score, notes })`, never one callback with a flag saying which happened."
        ],
        "a11y": [
          "The ToggleGroup carries aria-label=\"Rating\"; each Toggle's number is its name.",
          "The Textarea carries aria-label=\"Notes\"; its placeholder is a prompt, not the label."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, Textarea, Toggle, ToggleGroup } from \"@sableui/react\"",
        "code": "const scale = [\"1\", \"2\", \"3\", \"4\", \"5\"]\n\nexport interface FeedbackFormBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or Dialog that already frames it. */\n\tframed?: boolean\n\t/** Called when the person skips the question. */\n\tonSkip?: () => void\n\t/** Called with the answers when the person sends them. */\n\tonSend?: (feedback: { score: number; notes: string }) => void\n}\n\nexport function FeedbackFormBlock({ className, framed = true, onSkip, onSend }: FeedbackFormBlockProps) {\n\tconst [score, setScore] = useState(\"4\")\n\tconst [notes, setNotes] = useState(\"\")\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>How was the session?</CardTitle>\n\t\t\t\t<CardDescription>One tap is enough. Notes help us more.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<ToggleGroup value={[score]} onValueChange={(v: unknown[]) => v[0] && setScore(String(v[0]))} aria-label=\"Rating\" className=\"w-full\">\n\t\t\t\t\t{scale.map((n) => (\n\t\t\t\t\t\t<Toggle key={n} value={n} className=\"flex-1\">\n\t\t\t\t\t\t\t{n}\n\t\t\t\t\t\t</Toggle>\n\t\t\t\t\t))}\n\t\t\t\t</ToggleGroup>\n\t\t\t\t<Textarea placeholder=\"What worked, what didn’t…\" aria-label=\"Notes\" rows={3} value={notes} onChange={(e) => setNotes(e.target.value)} />\n\t\t\t</CardContent>\n\t\t\t<CardFooter actions className=\"justify-end\">\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" onClick={onSkip}>\n\t\t\t\t\tSkip\n\t\t\t\t</Button>\n\t\t\t\t<Button size=\"sm\" onClick={() => onSend?.({ score: Number(score), notes })}>\n\t\t\t\t\tSend feedback\n\t\t\t\t</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "GoalProgressBlock",
        "path": "blocks/goal-progress-block.tsx",
        "summary": "A goals card: a ring per goal in a RadialChart against its track (a full ring is 100%), a legend, and which goals are behind in the footer.",
        "intent": "Reach for this for progress toward two to four targets — a quarter's goals, a plan's limits, onboarding steps. A single reading in a settings row is a Meter; many goals are a list of Progress bars.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "max={100} makes a full ring mean done; each ring draws round from 12 o'clock as the card scrolls into view.",
          "The footer names what is behind, so the card is actionable without reading the rings.",
          "Values are formatted as percents in the tooltip and data table."
        ],
        "a11y": [
          "The rings' data table lists each goal and its percent.",
          "Arrowing through the rings announces each goal; the legend names every ring's colour."
        ],
        "imports": "import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, RadialChart } from \"@sableui/react\"",
        "code": "const goals = [\n\t{ goal: \"Releases\", progress: 82 },\n\t{ goal: \"Customers\", progress: 64 },\n\t{ goal: \"Revenue\", progress: 91 },\n]\n\nexport interface GoalProgressBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n}\n\nexport function GoalProgressBlock({ className, framed = true }: GoalProgressBlockProps) {\n\tconst behind = goals.filter((g) => g.progress < 70)\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Quarter goals</CardTitle>\n\t\t\t\t<CardDescription>Progress toward each target, in percent.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<RadialChart label=\"Progress toward quarter goals\" data={goals} index=\"goal\" valueKey=\"progress\" max={100} className=\"h-64\" valueFormatter={(v) => `${v}%`} />\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"text-body-sm text-muted-foreground\">\n\t\t\t\t{behind.length ? `${behind.map((g) => g.goal).join(\" and \")} behind pace.` : \"Every goal on pace.\"}\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "HeroBlock",
        "path": "blocks/hero-block.tsx",
        "summary": "A centred hero: an outline Badge eyebrow, the page's h1 at display size, a lede, a primary and an outline call to action, and an install command in a CodeBlock.",
        "intent": "Reach for this to open a product or developer-tool landing page. A brand page that leads with a product scene beside the headline is the BrandLandingPage page shell's hero.",
        "family": "Marketing",
        "kind": "section",
        "notes": [
          "Copied from the LandingPage page shell's hero.",
          "The headline is the page's only h1 — place one HeroBlock per page.",
          "Two actions, one primary. The install command is the third, quieter way in for developers who already decided.",
          "The lede is capped at the prose measure and the headline at max-w-4xl, so both stay readable on wide screens."
        ],
        "a11y": [
          "Calls to action are links styled as Buttons (render={<a />}), because they navigate.",
          "The CodeBlock's copy button is labelled and announces when it has copied."
        ],
        "imports": "import { Badge, Button, cn, CodeBlock, Icon, Region, Row, Stack } from \"@sableui/react\"",
        "code": "const hero = {\n\teyebrow: \"Open source · MIT licensed\",\n\ttitle: \"Product UI your agents can't get wrong\",\n\tlede: \"Sable is a themeable React component library with enforced tokens, typography, and motion, documented for coding agents as carefully as for people.\",\n\tprimary: { label: \"Get started\", href: \"/docs/getting-started\" },\n\tsecondary: { label: \"Browse components\", href: \"/components\" },\n\tinstall: \"pnpm add @sableui/react\",\n}\n\nexport interface HeroBlockProps {\n\tclassName?: string\n}\n\nexport function HeroBlock({ className }: HeroBlockProps) {\n\treturn (\n\t\t<Region as=\"section\" max=\"wide\" className={cn(\"w-full py-16 sm:py-24\", className)}>\n\t\t\t<Stack gap={8} align=\"center\">\n\t\t\t\t<Stack gap={4} align=\"center\" className=\"text-center\">\n\t\t\t\t\t<Badge appearance=\"outline\" size=\"sm\" icon={<Icon name=\"sparkles\" />}>\n\t\t\t\t\t\t{hero.eyebrow}\n\t\t\t\t\t</Badge>\n\t\t\t\t\t<h1 className=\"max-w-4xl text-balance text-display-lg sm:text-display-2xl\">{hero.title}</h1>\n\t\t\t\t\t<p className=\"max-w-(--measure-prose) text-pretty text-body-lg text-muted-foreground\">{hero.lede}</p>\n\t\t\t\t\t<Row gap={2} justify=\"center\" wrap className=\"pt-2\">\n\t\t\t\t\t\t<Button size=\"cta\" render={<a href={hero.primary.href} />}>\n\t\t\t\t\t\t\t{hero.primary.label}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button size=\"cta\" variant=\"outline\" render={<a href={hero.secondary.href} />}>\n\t\t\t\t\t\t\t{hero.secondary.label}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Row>\n\t\t\t\t</Stack>\n\t\t\t\t<div className=\"w-full max-w-sm\">\n\t\t\t\t\t<CodeBlock prompt=\"$\" code={hero.install} />\n\t\t\t\t</div>\n\t\t\t</Stack>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "InviteTeamBlock",
        "path": "blocks/invite-team-block.tsx",
        "summary": "An invite card: who is already on the team as an AvatarGroup, and an email field with Send.",
        "intent": "Reach for this for team or project invites in onboarding, an empty workspace, or a settings section. For managing an existing member list with roles, use TeamMembersBlock; for sharing one document with people already in the workspace, ShareBlock.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The field and Send are a <form>, so Enter sends; `onSend` receives the typed address.",
          "The AvatarGroup ring matches the card surface when framed and inherits the host surface when not."
        ],
        "a11y": [
          "The AvatarGroup carries an aria-label with the count, so the stack reads as one item, not four initials.",
          "The email Input carries aria-label; there is no visible label in this compact layout."
        ],
        "imports": "\"use client\"\n\nimport { Avatar, AvatarGroup, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Input } from \"@sableui/react\"",
        "code": "const collaborators = [\"MO\", \"SR\", \"JL\", \"AK\"]\n\nexport interface InviteTeamBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet, Dialog or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the address typed, on Send or Enter. */\n\tonSend?: (email: string) => void\n}\n\nexport function InviteTeamBlock({ className, framed = true, onSend }: InviteTeamBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Invite your team</CardTitle>\n\t\t\t\t<CardDescription>Collaborators can edit every project.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<AvatarGroup aria-label={`${collaborators.length} collaborators`} size=\"sm\" surface={framed ? \"card\" : undefined}>\n\t\t\t\t\t{collaborators.map((initials) => (\n\t\t\t\t\t\t<Avatar variant=\"art\" key={initials} fallback={initials} alt={initials} />\n\t\t\t\t\t))}\n\t\t\t\t</AvatarGroup>\n\t\t\t\t<form\n\t\t\t\t\tclassName=\"flex gap-2\"\n\t\t\t\t\tonSubmit={(event) => {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tonSend?.(String(new FormData(event.currentTarget).get(\"email\") ?? \"\"))\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Input name=\"email\" type=\"email\" placeholder=\"name@company.com\" aria-label=\"Email address\" />\n\t\t\t\t\t<Button type=\"submit\">Send</Button>\n\t\t\t\t</form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "InvoiceHistoryBlock",
        "path": "blocks/invoice-history-block.tsx",
        "summary": "A billing history card: a flush Table of date, plan, amount and status per invoice, with a download button on each row.",
        "intent": "Reach for this in billing settings, under the current plan. For a long, filterable history (hundreds of rows, date ranges, export), use DataTable on its own page.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "42rem"
        },
        "notes": [
          "The table runs edge to edge (CardContent flush); its first and last columns still line up with the card header's padding.",
          "Amounts are a numeric column — right-aligned with tabular figures — so they compare by eye.",
          "On a narrow screen the table scrolls sideways inside the card (with a quiet scrollbar) rather than squeezing its columns."
        ],
        "a11y": [
          "The download column has a screen-reader-only header, and each button names its invoice (\"Download INV-0042\").",
          "Status is text in a Badge; the dot's colour only reinforces it."
        ],
        "imports": "\"use client\"\n\nimport { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Icon, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@sableui/react\"",
        "code": "const invoices = [\n\t{ id: \"INV-0042\", date: \"Oct 1, 2026\", plan: \"Studio · yearly\", amount: \"$192.00\", status: \"Paid\" },\n\t{ id: \"INV-0031\", date: \"Sep 1, 2026\", plan: \"Studio · monthly\", amount: \"$20.00\", status: \"Paid\" },\n\t{ id: \"INV-0027\", date: \"Aug 1, 2026\", plan: \"Studio · monthly\", amount: \"$20.00\", status: \"Refunded\" },\n\t{ id: \"INV-0019\", date: \"Jul 1, 2026\", plan: \"Starter\", amount: \"$0.00\", status: \"Paid\" },\n]\n\nexport interface InvoiceHistoryBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the invoice id to download. */\n\tonDownload?: (id: string) => void\n}\n\nexport function InvoiceHistoryBlock({ className, framed = true, onDownload }: InvoiceHistoryBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-2xl\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Invoices</CardTitle>\n\t\t\t\t<CardDescription>Sent to billing@studio.com on the 1st of each month.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent flush className=\"overflow-x-auto scrollbar-quiet\">\n\t\t\t\t<Table>\n\t\t\t\t\t<TableHeader>\n\t\t\t\t\t\t<TableRow>\n\t\t\t\t\t\t\t<TableHead>Date</TableHead>\n\t\t\t\t\t\t\t<TableHead>Plan</TableHead>\n\t\t\t\t\t\t\t<TableHead numeric>Amount</TableHead>\n\t\t\t\t\t\t\t<TableHead>Status</TableHead>\n\t\t\t\t\t\t\t<TableHead className=\"w-0\">\n\t\t\t\t\t\t\t\t<span className=\"sr-only\">Download</span>\n\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t</TableHeader>\n\t\t\t\t\t<TableBody>\n\t\t\t\t\t\t{invoices.map((invoice) => (\n\t\t\t\t\t\t\t<TableRow key={invoice.id}>\n\t\t\t\t\t\t\t\t<TableCell className=\"whitespace-nowrap\">{invoice.date}</TableCell>\n\t\t\t\t\t\t\t\t<TableCell className=\"text-muted-foreground\">{invoice.plan}</TableCell>\n\t\t\t\t\t\t\t\t<TableCell numeric>{invoice.amount}</TableCell>\n\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t<Badge appearance=\"plain\" tone={invoice.status === \"Paid\" ? \"success\" : \"neutral\"} dot>\n\t\t\t\t\t\t\t\t\t\t{invoice.status}\n\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t\t<TableCell>\n\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label={`Download ${invoice.id}`} onClick={() => onDownload?.(invoice.id)}>\n\t\t\t\t\t\t\t\t\t\t<Icon name=\"download\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableBody>\n\t\t\t\t</Table>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "InvoicePreviewBlock",
        "path": "blocks/invoice-preview-block.tsx",
        "summary": "A draft invoice with a discount, a rolling amount due, and sending feedback inside its one button.",
        "intent": "A copyable reference for a total that changes and feedback that stays in the action. Replace the one-second stand-in with the real request when integrating billing.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "NumberTicker rolls the amount due; TextSwap changes the button's label in place; Button owns the spinner and busy state.",
          "The discount Switch applies at once, with the deduction on the same row so the line items reconcile with the amount due.",
          "The status Badge moves from Draft to Sent. Changing the discount returns the invoice to draft; pressing Sent sends it again."
        ],
        "a11y": [
          "The button keeps focus through sending and sent, exposes its busy state, and announces its new label; TextSwap's visual copies are hidden.",
          "The discount is locked only while sending."
        ],
        "imports": "\"use client\"\n\nimport { useState, useEffect } from \"react\"\nimport { Badge, Button, Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle, cn, Field, Icon, NumberTicker, Switch, TextSwap } from \"@sableui/react\"",
        "code": "const invoice = {\n\tnumber: \"Invoice 1042\",\n\tcustomer: \"Mara Okafor · Brand direction\",\n\tlines: [\n\t\t{ label: \"Design review\", amount: 480 },\n\t\t{ label: \"Project assets\", amount: 120 },\n\t],\n\tdiscount: 0.1,\n}\n\nconst money = new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\n\ntype SendState = \"draft\" | \"sending\" | \"sent\"\n\nconst action: Record<SendState, string> = { draft: \"Send invoice\", sending: \"Sending…\", sent: \"Sent\" }\n\nexport interface InvoicePreviewBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called when the invoice is sent. Here the send is a one-second stand-in. */\n\tonSend?: (amount: number) => void\n}\n\nexport function InvoicePreviewBlock({ className, framed = true, onSend }: InvoicePreviewBlockProps) {\n\tconst [discounted, setDiscounted] = useState(false)\n\tconst [state, setState] = useState<SendState>(\"draft\")\n\tconst subtotal = invoice.lines.reduce((total, line) => total + line.amount, 0)\n\tconst deduction = discounted ? subtotal * invoice.discount : 0\n\tconst amount = subtotal - deduction\n\t// One label, swapped in place in every state, and announced as it changes.\n\tconst label = <TextSwap text={action[state]} aria-live=\"polite\" />\n\tuseEffect(() => {\n\t\tif (state !== \"sending\") return\n\t\tconst timer = setTimeout(() => setState(\"sent\"), 1000)\n\t\treturn () => clearTimeout(timer)\n\t}, [state])\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{invoice.number}</CardTitle>\n\t\t\t\t<CardDescription>{invoice.customer}</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<Badge tone={state === \"sent\" ? \"success\" : \"neutral\"} size=\"sm\">\n\t\t\t\t\t\t{state === \"sent\" ? \"Sent\" : \"Draft\"}\n\t\t\t\t\t</Badge>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-5\">\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">Amount due</span>\n\t\t\t\t\t<NumberTicker value={amount} format={{ style: \"currency\", currency: \"USD\" }} className=\"text-mono-xl\" />\n\t\t\t\t</div>\n\t\t\t\t<dl className=\"flex flex-col gap-2 text-body-sm\">\n\t\t\t\t\t{invoice.lines.map((line) => (\n\t\t\t\t\t\t<div key={line.label} className=\"flex justify-between gap-3\">\n\t\t\t\t\t\t\t<dt>{line.label}</dt>\n\t\t\t\t\t\t\t<dd className=\"text-mono-md\">{money.format(line.amount)}</dd>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</dl>\n\t\t\t\t<Field\n\t\t\t\t\tlabel=\"10% discount\"\n\t\t\t\t\torientation=\"horizontal\"\n\t\t\t\t\tdisabled={state === \"sending\"}\n\t\t\t\t\ttrailing={discounted ? <span className=\"text-mono-md text-muted-foreground\">−{money.format(deduction)}</span> : undefined}\n\t\t\t\t>\n\t\t\t\t\t<Switch\n\t\t\t\t\t\tchecked={discounted}\n\t\t\t\t\t\tonCheckedChange={(on: boolean) => {\n\t\t\t\t\t\t\tsetDiscounted(on)\n\t\t\t\t\t\t\tsetState(\"draft\")\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</Field>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\taria-label={action[state]}\n\t\t\t\t\tloading={state === \"sending\"}\n\t\t\t\t\tloadingLabel={label}\n\t\t\t\t\ticonStart={state === \"sent\" ? <Icon name=\"check\" /> : undefined}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tif (state === \"sending\") return\n\t\t\t\t\t\tsetState(\"sending\")\n\t\t\t\t\t\tonSend?.(amount)\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{label}\n\t\t\t\t</Button>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "KpiSparklineBlock",
        "path": "blocks/kpi-sparkline-block.tsx",
        "summary": "A KPI row with trends: three stat cards, each the value in the metric mono tier, a Sparkline of its last twelve weeks, and the change as a Badge.",
        "intent": "Reach for this at the top of a dashboard or a landing page's proof section, where each number needs its recent shape. Without the trend, StatRowBlock is calmer; for one headline trend, TrafficTrendBlock.",
        "family": "Dashboard",
        "kind": "section",
        "notes": [
          "Each sparkline is coloured by what its measure is, and the change Badge by whether it is good: churn falling is good news in a warning-toned trend.",
          "The sparklines draw on as the row scrolls into view.",
          "One column on a phone, three from sm."
        ],
        "a11y": [
          "Each Sparkline is an image named by the measure and the period, with its range spoken.",
          "The change is stated in text (+8.2% vs last quarter) with an arrow icon; colour only reinforces it."
        ],
        "imports": "import { Badge, Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle, cn, Grid, Icon, Sparkline } from \"@sableui/react\"",
        "code": "const kpis = [\n\t{ label: \"Revenue\", value: \"$18,240\", delta: \"+8.2%\", up: true, trend: [12, 14, 13, 17, 16, 19, 18, 21, 20, 24, 23, 26], tone: \"success\" },\n\t{ label: \"Active users\", value: \"3,912\", delta: \"+3.1%\", up: true, trend: [30, 31, 29, 33, 34, 33, 36, 35, 37, 38, 37, 39], tone: \"info\" },\n\t{ label: \"Churn\", value: \"4.1%\", delta: \"−0.6%\", up: false, trend: [9, 8, 9, 7, 8, 6, 7, 5, 6, 4, 5, 4], tone: \"warning\" },\n] as const\n\nexport interface KpiSparklineBlockProps {\n\tclassName?: string\n}\n\nexport function KpiSparklineBlock({ className }: KpiSparklineBlockProps) {\n\treturn (\n\t\t<Grid cols={{ base: 1, sm: 3 }} gap={3} className={cn(\"w-full\", className)}>\n\t\t\t{kpis.map((kpi) => (\n\t\t\t\t<Card key={kpi.label}>\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardDescription>{kpi.label}</CardDescription>\n\t\t\t\t\t\t<CardTitle className=\"text-mono-xl\">{kpi.value}</CardTitle>\n\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t<Sparkline label={`${kpi.label}, last 12 weeks`} data={[...kpi.trend]} variant=\"area\" tone={kpi.tone} />\n\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t<Badge tone={kpi.up ? \"success\" : \"neutral\"} size=\"sm\" icon={<Icon name={kpi.up ? \"arrow-up\" : \"arrow-down\"} />}>\n\t\t\t\t\t\t\t{kpi.delta} vs last quarter\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t))}\n\t\t</Grid>\n\t)\n}"
      },
      {
        "name": "MediaPlayerBlock",
        "path": "blocks/media-player-block.tsx",
        "summary": "A now-playing card: cover, title and artist as an Entity with a Like action, a position Slider with elapsed and remaining time, and previous / play-pause / next.",
        "intent": "Reach for this for audio or video playback controls outside the media itself — a mini player, a podcast card, a preview in a feed. Playback over the video frame is the Video component's own chrome.",
        "family": "Media & files",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Play/pause is the one filled control, centred between two ghost skips.",
          "Times are `text-mono-caption`, so the digits do not shift as they count.",
          "The cover is painted from the palette as a placeholder; swap it for the real artwork."
        ],
        "a11y": [
          "Every icon-only Button carries aria-label, and play/pause's label follows its state.",
          "The Slider carries aria-label=\"Position\". Give it aria-valuetext in your player (\"1:24 of 3:40\") so the position is read as time, not a percentage."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Button, Card, CardContent, cn, Entity, Icon, MediaImage, Slider } from \"@sableui/react\"",
        "code": "// `cover` is the artwork URL; left empty, the cover paints art seeded by the title.\nconst track = { title: \"Low tide, high noon\", artist: \"Juno Avery\", cover: \"\", duration: 220, position: 84 }\n\n/** Seconds → m:ss, the way the readout and the screen reader both say it. */\nfunction formatTime(seconds: number) {\n\treturn `${Math.floor(seconds / 60)}:${String(Math.floor(seconds % 60)).padStart(2, \"0\")}`\n}\n\n\nexport interface MediaPlayerBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the new playing state. */\n\tonPlayingChange?: (playing: boolean) => void\n\tonPrevious?: () => void\n\tonNext?: () => void\n}\n\nexport function MediaPlayerBlock({ className, framed = true, onPlayingChange, onPrevious, onNext }: MediaPlayerBlockProps) {\n\tconst [playing, setPlaying] = useState(true)\n\tconst [position, setPosition] = useState(track.position)\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{/* Entity's own row padding is for lists; inside a card's content the\n\t\t\t\t    card already pads it. */}\n\t\t\t\t<Entity\n\t\t\t\t\tclassName=\"p-0\"\n\t\t\t\t\tleading={<MediaImage src={track.cover} seed={track.title} className=\"size-14 shrink-0 rounded-md\" />}\n\t\t\t\t\ttitle={track.title}\n\t\t\t\t\tsubtitle={track.artist}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Like\">\n\t\t\t\t\t\t\t<Icon name=\"heart\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<div className=\"flex flex-col gap-1.5\">\n\t\t\t\t\t<Slider\n\t\t\t\t\t\tvalue={position}\n\t\t\t\t\t\tmax={track.duration}\n\t\t\t\t\t\tonValueChange={setPosition}\n\t\t\t\t\t\taria-label=\"Position\"\n\t\t\t\t\t\t// Spoken as a time, not \"38\": the number alone means nothing.\n\t\t\t\t\t\tgetAriaValueText={(_, value) => `${formatTime(value)} of ${formatTime(track.duration)}`}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"flex justify-between text-mono-caption text-muted-foreground\">\n\t\t\t\t\t\t<span>{formatTime(position)}</span>\n\t\t\t\t\t\t<span>-{formatTime(track.duration - position)}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex items-center justify-center gap-3\">\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" aria-label=\"Previous\" onClick={onPrevious}>\n\t\t\t\t\t\t<Icon name=\"previous\" variant=\"solid\" />\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\taria-label={playing ? \"Pause\" : \"Play\"}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tsetPlaying(!playing)\n\t\t\t\t\t\t\tonPlayingChange?.(!playing)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name={playing ? \"pause\" : \"play\"} variant=\"solid\" />\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" aria-label=\"Next\" onClick={onNext}>\n\t\t\t\t\t\t<Icon name=\"next\" variant=\"solid\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "MessageReactionsBlock",
        "path": "blocks/message-reactions-block.tsx",
        "summary": "A short thread you can react to: right-click or long-press a bubble for a menu with a row of quick reactions above Reply and Copy, or use the add-reaction pill under a message. A new reaction blooms in and sprays copies of its emoji.",
        "intent": "Reach for this when a conversation excerpt should be reactable — a team thread, a comment card, a support transcript. A read-only excerpt is ChatThreadBlock; a working chat with a composer and history is the ChatPanel page shell.",
        "family": "Social & messaging",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "Two ways in, on purpose: the right-click / long-press menu is fast once you know it is there, and the add-reaction pill is how a first-time reader finds reactions at all.",
          "The quick row in the menu is MenuReactions (checkbox menu items) and the one in the pill's popover is ReactionPicker (a toolbar), so each is reachable by the keyboard model of the surface it sits in.",
          "Only the reader's own reaction celebrates. Counts from other people roll quietly, and the reactions a page loads with never play.",
          "The add-reaction pill appears only on messages that already have reactions; a message with none is reacted to from its menu, which keeps quiet rows quiet."
        ],
        "a11y": [
          "Each bubble is focusable, and its menu opens on right click, long press, Shift+F10 or the Menu key; its reactions are checkbox items reporting whether the reader has used each one.",
          "Each reaction pill is a toggle named by its meaning and count (\"Party, 3\") with `aria-pressed`; the emoji and the burst are hidden from assistive tech.",
          "Under reduced motion the reaction appears and the count changes at once; nothing else is lost."
        ],
        "imports": "\"use client\"\n\nimport { Avatar, Bubble, BubbleReaction, BubbleReactions, Card, CardContent, CardFooter, cn, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, DEFAULT_REACTIONS, MenuReactions, Message } from \"@sableui/react\"",
        "code": "// Each reaction lists who gave it. The reader's own are kept apart, in state.\nconst me = \"You\"\nconst messages: { id: string; text: string; mine: boolean; reactions: Record<string, string[]> }[] = [\n\t{ id: \"m1\", text: \"The new onboarding flow is live on staging 🚀\", mine: false, reactions: { \"🎉\": [\"Ana\", \"Kofi\"], \"👀\": [\"Jun\"] } },\n\t{ id: \"m2\", text: \"Clicked through it twice. The progress bar is so smooth.\", mine: true, reactions: { \"🙏\": [\"Mara\"] } },\n\t{ id: \"m3\", text: \"Ship it Friday?\", mine: false, reactions: { \"👍\": [\"Ana\", \"Kofi\", \"Mara\", \"Jun\"] } },\n]\nconst hint = \"Right-click or long-press a message to react.\"\n// Every emoji that can appear needs a name: it is the pill's accessible label.\nconst labels: Record<string, string> = {\n\t...Object.fromEntries(DEFAULT_REACTIONS.map((r) => [r.emoji, r.label])),\n\t\"👀\": \"Eyes\",\n}\n\nexport interface MessageReactionsBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border. Unframed, its bubbles stand on the page: the reader's own are a wash over it. */\n\tframed?: boolean\n\t/** Called when the reader adds or removes a reaction: the message's id, then the emoji and whether it is now on. */\n\tonReactionChange?: (messageId: string, reaction: { emoji: string; reacted: boolean }) => void\n}\n\nexport function MessageReactionsBlock({ className, framed = true, onReactionChange }: MessageReactionsBlockProps) {\n\t// The reader's own reactions, per message. Everyone else's are the counts above.\n\tconst [mine, setMine] = useState<Record<string, string[]>>({ m1: [\"🎉\"] })\n\tconst toggle = (messageId: string, emoji: string) => {\n\t\tconst reacted = !(mine[messageId] ?? []).includes(emoji)\n\t\t// Decided again from `prev`, so two toggles in one batch cannot add an emoji twice.\n\t\tsetMine((prev) => {\n\t\t\tconst current = prev[messageId] ?? []\n\t\t\tconst next = current.includes(emoji) ? current.filter((e) => e !== emoji) : [...current, emoji]\n\t\t\treturn { ...prev, [messageId]: next }\n\t\t})\n\t\tonReactionChange?.(messageId, { emoji, reacted })\n\t}\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardContent className=\"flex flex-col gap-3\">\n\t\t\t\t{messages.map((m) => {\n\t\t\t\t\tconst align = m.mine ? \"end\" : \"start\"\n\t\t\t\t\tconst chosen = mine[m.id] ?? []\n\t\t\t\t\t// Everyone else, then the reader: a reaction only the reader gave is\n\t\t\t\t\t// a pill of its own, ordered after the ones already there.\n\t\t\t\t\tconst emojis = [...Object.keys(m.reactions), ...chosen.filter((emoji) => !(emoji in m.reactions))]\n\t\t\t\t\tconst pills = emojis.map((emoji) => ({\n\t\t\t\t\t\temoji,\n\t\t\t\t\t\tactive: chosen.includes(emoji),\n\t\t\t\t\t\tpeople: [...(m.reactions[emoji] ?? []), ...(chosen.includes(emoji) ? [me] : [])],\n\t\t\t\t\t}))\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Message key={m.id} messageId={m.id} align={m.mine ? \"end\" : undefined}>\n\t\t\t\t\t\t\t<ContextMenu>\n\t\t\t\t\t\t\t\t<ContextMenuTrigger\n\t\t\t\t\t\t\t\t\t// Focusable, so Shift+F10 or the Menu key opens the same menu.\n\t\t\t\t\t\t\t\t\t// A light thread: the other party on the card's own surface with\n\t\t\t\t\t\t\t\t\t// an edge, the reader's on a wash of the brand colour. The one solid chip\n\t\t\t\t\t\t\t\t\t// left is the reader's own reaction.\n\t\t\t\t\t\t\t\t\trender={<Bubble tabIndex={0} variant={m.mine ? \"tint\" : \"outline\"} align={align} />}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{m.text}\n\t\t\t\t\t\t\t\t\t{/* Inside the bubble, as part of the message. Rendered even while\n\t\t\t\t\t\t\t\t\t    empty (it hides itself), so the first reaction still celebrates.\n\t\t\t\t\t\t\t\t\t    Up to three people show as faces; past that, the count. */}\n\t\t\t\t\t\t\t\t\t<BubbleReactions>\n\t\t\t\t\t\t\t\t\t\t{pills.map((p) => (\n\t\t\t\t\t\t\t\t\t\t\t<BubbleReaction\n\t\t\t\t\t\t\t\t\t\t\t\tkey={p.emoji}\n\t\t\t\t\t\t\t\t\t\t\t\temoji={p.emoji}\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={labels[p.emoji]}\n\t\t\t\t\t\t\t\t\t\t\t\tactive={p.active}\n\t\t\t\t\t\t\t\t\t\t\t\tavatars={p.people.map((person) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t// One letter: at this size two would run under the next face.\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar key={person} variant=\"art\" fallback={person[0]} alt=\"\" />\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => toggle(m.id, p.emoji)}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</BubbleReactions>\n\t\t\t\t\t\t\t\t</ContextMenuTrigger>\n\t\t\t\t\t\t\t\t<ContextMenuContent>\n\t\t\t\t\t\t\t\t\t<MenuReactions selected={chosen} onSelect={(emoji) => toggle(m.id, emoji)} />\n\t\t\t\t\t\t\t\t\t<ContextMenuSeparator />\n\t\t\t\t\t\t\t\t\t<ContextMenuItem>Reply</ContextMenuItem>\n\t\t\t\t\t\t\t\t\t<ContextMenuItem>Copy text</ContextMenuItem>\n\t\t\t\t\t\t\t\t</ContextMenuContent>\n\t\t\t\t\t\t\t</ContextMenu>\n\t\t\t\t\t\t</Message>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"text-caption text-muted-foreground\">{hint}</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "NewsletterBlock",
        "path": "blocks/newsletter-block.tsx",
        "summary": "A newsletter sign-up card: the list's name, what it sends and how often, and an email field with Subscribe.",
        "intent": "Reach for this in a footer, at the end of an article, or beside a changelog. Creating an account is SignUpBlock; inviting a teammate is InviteTeamBlock.",
        "family": "Marketing",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "Copied from the BrandLandingPage page shell's footer.",
          "The description says how often mail arrives — the one thing people want to know before they subscribe.",
          "The field and button sit side by side from sm up and stack on a phone, where the button goes full width."
        ],
        "a11y": [
          "The input has a real (visually hidden) <label>, not just a placeholder.",
          "The CardTitle renders an h2, so the sign-up is reachable by heading in a footer."
        ],
        "imports": "\"use client\"\n\nimport { useId } from \"react\"\nimport { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Input } from \"@sableui/react\"",
        "code": "const newsletter = { title: \"The Cove digest\", body: \"One note a month on trusted workflows and product releases.\" }\n\nexport interface NewsletterBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a footer or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the address on Subscribe or Enter. */\n\tonSubscribe?: (email: string) => void\n}\n\nexport function NewsletterBlock({ className, framed = true, onSubscribe }: NewsletterBlockProps) {\n\tconst emailId = useId()\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{newsletter.title}</CardTitle>\n\t\t\t\t<CardDescription>{newsletter.body}</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<form\n\t\t\t\t\tclassName=\"grid gap-2 sm:grid-cols-[1fr_auto]\"\n\t\t\t\t\tonSubmit={(event) => {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tonSubscribe?.(String(new FormData(event.currentTarget).get(\"email\") ?? \"\"))\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<label htmlFor={emailId} className=\"sr-only\">\n\t\t\t\t\t\tWork email\n\t\t\t\t\t</label>\n\t\t\t\t\t<Input id={emailId} name=\"email\" type=\"email\" autoComplete=\"email\" placeholder=\"you@company.com\" required />\n\t\t\t\t\t<Button type=\"submit\" className=\"w-full sm:w-auto\">\n\t\t\t\t\t\tSubscribe\n\t\t\t\t\t</Button>\n\t\t\t\t</form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "NotFoundBlock",
        "path": "blocks/not-found-block.tsx",
        "summary": "A not-found page body: the status code in mono, a plain-language h1, what probably happened, and two ways on — home and search.",
        "intent": "Reach for this as the body of a 404 route. An empty list or a search with no results inside a working page is EmptyState, not this.",
        "family": "System",
        "kind": "section",
        "notes": [
          "The heading says what happened in words; the code is a small mono label for people who look for it.",
          "Two ways on, one primary. Never a dead end with only the browser's back button.",
          "Capped at the `form` region width, so the short message stays a tight, centred column."
        ],
        "a11y": [
          "It renders the page's h1 — use it as the route's main content, inside <main>.",
          "Both actions are links styled as Buttons, because they navigate."
        ],
        "imports": "import { Button, cn, Icon, Region, Row, Stack } from \"@sableui/react\"",
        "code": "const notFound = {\n\tcode: \"404\",\n\ttitle: \"This page isn't here\",\n\tbody: \"It may have moved, or the link may be mistyped. Check the address, or head back to somewhere you know.\",\n\thome: { label: \"Go home\", href: \"/\" },\n\thelp: { label: \"Search the docs\", href: \"/docs\" },\n}\n\nexport interface NotFoundBlockProps {\n\tclassName?: string\n}\n\nexport function NotFoundBlock({ className }: NotFoundBlockProps) {\n\treturn (\n\t\t<Region as=\"section\" max=\"form\" className={cn(\"w-full py-16 sm:py-24\", className)}>\n\t\t\t<Stack gap={4} align=\"center\" className=\"text-center\">\n\t\t\t\t<p className=\"text-mono-md text-muted-foreground\">{notFound.code}</p>\n\t\t\t\t<h1 className=\"text-balance text-heading-1\">{notFound.title}</h1>\n\t\t\t\t<p className=\"text-pretty text-body-md text-muted-foreground\">{notFound.body}</p>\n\t\t\t\t<Row gap={2} justify=\"center\" wrap className=\"pt-2\">\n\t\t\t\t\t<Button iconStart={<Icon name=\"home\" />} render={<a href={notFound.home.href} />}>\n\t\t\t\t\t\t{notFound.home.label}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button variant=\"outline\" iconStart={<Icon name=\"search\" />} render={<a href={notFound.help.href} />}>\n\t\t\t\t\t\t{notFound.help.label}\n\t\t\t\t\t</Button>\n\t\t\t\t</Row>\n\t\t\t</Stack>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "NotificationListBlock",
        "path": "blocks/notification-list-block.tsx",
        "summary": "An activity list: Entity rows with the actor's Avatar, who did what, and a compact time with an unread StatusDot.",
        "intent": "Reach for this for a notifications popover, a recent-activity card or an inbox preview. A full inbox with selection and bulk actions is a ListDetailPage.",
        "family": "Social & messaging",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Rows are Card + CardList + Entity, inset from the card's padding at any density.",
          "Unread is a quiet info dot before the time, so the times keep one right edge — the list stays calm when most items are unread.",
          "framed={false} drops the surface for a Popover, which already is one."
        ],
        "a11y": [
          "The unread dot is decorative; each unread row also carries a screen-reader-only \"(unread)\" after the name.",
          "Each Avatar's alt is the actor's name."
        ],
        "imports": "import { Avatar, Card, CardList, cn, Entity, StatusDot } from \"@sableui/react\"",
        "code": "const notifications = [\n\t{ initials: \"MO\", name: \"Mara Okafor\", what: \"invited you to Q3 planning\", when: \"2m\", unread: true },\n\t{ initials: \"SR\", name: \"Sam Rivera\", what: \"left a comment on Dusk\", when: \"1h\", unread: false },\n]\n\nexport interface NotificationListBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Popover or Sheet that already frames it. */\n\tframed?: boolean\n}\n\nexport function NotificationListBlock({ className, framed = true }: NotificationListBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs overflow-hidden\", className)}>\n\t\t\t<CardList>\n\t\t\t\t{notifications.map((n) => (\n\t\t\t\t\t<Entity\n\t\t\t\t\t\tkey={n.name}\n\t\t\t\t\t\tleading={<Avatar variant=\"art\" size=\"sm\" fallback={n.initials} alt={n.name} />}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{n.name}\n\t\t\t\t\t\t\t\t{n.unread ? <span className=\"sr-only\"> (unread)</span> : null}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsubtitle={n.what}\n\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t<span className=\"flex items-center gap-1.5 text-caption text-muted-foreground\">\n\t\t\t\t\t\t\t\t{n.unread ? <StatusDot tone=\"info\" /> : null}\n\t\t\t\t\t\t\t\t{n.when}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</CardList>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "NotificationSettingsBlock",
        "path": "blocks/notification-settings-block.tsx",
        "summary": "A preferences card: Entity rows in a CardList, each with a title, a one-line detail and a Switch that applies instantly.",
        "intent": "Reach for this for any short list of on/off preferences — notifications, privacy, feature flags in a settings section. For a full settings route with a section rail, start from the SettingsPage page shell.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Switches apply the moment they change; never pair them with a Save button. `onSettingChange` receives the row id and the new state.",
          "Rows are Card + CardList + Entity, so they inset with the card's padding at any density."
        ],
        "a11y": [
          "Each Switch takes its row title as aria-label, since the Entity title is not a <label>.",
          "Keep details to one line — Entity truncates its subtitle."
        ],
        "imports": "\"use client\"\n\nimport { Card, CardList, cn, Entity, Switch } from \"@sableui/react\"",
        "code": "const preferences = [\n\t{ id: \"email\", title: \"Email notifications\", detail: \"Replies and mentions\", on: true },\n\t{ id: \"push\", title: \"Push notifications\", detail: \"On this device\", on: false },\n\t{ id: \"digest\", title: \"Weekly digest\", detail: \"Every Monday\", on: true },\n]\n\nexport interface NotificationSettingsBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet, Dialog or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called the moment a switch changes. Toggles apply instantly; there is no Save. */\n\tonSettingChange?: (id: string, enabled: boolean) => void\n}\n\nexport function NotificationSettingsBlock({ className, framed = true, onSettingChange }: NotificationSettingsBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs overflow-hidden\", className)}>\n\t\t\t<CardList>\n\t\t\t\t{preferences.map((p) => (\n\t\t\t\t\t<Entity\n\t\t\t\t\t\tkey={p.id}\n\t\t\t\t\t\ttitle={p.title}\n\t\t\t\t\t\tsubtitle={p.detail}\n\t\t\t\t\t\taction={<Switch defaultChecked={p.on} aria-label={p.title} onCheckedChange={(enabled: boolean) => onSettingChange?.(p.id, enabled)} />}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</CardList>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "OrderTrackingBlock",
        "path": "blocks/order-tracking-block.tsx",
        "summary": "An order status card: order number, item and a status Badge in the header over a vertical dot Stepper of delivery milestones.",
        "intent": "Reach for this for anything that moves through known stages — a delivery, an application, a review, a deployment. For an open-ended activity log, use a list of Entity rows with timestamps instead.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The Stepper's `current` is the step under way; finished steps show their timestamp and future steps show none.",
          "The status Badge restates the current stage in one word so the card scans without reading the steps."
        ],
        "a11y": [
          "The Stepper is labelled \"Delivery status\" and marks the current step for assistive tech.",
          "The Badge's tone is backed by its text; colour alone never carries the status."
        ],
        "imports": "import { Badge, Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle, cn, Stepper, StepperItem } from \"@sableui/react\"",
        "code": "// design-lint-disable-next-line inline-color -- an order number, not a colour\nconst order = { number: \"Order #2048\", item: \"Giclée print, 18 × 24 in\", status: \"In transit\", current: 2 }\n\nconst steps = [\n\t{ title: \"Order placed\", detail: \"Oct 9, 10:14 AM\" },\n\t{ title: \"Printed and packed\", detail: \"Oct 10, 4:02 PM\" },\n\t{ title: \"Out for delivery\", detail: \"Arriving today by 6 PM\" },\n\t{ title: \"Delivered\", detail: undefined },\n]\n\nexport interface OrderTrackingBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or muted section that already frames it. */\n\tframed?: boolean\n}\n\nexport function OrderTrackingBlock({ className, framed = true }: OrderTrackingBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{order.number}</CardTitle>\n\t\t\t\t<CardDescription>{order.item}</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<Badge tone=\"warning\" size=\"sm\">\n\t\t\t\t\t\t{order.status}\n\t\t\t\t\t</Badge>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<Stepper orientation=\"vertical\" indicator=\"dot\" current={order.current} aria-label=\"Delivery status\">\n\t\t\t\t\t{steps.map((step) => (\n\t\t\t\t\t\t<StepperItem key={step.title} title={step.title} description={step.detail} />\n\t\t\t\t\t))}\n\t\t\t\t</Stepper>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "PhotoAdjustBlock",
        "path": "blocks/photo-adjust-block.tsx",
        "summary": "A photo with its adjustments under it: PropertyRows that pair a Slider with a ScrubField, a ColorField tint, and Reset and Save at the foot — all applied live to the preview.",
        "intent": "Reach for this as the inspector of an image, video or canvas tool: a few numeric properties and a colour, changed while watching the result. A whole editor with layers and panels is the Workspace shell with PanelSections; a single percentage a reader sets once is a Slider.",
        "family": "Media & files",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Every row is a PropertyRow, so the labels form one column and the controls another. Do not hand-lay a label and a field per property.",
          "Each adjustment has one drag, the Slider, and a ScrubField beside it for the exact value, typing and arrow keys. A row with no slider would make its name the drag handle instead (`scrub` on PropertyRow).",
          "The actions come after the controls, in the card's footer: Reset to undo every adjustment, Save as the primary. Two actions of one kind, so both are plain Buttons.",
          "Reset is disabled until something has changed, so it never looks like it did nothing.",
          "The tint starts transparent (`allowTransparent`): no tint is a value, not a missing one."
        ],
        "a11y": [
          "Each adjustment is a named slider and a labelled number input, so it can be set by dragging, arrow keys or typing.",
          "The photo's alt is its title. The tint overlay is decorative and hidden from assistive technology."
        ],
        "imports": "\"use client\"\n\nimport { useState, useId } from \"react\"\nimport { AspectBox, Button, Card, CardContent, CardFooter, cn, ColorField, MediaImage, PropertyRow, ScrubField, Slider } from \"@sableui/react\"",
        "code": "// The photo's title is its alt text and seeds the art painted when there is no image.\nconst photo = { title: \"Ridge at first light\" }\n\n// Each adjustment runs from -100 to 100 around the untouched photo at 0.\nconst adjustments = [\n\t{ id: \"exposure\", label: \"Exposure\" },\n\t{ id: \"contrast\", label: \"Contrast\" },\n\t{ id: \"saturation\", label: \"Saturation\" },\n] as const\n\ntype Adjustment = (typeof adjustments)[number][\"id\"]\n\nconst untouched: Record<Adjustment, number> = { exposure: 0, contrast: 0, saturation: 0 }\nconst noTint = \"transparent\"\n\nexport interface PhotoAdjustBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a panel that already frames it. */\n\tframed?: boolean\n\t/**\n\t * The photo being adjusted, as a URL. It is the block's input, not its copy,\n\t * so it is the one piece of media a block takes as a prop. Omitted, or\n\t * failing to load, the preview paints art seeded by the title.\n\t */\n\timage?: string\n\t/** Called with the adjustments when the person saves. */\n\tonSave?: (edit: Record<Adjustment, number> & { tint: string }) => void\n}\n\nexport function PhotoAdjustBlock({ className, framed = true, image, onSave }: PhotoAdjustBlockProps) {\n\tconst [values, setValues] = useState(untouched)\n\tconst [tint, setTint] = useState(noTint)\n\tconst id = useId()\n\tconst edited = tint !== noTint || adjustments.some((item) => values[item.id] !== 0)\n\tconst set = (key: Adjustment) => (next: number) => setValues((current) => ({ ...current, [key]: next }))\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs overflow-hidden\", className)}>\n\t\t\t<AspectBox\n\t\t\t\tratio={4 / 3}\n\t\t\t\tstyle={{\n\t\t\t\t\tfilter: `brightness(${1 + values.exposure / 200}) contrast(${1 + values.contrast / 200}) saturate(${1 + values.saturation / 100})`,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<MediaImage src={image} alt={photo.title} seed={photo.title} />\n\t\t\t\t{tint !== noTint ? (\n\t\t\t\t\t<div aria-hidden className=\"absolute inset-0 mix-blend-soft-light\" style={{ backgroundColor: tint }} />\n\t\t\t\t) : null}\n\t\t\t</AspectBox>\n\t\t\t<CardContent className=\"flex flex-col gap-1\">\n\t\t\t\t{/* One drag per row: the slider. The field beside it takes typing and\n\t\t\t\t    arrow keys, and shows the exact value. */}\n\t\t\t\t{adjustments.map((item) => (\n\t\t\t\t\t<PropertyRow key={item.id} label={item.label} htmlFor={`${id}-${item.id}`}>\n\t\t\t\t\t\t<Slider\n\t\t\t\t\t\t\taria-label={item.label}\n\t\t\t\t\t\t\tclassName=\"w-24\"\n\t\t\t\t\t\t\tvalue={values[item.id]}\n\t\t\t\t\t\t\tmin={-100}\n\t\t\t\t\t\t\tmax={100}\n\t\t\t\t\t\t\tonValueChange={(next: number | number[]) => set(item.id)(Array.isArray(next) ? next[0] : next)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ScrubField\n\t\t\t\t\t\t\tid={`${id}-${item.id}`}\n\t\t\t\t\t\t\t// The slider is \"Exposure\"; the field beside it is its exact value.\n\t\t\t\t\t\t\tlabel={`${item.label} value`}\n\t\t\t\t\t\t\tclassName=\"w-14\"\n\t\t\t\t\t\t\tvalue={values[item.id]}\n\t\t\t\t\t\t\tmin={-100}\n\t\t\t\t\t\t\tmax={100}\n\t\t\t\t\t\t\tonValueChange={set(item.id)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PropertyRow>\n\t\t\t\t))}\n\t\t\t\t<PropertyRow label=\"Tint\">\n\t\t\t\t\t<ColorField label=\"Tint\" value={tint} onValueChange={setTint} allowTransparent />\n\t\t\t\t</PropertyRow>\n\t\t\t</CardContent>\n\t\t\t{/* The controls first, then what to do with them: undo everything, or keep it. */}\n\t\t\t<CardFooter actions className=\"justify-end\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tdisabled={!edited}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetValues(untouched)\n\t\t\t\t\t\tsetTint(noTint)\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tReset\n\t\t\t\t</Button>\n\t\t\t\t<Button onClick={() => onSave?.({ ...values, tint })}>Save</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "PostBlock",
        "path": "blocks/post-block.tsx",
        "summary": "A feed post on a card: the author as an Entity with a RelativeTime, the text behind a ShowMore, a photo, and a LikeButton with its count beside comments and save.",
        "intent": "Reach for this as the item of a social feed, a community update or an activity stream. A message between two people is ChatThreadBlock; a post with no author and a price is ProductCardBlock.",
        "family": "Social & messaging",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "The text collapses to three of its own lines (`collapsedLines`), so the preview stays three lines when the type scale or density changes. A short post shows in full with no control.",
          "The time is a RelativeTime: \"2 hours ago\" to read, the exact date on hover and to a screen reader.",
          "Without a photo URL the image is GradientArt seeded by the post id, so every post keeps its own stable art.",
          "Like owns its count and rolls it on press. Save is the same control with a star and no count — one pressed-state behaviour for both.",
          "The author row's menu (copy link, mute, report) is a real Menu reported through `onPostAction`, never an ellipsis that does nothing.",
          "The actions sit in the content's own spacing, and the ghost buttons at each end bleed by their padding, so the heart and the star line up with the text edges above them."
        ],
        "a11y": [
          "The avatar's alt names the author; the photo is decorative beside the text, so give `alt` on MediaImage when it carries meaning of its own.",
          "The like button is a toggle (aria-pressed) whose name reads \"Like\" then the count. The comment button is named as one string, \"24 comments\", so the count and the word cannot run together.",
          "The menu button is named for the post it acts on (\"More options for Mara Okafor's post\"), not a bare \"More\"."
        ],
        "imports": "\"use client\"\n\nimport { AspectBox, Avatar, Button, Card, CardContent, cn, Entity, Icon, LikeButton, MediaImage, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger, RelativeTime, ShowMore } from \"@sableui/react\"",
        "code": "// `image` is the photo URL; left empty, it paints art seeded by the post id.\nconst post = {\n\tid: \"post-218\",\n\tauthor: { name: \"Mara Okafor\", handle: \"@mara\", initials: \"MO\" },\n\t// Two hours before the page loaded — replace with the post's own timestamp.\n\tpostedAt: Date.now() - 2 * 60 * 60 * 1000,\n\ttext: \"First light over the ridge this morning. We left camp at four, climbed in the dark, and reached the saddle just as the valley filled with colour. Cold hands, hot coffee, and nobody said a word for ten minutes.\",\n\timage: \"\",\n\tlikes: 128,\n\tcomments: 24,\n}\n\nexport interface PostBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a feed column that already frames it. */\n\tframed?: boolean\n\t/** Called with the new state when the reader likes or unlikes the post. */\n\tonLikeChange?: (liked: boolean) => void\n\t/** Called when the reader opens the comments. */\n\tonComment?: () => void\n\t/** Called with the new state when the reader saves or unsaves the post. */\n\tonSaveChange?: (saved: boolean) => void\n\t/** Called with the row chosen in the post's menu. */\n\tonPostAction?: (action: \"copy-link\" | \"mute\" | \"report\") => void\n}\n\nexport function PostBlock({ className, framed = true, onLikeChange, onComment, onSaveChange, onPostAction }: PostBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardContent className=\"flex flex-col gap-3\">\n\t\t\t\t<Entity\n\t\t\t\t\tclassName=\"p-0\"\n\t\t\t\t\tleading={<Avatar variant=\"art\" fallback={post.author.initials} alt={post.author.name} />}\n\t\t\t\t\ttitle={post.author.name}\n\t\t\t\t\tsubtitle={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{post.author.handle} · <RelativeTime date={post.postedAt} />\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t<MenuTrigger\n\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" bleed=\"end\" aria-label={`More options for ${post.author.name}'s post`}>\n\t\t\t\t\t\t\t\t\t\t<Icon name=\"ellipsis\" variant=\"solid\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuContent align=\"end\">\n\t\t\t\t\t\t\t\t<MenuItem icon={<Icon name=\"link\" />} onClick={() => onPostAction?.(\"copy-link\")}>\n\t\t\t\t\t\t\t\t\tCopy link\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t<MenuItem icon={<Icon name=\"eye-off\" />} onClick={() => onPostAction?.(\"mute\")}>\n\t\t\t\t\t\t\t\t\tMute {post.author.handle}\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t<MenuSeparator />\n\t\t\t\t\t\t\t\t<MenuItem icon={<Icon name=\"flag\" />} onClick={() => onPostAction?.(\"report\")}>\n\t\t\t\t\t\t\t\t\tReport post\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuContent>\n\t\t\t\t\t\t</Menu>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{/* Three lines of the post, whatever the type scale; the rest on request. */}\n\t\t\t\t<ShowMore collapsedLines={3}>\n\t\t\t\t\t<p className=\"text-body-md\">{post.text}</p>\n\t\t\t\t</ShowMore>\n\t\t\t\t<AspectBox ratio={4 / 3} className=\"rounded-md\">\n\t\t\t\t\t<MediaImage src={post.image} seed={post.id} />\n\t\t\t\t</AspectBox>\n\t\t\t\t{/* In the content's own rhythm, not a footer: a footer's padding on top of\n\t\t\t\t    the buttons' own left the actions adrift under the photo. */}\n\t\t\t\t<div className=\"flex items-center gap-1\">\n\t\t\t\t\t<LikeButton bleed=\"start\" count={post.likes} onPressedChange={(liked) => onLikeChange?.(liked)} />\n\t\t\t\t\t{/* The name is one string, \"24 comments\": a count and a hidden word\n\t\t\t\t\t    in separate nodes ran together as \"24comments\". */}\n\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" aria-label={`${post.comments} comments`} onClick={onComment}>\n\t\t\t\t\t\t<Icon name=\"comment\" />\n\t\t\t\t\t\t{post.comments}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<LikeButton\n\t\t\t\t\t\t\tclassName=\"ms-auto\"\n\t\t\t\t\t\t\tbleed=\"end\"\n\t\t\t\t\t\t\ticon=\"star\"\n\t\t\t\t\t\t\ttone=\"yellow\"\n\t\t\t\t\t\t\tlabel=\"Save\"\n\t\t\t\t\t\t\tonPressedChange={(saved) => onSaveChange?.(saved)}\n\t\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "PricingCardBlock",
        "path": "blocks/pricing-card-block.tsx",
        "summary": "A single-plan pricing card: a Monthly/Yearly ToggleGroup, the price and billing note, a checked feature list, and one full-width call to action.",
        "intent": "Reach for this when one plan is on offer — an upgrade prompt, a paywall, a plan summary in billing settings. Comparing several tiers side by side is a pricing table, not three of these.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The period switch is a ToggleGroup (a segmented control), not Tabs: it changes a value in place rather than showing another panel.",
          "The price is a heading tier because it is the card's headline; its unit and billing note sit beside and below it in muted body text.",
          "`onStart` receives the period showing, so checkout opens on the plan the person was looking at."
        ],
        "a11y": [
          "The ToggleGroup carries aria-label=\"Billing period\"; each Toggle's text is its name.",
          "The check icons are decorative beside each feature's text."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Button, Card, CardContent, cn, Icon, Toggle, ToggleGroup } from \"@sableui/react\"",
        "code": "const plan = {\n\tmonthly: { price: \"$20\", note: \"Billed monthly. Cancel anytime.\" },\n\tyearly: { price: \"$16\", note: \"Billed $192 yearly. You save 20%.\" },\n\tfeatures: [\"Unlimited projects\", \"Version history\", \"Priority support\"],\n}\n\ntype Period = \"monthly\" | \"yearly\"\n\nexport interface PricingCardBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the billing period showing when the trial starts. */\n\tonStart?: (period: Period) => void\n}\n\nexport function PricingCardBlock({ className, framed = true, onStart }: PricingCardBlockProps) {\n\tconst [period, setPeriod] = useState<Period>(\"yearly\")\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardContent className=\"flex flex-col gap-5\">\n\t\t\t\t<ToggleGroup\n\t\t\t\t\tvalue={[period]}\n\t\t\t\t\tonValueChange={(v: unknown[]) => v[0] && setPeriod(v[0] as Period)}\n\t\t\t\t\taria-label=\"Billing period\"\n\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t>\n\t\t\t\t\t<Toggle value=\"monthly\" className=\"flex-1\">\n\t\t\t\t\t\tMonthly\n\t\t\t\t\t</Toggle>\n\t\t\t\t\t<Toggle value=\"yearly\" className=\"flex-1\">\n\t\t\t\t\t\tYearly\n\t\t\t\t\t</Toggle>\n\t\t\t\t</ToggleGroup>\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t<div className=\"flex items-baseline gap-1.5\">\n\t\t\t\t\t\t<span className=\"text-mono-xl\">{plan[period].price}</span>\n\t\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">per seat / month</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">{plan[period].note}</span>\n\t\t\t\t</div>\n\t\t\t\t<ul className=\"flex flex-col gap-2 text-body-sm\">\n\t\t\t\t\t{plan.features.map((feature) => (\n\t\t\t\t\t\t<li key={feature} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<Icon name=\"check\" className=\"text-success\" />\n\t\t\t\t\t\t\t{feature}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ul>\n\t\t\t\t<Button className=\"w-full\" onClick={() => onStart?.(period)}>\n\t\t\t\t\tStart free trial\n\t\t\t\t</Button>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "PricingTableBlock",
        "path": "blocks/pricing-table-block.tsx",
        "summary": "A three-tier pricing section: heading, a Monthly/Yearly ToggleGroup, and three equal-height plan cards with the recommended one outlined in primary and badged \"Most popular\".",
        "intent": "Reach for this on a pricing page or the pricing band of a landing page, to compare plans side by side. A single plan on offer (an upgrade prompt, a paywall) is PricingCardBlock.",
        "family": "Commerce",
        "kind": "section",
        "notes": [
          "One featured tier at most: it takes the primary button and a primary outline; the others take outline buttons so the recommendation is unmistakable.",
          "Cards stretch to the tallest one and push their buttons to the bottom, so the calls to action line up across the row.",
          "The yearly saving is stated in the toggle itself, where the choice is made. `onChoose` receives the tier id and the period showing."
        ],
        "a11y": [
          "Each plan is an <article> with an h3 under the section's h2, so the tiers are navigable by heading.",
          "The ToggleGroup is labelled \"Billing period\"; prices update in place and stay in the reading order of each card."
        ],
        "imports": "\"use client\"\n\nimport { useState, useId } from \"react\"\nimport { Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, Grid, Icon, Region, Stack, Toggle, ToggleGroup } from \"@sableui/react\"",
        "code": "const tiers = [\n\t{\n\t\tid: \"starter\",\n\t\tname: \"Starter\",\n\t\tblurb: \"For one person getting a first project going.\",\n\t\tmonthly: 0,\n\t\tyearly: 0,\n\t\tcta: \"Start for free\",\n\t\tfeatured: false,\n\t\tfeatures: [\"3 active projects\", \"Shared docs\", \"Community support\"],\n\t},\n\t{\n\t\tid: \"studio\",\n\t\tname: \"Studio\",\n\t\tblurb: \"For small teams shipping on a steady schedule.\",\n\t\tmonthly: 20,\n\t\tyearly: 16,\n\t\tcta: \"Start free trial\",\n\t\tfeatured: true,\n\t\tfeatures: [\"Unlimited projects\", \"Scheduled reports\", \"Usage analytics\", \"Priority support\"],\n\t},\n\t{\n\t\tid: \"business\",\n\t\tname: \"Business\",\n\t\tblurb: \"For companies running several teams at once.\",\n\t\tmonthly: 48,\n\t\tyearly: 40,\n\t\tcta: \"Talk to sales\",\n\t\tfeatured: false,\n\t\tfeatures: [\"Everything in Studio\", \"Up to 10 seats\", \"SSO and audit log\", \"Roles and approvals\"],\n\t},\n]\n\ntype Period = \"monthly\" | \"yearly\"\n\nexport interface PricingTableBlockProps {\n\tclassName?: string\n\t/** Called with the chosen tier and the billing period showing. */\n\tonChoose?: (choice: { tier: string; period: Period }) => void\n}\n\nexport function PricingTableBlock({ className, onChoose }: PricingTableBlockProps) {\n\tconst [period, setPeriod] = useState<Period>(\"yearly\")\n\tconst titleId = useId()\n\treturn (\n\t\t<Region as=\"section\" aria-labelledby={titleId} max=\"wide\" className={cn(\"w-full py-16\", className)}>\n\t\t\t<Stack gap={10}>\n\t\t\t\t<Stack gap={4} align=\"center\" className=\"text-center\">\n\t\t\t\t\t<h2 id={titleId} className=\"text-balance text-heading-1\">\n\t\t\t\t\t\tPricing that grows with your team\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"max-w-(--measure-prose) text-body-lg text-muted-foreground\">\n\t\t\t\t\t\tEvery plan includes unlimited guests, and you can switch plans at any time.\n\t\t\t\t\t</p>\n\t\t\t\t\t<ToggleGroup value={[period]} onValueChange={(v: unknown[]) => v[0] && setPeriod(v[0] as Period)} aria-label=\"Billing period\">\n\t\t\t\t\t\t<Toggle value=\"monthly\">Monthly</Toggle>\n\t\t\t\t\t\t<Toggle value=\"yearly\">Yearly · save 20%</Toggle>\n\t\t\t\t\t</ToggleGroup>\n\t\t\t\t</Stack>\n\t\t\t\t<Grid cols={{ base: 1, md: 3 }} gap={4} className=\"items-stretch\">\n\t\t\t\t\t{tiers.map((tier) => (\n\t\t\t\t\t\t<Card key={tier.id} variant={tier.featured ? \"featured\" : \"default\"} render={<article />} className=\"flex flex-col\">\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t<CardTitle render={<h3 />}>{tier.name}</CardTitle>\n\t\t\t\t\t\t\t\t<CardDescription>{tier.blurb}</CardDescription>\n\t\t\t\t\t\t\t\t{tier.featured ? (\n\t\t\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t\t\t<Badge tone=\"1\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\t\tMost popular\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardContent className=\"flex flex-1 flex-col gap-5\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-baseline gap-1.5\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-mono-xl\">${tier[period]}</span>\n\t\t\t\t\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">per seat / month</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<ul className=\"flex flex-col gap-2 text-body-sm\">\n\t\t\t\t\t\t\t\t\t{tier.features.map((feature) => (\n\t\t\t\t\t\t\t\t\t\t<li key={feature} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"check\" className=\"text-success\" />\n\t\t\t\t\t\t\t\t\t\t\t{feature}\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t<CardFooter>\n\t\t\t\t\t\t\t\t<Button className=\"w-full\" variant={tier.featured ? \"primary\" : \"outline\"} onClick={() => onChoose?.({ tier: tier.id, period })}>\n\t\t\t\t\t\t\t\t\t{tier.cta}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t))}\n\t\t\t\t</Grid>\n\t\t\t</Stack>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "ProductCardBlock",
        "path": "blocks/product-card-block.tsx",
        "summary": "A product card: edge-to-edge product image, title and maker, a status Badge, and the price beside a single buy action.",
        "intent": "Reach for this for a product or listing in a grid or a featured slot. For a row in a dense list, use an Entity with the image as `leading` instead.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "16rem",
          "max": "20rem"
        },
        "notes": [
          "The image runs to the card's edges; the card clips it to its own corners (overflow-hidden).",
          "Prices are `text-mono-lg` — the metric mono tier with tabular figures — never a heading tier.",
          "The placeholder art is painted from the palette's decorative tones so it follows the theme; swap it for the product image with real alt text."
        ],
        "a11y": [
          "The placeholder art is aria-hidden. A real product image needs alt text naming the product.",
          "The card is not a link: it holds its own button. To make the whole card navigate, move the action to the detail page and render the Card as an <a>."
        ],
        "imports": "\"use client\"\n\nimport { AspectBox, Badge, Button, Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle, cn, MediaImage } from \"@sableui/react\"",
        "code": "// `image` is the product shot URL; left empty, it paints art seeded by the title.\nconst product = { title: \"Linen throw blanket\", maker: \"Northfield Home\", image: \"\", badge: \"New\", price: \"$64.00\" }\n\n\nexport interface ProductCardBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\t/** The buy action. */\n\tonCollect?: () => void\n}\n\nexport function ProductCardBlock({ className, framed = true, onCollect }: ProductCardBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs overflow-hidden\", className)}>\n\t\t\t<AspectBox ratio={4 / 3}>\n\t\t\t\t<MediaImage src={product.image} seed={product.title} />\n\t\t\t</AspectBox>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{product.title}</CardTitle>\n\t\t\t\t<CardDescription>{product.maker}</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<Badge tone=\"1\" size=\"sm\">{product.badge}</Badge>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardFooter className=\"justify-between pt-4\">\n\t\t\t\t<span className=\"text-mono-lg\">{product.price}</span>\n\t\t\t\t<Button onClick={onCollect}>Add to cart</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ProfileCardBlock",
        "path": "blocks/profile-card-block.tsx",
        "summary": "A profile card: a cover banner, an avatar rising into it, Share and Follow, the name and handle, a one-line bio and two counts.",
        "intent": "Reach for this for a person or creator summary — a suggested-follow card, a hover target's full view, the top of a profile sidebar. For a small inline preview on hover, use ContextCard; for a row in a list of people, use Entity.",
        "family": "Social & messaging",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The avatar overlaps the banner by half its height with a ring in the card colour, so it reads as sitting on the card, not pasted over the art.",
          "Follow is the one primary action and flips to a secondary Following once pressed; Share is an icon-only ghost Button beside it.",
          "Counts pair a label-tier number with muted body text, so the numbers scan as a row."
        ],
        "a11y": [
          "The Share button carries aria-label; Follow's visible text changes with its state.",
          "The banner is decorative (aria-hidden); the Avatar's alt is the person's name."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Avatar, Button, Card, CardContent, CardDescription, CardTitle, cn, GradientArt, Icon } from \"@sableui/react\"",
        "code": "const profile = {\n\tname: \"Juno Avery\",\n\tinitials: \"JA\",\n\thandle: \"@juno · Sound and light\",\n\tbio: \"Field recordings, slowed down. New track every full moon.\",\n\tstats: [\n\t\t{ value: \"128\", label: \"posts\" },\n\t\t{ value: \"4.2k\", label: \"followers\" },\n\t],\n}\n\n\nexport interface ProfileCardBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the new follow state. */\n\tonFollowChange?: (following: boolean) => void\n\tonShare?: () => void\n}\n\nexport function ProfileCardBlock({ className, framed = true, onFollowChange, onShare }: ProfileCardBlockProps) {\n\tconst [following, setFollowing] = useState(false)\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs overflow-hidden\", className)}>\n\t\t\t{/* Placeholder banner painted from the theme, so it follows every look. Replace with the person's cover image. */}\n\t\t\t<GradientArt aria-hidden seed={profile.handle} className=\"h-20\" />\n\t\t\t{/* pt-0: the avatar rises into the banner above, so the content\n\t\t\t    starts at the banner's edge rather than a full pad below it. */}\n\t\t\t<CardContent className=\"flex flex-col gap-3 pt-0\">\n\t\t\t\t<div className=\"flex items-start justify-between\">\n\t\t\t\t\t<Avatar variant=\"art\" size=\"lg\" fallback={profile.initials} alt={profile.name} cutout className=\"-mt-6\" />\n\t\t\t\t\t<div className=\"flex gap-1.5 pt-3\">\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Share profile\" onClick={onShare}>\n\t\t\t\t\t\t\t<Icon name=\"share\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tvariant={following ? \"secondary\" : \"primary\"}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetFollowing(!following)\n\t\t\t\t\t\t\t\tonFollowChange?.(!following)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{following ? \"Following\" : \"Follow\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t<CardTitle render={<h2 />}>{profile.name}</CardTitle>\n\t\t\t\t\t<CardDescription>{profile.handle}</CardDescription>\n\t\t\t\t</div>\n\t\t\t\t<p className=\"text-body-sm\">{profile.bio}</p>\n\t\t\t\t<div className=\"flex gap-4 text-body-sm\">\n\t\t\t\t\t{profile.stats.map((s) => (\n\t\t\t\t\t\t<span key={s.label}>\n\t\t\t\t\t\t\t<span className=\"text-label-lg\">{s.value}</span> <span className=\"text-muted-foreground\">{s.label}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ProfileFormBlock",
        "path": "blocks/profile-form-block.tsx",
        "summary": "A profile settings card: avatar with upload/remove, name and handle side by side, a bio, a timezone Select, and one Save profile in the footer.",
        "intent": "Reach for this for the profile or account section of settings, or any form of drafted text that is committed together. Toggles that apply instantly belong in NotificationSettingsBlock, never behind this Save.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "42rem"
        },
        "notes": [
          "Copied from the SettingsPage page shell's Profile section; the shell keeps its own copy so it stays one self-contained file.",
          "One explicit save for the whole card. Short pairs (name + handle) sit side by side from sm up with Grid cols={{ base: 1, sm: 2 }}.",
          "The CardTitle renders an h2, so the section joins the page outline under its h1."
        ],
        "a11y": [
          "Field wires label, description and error to each control; the handle's URL preview is its description.",
          "The photo actions are type=\"button\", so neither one submits the form."
        ],
        "imports": "\"use client\"\n\nimport { Avatar, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, Field, Form, Grid, Input, Row, Select, SelectContent, SelectItem, SelectTrigger, Stack, Textarea } from \"@sableui/react\"",
        "code": "const profile = {\n\tname: \"Ada Lovelace\",\n\tinitials: \"AL\",\n\thandle: \"ada\",\n\tbio: \"Product designer working on tools for small teams. Writing about process every month.\",\n\ttimezone: \"europe-london\",\n}\n\nconst timezones = [\n\t{ value: \"europe-london\", label: \"London (GMT+1)\" },\n\t{ value: \"europe-paris\", label: \"Paris (GMT+2)\" },\n\t{ value: \"america-new-york\", label: \"New York (GMT−4)\" },\n\t{ value: \"america-los-angeles\", label: \"Los Angeles (GMT−7)\" },\n\t{ value: \"asia-tokyo\", label: \"Tokyo (GMT+9)\" },\n]\n\nexport interface ProfileFormBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the form's fields on Save profile. */\n\tonSave?: (profile: { displayName: string; handle: string; bio: string; timezone: string }) => void\n}\n\nexport function ProfileFormBlock({ className, framed = true, onSave }: ProfileFormBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-2xl\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Profile</CardTitle>\n\t\t\t\t<CardDescription>How your team sees you.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t{/* The one explicit save: profile text is drafted, then committed. */}\n\t\t\t<Form\n\t\t\t\tclassName=\"gap-0\"\n\t\t\t\tonSubmit={(event) => {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tconst fields = new FormData(event.currentTarget)\n\t\t\t\t\tconst read = (name: string) => String(fields.get(name) ?? \"\")\n\t\t\t\t\tonSave?.({ displayName: read(\"displayName\"), handle: read(\"handle\"), bio: read(\"bio\"), timezone: read(\"timezone\") })\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t<Row gap={2}>\n\t\t\t\t\t\t\t<Avatar variant=\"art\" size=\"lg\" fallback={profile.initials} alt={profile.name} />\n\t\t\t\t\t\t\t<Stack gap={0.5} align=\"start\">\n\t\t\t\t\t\t\t\t<Row gap={1}>\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" variant=\"outline\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\tUpload photo\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" variant=\"ghost\" size=\"sm\">\n\t\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t<p className=\"text-caption text-muted-foreground\">Square PNG or JPG, at least 400 px.</p>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t<Grid cols={{ base: 1, sm: 2 }} gap={3}>\n\t\t\t\t\t\t\t<Field label=\"Display name\" name=\"displayName\" required>\n\t\t\t\t\t\t\t\t<Input defaultValue={profile.name} autoComplete=\"name\" />\n\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t<Field label=\"Handle\" name=\"handle\" description={`atelier.com/@${profile.handle}`} required>\n\t\t\t\t\t\t\t\t<Input defaultValue={profile.handle} autoComplete=\"username\" spellCheck={false} />\n\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t<Field label=\"Bio\" name=\"bio\" description=\"Shown on your profile and in comments.\">\n\t\t\t\t\t\t\t<Textarea rows={3} defaultValue={profile.bio} />\n\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t<Grid cols={{ base: 1, sm: 2 }} gap={3}>\n\t\t\t\t\t\t\t<Field label=\"Timezone\" name=\"timezone\" description=\"Release times use this zone.\">\n\t\t\t\t\t\t\t\t<Select defaultValue={profile.timezone} items={timezones}>\n\t\t\t\t\t\t\t\t\t<SelectTrigger />\n\t\t\t\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t\t\t\t{timezones.map((zone) => (\n\t\t\t\t\t\t\t\t\t\t\t<SelectItem key={zone.value} value={zone.value}>\n\t\t\t\t\t\t\t\t\t\t\t\t{zone.label}\n\t\t\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t\t\t\t</Select>\n\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t</Grid>\n\t\t\t\t\t</Stack>\n\t\t\t\t</CardContent>\n\t\t\t\t<CardFooter actions className=\"justify-end\">\n\t\t\t\t\t<Button type=\"submit\">Save profile</Button>\n\t\t\t\t</CardFooter>\n\t\t\t</Form>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ProjectCollectionBlock",
        "path": "blocks/project-collection-block.tsx",
        "summary": "A compact collection of three project summaries that expands into a readable list, with pointer depth while it is closed.",
        "intent": "A browsable small collection of related work. Replace the sample projects after copying; use a grid or table for a large workspace.",
        "family": "Media & files",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "CardStack owns overlap, hidden-card inertness and explicit expansion. Tilt gives the closed stack a little depth under a mouse; opened, the cards sit flat and still, a list to read. Static on touch and under subtle/off motion.",
          "Each project is a Card: a CardHeader with title, description and a count Badge in CardAction, and a footer of collaborators and when it last changed. Cards keep their keys and content while the collection opens; nothing auto-advances."
        ],
        "a11y": [
          "Press the front card to expand or collapse the collection. Base UI owns Enter/Space activation, and the same trigger retains focus in both states.",
          "All projects become readable in normal flow when expanded. Tilt adds no tab stops or essential content."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Avatar, AvatarGroup, Badge, Card, CardAction, CardDescription, CardFooter, CardHeader, CardStack, CardTitle, cn, Tilt } from \"@sableui/react\"",
        "code": "const collection = { label: \"Projects\", expand: \"Show 3 projects\", collapse: \"Collapse projects\" }\n\nconst projects = [\n\t{ title: \"Project research\", count: \"12 docs\", description: \"Interviews, notes, and the questions to answer next.\", people: [\"MO\", \"SR\", \"JL\"], updated: \"Updated today\" },\n\t{ title: \"Interface studies\", count: \"8 studies\", description: \"Layouts and interaction states for the next review.\", people: [\"SR\", \"JL\"], updated: \"Updated Tue\" },\n\t{ title: \"Final designs\", count: \"6 screens\", description: \"The selected direction, ready to discuss with the team.\", people: [\"MO\", \"JL\"], updated: \"Updated last week\" },\n]\n\nexport interface ProjectCollectionBlockProps {\n\tclassName?: string\n\t/** false drops each card's surface and border — for a muted section that already frames them. */\n\tframed?: boolean\n}\n\nexport function ProjectCollectionBlock({ className, framed = true }: ProjectCollectionBlockProps) {\n\tconst [open, setOpen] = useState(false)\n\treturn (\n\t\t// The front card is the expand control, so the cards hold no controls of their own.\n\t\t<CardStack\n\t\t\tlabel={collection.label}\n\t\t\ttrigger=\"stack\"\n\t\t\texpanded={open}\n\t\t\tonExpandedChange={setOpen}\n\t\t\texpandLabel={collection.expand}\n\t\t\tcollapseLabel={collection.collapse}\n\t\t\tclassName={cn(\"w-full max-w-xs\", className)}\n\t\t>\n\t\t\t{projects.map((project) => (\n\t\t\t\t// Depth invites a press on the closed stack. Opened, the cards are a list\n\t\t\t\t// to read: no lean, and the front card eases flat as the stack opens.\n\t\t\t\t<Tilt key={project.title} maxAngle={open ? 0 : 3} className=\"h-full\">\n\t\t\t\t\t{/* Full height, so cards behind a taller front card still show their edge. */}\n\t\t\t\t\t<Card variant={framed ? \"default\" : \"flat\"} className=\"h-full\">\n\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t<CardTitle render={<h2 />}>{project.title}</CardTitle>\n\t\t\t\t\t\t\t<CardDescription>{project.description}</CardDescription>\n\t\t\t\t\t\t\t<CardAction>\n\t\t\t\t\t\t\t\t<Badge size=\"sm\">{project.count}</Badge>\n\t\t\t\t\t\t\t</CardAction>\n\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t<CardFooter className=\"justify-between gap-3\">\n\t\t\t\t\t\t\t<AvatarGroup aria-label={`${project.people.length} collaborators`} size=\"sm\" surface={framed ? \"card\" : undefined}>\n\t\t\t\t\t\t\t\t{project.people.map((initials) => (\n\t\t\t\t\t\t\t\t\t<Avatar variant=\"art\" key={initials} fallback={initials} alt={initials} />\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</AvatarGroup>\n\t\t\t\t\t\t\t<span className=\"text-caption text-muted-foreground\">{project.updated}</span>\n\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t</Card>\n\t\t\t\t</Tilt>\n\t\t\t))}\n\t\t</CardStack>\n\t)\n}"
      },
      {
        "name": "RecentOrdersBlock",
        "path": "blocks/recent-orders-block.tsx",
        "summary": "A data-table card for a dashboard: a flush DataTable of recent orders with sortable columns, status Badges and clickable rows, a status Select in the header, and a count with View all orders below.",
        "intent": "Reach for this as the table tile on a dashboard: the latest few records, filtered and sorted in place, each opening its detail. A full history with paging and export is DataTable on its own page; a fixed billing history with downloads is InvoiceHistoryBlock.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "48rem"
        },
        "notes": [
          "The table runs edge to edge (CardContent flush) and its outer columns still line up with the header; on a narrow screen it scrolls sideways inside the card.",
          "The filter is a Select in CardAction: one choice that changes the rows, where a row of Pills would crowd the header.",
          "Sorting is DataTable's own (Customer, Placed, Total), newest first on arrival.",
          "Placed is a RelativeTime, and the sample orders are timed from the page load.",
          "A filter with no matches shows DataTable's empty row, not an empty card."
        ],
        "a11y": [
          "Status is text in a Badge; the dot only reinforces it.",
          "Rows open from the keyboard as well as by click (DataTable's row click), and sortable headers announce their direction.",
          "The filter Select is named \"Filter by status\"."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, DataTable, RelativeTime, Select, SelectContent, SelectItem, SelectTrigger } from \"@sableui/react\"",
        "code": "// Placed relative to the page load — replace with your own rows.\nconst HOUR = 3_600_000\nconst orders = [\n\t{ id: \"1048\", customer: \"Mara Okafor\", placedAt: Date.now() - 2 * HOUR, status: \"paid\", total: 128 },\n\t{ id: \"1047\", customer: \"Sam Rivera\", placedAt: Date.now() - 5 * HOUR, status: \"pending\", total: 64 },\n\t{ id: \"1046\", customer: \"Jun Park\", placedAt: Date.now() - 26 * HOUR, status: \"paid\", total: 212.5 },\n\t{ id: \"1045\", customer: \"Lena Fischer\", placedAt: Date.now() - 30 * HOUR, status: \"refunded\", total: 48 },\n\t{ id: \"1044\", customer: \"Tala Begay\", placedAt: Date.now() - 52 * HOUR, status: \"paid\", total: 96 },\n\t{ id: \"1043\", customer: \"Kofi Mensah\", placedAt: Date.now() - 75 * HOUR, status: \"pending\", total: 18 },\n]\n\nconst statuses = [\n\t{ value: \"all\", label: \"All statuses\" },\n\t{ value: \"paid\", label: \"Paid\" },\n\t{ value: \"pending\", label: \"Pending\" },\n\t{ value: \"refunded\", label: \"Refunded\" },\n]\nconst tone = { paid: \"success\", pending: \"warning\", refunded: \"neutral\" } as const\nconst label = { paid: \"Paid\", pending: \"Pending\", refunded: \"Refunded\" } as const\n\nconst money = new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: \"USD\" })\n\ntype Status = keyof typeof tone\n\nexport interface RecentOrdersBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a dashboard section that already frames it. */\n\tframed?: boolean\n\t/** Called with the order's id when its row is opened. */\n\tonOpen?: (orderId: string) => void\n\t/** Called when the person asks for every order. */\n\tonViewAll?: () => void\n}\n\nexport function RecentOrdersBlock({ className, framed = true, onOpen, onViewAll }: RecentOrdersBlockProps) {\n\tconst [status, setStatus] = useState(\"all\")\n\tconst shown = orders.filter((order) => status === \"all\" || order.status === status)\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"@container/orders w-full max-w-3xl\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Recent orders</CardTitle>\n\t\t\t\t<CardDescription>The last three days.</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<Select items={statuses} value={status} onValueChange={(next: unknown) => setStatus(String(next))}>\n\t\t\t\t\t\t<SelectTrigger size=\"sm\" aria-label=\"Filter by status\" />\n\t\t\t\t\t\t<SelectContent align=\"end\">\n\t\t\t\t\t\t\t{statuses.map((item) => (\n\t\t\t\t\t\t\t\t<SelectItem key={item.value} value={item.value}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t{/* Edge to edge: the table's outer columns line up with the header's padding.\n\t\t\t    A narrow card (a phone, a dashboard's side column) drops the order\n\t\t\t    number and then the date by its own width, so the customer, the\n\t\t\t    status and the total are never the columns scrolled out of sight. */}\n\t\t\t<CardContent flush className=\"overflow-x-auto scrollbar-quiet\">\n\t\t\t\t<DataTable\n\t\t\t\t\tdata={shown}\n\t\t\t\t\trowKey={(order) => order.id}\n\t\t\t\t\tonRowClick={(order) => onOpen?.(order.id)}\n\t\t\t\t\tdefaultSort={{ key: \"placed\", direction: \"desc\" }}\n\t\t\t\t\tempty=\"No orders with this status.\"\n\t\t\t\t\tcolumns={[\n\t\t\t\t\t\t// First, and never hidden: the table insets its first column to the card's padding.\n\t\t\t\t\t\t{ key: \"customer\", header: \"Customer\", sortable: true },\n\t\t\t\t\t\t{ key: \"id\", header: \"Order\", className: \"hidden @md/orders:table-cell\", cell: (order) => <span className=\"text-mono-md\">#{order.id}</span> },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: \"placed\",\n\t\t\t\t\t\t\theader: \"Placed\",\n\t\t\t\t\t\t\tsortable: true,\n\t\t\t\t\t\t\tclassName: \"hidden @lg/orders:table-cell\",\n\t\t\t\t\t\t\tsortValue: (order) => order.placedAt,\n\t\t\t\t\t\t\tcell: (order) => (\n\t\t\t\t\t\t\t\t<span className=\"whitespace-nowrap text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t<RelativeTime date={order.placedAt} />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: \"status\",\n\t\t\t\t\t\t\theader: \"Status\",\n\t\t\t\t\t\t\tcell: (order) => (\n\t\t\t\t\t\t\t\t<Badge appearance=\"plain\" tone={tone[order.status as Status]} dot>\n\t\t\t\t\t\t\t\t\t{label[order.status as Status]}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ key: \"total\", header: \"Total\", align: \"end\", sortable: true, sortValue: (order) => order.total, cell: (order) => <span className=\"text-mono-md\">{money.format(order.total)}</span> },\n\t\t\t\t\t]}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"justify-between gap-3\">\n\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">\n\t\t\t\t\t{shown.length === 1 ? \"1 order\" : `${shown.length} orders`}\n\t\t\t\t</span>\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"end\" onClick={onViewAll}>\n\t\t\t\t\tView all orders\n\t\t\t\t</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ReserveTableBlock",
        "path": "blocks/reserve-table-block.tsx",
        "summary": "A booking card: a bare Calendar for the day, a NumberField for the party size, a Reserve button that names the day picked, then a confirmation that replaces the picker with a DateTile, the party size and a ConfirmButton to cancel.",
        "intent": "Reach for this to book one slot on one day — a table, a class, a viewing, a pickup. Picking a range of nights is a Calendar in range mode; a date inside a longer form is DatePicker.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The Calendar is `bare`: the card is already the surface, and a framed calendar inside it would read as a card in a card.",
          "The button says what it will do with the choice (\"Reserve for Fri, Nov 13\"), so the day is confirmed before the press, not after.",
          "Days before the first bookable one are disabled rather than hidden, so the month keeps its shape.",
          "Once booked, the picker leaves and the card becomes the confirmation: \"Table booked\" as its title, the day as a DateTile, and the party size. A disabled calendar with a small status line under it buries the one thing the person wants to know.",
          "The card eases to the confirmation's shorter height (`useAutoSize`) rather than snapping.",
          "Cancel is a ConfirmButton, not a dialog: a second press is enough for something this easy to redo. It returns to the picker with the day and party size kept, so it also serves as change."
        ],
        "a11y": [
          "Focus moves to the confirmation's header when the picker leaves, and back to Reserve after a cancel. The header is a role=status region, so \"Table booked\" is announced.",
          "The party size is a labelled NumberField clamped to the venue's range by typing, arrows and steppers alike.",
          "ConfirmButton announces that it is armed and what a second press does."
        ],
        "imports": "\"use client\"\n\nimport { useState, useEffect, useMemo, useRef } from \"react\"\nimport { Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, ConfirmButton, DateTile, Field, Icon, NumberField, TextSwap, useAutoSize, useToday } from \"@sableui/react\"",
        "code": "const venue = { name: \"Osteria Lina\", service: \"Dinner, from 6 pm\", maxParty: 8 }\n\nconst dayLabel = new Intl.DateTimeFormat(\"en-US\", { weekday: \"short\", month: \"short\", day: \"numeric\" })\nconst weekday = new Intl.DateTimeFormat(\"en-US\", { weekday: \"long\" })\n\nexport interface ReserveTableBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the booking when the person reserves. */\n\tonReserve?: (booking: { date: Date; guests: number }) => void\n\t/** Called when the person cancels the booking they just made. */\n\tonCancel?: () => void\n}\n\nexport function ReserveTableBlock({ className, framed = true, onReserve, onCancel }: ReserveTableBlockProps) {\n\t// The first day that can still be booked (today), and the day picked on\n\t// arrival (two days out), so the sample never opens on a day that has\n\t// already gone; use your venue's own availability. useToday, not\n\t// new Date(): the server and the reader may be on different days.\n\tconst opens = useToday()\n\tconst [picked, setDate] = useState<Date | null>(null)\n\tconst date = useMemo(() => picked ?? new Date(opens.getFullYear(), opens.getMonth(), opens.getDate() + 2), [picked, opens])\n\tconst [guests, setGuests] = useState(2)\n\tconst [reserved, setReserved] = useState(false)\n\n\t// Booking swaps the whole card for its confirmation, so focus follows it\n\t// instead of falling back to the top of the page.\n\tconst action = useRef<HTMLButtonElement>(null)\n\tconst outcome = useRef<HTMLDivElement>(null)\n\tconst was = useRef(reserved)\n\tuseEffect(() => {\n\t\tif (was.current !== reserved) (reserved ? outcome : action).current?.focus()\n\t\twas.current = reserved\n\t}, [reserved])\n\n\t// The confirmation is much shorter than the picker: the card eases to it.\n\tconst size = useAutoSize<HTMLDivElement, HTMLDivElement>({ axis: \"height\" })\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<div ref={size.outerRef} className=\"motion-size\">\n\t\t\t\t<div ref={size.innerRef}>\n\t\t\t\t\t{reserved ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{/* The picker has done its job, so it leaves. What is left is the\n\t\t\t\t\t\t\t    answer: that it worked, and what was booked. */}\n\t\t\t\t\t\t\t<CardHeader ref={outcome} tabIndex={-1} role=\"status\" className=\"outline-none\">\n\t\t\t\t\t\t\t\t<CardTitle render={<h2 />} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t<Icon name=\"circle-check\" variant=\"solid\" className=\"text-success\" />\n\t\t\t\t\t\t\t\t\t<span>Table booked</span>\n\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t<CardDescription>{venue.name}</CardDescription>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardContent className=\"flex items-center gap-4\">\n\t\t\t\t\t\t\t\t<DateTile date={date} />\n\t\t\t\t\t\t\t\t<div className=\"flex min-w-0 flex-col\">\n\t\t\t\t\t\t\t\t\t<span className=\"text-title-lg\">Table for {guests}</span>\n\t\t\t\t\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t{weekday.format(date)} · {venue.service}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t<CardFooter actions>\n\t\t\t\t\t\t\t\t{/* Two presses, not a dialog: cancelling is easy to undo by booking\n\t\t\t\t\t\t\t\t    again, and it returns to the picker with the choices kept. */}\n\t\t\t\t\t\t\t\t<ConfirmButton\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tconfirmLabel=\"Cancel this booking?\"\n\t\t\t\t\t\t\t\t\tonConfirm={() => {\n\t\t\t\t\t\t\t\t\t\tsetReserved(false)\n\t\t\t\t\t\t\t\t\t\tonCancel?.()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tCancel booking\n\t\t\t\t\t\t\t\t</ConfirmButton>\n\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t<CardTitle render={<h2 />}>{venue.name}</CardTitle>\n\t\t\t\t\t\t\t\t<CardDescription>{venue.service}</CardDescription>\n\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t\t\t{/* Bare: the card is already the surface, so the calendar brings no frame of its own. */}\n\t\t\t\t\t\t\t\t<Calendar\n\t\t\t\t\t\t\t\t\tbare\n\t\t\t\t\t\t\t\t\tmode=\"single\"\n\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\tselected={date}\n\t\t\t\t\t\t\t\t\tonSelect={(next: Date | undefined) => next && setDate(next)}\n\t\t\t\t\t\t\t\t\tdefaultMonth={date}\n\t\t\t\t\t\t\t\t\tdisabled={{ before: opens }}\n\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Field label=\"Guests\">\n\t\t\t\t\t\t\t\t\t<NumberField\n\t\t\t\t\t\t\t\t\t\tmin={1}\n\t\t\t\t\t\t\t\t\t\tmax={venue.maxParty}\n\t\t\t\t\t\t\t\t\t\tvalue={guests}\n\t\t\t\t\t\t\t\t\t\tonValueChange={(next: number | null) => setGuests(next ?? 1)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t<CardFooter actions>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tref={action}\n\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tsetReserved(true)\n\t\t\t\t\t\t\t\t\t\tonReserve?.({ date, guests })\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{/* One span, so the words keep a word space between them, not the button's icon gap. */}\n\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\tReserve for <TextSwap text={dayLabel.format(date)} />\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "RevenueBreakdownBlock",
        "path": "blocks/revenue-breakdown-block.tsx",
        "summary": "A stat card with a breakdown: the KPI in the metric mono tier, its trend Badge, a SegmentedBar of how the total divides, and a StatusDot legend.",
        "intent": "Reach for this when a headline number is worth splitting into a few categories — revenue by product, storage by type, tickets by priority. A plain KPI with no split is a smaller stat card (see DashboardPage's stat row).",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The value is `text-mono-xl` — tabular figures, never a heading tier — and the label above it is CardDescription.",
          "The legend reflows from two columns to one by measuring in em, so larger type or a narrower card never truncates a label.",
          "Each category keeps the same tone in the bar and its legend dot; reuse those tones wherever the category appears."
        ],
        "a11y": [
          "The SegmentedBar is one image whose name reads every share; the legend repeats it visually and is aria-hidden so it is not announced twice.",
          "The trend Badge states the change as text (+8.2%), not by colour."
        ],
        "imports": "import { Badge, Card, CardAction, CardContent, CardDescription, CardHeader, cn, Grid, SegmentedBar, StatusDot } from \"@sableui/react\"",
        "code": "const revenue = { label: \"Revenue this month\", total: \"$12,480\", change: \"+8.2%\" }\n\nconst segments = [\n\t{ label: \"Direct\", value: 42, tone: \"1\" },\n\t{ label: \"Partners\", value: 27, tone: \"2\" },\n\t{ label: \"Referrals\", value: 19, tone: \"3\" },\n\t{ label: \"Resellers\", value: 12, tone: \"info\" },\n] as const\n\nexport interface RevenueBreakdownBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n}\n\nexport function RevenueBreakdownBlock({ className, framed = true }: RevenueBreakdownBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardDescription>{revenue.label}</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<Badge tone=\"success\" size=\"sm\">\n\t\t\t\t\t\t{revenue.change}\n\t\t\t\t\t</Badge>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4 pt-2\">\n\t\t\t\t<span className=\"text-mono-xl\">{revenue.total}</span>\n\t\t\t\t<SegmentedBar label=\"Revenue by channel\" segments={[...segments]} size=\"lg\" />\n\t\t\t\t{/* Two columns while each entry fits whole, one when they would not:\n\t\t\t\t    sized in em, so a larger type or a narrower card drops to one.\n\t\t\t\t    aria-hidden: the bar already reads every share aloud. */}\n\t\t\t\t<Grid aria-hidden minItemWidth=\"9.5em\" gap=\"calc(var(--spacing) * 1.5) calc(var(--spacing) * 4)\">\n\t\t\t\t\t{segments.map((s) => (\n\t\t\t\t\t\t<div key={s.label} className=\"flex items-center gap-2 text-body-sm\">\n\t\t\t\t\t\t\t<StatusDot tone={s.tone} />\n\t\t\t\t\t\t\t<span className=\"flex-1 text-muted-foreground\">{s.label}</span>\n\t\t\t\t\t\t\t<span className=\"text-mono-caption\">{s.value}%</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</Grid>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ScheduleBlock",
        "path": "blocks/schedule-block.tsx",
        "summary": "A three-day agenda: the day as the card title, its events down a column of start times, each a block in its calendar's colour with the people in it, and a card height that eases between days, driven by Tabs.",
        "intent": "A compact day planner where selecting a day changes the amount of content in place. Edit the sample days after copying.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Tabs owns selection and keyboard navigation; useAutoSize measures the current panel's actual layout height.",
          "TextSwap reflects the selected day. No automatic rotation or timers.",
          "An event's colour is a palette family on data-palette: the block, its text and the avatars' ring read the slots, so no step is named and it follows the theme in both modes.",
          "The days are dated from the page load, today first."
        ],
        "a11y": [
          "The tablist has a name and each panel follows its tab.",
          "The current day and event details remain present when motion is subtle or off."
        ],
        "imports": "\"use client\"\n\nimport { useState, useMemo } from \"react\"\nimport { Avatar, AvatarGroup, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Tabs, TabsList, TabsPanel, TabsTrigger, TextSwap, useAutoSize, useToday } from \"@sableui/react\"",
        "code": "// `tone` is a palette family: the calendar an event belongs to. `people` are initials.\nconst agenda = [\n\t[\n\t\t{ name: \"Studio standup\", start: \"9:00\", length: \"15 min\", tone: \"teal\", people: [\"AC\", \"KM\", \"AH\"] },\n\t\t{ name: \"Design review\", start: \"11:00\", length: \"1 hr\", tone: \"purple\", people: [\"AC\", \"JP\"] },\n\t\t{ name: \"Focus time\", start: \"14:00\", length: \"2 hr\", tone: \"neutral\", people: [] },\n\t],\n\t[{ name: \"Project planning\", start: \"10:00\", length: \"1 hr\", tone: \"blue\", people: [\"KM\", \"AH\", \"JP\", \"TB\"] }],\n\t[\n\t\t{ name: \"Client review\", start: \"9:30\", length: \"1 hr\", tone: \"pink\", people: [\"AC\", \"SR\"] },\n\t\t{ name: \"Research\", start: \"13:00\", length: \"2 hr\", tone: \"teal\", people: [\"AH\"] },\n\t],\n] as const\n\n// Dated from today, today first — replace with your own days.\nconst weekday = new Intl.DateTimeFormat(\"en-US\", { weekday: \"long\" })\nconst shortWeekday = new Intl.DateTimeFormat(\"en-US\", { weekday: \"short\" })\nconst monthDay = new Intl.DateTimeFormat(\"en-US\", { month: \"long\", day: \"numeric\" })\nconst datedFrom = (today: Date) =>\n\tagenda.map((events, offset) => {\n\t\tconst date = new Date(today.getFullYear(), today.getMonth(), today.getDate() + offset)\n\t\treturn {\n\t\t\tid: String(offset),\n\t\t\tlabel: `${shortWeekday.format(date)} ${date.getDate()}`,\n\t\t\ttitle: weekday.format(date),\n\t\t\tdate: monthDay.format(date),\n\t\t\tevents,\n\t\t}\n\t})\n\nexport interface ScheduleBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or muted section that already frames it. */\n\tframed?: boolean\n}\n\nexport function ScheduleBlock({ className, framed = true }: ScheduleBlockProps) {\n\t// useToday, not new Date(): the server and the reader may be on different days.\n\tconst today = useToday()\n\tconst days = useMemo(() => datedFrom(today), [today])\n\tconst [day, setDay] = useState(\"0\")\n\tconst selected = days.find((item) => item.id === day) ?? days[0]\n\t// Days hold different numbers of events: the card eases to the new height.\n\tconst size = useAutoSize<HTMLDivElement, HTMLDivElement>({ axis: \"height\" })\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>\n\t\t\t\t\t<TextSwap text={selected.title} />\n\t\t\t\t</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\t{selected.date} · {selected.events.length === 1 ? \"1 event\" : `${selected.events.length} events`}\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<Tabs value={day} onValueChange={(value) => setDay(String(value))}>\n\t\t\t\t\t{/* Equal segments across the card, as PricingCard's period toggle: the\n\t\t\t\t\t    row's edges are the content edges whichever day is selected. Left\n\t\t\t\t\t    to their own width, an unselected first pill's label sits one\n\t\t\t\t\t    pill-padding inside the title above it. */}\n\t\t\t\t\t<TabsList variant=\"pill\" aria-label=\"Day\" className=\"flex w-full\">\n\t\t\t\t\t\t{days.map((item) => (\n\t\t\t\t\t\t\t<TabsTrigger key={item.id} value={item.id} className=\"flex-1 justify-center\">\n\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TabsList>\n\t\t\t\t\t<div ref={size.outerRef} className=\"motion-size\">\n\t\t\t\t\t\t<div ref={size.innerRef}>\n\t\t\t\t\t\t\t{days.map((item) => (\n\t\t\t\t\t\t\t\t<TabsPanel key={item.id} value={item.id}>\n\t\t\t\t\t\t\t\t\t{/* A day reads down its times: the start in a column of its\n\t\t\t\t\t\t\t\t\t    own, the event beside it as a block in its calendar's\n\t\t\t\t\t\t\t\t\t    colour. The block paints from the palette slots its\n\t\t\t\t\t\t\t\t\t    data-palette fills, so no colour step is named here. */}\n\t\t\t\t\t\t\t\t\t<ol className=\"flex flex-col gap-2 pt-4\">\n\t\t\t\t\t\t\t\t\t\t{item.events.map((event) => (\n\t\t\t\t\t\t\t\t\t\t\t<li key={event.name} className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t<time className=\"w-10 shrink-0 text-end text-mono-caption text-muted-foreground tabular-nums\">{event.start}</time>\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tdata-palette={event.tone}\n\t\t\t\t\t\t\t\t\t\t\t\t\t// The avatars' separating ring takes the block's fill, not the card's.\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex min-w-0 flex-1 items-center gap-2 rounded-(--card-inner-radius) bg-palette-wash px-3 py-2 text-palette-text [--avatar-group-ring:var(--palette-wash)]\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex min-w-0 flex-1 flex-col\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"truncate text-title-sm\">{event.name}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-body-sm\">{event.length}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{event.people.length ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<AvatarGroup\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax={2}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-label={event.people.length === 1 ? \"1 person\" : `${event.people.length} people`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{event.people.map((person) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Avatar key={person} variant=\"art\" fallback={person} alt=\"\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</AvatarGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t\t</TabsPanel>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Tabs>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "SearchBlock",
        "path": "blocks/search-block.tsx",
        "summary": "Search with its three answers: a SearchInput and Pill filters over a list that shows Skeleton rows while it works, Entity results with the match highlighted, or an EmptyState with a way out.",
        "intent": "Reach for this as a search panel that stays on the page — a sidebar, a popover, the top of a list. Search that opens over the app from a shortcut and runs commands is CommandPaletteBlock; filtering rows already on screen needs only SearchInput.",
        "family": "Navigation",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The list area has one height for results, loading and empty, so the card never jumps while someone types.",
          "With nothing typed it shows recent items instead of an empty box.",
          "Loading is Skeleton rows in the shape of a result, plus a Spinner in the status line that later carries the count.",
          "The typed text is painted in each title with useMatchHighlight: no <mark> elements, and the accessible name is unchanged.",
          "The empty state names what was searched and offers one action that clears both the text and the filter. It is named apart from the field's own clear button.",
          "The timer stands in for a request. Each change restarts it, which is the debounce."
        ],
        "a11y": [
          "The field has an accessible name, and the Pills are toggle buttons with aria-pressed.",
          "The status line is a live region: it announces searching, then the number of results.",
          "Each result is one button covering its row. The skeleton rows are hidden from assistive technology."
        ],
        "imports": "\"use client\"\n\nimport { useState, useEffect } from \"react\"\nimport { Avatar, Button, Card, CardHeader, CardList, CardListLabel, cn, EmptyState, Entity, IconTile, Pill, SearchInput, Skeleton, Spinner, useMatchHighlight } from \"@sableui/react\"",
        "code": "const kinds = [\n\t{ id: \"all\", label: \"All\" },\n\t{ id: \"doc\", label: \"Docs\" },\n\t{ id: \"person\", label: \"People\" },\n\t{ id: \"file\", label: \"Files\" },\n]\n\n// Most recent first: with nothing typed, the top of this list is what shows.\nconst index = [\n\t{ id: \"roadmap\", kind: \"doc\", title: \"Q4 roadmap\", detail: \"Edited 2 hours ago\" },\n\t{ id: \"ana\", kind: \"person\", title: \"Ana Chen\", detail: \"Design lead\" },\n\t{ id: \"launch\", kind: \"doc\", title: \"Launch checklist\", detail: \"Edited yesterday\" },\n\t{ id: \"brand\", kind: \"file\", title: \"Brand guidelines.pdf\", detail: \"4.2 MB\" },\n\t{ id: \"pricing\", kind: \"doc\", title: \"Pricing research\", detail: \"Edited last week\" },\n\t{ id: \"kofi\", kind: \"person\", title: \"Kofi Mensah\", detail: \"Engineering\" },\n\t{ id: \"roadmap-deck\", kind: \"file\", title: \"Roadmap review.key\", detail: \"18 MB\" },\n\t{ id: \"amira\", kind: \"person\", title: \"Amira Haddad\", detail: \"Research\" },\n]\n\n// How many rows the list has room for. Loading and empty states fill the same space.\nconst rows = 4\n\nconst initials = (name: string) =>\n\tname\n\t\t.split(\" \")\n\t\t.map((part) => part[0])\n\t\t.join(\"\")\n\nexport interface SearchBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Popover or Sheet that already frames it. */\n\tframed?: boolean\n\t/** Called with the result's id when one is opened. */\n\tonOpen?: (id: string) => void\n}\n\nexport function SearchBlock({ className, framed = true, onOpen }: SearchBlockProps) {\n\tconst [query, setQuery] = useState(\"\")\n\tconst [kind, setKind] = useState(\"all\")\n\t// What the list is showing. It trails what was asked for while a search runs.\n\tconst [shown, setShown] = useState({ query, kind })\n\tconst searching = shown.query !== query || shown.kind !== kind\n\n\t// Stands in for the request. Each keystroke restarts it, which is the debounce.\n\tuseEffect(() => {\n\t\tif (shown.query === query && shown.kind === kind) return\n\t\tconst timer = setTimeout(() => setShown({ query, kind }), 450)\n\t\treturn () => clearTimeout(timer)\n\t}, [query, kind, shown])\n\n\tconst term = shown.query.trim().toLowerCase()\n\tconst results = index\n\t\t.filter((item) => (shown.kind === \"all\" || item.kind === shown.kind) && item.title.toLowerCase().includes(term))\n\t\t.slice(0, rows)\n\tconst list = useMatchHighlight<HTMLDivElement>(shown.query, { selector: \"[data-title]\" })\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader className=\"gap-3\">\n\t\t\t\t<SearchInput value={query} onValueChange={setQuery} placeholder=\"Search the workspace\" aria-label=\"Search the workspace\" />\n\t\t\t\t<div className=\"flex gap-1\">\n\t\t\t\t\t{kinds.map((item) => (\n\t\t\t\t\t\t<Pill key={item.id} selected={item.id === kind} onClick={() => setKind(item.id)}>\n\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t</Pill>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</CardHeader>\n\t\t\t{/* The list's own label, close above the rows it names: what the list is\n\t\t\t    showing, working, or how much it found. The spinner is decoration:\n\t\t\t    the word beside it is what is announced, once. */}\n\t\t\t<CardListLabel role=\"status\" className=\"mt-[calc(var(--card-p)/2)]\">\n\t\t\t\t{searching ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Spinner size=\"sm\" aria-hidden />\n\t\t\t\t\t\t<span>Searching</span>\n\t\t\t\t\t</>\n\t\t\t\t) : term ? (\n\t\t\t\t\t`${results.length} ${results.length === 1 ? \"result\" : \"results\"}`\n\t\t\t\t) : (\n\t\t\t\t\t\"Recent\"\n\t\t\t\t)}\n\t\t\t</CardListLabel>\n\t\t\t{/* One floor for every state, so the card does not jump as results come\n\t\t\t    and go. The floor is the rows themselves: a hidden list of `rows`\n\t\t\t    rows shares one grid cell with whatever is showing, so a full list\n\t\t\t    ends exactly on the card's edge at any density or type scale. A\n\t\t\t    fixed min-height left a strip under the last row, or let it spill. */}\n\t\t\t<div className=\"grid *:col-start-1 *:row-start-1\">\n\t\t\t\t<CardList divided={false} aria-hidden className={cn(!searching && \"invisible\")}>\n\t\t\t\t\t{Array.from({ length: rows }, (_, row) => (\n\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\tkey={row}\n\t\t\t\t\t\t\tleading={<Skeleton className=\"size-8\" />}\n\t\t\t\t\t\t\t// Each bar and its margins add up to one line of the text it\n\t\t\t\t\t\t\t// stands in for, so a loading row is exactly a result row.\n\t\t\t\t\t\t\ttitle={<Skeleton className=\"my-[0.15lh] h-[0.7lh] w-32\" />}\n\t\t\t\t\t\t\tsubtitle={<Skeleton className=\"my-[0.15lh] h-[0.7lh] w-20\" />}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</CardList>\n\t\t\t\t{searching ? null : results.length ? (\n\t\t\t\t\t<CardList divided={false} ref={list}>\n\t\t\t\t\t\t{results.map((item) => (\n\t\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\tinteractive\n\t\t\t\t\t\t\t\tonSelect={() => onOpen?.(item.id)}\n\t\t\t\t\t\t\t\tleading={\n\t\t\t\t\t\t\t\t\titem.kind === \"person\" ? (\n\t\t\t\t\t\t\t\t\t\t<Avatar size=\"sm\" fallback={initials(item.title)} alt=\"\" />\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<IconTile icon={item.kind === \"doc\" ? \"file\" : \"paperclip\"} size=\"sm\" appearance=\"muted\" />\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttitle={<span data-title>{item.title}</span>}\n\t\t\t\t\t\t\t\tsubtitle={item.detail}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</CardList>\n\t\t\t\t) : (\n\t\t\t\t\t<EmptyState\n\t\t\t\t\t\t// No glyph: with one the state stood taller than four rows, and\n\t\t\t\t\t\t// the card grew each time a search found nothing.\n\t\t\t\t\t\tclassName=\"self-center\"\n\t\t\t\t\t\ttitle={`Nothing for “${shown.query.trim()}”`}\n\t\t\t\t\t\tdescription=\"Check the spelling, or start again.\"\n\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tsetQuery(\"\")\n\t\t\t\t\t\t\t\t\tsetKind(\"all\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tReset search\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "SecurityBlock",
        "path": "blocks/security-block.tsx",
        "summary": "Account security in one card: a Switch for two-factor authentication, passkeys with Manage, and the signed-in devices as Entity rows with RelativeTime and Sign out, plus a two-press Sign out of other devices.",
        "intent": "Reach for this in account settings, beside ProfileFormBlock and NotificationSettingsBlock. Keys for programmatic access are ApiKeysBlock; deleting the account is DangerZoneBlock.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "28rem"
        },
        "notes": [
          "Two-factor is a Switch because it applies the moment it changes, with no Save; its subtitle says what it is set to.",
          "The device rows share one CardList with the protection rows, set off by a quiet group label (\"Signed-in devices\") rather than a second card.",
          "The current device has no Sign out button; a Badge says \"This device\" in its place, so the one session that cannot be ended here is never offered.",
          "Last seen is a RelativeTime, and the sample sessions are timed from the page load.",
          "Sign out of other devices is a ConfirmButton naming how many it will end, and it disables itself when there are none."
        ],
        "a11y": [
          "Each Sign out button is named for its device (\"Sign out of Windows desktop\").",
          "Signing a device out moves focus to the group label, since its row is gone, and a status region mounted from the start says what happened.",
          "The Switch is named \"Two-factor authentication\", the row's title."
        ],
        "imports": "\"use client\"\n\nimport { useState, useRef } from \"react\"\nimport { Badge, Button, Card, CardDescription, CardFooter, CardHeader, CardList, CardListLabel, CardTitle, cn, ConfirmButton, Entity, IconTile, RelativeTime, Switch } from \"@sableui/react\"",
        "code": "const protection = { twoFactor: true, passkeys: 2 }\n\n// Last seen relative to the page load — replace with each session's own timestamp.\nconst HOUR = 3_600_000\nconst sessions = [\n\t{ id: \"s1\", device: \"MacBook Pro\", client: \"Safari\", place: \"Lisbon\", seen: Date.now(), current: true },\n\t{ id: \"s2\", device: \"Windows desktop\", client: \"Edge\", place: \"Porto\", seen: Date.now() - 3 * HOUR, current: false },\n\t{ id: \"s3\", device: \"Linux workstation\", client: \"Firefox\", place: \"Berlin\", seen: Date.now() - 50 * HOUR, current: false },\n]\n\ntype Session = (typeof sessions)[number]\n\nexport interface SecurityBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a settings section that already frames it. */\n\tframed?: boolean\n\t/** Called with the new state the moment two-factor authentication is switched. */\n\tonTwoFactorChange?: (enabled: boolean) => void\n\t/** Called when the person asks to manage their passkeys. */\n\tonManagePasskeys?: () => void\n\t/** Called with the session's id when the person signs it out. */\n\tonSignOut?: (sessionId: string) => void\n\t/** Called when the person signs out every session but this one. */\n\tonSignOutOthers?: () => void\n}\n\nexport function SecurityBlock({ className, framed = true, onTwoFactorChange, onManagePasskeys, onSignOut, onSignOutOthers }: SecurityBlockProps) {\n\tconst [twoFactor, setTwoFactor] = useState(protection.twoFactor)\n\tconst [active, setActive] = useState<Session[]>(sessions)\n\t// What the last sign-out did, for the live region below: the row it was on is gone.\n\tconst [notice, setNotice] = useState(\"\")\n\tconst others = active.filter((session) => !session.current)\n\t// The row a sign-out button was on leaves with it, so focus goes to the\n\t// group's label rather than falling back to the top of the page.\n\tconst group = useRef<HTMLDivElement>(null)\n\n\tconst signOut = (session: Session) => {\n\t\tgroup.current?.focus()\n\t\tsetActive((current) => current.filter((item) => item.id !== session.id))\n\t\tsetNotice(`Signed out of ${session.device}`)\n\t\tonSignOut?.(session.id)\n\t}\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-md\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Security</CardTitle>\n\t\t\t\t<CardDescription>How you sign in, and where you are signed in.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t{/* Two short groups, set apart by space: no rules. */}\n\t\t\t<CardList divided={false}>\n\t\t\t\t<Entity\n\t\t\t\t\tleading={<IconTile icon=\"lock\" size=\"sm\" appearance=\"muted\" />}\n\t\t\t\t\ttitle=\"Two-factor authentication\"\n\t\t\t\t\tsubtitle={twoFactor ? \"On · codes from an authenticator app\" : \"Off\"}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\tchecked={twoFactor}\n\t\t\t\t\t\t\taria-label=\"Two-factor authentication\"\n\t\t\t\t\t\t\tonCheckedChange={(enabled: boolean) => {\n\t\t\t\t\t\t\t\tsetTwoFactor(enabled)\n\t\t\t\t\t\t\t\tonTwoFactorChange?.(enabled)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<Entity\n\t\t\t\t\tleading={<IconTile icon=\"key\" size=\"sm\" appearance=\"muted\" />}\n\t\t\t\t\ttitle=\"Passkeys\"\n\t\t\t\t\tsubtitle={protection.passkeys === 1 ? \"1 saved\" : `${protection.passkeys} saved`}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"end\" aria-label=\"Manage passkeys\" onClick={onManagePasskeys}>\n\t\t\t\t\t\t\tManage\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<CardListLabel ref={group} render={<h3 />} tabIndex={-1} className=\"outline-none\">\n\t\t\t\t\tSigned-in devices\n\t\t\t\t</CardListLabel>\n\t\t\t\t{active.map((session) => (\n\t\t\t\t\t<Entity\n\t\t\t\t\t\tkey={session.id}\n\t\t\t\t\t\tleading={<IconTile icon=\"desktop\" size=\"sm\" appearance=\"muted\" />}\n\t\t\t\t\t\ttitle={`${session.device} · ${session.client}`}\n\t\t\t\t\t\tsubtitle={\n\t\t\t\t\t\t\tsession.current ? (\n\t\t\t\t\t\t\t\tsession.place\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{session.place} · <RelativeTime date={session.seen} />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\taction={\n\t\t\t\t\t\t\tsession.current ? (\n\t\t\t\t\t\t\t\t<Badge appearance=\"plain\" tone=\"success\" dot>\n\t\t\t\t\t\t\t\t\tThis device\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"end\" aria-label={`Sign out of ${session.device}`} onClick={() => signOut(session)}>\n\t\t\t\t\t\t\t\t\tSign out\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</CardList>\n\t\t\t<p role=\"status\" className=\"sr-only\">\n\t\t\t\t{notice}\n\t\t\t</p>\n\t\t\t<CardFooter actions>\n\t\t\t\t{/* Two presses, not a dialog: signing out is undone by signing in again. */}\n\t\t\t\t<ConfirmButton\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\tdisabled={others.length === 0}\n\t\t\t\t\tconfirmLabel={others.length === 1 ? \"Sign out of 1 device?\" : `Sign out of ${others.length} devices?`}\n\t\t\t\t\tonConfirm={() => {\n\t\t\t\t\t\tsetActive((current) => current.filter((session) => session.current))\n\t\t\t\t\t\tsetNotice(\"Signed out of every other device\")\n\t\t\t\t\t\tonSignOutOthers?.()\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{others.length ? \"Sign out of other devices\" : \"No other devices\"}\n\t\t\t\t</ConfirmButton>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "ShareBlock",
        "path": "blocks/share-block.tsx",
        "summary": "Sharing a document: a multi-select Combobox of people with a role Select and Invite, then who the link works for and a split Copy link button, each ending in a toast.",
        "intent": "Reach for this as the body of a Share dialog or popover on a document, board or file. Inviting teammates by email address with no link is InviteTeamBlock; a list of who already has access is TeamMembersBlock.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "People are picked from a known list, so the field is a Combobox with chips, not a free-text input. Backspace in the empty field removes the last chip.",
          "Invite is disabled until someone is chosen. The toast waits for `onInvite`: return a promise and it says \"Invited …\" once the invites are sent, or that they were not sent (keeping the people chosen) if it rejects.",
          "Link access is controlled and reported through `onAccessChange`, like every other control in the card.",
          "Sharing outside the workspace by email address is InviteTeamBlock; this block picks people who are already in it.",
          "The link is shown with MiddleTruncate: the site at the start and the id at the end both stay readable in a narrow card.",
          "Copy link is a split button in a ButtonGroup: the common action on the face, the other formats in a Menu behind the chevron.",
          "Each result is a toast, including a failed copy. A ToastProvider must be mounted in the app for them to show."
        ],
        "a11y": [
          "Both Selects have a name: the role by aria-label, link access by its Field label.",
          "The chevron button has its own accessible name, and the two buttons are announced as one group, \"Share link\".",
          "The full link is the truncated text's title, and copying is confirmed by the toast's live region."
        ],
        "imports": "\"use client\"\n\nimport { useState, useRef } from \"react\"\nimport { Button, ButtonGroup, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Combobox, ComboboxChips, ComboboxContent, ComboboxEmpty, ComboboxItem, ComboboxList, Field, Icon, Menu, MenuContent, MenuItem, MenuTrigger, MiddleTruncate, Select, SelectContent, SelectItem, SelectTrigger, Separator, toast, useCopy } from \"@sableui/react\"",
        "code": "const doc = { title: \"Q4 roadmap\", url: \"https://atlas.example/d/q4-roadmap-8f3a9c2e5b8d1f4a6c0e\" }\n\n// `label` is what a chip and a row show; `value` is what onInvite reports.\nconst people = [\n\t{ value: \"ana\", label: \"Ana Chen\" },\n\t{ value: \"kofi\", label: \"Kofi Mensah\" },\n\t{ value: \"amira\", label: \"Amira Haddad\" },\n\t{ value: \"jo\", label: \"Jo Lund\" },\n\t{ value: \"tala\", label: \"Tala Begay\" },\n]\n\nconst roles = [\n\t{ value: \"view\", label: \"Can view\" },\n\t{ value: \"comment\", label: \"Can comment\" },\n\t{ value: \"edit\", label: \"Can edit\" },\n]\n\nconst access = [\n\t{ value: \"invited\", label: \"Only people invited\" },\n\t{ value: \"link\", label: \"Anyone with the link\" },\n] as const\n\ntype Person = (typeof people)[number]\ntype Access = (typeof access)[number][\"value\"]\n\nexport interface ShareBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Dialog or Popover that already frames it. */\n\tframed?: boolean\n\t/**\n\t * Called with the people chosen and the role they get. Return a promise to\n\t * hold the toast until the invites are sent: it resolves to \"Invited …\", and\n\t * a rejection says they were not sent and keeps the people chosen.\n\t */\n\tonInvite?: (invite: { people: string[]; role: string }) => void | Promise<void>\n\t/** Called with who the link opens for, the moment it changes. */\n\tonAccessChange?: (access: Access) => void\n\t/** Called after the link has been copied. */\n\tonCopyLink?: () => void\n}\n\nexport function ShareBlock({ className, framed = true, onInvite, onAccessChange, onCopyLink }: ShareBlockProps) {\n\tconst [chosen, setChosen] = useState<Person[]>([])\n\tconst [role, setRole] = useState(roles[0].value)\n\tconst [linkAccess, setLinkAccess] = useState<Access>(access[0].value)\n\n\t// The toast follows the outcome, not the press: the app's answer decides it.\n\tconst invite = async () => {\n\t\tconst names = chosen.length === 1 ? `Invited ${chosen[0].label}` : `Invited ${chosen.length} people`\n\t\ttry {\n\t\t\tawait onInvite?.({ people: chosen.map((person) => person.value), role })\n\t\t\ttoast.success(names)\n\t\t\tsetChosen([])\n\t\t} catch {\n\t\t\ttoast.error(\"The invites were not sent. Try again.\")\n\t\t}\n\t}\n\n\t// One copy behaviour for the three formats: the text is read at click time.\n\tconst text = useRef(doc.url)\n\tconst { copy } = useCopy(() => text.current)\n\tconst copyAs = async (value: string, done: string) => {\n\t\ttext.current = value\n\t\tif (await copy()) {\n\t\t\ttoast.success(done)\n\t\t\tonCopyLink?.()\n\t\t} else {\n\t\t\ttoast.error(\"Could not copy the link\")\n\t\t}\n\t}\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Share “{doc.title}”</CardTitle>\n\t\t\t\t<CardDescription>Invite people, or send them the link.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<Field label=\"Add people\">\n\t\t\t\t\t<Combobox multiple items={people} value={chosen} onValueChange={(next: Person[]) => setChosen(next)}>\n\t\t\t\t\t\t<ComboboxChips placeholder=\"Search by name\" />\n\t\t\t\t\t\t<ComboboxContent>\n\t\t\t\t\t\t\t<ComboboxEmpty>No one by that name.</ComboboxEmpty>\n\t\t\t\t\t\t\t<ComboboxList>\n\t\t\t\t\t\t\t\t{(person: Person) => (\n\t\t\t\t\t\t\t\t\t<ComboboxItem key={person.value} value={person}>\n\t\t\t\t\t\t\t\t\t\t{person.label}\n\t\t\t\t\t\t\t\t\t</ComboboxItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</ComboboxList>\n\t\t\t\t\t\t</ComboboxContent>\n\t\t\t\t\t</Combobox>\n\t\t\t\t</Field>\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Select items={roles} value={role} onValueChange={(next: unknown) => setRole(String(next))}>\n\t\t\t\t\t\t<SelectTrigger aria-label=\"Role\" className=\"min-w-0 flex-1\" />\n\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t{roles.map((item) => (\n\t\t\t\t\t\t\t\t<SelectItem key={item.value} value={item.value}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t\t<Button disabled={chosen.length === 0} onClick={invite}>\n\t\t\t\t\t\tInvite\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t\t<Separator />\n\t\t\t\t<Field label=\"Link access\">\n\t\t\t\t\t<Select\n\t\t\t\t\t\titems={access}\n\t\t\t\t\t\tvalue={linkAccess}\n\t\t\t\t\t\tonValueChange={(next: unknown) => {\n\t\t\t\t\t\t\tsetLinkAccess(next as Access)\n\t\t\t\t\t\t\tonAccessChange?.(next as Access)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectTrigger />\n\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t{access.map((item) => (\n\t\t\t\t\t\t\t\t<SelectItem key={item.value} value={item.value}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t</Field>\n\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t{/* Both ends of a link matter: the site, and the id that tells two links apart. */}\n\t\t\t\t\t<MiddleTruncate\n\t\t\t\t\t\ttext={doc.url.replace(\"https://\", \"\")}\n\t\t\t\t\t\tstartChars={10}\n\t\t\t\t\t\tendChars={4}\n\t\t\t\t\t\tclassName=\"min-w-0 flex-1 text-mono-sm text-muted-foreground\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ButtonGroup aria-label=\"Share link\">\n\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" iconStart={<Icon name=\"link\" />} onClick={() => copyAs(doc.url, \"Link copied\")}>\n\t\t\t\t\t\t\tCopy link\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t<MenuTrigger render={<Button variant=\"outline\" size=\"icon-sm\" aria-label=\"More ways to copy\" />}>\n\t\t\t\t\t\t\t\t<Icon name=\"chevron-down\" />\n\t\t\t\t\t\t\t</MenuTrigger>\n\t\t\t\t\t\t\t<MenuContent align=\"end\">\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\ticon={<Icon name=\"file\" />}\n\t\t\t\t\t\t\t\t\tonClick={() => copyAs(`[${doc.title}](${doc.url})`, \"Copied as Markdown\")}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tCopy as Markdown\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\ticon={<Icon name=\"layout\" />}\n\t\t\t\t\t\t\t\t\tonClick={() => copyAs(`<iframe src=\"${doc.url}/embed\"></iframe>`, \"Embed code copied\")}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tCopy embed code\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuContent>\n\t\t\t\t\t\t</Menu>\n\t\t\t\t\t</ButtonGroup>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "SignInBlock",
        "path": "blocks/sign-in-block.tsx",
        "summary": "A sign-in card: email and password, a primary Sign in, and a passkey alternative under an \"or\" separator.",
        "intent": "Reach for this wherever someone signs in inside a surface you already have — a Sheet, a Dialog, a gated panel. For a whole sign-in route with brand art beside the form, start from the AuthPage page shell instead.",
        "family": "Auth",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "One primary action. The passkey is an outline Button under a labelled Separator, so it reads as an alternative, not a second submit.",
          "The fields are a real <form>: Enter submits, and the browser's password manager recognises the autocomplete hints.",
          "framed={false} keeps the padding and drops the surface, for a Sheet or Dialog that is already the frame."
        ],
        "a11y": [
          "Inputs carry aria-label because the design shows placeholders, not visible labels; add Field labels if your brief wants them visible.",
          "`onSignIn` receives \"password\" or \"passkey\", so focus and error handling stay with the caller's auth flow."
        ],
        "imports": "\"use client\"\n\nimport { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Icon, Input, Separator } from \"@sableui/react\"",
        "code": "export interface SignInBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet, Dialog or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the method the person chose. Wire your auth here. */\n\tonSignIn?: (method: \"password\" | \"passkey\") => void\n}\n\nexport function SignInBlock({ className, framed = true, onSignIn }: SignInBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Welcome back</CardTitle>\n\t\t\t\t<CardDescription>Sign in to pick up where you left off.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<form\n\t\t\t\t\tclassName=\"flex flex-col gap-4\"\n\t\t\t\t\tonSubmit={(event) => {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tonSignIn?.(\"password\")\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t\t<Input name=\"email\" type=\"email\" autoComplete=\"email\" placeholder=\"you@studio.com\" aria-label=\"Email\" />\n\t\t\t\t\t\t<Input name=\"password\" type=\"password\" autoComplete=\"current-password\" placeholder=\"Password\" aria-label=\"Password\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<Button type=\"submit\" className=\"w-full\">\n\t\t\t\t\t\tSign in\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Separator label=\"or\" />\n\t\t\t\t\t<Button variant=\"outline\" className=\"w-full\" iconStart={<Icon name=\"lock\" />} onClick={() => onSignIn?.(\"passkey\")}>\n\t\t\t\t\t\tUse a passkey\n\t\t\t\t\t</Button>\n\t\t\t\t</form>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "SignUpBlock",
        "path": "blocks/sign-up-block.tsx",
        "summary": "A sign-up card: name, work email and password as labelled Fields, one full-width Create account, and a link to sign in instead.",
        "intent": "Reach for this to create an account inside a surface you already have, or as the form of a sign-up route. For the whole route with brand art beside it, start from the AuthPage page shell and drop this card in.",
        "family": "Auth",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "Visible labels, not placeholders: someone filling a new form needs to see what each field is after typing in it.",
          "The password rule is stated up front in the Field description, before anyone fails it.",
          "`onSignUp` receives the fields only after the browser's own validation (required, type=email, minLength) passes."
        ],
        "a11y": [
          "Field wires each label, description and error to its input; never hand-roll <label> + <input> pairs.",
          "autoComplete hints (name, email, new-password) let password managers offer to generate and save the password."
        ],
        "imports": "\"use client\"\n\nimport { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, Field, Form, Input } from \"@sableui/react\"",
        "code": "export interface SignUpBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet, Dialog or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the submitted fields once the browser's validation passes. */\n\tonSignUp?: (account: { name: string; email: string; password: string }) => void\n}\n\nexport function SignUpBlock({ className, framed = true, onSignUp }: SignUpBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Create your account</CardTitle>\n\t\t\t\t<CardDescription>Free for 14 days. No card needed.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<Form\n\t\t\t\tclassName=\"gap-0\"\n\t\t\t\tonSubmit={(event) => {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tconst data = new FormData(event.currentTarget)\n\t\t\t\t\tonSignUp?.({\n\t\t\t\t\t\tname: String(data.get(\"name\") ?? \"\"),\n\t\t\t\t\t\temail: String(data.get(\"email\") ?? \"\"),\n\t\t\t\t\t\tpassword: String(data.get(\"password\") ?? \"\"),\n\t\t\t\t\t})\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<CardContent className=\"flex flex-col gap-3\">\n\t\t\t\t\t<Field label=\"Name\" name=\"name\" required>\n\t\t\t\t\t\t<Input autoComplete=\"name\" />\n\t\t\t\t\t</Field>\n\t\t\t\t\t<Field label=\"Work email\" name=\"email\" required>\n\t\t\t\t\t\t<Input type=\"email\" autoComplete=\"email\" placeholder=\"you@studio.com\" />\n\t\t\t\t\t</Field>\n\t\t\t\t\t<Field label=\"Password\" name=\"password\" description=\"At least 12 characters.\" required>\n\t\t\t\t\t\t<Input type=\"password\" autoComplete=\"new-password\" minLength={12} />\n\t\t\t\t\t</Field>\n\t\t\t\t</CardContent>\n\t\t\t\t<CardFooter className=\"flex-col items-stretch gap-3\">\n\t\t\t\t\t<Button type=\"submit\" className=\"w-full\">\n\t\t\t\t\t\tCreate account\n\t\t\t\t\t</Button>\n\t\t\t\t\t<p className=\"text-center text-caption text-muted-foreground\">\n\t\t\t\t\t\tAlready have an account?{\" \"}\n\t\t\t\t\t\t<a href=\"/sign-in\" className=\"text-foreground underline underline-offset-4 motion-interactive hover:text-muted-foreground\">\n\t\t\t\t\t\t\tSign in\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</p>\n\t\t\t\t</CardFooter>\n\t\t\t</Form>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "SiteFooterBlock",
        "path": "blocks/site-footer-block.tsx",
        "summary": "A site footer: the brand and a one-line tagline beside link groups in a labelled Footer nav, over a copyright line.",
        "intent": "Reach for this at the foot of a marketing or docs site. App screens inside an AppShell take no footer; their navigation lives in the sidebar.",
        "family": "Marketing",
        "kind": "section",
        "notes": [
          "Copied from the LandingPage page shell's footer.",
          "Every link is at least 36px tall (min-h-9), so the dense list is still an easy touch target.",
          "Groups go two up on a phone and three up from sm; add a group only if it has three links or more."
        ],
        "a11y": [
          "Renders <footer> with a <nav aria-label=\"Footer\">, distinct from the page's main navigation.",
          "Group titles are h2s, so the footer's structure is navigable by heading."
        ],
        "imports": "import { cn, Region, Stack } from \"@sableui/react\"",
        "code": "const brand = { name: \"Sable\", tagline: \"React components, patterns, and tokens for products built with AI agents.\" }\n\nconst groups = [\n\t{\n\t\ttitle: \"Product\",\n\t\tlinks: [\n\t\t\t{ label: \"Components\", href: \"/components\" },\n\t\t\t{ label: \"Patterns\", href: \"/patterns\" },\n\t\t\t{ label: \"Themes\", href: \"/themes\" },\n\t\t\t{ label: \"Canvas\", href: \"/canvas\" },\n\t\t],\n\t},\n\t{\n\t\ttitle: \"Resources\",\n\t\tlinks: [\n\t\t\t{ label: \"Documentation\", href: \"/docs\" },\n\t\t\t{ label: \"Changelog\", href: \"/changelog\" },\n\t\t\t{ label: \"llms.txt\", href: \"/llms.txt\" },\n\t\t],\n\t},\n\t{\n\t\ttitle: \"Community\",\n\t\tlinks: [\n\t\t\t{ label: \"GitHub\", href: \"/github\" },\n\t\t\t{ label: \"npm\", href: \"/npm\" },\n\t\t\t{ label: \"Discussions\", href: \"/discussions\" },\n\t\t],\n\t},\n]\n\nexport interface SiteFooterBlockProps {\n\tclassName?: string\n}\n\nexport function SiteFooterBlock({ className }: SiteFooterBlockProps) {\n\treturn (\n\t\t<footer className={cn(\"w-full border-t border-border\", className)}>\n\t\t\t<Region max=\"wide\" className=\"py-12\">\n\t\t\t\t<div className=\"grid gap-10 md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]\">\n\t\t\t\t\t<Stack gap={3} className=\"max-w-xs\">\n\t\t\t\t\t\t<a href=\"/\" className=\"w-fit text-title-lg motion-interactive hover:text-muted-foreground\">\n\t\t\t\t\t\t\t{brand.name}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{brand.tagline}</p>\n\t\t\t\t\t</Stack>\n\t\t\t\t\t<nav aria-label=\"Footer\" className=\"grid grid-cols-2 gap-8 sm:grid-cols-3\">\n\t\t\t\t\t\t{groups.map((group) => (\n\t\t\t\t\t\t\t<div key={group.title}>\n\t\t\t\t\t\t\t\t<h2 className=\"text-label-md text-muted-foreground\">{group.title}</h2>\n\t\t\t\t\t\t\t\t<ul className=\"mt-3 flex flex-col gap-1\">\n\t\t\t\t\t\t\t\t\t{group.links.map((link) => (\n\t\t\t\t\t\t\t\t\t\t<li key={link.label}>\n\t\t\t\t\t\t\t\t\t\t\t<a href={link.href} className=\"flex min-h-9 items-center text-body-sm motion-interactive hover:text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{link.label}\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</nav>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"mt-12 border-t border-border pt-6\">\n\t\t\t\t\t<p className=\"text-caption text-muted-foreground\">\n\t\t\t\t\t\t© 2026 {brand.name}. Released under the MIT license.\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</Region>\n\t\t</footer>\n\t)\n}"
      },
      {
        "name": "StatRowBlock",
        "path": "blocks/stat-row-block.tsx",
        "summary": "A KPI row: four stat cards, each a label, the value in the metric mono tier, and a trend Badge with its comparison note — 2 × 2 on a phone, one row from xl.",
        "intent": "Reach for this at the top of a dashboard or report, above the tables and charts it summarises. One headline number worth splitting into categories is RevenueBreakdownBlock.",
        "family": "Dashboard",
        "kind": "section",
        "notes": [
          "Copied from the DashboardPage page shell's stat row.",
          "Values are `text-mono-xl` — tabular figures, never a heading tier — so the four numbers align digit for digit.",
          "The trend Badge sits with its note in CardContent, so the value keeps the full card width when the row folds to 2 × 2.",
          "Keep it to four. A fifth stat is a sign one of them belongs in a table."
        ],
        "a11y": [
          "The trend is stated in text (+8.2%) with an arrow icon; the tone is reinforcement, not the signal.",
          "Each card's label is read before its value, in source order."
        ],
        "imports": "import { Badge, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Grid, Icon, Row } from \"@sableui/react\"",
        "code": "const stats = [\n\t{ label: \"Revenue\", value: \"$18,240\", delta: \"+8.2%\", up: true, note: \"vs. $16,857\" },\n\t{ label: \"Orders\", value: \"1,284\", delta: \"+3.1%\", up: true, note: \"182 first-time\" },\n\t{ label: \"New customers\", value: \"312\", delta: \"+12.4%\", up: true, note: \"Best month yet\" },\n\t{ label: \"Conversion\", value: \"3.4%\", delta: \"−0.2%\", up: false, note: \"6 open trials\" },\n]\n\nexport interface StatRowBlockProps {\n\tclassName?: string\n}\n\nexport function StatRowBlock({ className }: StatRowBlockProps) {\n\treturn (\n\t\t<Grid cols={{ base: 2, xl: 4 }} gap={3} className={cn(\"w-full\", className)}>\n\t\t\t{stats.map((stat) => (\n\t\t\t\t<Card key={stat.label}>\n\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t<CardDescription>{stat.label}</CardDescription>\n\t\t\t\t\t\t<CardTitle className=\"text-mono-xl\">{stat.value}</CardTitle>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t<Row gap={1} wrap>\n\t\t\t\t\t\t\t<Badge tone={stat.up ? \"success\" : \"warning\"} size=\"sm\" icon={<Icon name={stat.up ? \"arrow-up\" : \"arrow-down\"} />}>\n\t\t\t\t\t\t\t\t{stat.delta}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t<span className=\"text-caption text-muted-foreground\">{stat.note}</span>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t))}\n\t\t</Grid>\n\t)\n}"
      },
      {
        "name": "StepsBlock",
        "path": "blocks/steps-block.tsx",
        "summary": "A how-it-works section: the heading, lede and a guide link on the left; three numbered steps on the right, each under a strong rule.",
        "intent": "Reach for this when the pitch is a sequence — onboarding, a workflow, a setup. Parallel benefits with no order are FeatureGridBlock; progress through a live process is a Stepper.",
        "family": "Marketing",
        "kind": "section",
        "notes": [
          "Copied from the BrandLandingPage page shell's how-it-works section.",
          "The steps are an <ol>, so the order is semantic and the 01 / 02 / 03 numbers are its visual echo, set in the mono tier.",
          "Three steps fit the 1 : 2 split on desktop; on a phone everything stacks with the intro first."
        ],
        "a11y": [
          "Each step has an h3 under the section's h2.",
          "The guide link is an <a> styled as an outline Button, because it navigates."
        ],
        "imports": "\"use client\"\n\nimport { useId } from \"react\"\nimport { Button, cn, Icon, Region, Stack } from \"@sableui/react\"",
        "code": "const intro = {\n\teyebrow: \"How it works\",\n\ttitle: \"From request to sealed record.\",\n\tlede: \"Teams are usually live within a week. Cove adapts to the routes you already run instead of asking you to start over.\",\n\tlink: { label: \"Read the rollout guide\", href: \"/guides/rollout\" },\n}\n\nconst steps = [\n\t{ title: \"Connect your spaces\", body: \"Bring teams, vendors, and record stores into one workspace, with roles that mirror how you already work.\" },\n\t{ title: \"Route every approval\", body: \"Requests follow the path you define, with reviewers, deadlines, and escalation built in from the start.\" },\n\t{ title: \"Seal the record\", body: \"Approved work is archived with its full context and is ready for review the moment it closes.\" },\n]\n\nexport interface StepsBlockProps {\n\tclassName?: string\n}\n\nexport function StepsBlock({ className }: StepsBlockProps) {\n\tconst titleId = useId()\n\treturn (\n\t\t<Region as=\"section\" aria-labelledby={titleId} max=\"wide\" className={cn(\"w-full py-16 sm:py-24\", className)}>\n\t\t\t<div className=\"grid gap-12 lg:grid-cols-[1fr_2fr] lg:gap-16\">\n\t\t\t\t<Stack gap={2} className=\"max-w-md\">\n\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">{intro.eyebrow}</p>\n\t\t\t\t\t<h2 id={titleId} className=\"text-balance text-heading-1\">\n\t\t\t\t\t\t{intro.title}\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"text-body-md text-muted-foreground\">{intro.lede}</p>\n\t\t\t\t\t<div className=\"pt-3\">\n\t\t\t\t\t\t<Button variant=\"outline\" iconEnd={<Icon name=\"arrow-right\" />} render={<a href={intro.link.href} />}>\n\t\t\t\t\t\t\t{intro.link.label}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</Stack>\n\t\t\t\t<ol className=\"grid gap-10 sm:grid-cols-3 sm:gap-6\">\n\t\t\t\t\t{steps.map((step, index) => (\n\t\t\t\t\t\t<li key={step.title} className=\"flex flex-col gap-2 border-t border-border-strong pt-6\">\n\t\t\t\t\t\t\t<span className=\"text-mono-sm text-muted-foreground\">{String(index + 1).padStart(2, \"0\")}</span>\n\t\t\t\t\t\t\t<h3 className=\"mt-3 text-title-lg sm:mt-6\">{step.title}</h3>\n\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{step.body}</p>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ol>\n\t\t\t</div>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "StorageBlock",
        "path": "blocks/storage-block.tsx",
        "summary": "Storage used against a plan: a Meter with its reading, what takes the space, and a two-press Clear cache that turns into a Progress bar and ends in a toast.",
        "intent": "Reach for this on a settings or account page to show a quota and offer one way to win some back — storage, seats, API calls, credits. A breakdown by category with no limit is SegmentedBar; a task with no level behind it is Progress alone.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The level is a Meter and the clear is a Progress. They look alike and mean different things: one is how full, the other is how far along.",
          "The Meter's tone comes from thresholds the block owns: warning from 75% of the plan, destructive from 90%. Clearing the cache drops it back under the first.",
          "While the cache is being cleared its size is a Skeleton, not the old number: the value is not known until the work is done.",
          "The outcome is a toast, so it is seen even if the person has scrolled on. A ToastProvider must be mounted in the app for it to show.",
          "Once cleared, the button stays in place, disabled and saying why, instead of disappearing."
        ],
        "a11y": [
          "The Meter is announced as a level with its reading in gigabytes; the Progress as a task with its percentage.",
          "The footer keeps focus while the button and the progress bar swap, so a keyboard user is not sent back to the top of the page.",
          "The toast is announced through the provider's live region."
        ],
        "imports": "\"use client\"\n\nimport { useState, useEffect, useRef } from \"react\"\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, ConfirmButton, Meter, MeterLabel, MeterTrack, MeterValue, Progress, ProgressLabel, ProgressTrack, ProgressValue, Skeleton, toast } from \"@sableui/react\"",
        "code": "// Sizes in gigabytes. `cache` is the one that can be cleared.\nconst plan = { name: \"Studio plan\", capacity: 50 }\nconst usage = [\n\t{ id: \"photos\", label: \"Photos\", size: 21.4 },\n\t{ id: \"videos\", label: \"Videos\", size: 9.6 },\n\t{ id: \"documents\", label: \"Documents\", size: 4.1 },\n\t{ id: \"cache\", label: \"Cache\", size: 3.1 },\n]\n\nconst gb = (size: number) => `${size.toFixed(1)} GB`\n\nexport interface StorageBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a settings section that already frames it. */\n\tframed?: boolean\n\t/** Called once the cache has been cleared. */\n\tonClear?: () => void\n}\n\nexport function StorageBlock({ className, framed = true, onClear }: StorageBlockProps) {\n\t// idle → clearing (a number, the percent done) → cleared\n\tconst [cleared, setCleared] = useState(false)\n\tconst [progress, setProgress] = useState<number | null>(null)\n\tconst clearing = progress !== null\n\n\tconst cache = usage.find((item) => item.id === \"cache\")?.size ?? 0\n\tconst used = usage.reduce((sum, item) => sum + item.size, 0) - (cleared ? cache : 0)\n\tconst share = used / plan.capacity\n\n\t// The button gives way to the progress bar, so the footer holds the focus\n\t// while the two swap.\n\tconst footer = useRef<HTMLDivElement>(null)\n\n\tuseEffect(() => {\n\t\tif (progress === null) return\n\t\tif (progress < 100) {\n\t\t\tconst timer = setTimeout(() => setProgress(Math.min(100, progress + 20)), 280)\n\t\t\treturn () => clearTimeout(timer)\n\t\t}\n\t\tsetProgress(null)\n\t\tsetCleared(true)\n\t\ttoast.success(\"Cache cleared\", { description: `${gb(cache)} freed.` })\n\t\tonClear?.()\n\t}, [progress, cache, onClear])\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Storage</CardTitle>\n\t\t\t\t<CardDescription>{plan.name}</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t{/* A level, not a task: Meter. The tone comes from thresholds this block owns. */}\n\t\t\t\t<Meter\n\t\t\t\t\tvalue={used}\n\t\t\t\t\tmax={plan.capacity}\n\t\t\t\t\ttone={share >= 0.9 ? \"destructive\" : share >= 0.75 ? \"warning\" : \"primary\"}\n\t\t\t\t\tgetAriaValueText={(_, value) => `${gb(value ?? 0)} of ${plan.capacity} gigabytes used`}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"mb-2 flex flex-wrap items-center justify-between gap-x-3 gap-y-1\">\n\t\t\t\t\t\t<MeterLabel>Used</MeterLabel>\n\t\t\t\t\t\t<MeterValue>{(_, value) => `${gb(value ?? 0)} of ${plan.capacity} GB`}</MeterValue>\n\t\t\t\t\t</div>\n\t\t\t\t\t<MeterTrack />\n\t\t\t\t</Meter>\n\t\t\t\t<ul className=\"flex flex-col gap-2 text-body-sm\">\n\t\t\t\t\t{usage.map((item) => (\n\t\t\t\t\t\t<li key={item.id} className=\"flex items-center justify-between gap-3\">\n\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">{item.label}</span>\n\t\t\t\t\t\t\t{item.id === \"cache\" && clearing ? (\n\t\t\t\t\t\t\t\t// Unknown until the clear finishes, so a placeholder the size of the value.\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-4 w-12\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"text-mono-md\">{gb(item.id === \"cache\" && cleared ? 0 : item.size)}</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ul>\n\t\t\t</CardContent>\n\t\t\t<CardFooter>\n\t\t\t\t<div ref={footer} tabIndex={-1} className=\"flex min-h-(--control-md) w-full flex-col justify-center outline-none\">\n\t\t\t\t\t{clearing ? (\n\t\t\t\t\t\t// A task in flight: Progress, in the place of the button that started it.\n\t\t\t\t\t\t<Progress value={progress} size=\"sm\">\n\t\t\t\t\t\t\t<div className=\"mb-2 flex items-center justify-between gap-3\">\n\t\t\t\t\t\t\t\t<ProgressLabel>Clearing cache</ProgressLabel>\n\t\t\t\t\t\t\t\t<ProgressValue />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ProgressTrack />\n\t\t\t\t\t\t</Progress>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Two presses, not a dialog: a cache rebuilds itself.\n\t\t\t\t\t\t<ConfirmButton\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\tdisabled={cleared}\n\t\t\t\t\t\t\tconfirmLabel={`Clear ${gb(cache)}?`}\n\t\t\t\t\t\t\tonConfirm={() => {\n\t\t\t\t\t\t\t\tfooter.current?.focus()\n\t\t\t\t\t\t\t\tsetProgress(0)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{cleared ? \"Cache is empty\" : \"Clear cache\"}\n\t\t\t\t\t\t</ConfirmButton>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "StreakBlock",
        "path": "blocks/streak-block.tsx",
        "summary": "A habit's streak: the run of days still going, the longest one, and sixteen weeks on an ActivityHeatmap that Pills switch between two measures.",
        "intent": "Reach for this to show whether something was kept up day by day — reading, workouts, commits, lessons. A year of activity on a wide page is ActivityHeatmap on its own; one month with its days marked is Calendar.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The streak numbers are worked out from the same days the grid draws, so the two can never disagree.",
          "Sixteen weeks fit a 20rem card without scrolling. A longer range scrolls sideways and opens on the latest week.",
          "The Pills change what the grid measures, not which days it shows: each cell cross-fades to its new level.",
          "How a day counts is a hint, so it sits in a tooltip on an info button rather than taking a line of the card.",
          "Dates are built in UTC and passed as YYYY-MM-DD strings, so a time zone cannot shift a day."
        ],
        "a11y": [
          "The grid is one tab stop with arrow-key movement; each day is named with its date and value.",
          "The info button has its own accessible name; the tooltip is only its description.",
          "The Pills are toggle buttons with aria-pressed."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { ActivityHeatmap, Button, Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle, cn, Icon, NumberTicker, Pill, SimpleTooltip } from \"@sableui/react\"",
        "code": "const habit = { title: \"Reading\", rule: \"A day counts once you read 10 pages.\" }\n\n// What can be shown on the grid, and the word for one of each.\nconst measures = [\n\t{ id: \"pages\", label: \"Pages\", unit: { one: \"page\", other: \"pages\" } },\n\t{ id: \"minutes\", label: \"Minutes\", unit: { one: \"minute\", other: \"minutes\" } },\n] as const\n\ntype Measure = (typeof measures)[number][\"id\"]\n\n// Sixteen weeks ending today, as calendar days in UTC so no time zone moves one.\n// Replace `log` with your own days: { date: \"YYYY-MM-DD\", pages, minutes }.\nconst DAY = 86_400_000\nconst today = new Date()\nconst last = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate())\nconst span = 16 * 7\nconst log = Array.from({ length: span }, (_, index) => {\n\tconst spread = (index * 37 + 11) % 17\n\tconst read = index >= span - 12 || (index >= 40 && index < 63) || spread >= 3\n\treturn {\n\t\tdate: new Date(last - (span - 1 - index) * DAY).toISOString().slice(0, 10),\n\t\tpages: read ? 10 + spread * 2 : 0,\n\t\tminutes: read ? 15 + ((index * 53) % 41) : 0,\n\t}\n})\n\n// Runs of days read: the one still going, and the longest.\nconst runs = log.reduce(\n\t(acc, day) => {\n\t\tconst current = day.pages > 0 ? acc.current + 1 : 0\n\t\treturn { current, longest: Math.max(acc.longest, current) }\n\t},\n\t{ current: 0, longest: 0 },\n)\n\nexport interface StreakBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a dashboard section that already frames it. */\n\tframed?: boolean\n\t/** Called with the day, as \"YYYY-MM-DD\", when one is chosen on the grid. */\n\tonSelectDay?: (date: string) => void\n}\n\nexport function StreakBlock({ className, framed = true, onSelectDay }: StreakBlockProps) {\n\tconst [measure, setMeasure] = useState<Measure>(\"pages\")\n\tconst [day, setDay] = useState<string | null>(null)\n\tconst shown = measures.find((item) => item.id === measure) ?? measures[0]\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{habit.title}</CardTitle>\n\t\t\t\t<CardDescription>Last 16 weeks</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t{/* The rule is a hint, not an instruction, so it can live in a tooltip.\n\t\t\t\t\t    The button still has its own name. */}\n\t\t\t\t\t<SimpleTooltip content={habit.rule}>\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"How a streak is counted\">\n\t\t\t\t\t\t\t<Icon name=\"info\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-4\">\n\t\t\t\t<div className=\"flex items-baseline justify-between gap-3\">\n\t\t\t\t\t<div className=\"flex items-baseline gap-2\">\n\t\t\t\t\t\t<NumberTicker className=\"text-mono-xl\" value={runs.current} />\n\t\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">{runs.current === 1 ? \"day in a row\" : \"days in a row\"}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{/* One whole string per plural form, so it can be translated. */}\n\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">\n\t\t\t\t\t\t{runs.longest === 1 ? \"Longest 1 day\" : `Longest ${runs.longest} days`}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex gap-1\">\n\t\t\t\t\t{measures.map((item) => (\n\t\t\t\t\t\t<Pill key={item.id} selected={item.id === measure} onClick={() => setMeasure(item.id)}>\n\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t</Pill>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{/* Changing the measure cross-fades each cell to its new level. */}\n\t\t\t\t<ActivityHeatmap\n\t\t\t\t\tlabel={`${shown.label} read, last 16 weeks`}\n\t\t\t\t\tdata={log.map((entry) => ({ date: entry.date, value: entry[measure] }))}\n\t\t\t\t\tstart={log[0].date}\n\t\t\t\t\tend={log[span - 1].date}\n\t\t\t\t\tunit={shown.unit}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tweekdayLabels=\"none\"\n\t\t\t\t\tselectedDate={day}\n\t\t\t\t\tonSelectDate={(date: string) => {\n\t\t\t\t\t\tsetDay(date)\n\t\t\t\t\t\tonSelectDay?.(date)\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "SubscriptionBlock",
        "path": "blocks/subscription-block.tsx",
        "summary": "The current plan in billing settings: its name and state as a Badge, the price, a Meter of seats used, the payment method as an Entity with Update, and Change plan beside a two-press Cancel plan that can be taken back.",
        "intent": "Reach for this at the top of billing settings, above InvoiceHistoryBlock. Choosing a plan for the first time is PricingTableBlock or PricingCardBlock; deleting the whole account is DangerZoneBlock.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "24rem"
        },
        "notes": [
          "The renewal date is in the description, and after a cancel it becomes the end date: a cancelled plan stays active until then, and the Badge says \"Cancelling\", not \"Cancelled\".",
          "Cancel plan is a ConfirmButton (two presses) rather than a dialog, because nothing ends at once and Keep my plan undoes it until the period runs out. Use DestructiveActionModal when cancelling ends access immediately.",
          "Seats are a level against a limit, so they are a Meter, not a Progress bar.",
          "The payment method is an Entity whose leading mark is an IconTile, the same row shape as a session or an integration.",
          "Change plan is the outline action and the cancel is ghost: neither is the page's primary, and cancelling must not look like the suggested path."
        ],
        "a11y": [
          "The plan's state is text in a Badge; the dot only reinforces it.",
          "A status region mounted from the start announces the cancellation and the date the plan ends.",
          "The Update button is named \"Update payment method\", so it makes sense out of its row."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, ConfirmButton, Entity, IconTile, Meter, MeterLabel, MeterTrack, MeterValue } from \"@sableui/react\"",
        "code": "const plan = { name: \"Studio\", price: \"$192\", period: \"year\", seats: { used: 8, total: 10 } }\nconst card = { brand: \"Visa\", last4: \"4242\", expires: \"08/28\" }\n\n// The renewal is 23 days after the page loaded — replace with the subscription's own date.\nconst renews = new Date(Date.now() + 23 * 86_400_000)\nconst longDate = new Intl.DateTimeFormat(\"en-US\", { month: \"long\", day: \"numeric\", year: \"numeric\" })\n\nexport interface SubscriptionBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a settings section that already frames it. */\n\tframed?: boolean\n\t/** Called when the person asks to change plan. */\n\tonChangePlan?: () => void\n\t/** Called when the person asks to update the payment method. */\n\tonUpdatePayment?: () => void\n\t/** Called when the person cancels; the plan runs to the end of the period. */\n\tonCancel?: () => void\n\t/** Called when the person takes the cancellation back. */\n\tonResume?: () => void\n}\n\nexport function SubscriptionBlock({ className, framed = true, onChangePlan, onUpdatePayment, onCancel, onResume }: SubscriptionBlockProps) {\n\tconst [cancelled, setCancelled] = useState(false)\n\tconst ends = longDate.format(renews)\n\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>{plan.name} plan</CardTitle>\n\t\t\t\t<CardDescription>{cancelled ? `Ends on ${ends}` : `Renews on ${ends}`}</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t{/* The state in words: a cancelled plan is still active until it ends. */}\n\t\t\t\t\t<Badge appearance=\"plain\" tone={cancelled ? \"warning\" : \"success\"} dot>\n\t\t\t\t\t\t{cancelled ? \"Cancelling\" : \"Active\"}\n\t\t\t\t\t</Badge>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-5\">\n\t\t\t\t<div className=\"flex items-baseline gap-1.5\">\n\t\t\t\t\t<span className=\"text-mono-xl\">{plan.price}</span>\n\t\t\t\t\t<span className=\"text-body-sm text-muted-foreground\">per {plan.period}</span>\n\t\t\t\t</div>\n\t\t\t\t{/* A level against a limit: Meter, not Progress. */}\n\t\t\t\t<Meter value={plan.seats.used} max={plan.seats.total} getAriaValueText={(_, value) => `${value ?? 0} of ${plan.seats.total} seats used`}>\n\t\t\t\t\t<div className=\"mb-2 flex items-center justify-between gap-3\">\n\t\t\t\t\t\t<MeterLabel>Seats</MeterLabel>\n\t\t\t\t\t\t<MeterValue>{(_, value) => `${value ?? 0} of ${plan.seats.total}`}</MeterValue>\n\t\t\t\t\t</div>\n\t\t\t\t\t<MeterTrack />\n\t\t\t\t</Meter>\n\t\t\t\t<Entity\n\t\t\t\t\tclassName=\"p-0\"\n\t\t\t\t\tleading={<IconTile icon=\"wallet\" size=\"sm\" appearance=\"muted\" />}\n\t\t\t\t\ttitle={`${card.brand} ending ${card.last4}`}\n\t\t\t\t\tsubtitle={`Expires ${card.expires}`}\n\t\t\t\t\taction={\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"end\" aria-label=\"Update payment method\" onClick={onUpdatePayment}>\n\t\t\t\t\t\t\tUpdate\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t\t{/* Mounted from the start, so the change of state is announced. */}\n\t\t\t<p role=\"status\" className=\"sr-only\">\n\t\t\t\t{cancelled ? `Subscription cancelled. ${plan.name} stays active until ${ends}.` : \"\"}\n\t\t\t</p>\n\t\t\t<CardFooter actions className=\"justify-end\">\n\t\t\t\t{cancelled ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tsetCancelled(false)\n\t\t\t\t\t\t\tonResume?.()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tKeep my plan\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{/* Two presses, not a dialog: the plan runs to the end of the period,\n\t\t\t\t\t\t    and Keep my plan undoes it until then. */}\n\t\t\t\t\t\t<ConfirmButton\n\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\tconfirmLabel=\"Cancel at period end?\"\n\t\t\t\t\t\t\tonConfirm={() => {\n\t\t\t\t\t\t\t\tsetCancelled(true)\n\t\t\t\t\t\t\t\tonCancel?.()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCancel plan\n\t\t\t\t\t\t</ConfirmButton>\n\t\t\t\t\t\t<Button variant=\"outline\" onClick={onChangePlan}>\n\t\t\t\t\t\t\tChange plan\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "TaskListBlock",
        "path": "blocks/task-list-block.tsx",
        "summary": "A checklist card: a titled list of Checkbox rows with a category Badge each, a live count of what is left, and a quiet Add task action.",
        "intent": "Reach for this for a short, personal to-do list on a dashboard or in onboarding. A team's task board with assignees and status columns needs a Table or DataTable.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "Finishing a task strikes it through and mutes it rather than removing it, so the list does not jump under the pointer.",
          "The count in CardAction updates with every check, so progress reads without counting rows.",
          "Add task is a ghost Button in the footer — present, but quieter than the list."
        ],
        "a11y": [
          "Every Checkbox has a real <Label htmlFor>, so the whole title is the click target and the accessible name.",
          "Category Badges carry text; the tone only groups them visually."
        ],
        "imports": "\"use client\"\n\nimport { useState, useId } from \"react\"\nimport { Badge, Button, Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle, Checkbox, cn, Icon, Label } from \"@sableui/react\"",
        "code": "const tasks = [\n\t{ title: \"Pick the cover type\", tag: \"Design\", tone: \"2\", done: true },\n\t{ title: \"Wire up checkout\", tag: \"Engineering\", tone: \"info\", done: false },\n\t{ title: \"Draft launch post\", tag: \"Launch\", tone: \"1\", done: false },\n] as const\n\nexport interface TaskListBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\tonAddTask?: () => void\n}\n\nexport function TaskListBlock({ className, framed = true, onAddTask }: TaskListBlockProps) {\n\tconst [done, setDone] = useState<boolean[]>(tasks.map((t) => t.done))\n\tconst id = useId()\n\tconst left = done.filter((d) => !d).length\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>This week</CardTitle>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<span className=\"text-caption text-muted-foreground\">{left} left</span>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<ul className=\"flex flex-col gap-1\">\n\t\t\t\t\t{tasks.map((task, i) => (\n\t\t\t\t\t\t<li key={task.title} className=\"flex items-center gap-3 py-1.5\">\n\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\tid={`${id}-${i}`}\n\t\t\t\t\t\t\t\tchecked={done[i]}\n\t\t\t\t\t\t\t\tonCheckedChange={(v: boolean) => setDone(done.map((d, j) => (j === i ? v : d)))}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\thtmlFor={`${id}-${i}`}\n\t\t\t\t\t\t\t\tclassName={cn(\"min-w-0 flex-1 motion-interactive\", done[i] && \"text-muted-foreground line-through\")}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{task.title}\n\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t<Badge tone={task.tone} size=\"sm\">\n\t\t\t\t\t\t\t\t{task.tag}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ul>\n\t\t\t</CardContent>\n\t\t\t<CardFooter>\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"start\" iconStart={<Icon name=\"plus\" />} onClick={onAddTask}>\n\t\t\t\t\tAdd task\n\t\t\t\t</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "TeamMembersBlock",
        "path": "blocks/team-members-block.tsx",
        "summary": "A members card: Entity rows with avatar, name and email, a role Badge, and an OverflowMenu of role changes and removal; pending invites sit in the same list.",
        "intent": "Reach for this to manage who is in a workspace, project or team. For inviting people when the list is empty or short, InviteTeamBlock is the lighter shape; for hundreds of members with filters, use a DataTable.",
        "family": "Settings & team",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "42rem"
        },
        "notes": [
          "Each row's menu offers only what applies to it: Make admin or Make member, Resend invite for pending rows, then the destructive action after a separator.",
          "The owner has no menu — ownership is transferred elsewhere — and a control-sized spacer keeps the role badges aligned.",
          "Pending invites are outline Badges in the same list, so the team's full size reads in one place."
        ],
        "a11y": [
          "Each OverflowMenu is labelled with the member's name (\"Manage Mara Okafor\"), so the triggers are distinguishable in a list.",
          "Roles are text in a Badge; tone only distinguishes the owner."
        ],
        "imports": "\"use client\"\n\nimport { Avatar, Badge, Button, Card, CardAction, CardDescription, CardHeader, CardList, CardTitle, cn, Entity, Icon, MenuItem, MenuSeparator, OverflowMenu } from \"@sableui/react\"",
        "code": "const members = [\n\t{ id: \"u1\", name: \"Ada Lovelace\", initials: \"AL\", email: \"ada@studio.com\", role: \"Owner\" },\n\t{ id: \"u2\", name: \"Mara Okafor\", initials: \"MO\", email: \"mara@studio.com\", role: \"Admin\" },\n\t{ id: \"u3\", name: \"Sam Rivera\", initials: \"SR\", email: \"sam@studio.com\", role: \"Member\" },\n\t{ id: \"u4\", name: \"jun@studio.com\", initials: \"J\", email: \"Invited 2 days ago\", role: \"Pending\" },\n]\n\nexport interface TeamMembersBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n\tonInvite?: () => void\n\t/** Called with the member's id and the action chosen from their menu. */\n\tonMemberAction?: (id: string, action: \"make-admin\" | \"make-member\" | \"resend\" | \"remove\") => void\n}\n\nexport function TeamMembersBlock({ className, framed = true, onInvite, onMemberAction }: TeamMembersBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-2xl\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Members</CardTitle>\n\t\t\t\t<CardDescription>{members.length} people in this workspace.</CardDescription>\n\t\t\t\t<CardAction>\n\t\t\t\t\t<Button size=\"sm\" iconStart={<Icon name=\"plus\" />} onClick={onInvite}>\n\t\t\t\t\t\tInvite\n\t\t\t\t\t</Button>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardList>\n\t\t\t\t{members.map((m) => (\n\t\t\t\t\t<Entity\n\t\t\t\t\t\tkey={m.id}\n\t\t\t\t\t\tleading={<Avatar variant=\"art\" size=\"sm\" fallback={m.initials} alt={m.name} />}\n\t\t\t\t\t\ttitle={m.name}\n\t\t\t\t\t\tsubtitle={m.email}\n\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<Badge appearance={m.role === \"Pending\" ? \"outline\" : \"plain\"} tone={m.role === \"Owner\" ? \"1\" : \"neutral\"} size=\"sm\">\n\t\t\t\t\t\t\t\t\t{m.role}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t{/* The owner is not managed from here; a placeholder keeps the column aligned. */}\n\t\t\t\t\t\t\t\t{m.role === \"Owner\" ? (\n\t\t\t\t\t\t\t\t\t<span aria-hidden className=\"size-(--control-sm)\" />\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<OverflowMenu label={`Manage ${m.name}`} size=\"icon-sm\">\n\t\t\t\t\t\t\t\t\t\t{m.role === \"Pending\" ? (\n\t\t\t\t\t\t\t\t\t\t\t<MenuItem onClick={() => onMemberAction?.(m.id, \"resend\")}>Resend invite</MenuItem>\n\t\t\t\t\t\t\t\t\t\t) : m.role === \"Admin\" ? (\n\t\t\t\t\t\t\t\t\t\t\t<MenuItem onClick={() => onMemberAction?.(m.id, \"make-member\")}>Make member</MenuItem>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<MenuItem onClick={() => onMemberAction?.(m.id, \"make-admin\")}>Make admin</MenuItem>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<MenuSeparator />\n\t\t\t\t\t\t\t\t\t\t<MenuItem variant=\"destructive\" onClick={() => onMemberAction?.(m.id, \"remove\")}>\n\t\t\t\t\t\t\t\t\t\t\t{m.role === \"Pending\" ? \"Cancel invite\" : \"Remove from workspace\"}\n\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t</OverflowMenu>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</CardList>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "TestimonialBlock",
        "path": "blocks/testimonial-block.tsx",
        "summary": "A customer story: one large blockquote with the person's avatar, name and role, beside three outcome figures separated by rules.",
        "intent": "Reach for this for one strong, attributable quote backed by numbers. A wall of short quotes is a different section; a logo row is Marquee.",
        "family": "Marketing",
        "kind": "section",
        "notes": [
          "Copied from the BrandLandingPage page shell's customer story.",
          "The quote and the outcomes share one Card as a <figure>; the outcomes move under the quote below lg.",
          "Outcome values use display sizes because they are the proof; their labels say what each number counts."
        ],
        "a11y": [
          "<figure> + <blockquote> + <figcaption> tie the quote to the person who said it.",
          "The section is labelled \"Customer story\" so it is reachable as a landmark."
        ],
        "imports": "import { Avatar, Card, CardContent, cn, Region, Separator, Stack } from \"@sableui/react\"",
        "code": "const story = {\n\tquote: \"We used to chase approvals across four tools. Now every request has an owner, a deadline, and a record, and our auditors stopped asking for screenshots.\",\n\tname: \"Maya Okafor\",\n\tinitials: \"MO\",\n\trole: \"Head of operations, Fielddesk\",\n}\n\nconst outcomes = [\n\t{ value: \"3.2×\", label: \"faster approvals in the first quarter\" },\n\t{ value: \"68%\", label: \"fewer follow-ups on handoffs\" },\n\t{ value: \"1 day\", label: \"to prepare a quarterly audit\" },\n]\n\nexport interface TestimonialBlockProps {\n\tclassName?: string\n}\n\nexport function TestimonialBlock({ className }: TestimonialBlockProps) {\n\treturn (\n\t\t<Region as=\"section\" aria-label=\"Customer story\" max=\"wide\" className={cn(\"w-full py-16\", className)}>\n\t\t\t<Card render={<figure />}>\n\t\t\t\t<div className=\"grid lg:grid-cols-[1.5fr_1fr]\">\n\t\t\t\t\t<CardContent className=\"flex flex-col justify-between gap-10 sm:p-10\">\n\t\t\t\t\t\t<Stack gap={3}>\n\t\t\t\t\t\t\t<p className=\"text-overline text-muted-foreground\">Customer story</p>\n\t\t\t\t\t\t\t<blockquote className=\"text-balance text-heading-3 sm:text-heading-2\">“{story.quote}”</blockquote>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t<figcaption className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t<Avatar variant=\"art\" size=\"lg\" fallback={story.initials} alt={story.name} />\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<p className=\"text-title-sm\">{story.name}</p>\n\t\t\t\t\t\t\t\t<p className=\"text-body-sm text-muted-foreground\">{story.role}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</figcaption>\n\t\t\t\t\t</CardContent>\n\t\t\t\t\t<div className=\"border-border max-lg:border-t lg:border-s\">\n\t\t\t\t\t\t<CardContent className=\"flex h-full flex-col justify-center gap-6 sm:p-10\">\n\t\t\t\t\t\t\t{outcomes.map((outcome, index) => (\n\t\t\t\t\t\t\t\t<Stack key={outcome.label} gap={3}>\n\t\t\t\t\t\t\t\t\t{index > 0 && <Separator />}\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-heading-1 sm:text-display-lg\">{outcome.value}</p>\n\t\t\t\t\t\t\t\t\t\t<p className=\"mt-1 text-body-sm text-muted-foreground\">{outcome.label}</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Card>\n\t\t</Region>\n\t)\n}"
      },
      {
        "name": "TrafficSourcesBlock",
        "path": "blocks/traffic-sources-block.tsx",
        "summary": "A share card: a donut PieChart of where a total comes from, the total in the hole, a legend, and the headline share in words in the footer.",
        "intent": "Reach for this for a split of one total into four or fewer parts — traffic sources, revenue by plan, tickets by channel. More parts, or values to compare exactly, belong in a horizontal BarChart.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "The total sits in the donut's hole, so the card answers \"how many\" and \"from where\" at once.",
          "The footer puts the biggest share in a sentence — the takeaway does not depend on reading the slices.",
          "The slices sweep in clockwise as the card scrolls into view."
        ],
        "a11y": [
          "The chart's data table lists every source and its count; the legend repeats it visually.",
          "Hovering or arrowing through the slices pulls each out and announces it."
        ],
        "imports": "import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, PieChart } from \"@sableui/react\"",
        "code": "const sources = [\n\t{ source: \"Search\", visitors: 4280 },\n\t{ source: \"Direct\", visitors: 2910 },\n\t{ source: \"Social\", visitors: 1840 },\n\t{ source: \"Email\", visitors: 960 },\n]\n\nconst total = sources.reduce((sum, s) => sum + s.visitors, 0)\n\nexport interface TrafficSourcesBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n}\n\nexport function TrafficSourcesBlock({ className, framed = true }: TrafficSourcesBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Traffic sources</CardTitle>\n\t\t\t\t<CardDescription>Where this month's visitors came from.</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<PieChart\n\t\t\t\t\tlabel=\"Visitors by source, this month\"\n\t\t\t\t\tdata={sources}\n\t\t\t\t\tindex=\"source\"\n\t\t\t\t\tvalueKey=\"visitors\"\n\t\t\t\t\tdonut\n\t\t\t\t\tcenterLabel={{ value: total, label: \"Visitors\" }}\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"text-body-sm text-muted-foreground\">\n\t\t\t\tSearch brings {Math.round((sources[0].visitors / total) * 100)}% of visitors.\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "TrafficTrendBlock",
        "path": "blocks/traffic-trend-block.tsx",
        "summary": "A trend card: a stacked gradient AreaChart of two series by day, a time-range ToggleGroup in the header, and a one-line takeaway with its direction in the footer.",
        "intent": "Reach for this as the headline chart of a dashboard or an analytics section on a landing page. For a single number with a small trend beside it, KpiSparklineBlock is lighter.",
        "family": "Dashboard",
        "kind": "card",
        "width": {
          "min": "20rem",
          "max": "48rem"
        },
        "notes": [
          "Switching the range eases the chart from one shape to the next instead of redrawing it.",
          "The footer states the takeaway in words, so the card says something even before the chart is read. In a narrow card the observation moves to its own line instead of wrapping mid-phrase.",
          "The tooltip heading spells out the weekday; the axis keeps short dates so they fit."
        ],
        "a11y": [
          "The chart's accessible name includes the range showing, and its data table updates with it.",
          "The range control is a labelled ToggleGroup; the chart is one tab stop with arrow-key navigation."
        ],
        "imports": "\"use client\"\n\nimport { useState } from \"react\"\nimport { AreaChart, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, Icon, Toggle, ToggleGroup } from \"@sableui/react\"",
        "code": "/** 90 days of visitors — replace with your own rows ({ date, desktop, mobile }). */\nconst days = Array.from({ length: 90 }, (_, i) => {\n\tconst wave = Math.sin(i / 6) * 60 + Math.sin(i / 2.3) * 25\n\treturn {\n\t\tdate: new Date(2026, 6, 1 + i).toISOString().slice(0, 10),\n\t\tdesktop: Math.round(240 + wave + (i % 7) * 9),\n\t\tmobile: Math.round(160 + wave * 0.7 + ((i * 3) % 11) * 6),\n\t}\n})\n\nconst series = [\n\t{ key: \"desktop\", label: \"Desktop\" },\n\t{ key: \"mobile\", label: \"Mobile\" },\n]\n\nconst ranges = [\n\t{ id: \"90d\", label: \"3 months\", days: 90 },\n\t{ id: \"30d\", label: \"30 days\", days: 30 },\n\t{ id: \"7d\", label: \"7 days\", days: 7 },\n]\n\n// One formatter, built once: toLocaleDateString builds a new one per call,\n// and a chart formats every tick on every render.\nconst SHORT_DATE = new Intl.DateTimeFormat(\"en-US\", { month: \"short\", day: \"numeric\" })\nconst shortDate = (iso: string) => SHORT_DATE.format(new Date(`${iso}T00:00:00`))\nconst LONG_DATE = new Intl.DateTimeFormat(\"en-US\", { weekday: \"short\", month: \"short\", day: \"numeric\" })\n\nexport interface TrafficTrendBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a muted section that already frames it. */\n\tframed?: boolean\n}\n\nexport function TrafficTrendBlock({ className, framed = true }: TrafficTrendBlockProps) {\n\tconst [range, setRange] = useState(\"90d\")\n\tconst shown = days.slice(-(ranges.find((r) => r.id === range)?.days ?? 90))\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"@container/trend w-full max-w-3xl\", className)}>\n\t\t\t<CardHeader className=\"@max-sm/trend:has-data-[slot=card-action]:grid-cols-1\">\n\t\t\t\t<CardTitle render={<h2 />}>Visitors</CardTitle>\n\t\t\t\t<CardDescription>Desktop and mobile, by day.</CardDescription>\n\t\t\t\t{/* Beside the title on a wide card; under it on a narrow one, where three\n\t\t\t\t    ranges would squeeze the title and description into a sliver. */}\n\t\t\t\t<CardAction className=\"@max-sm/trend:col-start-1 @max-sm/trend:row-span-1 @max-sm/trend:row-start-auto @max-sm/trend:mt-2 @max-sm/trend:justify-self-start\">\n\t\t\t\t\t<ToggleGroup value={[range]} onValueChange={(v: unknown[]) => v[0] && setRange(String(v[0]))} aria-label=\"Time range\">\n\t\t\t\t\t\t{ranges.map((r) => (\n\t\t\t\t\t\t\t<Toggle key={r.id} value={r.id}>\n\t\t\t\t\t\t\t\t{r.label}\n\t\t\t\t\t\t\t</Toggle>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ToggleGroup>\n\t\t\t\t</CardAction>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<AreaChart\n\t\t\t\t\tlabel={`Visitors per day, last ${ranges.find((r) => r.id === range)?.label}`}\n\t\t\t\t\tdata={shown}\n\t\t\t\t\tindex=\"date\"\n\t\t\t\t\tseries={series}\n\t\t\t\t\tindexFormatter={shortDate}\n\t\t\t\t\ttooltip={{ labelFormatter: (d) => LONG_DATE.format(new Date(`${d}T00:00:00`)) }}\n\t\t\t\t\tstacked\n\t\t\t\t\tgradient\n\t\t\t\t\tclassName=\"h-64\"\n\t\t\t\t/>\n\t\t\t</CardContent>\n\t\t\t{/* One line where it fits. In a narrow card the observation takes its own\n\t\t\t    line (and drops the separator) rather than wrapping mid-phrase. */}\n\t\t\t<CardFooter className=\"flex-wrap gap-x-1.5 gap-y-0.5 text-body-sm\">\n\t\t\t\t<Icon name=\"arrow-up\" className=\"text-success\" />\n\t\t\t\t<span>Up 5.2% on the previous period</span>\n\t\t\t\t<span className=\"text-muted-foreground @max-md/trend:basis-full\">\n\t\t\t\t\t<span aria-hidden className=\"@max-md/trend:hidden\">· </span>\n\t\t\t\t\tDesktop leads every week\n\t\t\t\t</span>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "UploadListBlock",
        "path": "blocks/upload-list-block.tsx",
        "summary": "An upload queue: full-width Attachment rows — one uploading with progress and a cancel button, one finished with a success check.",
        "intent": "Reach for this under a FileDropzone, or anywhere files are in flight — a composer, an import step, a document form. For files attached to a message, Attachment chips in the composer fit better.",
        "family": "Media & files",
        "kind": "card",
        "width": {
          "min": "16rem",
          "max": "20rem"
        },
        "notes": [
          "Rows, not chips: each Attachment drops its chip cap (`max-w-none`) to fill the block's width.",
          "The success check sits in a control-sized box so it lines up with the cancel button on the row above.",
          "No card: Attachment rows are their own surfaces. Wrap the block in a Card if it needs a header."
        ],
        "a11y": [
          "Attachment announces upload progress; the cancel Button carries aria-label.",
          "The finished row's check carries aria-label=\"Uploaded\", so the state is spoken, not only coloured."
        ],
        "imports": "\"use client\"\n\nimport { Attachment, Button, cn, Icon } from \"@sableui/react\"",
        "code": "const uploading = { name: \"brand-guidelines.pdf\", meta: \"4.2 MB of 6.8 MB\", progress: 62 }\nconst uploaded = { name: \"cover-final.png\", meta: \"Uploaded · 2.1 MB\" }\n\nexport interface UploadListBlockProps {\n\tclassName?: string\n\t/** Called when the in-progress upload is cancelled. */\n\tonCancel?: () => void\n}\n\nexport function UploadListBlock({ className, onCancel }: UploadListBlockProps) {\n\treturn (\n\t\t// An upload list, not chips: rows fill the block's width.\n\t\t<div className={cn(\"flex w-full max-w-xs flex-col gap-2\", className)}>\n\t\t\t<Attachment\n\t\t\t\tclassName=\"max-w-none\"\n\t\t\t\tname={uploading.name}\n\t\t\t\tmeta={uploading.meta}\n\t\t\t\tstatus=\"uploading\"\n\t\t\t\tprogress={uploading.progress}\n\t\t\t\tactions={\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Cancel upload\" onClick={onCancel}>\n\t\t\t\t\t\t<Icon name=\"xmark\" />\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<Attachment\n\t\t\t\tclassName=\"max-w-none\"\n\t\t\t\tname={uploaded.name}\n\t\t\t\ticon=\"image-stack\"\n\t\t\t\tmeta={uploaded.meta}\n\t\t\t\t// The same box as the icon-sm button above, so the check centres on\n\t\t\t\t// the cancel button's line instead of hugging the edge.\n\t\t\t\tactions={\n\t\t\t\t\t<span className=\"grid size-(--control-sm) place-items-center\">\n\t\t\t\t\t\t<Icon name=\"circle-check\" className=\"text-success\" aria-label=\"Uploaded\" />\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t)\n}"
      },
      {
        "name": "VerifyCodeBlock",
        "path": "blocks/verify-code-block.tsx",
        "summary": "A one-time-code card: where the code went, a six-slot OtpField grouped 3 + 3 under a visible label, and a quiet Resend.",
        "intent": "Reach for this for email or SMS verification, two-factor sign-in, or confirming a sensitive change. For a code someone copies out (a recovery key), show it with Code and a copy button instead.",
        "family": "Auth",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "24rem"
        },
        "notes": [
          "No submit button: the code verifies the moment the last slot fills, which is what people expect from a code field.",
          "The destination is named in the description, so a mistyped address is caught before the wait.",
          "Resend is a ghost Button — present for the stuck case, never competing with the field."
        ],
        "a11y": [
          "OtpField names each slot (\"Character 1 of 6\") and accepts a pasted code into all six at once.",
          "Field labels the group and reads the expiry as its description."
        ],
        "imports": "\"use client\"\n\nimport { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, Field, OtpField } from \"@sableui/react\"",
        "code": "const sentTo = \"ada@studio.com\"\n\nexport interface VerifyCodeBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet, Dialog or muted section that already frames it. */\n\tframed?: boolean\n\t/** Called with the code as soon as the last digit is entered. */\n\tonVerify?: (code: string) => void\n\tonResend?: () => void\n}\n\nexport function VerifyCodeBlock({ className, framed = true, onVerify, onResend }: VerifyCodeBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-sm\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardTitle render={<h2 />}>Check your email</CardTitle>\n\t\t\t\t<CardDescription>\n\t\t\t\t\tWe sent a 6-digit code to <span className=\"text-foreground\">{sentTo}</span>.\n\t\t\t\t</CardDescription>\n\t\t\t</CardHeader>\n\t\t\t<CardContent>\n\t\t\t\t<Field label=\"Verification code\" description=\"The code expires in 10 minutes.\">\n\t\t\t\t\t<OtpField length={6} groupSize={3} onValueComplete={(code: string) => onVerify?.(code)} />\n\t\t\t\t</Field>\n\t\t\t</CardContent>\n\t\t\t<CardFooter className=\"justify-between gap-3\">\n\t\t\t\t<span className=\"text-caption text-muted-foreground\">Didn’t get it?</span>\n\t\t\t\t<Button variant=\"ghost\" size=\"sm\" bleed=\"end\" onClick={onResend}>\n\t\t\t\t\tResend code\n\t\t\t\t</Button>\n\t\t\t</CardFooter>\n\t\t</Card>\n\t)\n}"
      },
      {
        "name": "WalletBlock",
        "path": "blocks/wallet-block.tsx",
        "summary": "A balance card: the balance in the metric mono tier, Send and Receive as an equal pair, and recent activity as Entity rows with signed amounts.",
        "intent": "Reach for this for an account balance, store credit or credits summary with its latest movements. For a full transaction history with filters, use a DataTable.",
        "family": "Commerce",
        "kind": "card",
        "width": {
          "min": "18rem",
          "max": "20rem"
        },
        "notes": [
          "The balance is CardTitle at `text-mono-xl` — tabular figures, never a heading tier — under its label as CardDescription.",
          "Send is primary and Receive secondary, side by side at equal width: two directions of one action, with sending the riskier and more frequent.",
          "Incoming amounts are `text-success`; outgoing stay muted rather than red, because a payout or refund is not an error."
        ],
        "a11y": [
          "Each activity row's leading swatch is aria-hidden; the title and detail carry the meaning.",
          "Amounts keep their sign in text (+49.00 / -850.00), so the direction does not depend on colour."
        ],
        "imports": "\"use client\"\n\nimport { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Entity, Icon } from \"@sableui/react\"",
        "code": "const balance = \"$2,418.50\"\n\nconst activity = [\n\t{ title: \"Subscription\", detail: \"Team plan · 2h ago\", amount: \"+49.00\", tone: \"1\" },\n\t{ title: \"Refund\", detail: \"Order 1042 · Yesterday\", amount: \"-24.00\", tone: \"2\" },\n\t{ title: \"Payout\", detail: \"To checking · Mon\", amount: \"-850.00\", tone: \"3\" },\n] as const\n\n/** Each row's mark: its tone at graphic strength, which every theme tunes. */\nconst TONE_MARK = { \"1\": \"bg-tone-1-mark\", \"2\": \"bg-tone-2-mark\", \"3\": \"bg-tone-3-mark\" } as const\n\nexport interface WalletBlockProps {\n\tclassName?: string\n\t/** false drops the card's surface and border — for a Sheet or muted section that already frames it. */\n\tframed?: boolean\n\tonSend?: () => void\n\tonReceive?: () => void\n}\n\nexport function WalletBlock({ className, framed = true, onSend, onReceive }: WalletBlockProps) {\n\treturn (\n\t\t<Card variant={framed ? \"default\" : \"flat\"} className={cn(\"w-full max-w-xs\", className)}>\n\t\t\t<CardHeader>\n\t\t\t\t<CardDescription>Balance</CardDescription>\n\t\t\t\t<CardTitle className=\"text-mono-xl\">{balance}</CardTitle>\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"flex flex-col gap-3\">\n\t\t\t\t<div className=\"grid grid-cols-2 gap-2\">\n\t\t\t\t\t<Button iconStart={<Icon name=\"arrow-up\" />} onClick={onSend}>\n\t\t\t\t\t\tSend\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button variant=\"secondary\" iconStart={<Icon name=\"arrow-down\" />} onClick={onReceive}>\n\t\t\t\t\t\tReceive\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t{activity.map((item) => (\n\t\t\t\t\t\t<Entity\n\t\t\t\t\t\t\tkey={item.title}\n\t\t\t\t\t\t\tclassName=\"px-0\"\n\t\t\t\t\t\t\tleading={\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\tclassName={cn(\"block size-8 rounded-full\", TONE_MARK[item.tone])}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={item.title}\n\t\t\t\t\t\t\tsubtitle={item.detail}\n\t\t\t\t\t\t\taction={\n\t\t\t\t\t\t\t\t<span className={cn(\"text-mono-md\", item.amount.startsWith(\"+\") ? \"text-success\" : \"text-muted-foreground\")}>\n\t\t\t\t\t\t\t\t\t{item.amount}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t)\n}"
      }
    ]
  },
  "foundations": [
    {
      "slug": "typography",
      "title": "Typography",
      "summary": "Type is a closed vocabulary of paired utilities. Each one bundles size, weight, line-height and tracking, and is picked by role rather than by size.",
      "headline": "7 families · 8 everyday tiers · 2 text colors · 1 utility per text node",
      "retrieve": "sable docs typography",
      "vocabularies": [
        {
          "title": "The everyday set",
          "note": "Product UI is built almost entirely from these eight. Reach outside them on purpose.",
          "terms": [
            {
              "name": "text-heading-1",
              "value": "36px · 600",
              "use": "The page title. Exactly one per route."
            },
            {
              "name": "text-heading-2",
              "value": "28px · 600",
              "use": "A major section of the page."
            },
            {
              "name": "text-title-lg",
              "value": "16px · 600",
              "use": "Names a component: card, dialog, sheet, list row."
            },
            {
              "name": "text-title-sm",
              "value": "14px · 600",
              "use": "Names a dense component: compact card, table section."
            },
            {
              "name": "text-body-md",
              "value": "15px · 400",
              "use": "The default paragraph, description and help text."
            },
            {
              "name": "text-body-sm",
              "value": "13px · 400",
              "use": "Secondary copy and table cells."
            },
            {
              "name": "text-label-lg",
              "value": "14px · 600",
              "use": "Buttons, field labels, tabs."
            },
            {
              "name": "text-caption",
              "value": "12px · 400",
              "use": "Timestamps, footnotes, meta rows."
            }
          ]
        },
        {
          "title": "The seven families",
          "note": "Every tier belongs to one family, and the family is the decision. Size follows from it.",
          "terms": [
            {
              "name": "Display  display-lg…4xl",
              "value": "48–120px · 700–800",
              "use": "Type as image: landing heroes, campaign numbers. Never in product chrome; never two per view."
            },
            {
              "name": "Heading  heading-1…4",
              "value": "36 / 28 / 22 / 18px · 600",
              "use": "The document outline (h1–h4). Keep the order; never skip a level to get a size."
            },
            {
              "name": "Title  title-lg · title-sm",
              "value": "16 / 14px · 600",
              "use": "Names a UI part without claiming a document heading."
            },
            {
              "name": "Body  body-lg/md/sm/xs",
              "value": "17 / 15 / 13 / 12px · 400",
              "use": "Reading text. -lg is the lede (carries text-wrap: pretty); -xs is a dense-UI floor, not a prose size."
            },
            {
              "name": "Label  label-lg/md/sm/xs · caption",
              "value": "14 / 12 / 11 / 11px · 600; caption 12 · 400",
              "use": "Functional, scannable text of one to three words, sentence case. Caption is also the group-label tier: nav sections, menu groups."
            },
            {
              "name": "Overline  overline",
              "value": "12px · 600 · uppercase, tracked",
              "use": "The eyebrow: an editorial kicker above a marketing heading, at most one per view. Label `eyebrow` renders it. Never product chrome."
            },
            {
              "name": "Mono  mono-xl/lg/md/caption/sm",
              "value": "28 / 20 / 13 / 12 / 11px · tabular",
              "use": "Numbers that are the content, IDs, hashes, code, aligned figures."
            }
          ]
        },
        {
          "title": "Text color",
          "terms": [
            {
              "name": "text-foreground",
              "value": "full contrast",
              "use": "Primary text: headings, body, values."
            },
            {
              "name": "text-muted-foreground",
              "value": "secondary contrast (AA on every surface)",
              "use": "Supporting text: descriptions, captions, meta, placeholders."
            }
          ]
        }
      ],
      "rules": [
        {
          "rule": "One paired utility per text node. Compose it with a color and margin only.",
          "why": "Each utility is a tuned set of size, weight, leading and tracking. Splitting it into text-* + font-* + tracking-* breaks the tuning and every theme override of it.",
          "enforcedBy": "sable-lint: decomposed-type"
        },
        {
          "rule": "Pick the tier by role, not by the size it renders at.",
          "why": "A card title is title-lg even when body-lg is the same size: role fixes the weight (600 vs 400) and the rhythm around it."
        },
        {
          "rule": "Two text colors: foreground and muted-foreground.",
          "why": "Both are contrast-tested against every surface in every theme. A third grey, or an opacity step, is untested contrast."
        },
        {
          "rule": "One heading-1 per route; headings descend without skipping levels.",
          "why": "The heading outline is how screen-reader users navigate a page. Restyle with a tier rather than jumping a level for its size."
        },
        {
          "rule": "Hierarchy comes from a clear jump (heading → title → body), then weight and space, before size.",
          "why": "Two sizes one step apart read as the same level. Space and weight separate levels more cheaply than another size."
        },
        {
          "rule": "Cap reading text at --measure-prose (65ch).",
          "why": "Past roughly 75 characters the eye loses the line return. A wide region can still hold a 65ch column."
        },
        {
          "rule": "Numbers that must align use a mono tier (tabular figures).",
          "why": "Proportional digits change width as values update, so totals and columns shimmy."
        },
        {
          "rule": "text-wrap: balance on headings, pretty on ledes, neither on long prose.",
          "why": "balance evens short headlines; pretty only refuses a one-word last line. Both cost layout work that long prose does not repay."
        },
        {
          "rule": "To make all the type smaller or larger, set the base: --type-base: 14 (a unitless px number; 16 is the default). Never retune tiers one by one for it.",
          "why": "Every tier is authored on a 16px base and keeps its ratio to it, so one number rebuilds the whole scale, headings to captions, and the baseline step and spacing follow the body. Shrinking tiers individually breaks the ratios between them. Set it on :root, a theme scope or a preset (tokens.shared[\"type-base\"]) so the rhythm follows too."
        },
        {
          "rule": "Inside a Workspace, a panel's title is text-ui-title (14px · 600); compact text-title-lg resolves to it. Code follows too: text-mono-md and text-mono-caption compress to 12 / 11px at their own weight, so a CodeBlock matches the inputs beside it. A reading view inside the tool (an overview, a document, a long form) is wrapped in <Density value=\"comfortable\"> and gets the page tiers back.",
          "why": "The compact register remaps page tiers onto the 10-12px chrome ramp, which is right for chrome and wrong for prose: an issue overview set in a tool rendered its paragraphs at 11px. The remap stops at a comfortable boundary, so the wrapper is the whole fix."
        },
        {
          "rule": "A mark attached to a line of type (a dot, a bullet, a timeline marker, a leading icon) sits in a box one line tall (h-[1lh] items-center) and is sized in em.",
          "why": "1lh is the line-height of the text beside it, so the mark centres on that line in every tier, density and theme. A px size with a mt-[3px] nudge is right for one font at one size and wrong everywhere else."
        }
      ],
      "noGos": [
        {
          "never": "Opacity on text (text-foreground/60, opacity-70 on a paragraph).",
          "instead": "text-muted-foreground.",
          "why": "An alpha step over an unknown surface has unknown contrast, and it shifts per theme.",
          "enforcedBy": "sable-lint: text-opacity"
        },
        {
          "never": "A hand-picked size, weight or tracking (text-[15px], font-medium, tracking-wide).",
          "instead": "The paired utility for the role.",
          "why": "Off-vocabulary type cannot be retuned by a theme or the customizer, so it drifts the moment either changes.",
          "enforcedBy": "sable-lint: decomposed-type"
        },
        {
          "never": "Uppercase in product chrome: nav and menu group labels, page eyebrows, table headers, section titles.",
          "instead": "Sentence-case text-caption or text-label-md in muted-foreground; hierarchy from size, weight and space.",
          "why": "Tracked capitals spread across a UI read as shouting and slow word recognition. The eyebrow tier (text-overline, or Label `eyebrow`) is an editorial accent: at most one per marketing view. text-label-xs is a sentence-case label, not an eyebrow."
        },
        {
          "never": "Display tiers inside product UI, or two display sizes in one view.",
          "instead": "heading-1 for a page title; mono-xl for a metric.",
          "why": "Display is type as image. In chrome it competes with the content it is supposed to frame."
        },
        {
          "never": "Justified text, or reading copy below body-sm.",
          "instead": "Ragged-right at body-md; body-xs only for dense data.",
          "why": "Justification opens rivers on the web, which has no hyphenation control; 12px prose fails people with low vision."
        },
        {
          "never": "Changing the root font-size (html { font-size: 14px }) to make a product denser.",
          "instead": "--type-base: 14, with Workspace or <Density value=\"compact\"> for denser controls.",
          "why": "The root also sizes every rem the app wrote: widths, insets, media queries. --type-base moves only the type and the rhythm built on it, and density moves the controls, so each can be chosen on its own."
        },
        {
          "never": "A new font family, or raw font-feature-settings / font-variation-settings.",
          "instead": "The theme's sans, mono and optional display; font-variant-numeric and font-weight.",
          "why": "Raw axis tags silently do nothing on a fallback font, and every theme declares a fallback stack."
        }
      ]
    },
    {
      "slug": "spacing",
      "title": "Spacing & sizing",
      "summary": "One scale, derived from the type: the baseline is one line of body text, split into steps every gap, inset and line height lands on. Space is assigned by role. Controls read a height ladder that a density scope can retune all at once.",
      "headline": "Baseline from the type · 8px steps · 3 roles · 1 control ladder",
      "retrieve": "sable docs spacing",
      "vocabularies": [
        {
          "title": "Spacing by role",
          "note": "Steps below 2 (8px) are optical correction only.",
          "terms": [
            {
              "name": "Inset  p-4",
              "value": "16px",
              "use": "Padding inside a surface. p-3 for a dense card, px-3 py-2 for a row."
            },
            {
              "name": "Stack, within a group  gap-2",
              "value": "1 step · 8px",
              "use": "Label to field, title to description."
            },
            {
              "name": "Stack, between groups  gap-4 – gap-6",
              "value": "2–3 steps · 16–24px",
              "use": "Field to field, card to card."
            },
            {
              "name": "Stack, between sections  gap-12+",
              "value": "48px+",
              "use": "Major regions of a page."
            },
            {
              "name": "Inline  gap-2 – gap-3",
              "value": "8–12px",
              "use": "Icon to label, control to control."
            }
          ]
        },
        {
          "title": "The control ladder",
          "note": "Comfortable values; data-density=\"compact\" (or <Density>) redefines every step for a region.",
          "terms": [
            {
              "name": "h-(--control-xs)",
              "value": "28px · compact 24",
              "use": "Inline chips, tree rows."
            },
            {
              "name": "h-(--control-sm)",
              "value": "32px · compact 28",
              "use": "Compact buttons, toolbar controls."
            },
            {
              "name": "h-(--control-md)",
              "value": "40px · compact 32",
              "use": "The default: inputs, buttons, selects, menu triggers."
            },
            {
              "name": "h-(--control-cta)",
              "value": "44px · compact 36",
              "use": "The primary call to action; clears the touch floor on its own."
            },
            {
              "name": "h-(--control-lg)",
              "value": "48px · compact 40",
              "use": "Prominent or touch-first actions."
            }
          ]
        },
        {
          "title": "Icons and touch",
          "terms": [
            {
              "name": "text-base (16px)",
              "value": "sm",
              "use": "Inline with label-md / body-sm."
            },
            {
              "name": "text-xl (20px)",
              "value": "md · default",
              "use": "The default UI glyph beside label-lg."
            },
            {
              "name": "hit-target",
              "value": "44×44px",
              "use": "Keeps a visually small control's hit area at the WCAG floor without moving layout."
            }
          ]
        }
      ],
      "rules": [
        {
          "rule": "Every margin, padding and gap is a step on the scale, and vertical space between blocks is whole baseline steps: an even Tailwind step (2, 4, 6, 8, 12) or a Stack/Row/Grid gap number.",
          "why": "The baseline is one line of body text split into steps; line heights round to it. An odd step (3, 5) is half a baseline step. It is a rhythm to keep, not a grid to force: components stay as tall as their content."
        },
        {
          "rule": "Padding, gaps and insets in a component sit on the spacing scale: a step (p-4, gap-2) or --spacing(n) inside an arbitrary value (p-[var(--card-p,--spacing(6))]).",
          "why": "--spacing derives from the baseline step and the density (Character) control moves the leading it comes from, so anything on the scale moves with it. A literal p-[1.5rem] or padding: \"12px\" stays put while everything around it tightens. Keep fixed rem/px for what must not scale: a 1px hairline, a ring width.",
          "enforcedBy": "design-lint: fixed-spacing (library source)"
        },
        {
          "rule": "Related things sit closer than unrelated things.",
          "why": "Proximity groups content without a divider line. Use space first; reach for a border only when space is not enough."
        },
        {
          "rule": "Space lives on the container (gap), not on children (margins).",
          "why": "gap survives reordering, conditional children and RTL; per-child margins do not."
        },
        {
          "rule": "Control heights read the --control-* ladder.",
          "why": "A density scope retunes every control at once. A hardcoded height has to be found and overridden by hand.",
          "enforcedBy": "sable-lint: raw-control-height"
        },
        {
          "rule": "Single-column content inside a card stacks with flex flex-col and a gap, not CSS grid.",
          "why": "A grid track sizes to its widest min-content child, so one long unbreakable string (a URL, a code line, a table) blows the column out past the card. A flex column lets children shrink to the card."
        },
        {
          "rule": "A compact surface drops one whole step; a spacious one adds one.",
          "why": "Moving in whole steps keeps density changes proportional."
        },
        {
          "rule": "Every interactive element clears a 44×44px hit area.",
          "why": "WCAG 2.5.5. Use padding or hit-target to grow the hit area; never a bigger glyph."
        },
        {
          "rule": "Borderless controls get roughly twice the gap of bordered ones.",
          "why": "A border declares where a control ends. Two ghost buttons 12px apart read as one target."
        }
      ],
      "noGos": [
        {
          "never": "Arbitrary values: p-[15px], gap-[7px], mt-[13px].",
          "instead": "The nearest scale step.",
          "why": "Arbitrary values cannot follow density or a customized scale."
        },
        {
          "never": "h-[40px] on a control.",
          "instead": "h-(--control-md).",
          "why": "It will not follow <Density>.",
          "enforcedBy": "sable-lint: raw-control-height"
        },
        {
          "never": "Icons sized with type utilities (text-body-md on an <Icon>).",
          "instead": "text-{size} scale classes.",
          "why": "Type utilities carry line-height and tracking that misalign glyphs."
        },
        {
          "never": "A fixed width sized to an English label.",
          "instead": "padding-inline and max-width with wrapping.",
          "why": "German and Finnish run 30–50% longer."
        }
      ]
    },
    {
      "slug": "shape",
      "title": "Shape",
      "summary": "Radius signals what something is: tight on containers, full on actions. Nested corners stay concentric, and one edge treatment marks a boundary.",
      "headline": "7 radius steps · concentric nesting · 1 edge treatment per boundary",
      "retrieve": "sable docs shape",
      "vocabularies": [
        {
          "title": "The radius ladder",
          "note": "Each step is 4px apart, so common insets land on a real step. Themes and the customizer retune every step together.",
          "terms": [
            {
              "name": "rounded-none",
              "value": "0",
              "use": "Full-bleed media."
            },
            {
              "name": "rounded-xs",
              "value": "4px",
              "use": "Tags, kbd, small inline marks."
            },
            {
              "name": "rounded-sm",
              "value": "8px",
              "use": "Inputs, menu items, list rows."
            },
            {
              "name": "rounded-md",
              "value": "12px",
              "use": "Popovers, menus, toasts."
            },
            {
              "name": "rounded-lg",
              "value": "16px",
              "use": "Cards, dialogs, sheets."
            },
            {
              "name": "rounded-xl",
              "value": "20px",
              "use": "Hero surfaces."
            },
            {
              "name": "rounded-full",
              "value": "pill",
              "use": "Buttons (via --button-radius), avatars, pills, dots."
            }
          ]
        },
        {
          "title": "Edges",
          "terms": [
            {
              "name": "border-border",
              "value": "hairline",
              "use": "The default edge: inputs, cards, badges."
            },
            {
              "name": "border-border-strong",
              "value": "hairline, higher contrast",
              "use": "Structural rules: table grids, section separators."
            },
            {
              "name": "border-border-floating",
              "value": "faint, alpha",
              "use": "Every floating surface: popovers, menus, selects, tooltips, dialogs, sheets, toasts. Lighter than border; the shadow carries the elevation."
            },
            {
              "name": "ring-2 ring-ring",
              "value": "2px focus ring",
              "use": "Focus only. Never a thick border."
            }
          ]
        }
      ],
      "rules": [
        {
          "rule": "Nested corners are concentric: inner radius = outer radius − inset. Write it as rounded-concentric-<outer>/<inset>, not a hardcoded step.",
          "why": "A 12px popover with 4px padding takes 8px items. The utility computes the subtraction from the live tokens, so the pair stays concentric when a theme or the customizer rescales the radius ladder; a hardcoded rounded-sm drifts."
        },
        {
          "rule": "A list of rows inside a rounded popup uses popup-inset on the popup, rounded-popup-item on the rows and popup-bleed on a separator.",
          "why": "All three derive from the popup's radius: the inset grows to a third of it (never below --spacing(1), so density moves it too), the rows take what is left after the inset and the 1px border, and a separator bleeds by exactly the inset. A rounder look gets more room instead of rows that round into pills; the default ladder lands on a 4px inset and 7px rows.",
          "enforcedBy": "sable-lint: popup-separator-bleed"
        },
        {
          "rule": "A Button, Pill or Badge gets its look from a variant, never from override classes.",
          "why": "border, bg, rounded, ring and shadow classes on a component fight the variant's own hover, selected and focus states, and give one call site a look no other site can ask for. Use the variant that exists (Button variant=\"floating\" over content, \"on-color\" on a fill; Pill appearance=\"outline\"; Badge appearance and tone) or add one to the component.",
          "enforcedBy": "sable-lint: component-restyle"
        },
        {
          "rule": "The outer radius is always at least the inner radius.",
          "why": "If the inset is larger than the outer radius, square the inner element or step the container up."
        },
        {
          "rule": "Never mix radii within one component.",
          "why": "A component reads as one object when its corners agree."
        },
        {
          "rule": "Actions are full; containers are tight.",
          "why": "The contrast itself says 'this is a control'. A theme flattens buttons through --button-radius, not by editing each one."
        },
        {
          "rule": "High-contrast outlines (selection, emphasis) are inset rings; hairline chrome is a border.",
          "why": "Rings anti-alias on rounded corners at any display scale; a 1px light border on dark snaps to the pixel grid and looks jagged."
        },
        {
          "rule": "One edge treatment per boundary: a border, a ring or a shadow.",
          "why": "Stacking all three makes an edge heavier than the content it holds."
        },
        {
          "rule": "Prefer a tonal step or space over a divider line.",
          "why": "The flattest thing that reads is best."
        }
      ],
      "noGos": [
        {
          "never": "rounded-[10px] or any off-ladder radius.",
          "instead": "The ladder step for the role.",
          "why": "Off-ladder radii cannot follow a theme or the customizer's radius control."
        },
        {
          "never": "A card inside a card with the same radius.",
          "instead": "Flatten the inner one, or use rounded-concentric-*.",
          "why": "Nested surfaces with equal corners look misaligned at every corner."
        },
        {
          "never": "<Button className=\"rounded-full\">, <Pill className=\"border bg-card\">, a -mx-1 separator in a popup.",
          "instead": "The component's variant (add one if it is missing); popup-bleed for the separator.",
          "why": "An override fights the component's own states and does not follow the radius ladder, the density or a theme.",
          "enforcedBy": "sable-lint: component-restyle, popup-separator-bleed"
        },
        {
          "never": "border-2 for emphasis or focus.",
          "instead": "ring-2 ring-ring for focus; a tonal fill for emphasis.",
          "why": "A thick border shifts layout and competes with the focus ring."
        }
      ]
    },
    {
      "slug": "surfaces",
      "title": "Surfaces & elevation",
      "summary": "Depth is a step up the surface ladder, chosen by how transient a surface is. Dark mode lifts with lighter tones and edge light; light mode adds soft shadows.",
      "headline": "4 surface tokens · 5 elevation roles · 1 shadow per surface · 1 layer scale",
      "retrieve": "sable docs surfaces",
      "vocabularies": [
        {
          "title": "The surface ladder",
          "terms": [
            {
              "name": "bg-background",
              "value": "the page",
              "use": "The document body; the furthest-back surface."
            },
            {
              "name": "bg-card",
              "value": "+1 step",
              "use": "Resting containers: cards, panels, dialogs."
            },
            {
              "name": "bg-muted",
              "value": "+1 step, quieter",
              "use": "Wells, code blocks, inactive fills inside a card."
            },
            {
              "name": "bg-popover",
              "value": "+2 steps",
              "use": "Anything that floats: menus, popovers, selects, tooltips. Always distinct from card, so a menu in a dialog never melts into it."
            },
            {
              "name": "bg-overlay",
              "value": "scrim",
              "use": "Behind modals, and pills over imagery."
            }
          ]
        },
        {
          "title": "Elevation by role",
          "note": "Raise by transience — how much a surface floats over content — not by importance.",
          "terms": [
            {
              "name": "Resting",
              "value": "no shadow",
              "use": "Page content and flat cards. A hairline border if it needs an edge."
            },
            {
              "name": "Raised  shadow-sm",
              "value": "subtle",
              "use": "A draggable card, a sticky header over scrolled content."
            },
            {
              "name": "Floating  shadow-md",
              "value": "anchored",
              "use": "Menus, popovers, selects, dropdowns."
            },
            {
              "name": "Modal  shadow-lg",
              "value": "with scrim",
              "use": "Dialogs, sheets, the command menu."
            },
            {
              "name": "Top  shadow-xl",
              "value": "rare",
              "use": "The toast stack."
            }
          ]
        },
        {
          "title": "Layers",
          "terms": [
            {
              "name": "z-(--z-sticky)",
              "value": "30",
              "use": "Sticky in-content chrome: table headers."
            },
            {
              "name": "z-(--z-nav)",
              "value": "40",
              "use": "App chrome: header, sidebar, bottom nav."
            },
            {
              "name": "z-(--z-overlay)",
              "value": "50",
              "use": "Every portaled transient surface."
            },
            {
              "name": "z-(--z-toast)",
              "value": "60",
              "use": "Toasts, above modals."
            },
            {
              "name": "z-(--z-skip-link)",
              "value": "100",
              "use": "The skip link, above everything."
            }
          ]
        }
      ],
      "rules": [
        {
          "rule": "Pick the elevation role, not a shadow value.",
          "why": "Elevation is a five-step system. A custom box-shadow cannot follow a theme or the light/dark split."
        },
        {
          "rule": "Floating surfaces use bg-popover, resting ones bg-card. Anything with shadow-md or above floats: menus, popovers, selects, tooltips, dialogs, sheets, toasts, a floating panel.",
          "why": "In dark mode popover is guaranteed lighter than card, so a menu opened inside a dialog always reads as on top of it. In light mode several presets make background, card and popover the same colour, so the fill alone never carries elevation.",
          "enforcedBy": "themes.test.ts + sable-lint: floating-surface"
        },
        {
          "rule": "A floating surface's edge is border-border-floating (or ring-border-floating), never the full border-border. The shadow carries the elevation.",
          "why": "A full hairline plus a shadow stacks into a heavy dark outline. border-floating is a faint alpha edge: it defines the shape against a same-coloured page in light mode and reads as a lit edge in dark mode, where shadows barely show.",
          "enforcedBy": "sable-lint: floating-surface"
        },
        {
          "rule": "A recessed area inside a surface (a segmented-control track, a pad, a preview well) is sable-well, and it takes no outline. Whatever sits on the well takes the surface's own colour back (bg-popover inside a popover).",
          "why": "sable-well mixes a fixed amount of ink into the surface it sits in, so it is the same visible step on the page, in a card or in a floating panel, in every theme and mode. A fixed bg-muted can nearly vanish inside a popover in dark mode, and adding an outline to every well to compensate stacks a panel into boxes."
        },
        {
          "rule": "One shadow per surface; never a heavy shadow with a heavy border.",
          "why": "Stacked depth cues read as decoration rather than position."
        },
        {
          "rule": "Do not elevate a static section to make it stand out.",
          "why": "Elevation means 'this floats'. Use a tonal step or space for emphasis."
        },
        {
          "rule": "For modals, the scrim is the primary depth cue.",
          "why": "The scrim is what tells the user the page behind is inert; the shadow is secondary."
        },
        {
          "rule": "Stack with the named layer scale.",
          "why": "Overlays portal to the end of body and order themselves by open order; the layer only has to clear in-flow chrome."
        }
      ],
      "noGos": [
        {
          "never": "z-[9999] or any raw z-index.",
          "instead": "z-(--z-overlay) and the other named layers.",
          "why": "Raw z-indexes become a bidding war that a future overlay always loses.",
          "enforcedBy": "sable-lint: raw-z-index"
        },
        {
          "never": "shadow-[0_8px_30px_rgba(0,0,0,.2)] or any custom shadow.",
          "instead": "shadow-sm … shadow-xl by role.",
          "why": "Custom shadows ignore the theme's light/dark elevation recipes."
        },
        {
          "never": "bg-card on a popover, or bg-popover on a resting card.",
          "instead": "Match the token to the role.",
          "why": "Swapping them is how floating surfaces melt into the surface beneath."
        }
      ]
    },
    {
      "slug": "motion",
      "title": "Motion",
      "summary": "Motion explains a change: where something came from, what responded, and that work is happening. Components ship crafted by default: one indicator travels instead of two blinking, numbers roll, ticks draw, a refused answer shakes. It is built from named recipes, comes in two levels, and one switch turns it off.",
      "headline": "4 slots · 3 speeds · 2 levels · enter-only overshoot · 1 kill switch",
      "retrieve": "sable docs motion",
      "vocabularies": [
        {
          "title": "Three speeds",
          "note": "Match duration to the distance and size of what moves. Each value is multiplied by --motion-scale. Two edge steps sit outside the three: --motion-duration-instant (75ms) for a checkbox tick or tab swap, and --motion-duration-slower (500ms) for progress and value changes.",
          "terms": [
            {
              "name": "fast  --motion-duration-fast",
              "value": "150ms",
              "use": "Hover, press, focus, tooltips, small toggles. Pop/slide exits use this step."
            },
            {
              "name": "base  --motion-duration-base",
              "value": "200ms",
              "use": "Menus, popovers, tabs, disclosure. The default enter."
            },
            {
              "name": "slow  --motion-duration-slow",
              "value": "300ms",
              "use": "Dialogs, sheets, page-level transitions."
            }
          ]
        },
        {
          "title": "Recipes",
          "note": "Reach for one named class before writing a transition.",
          "terms": [
            {
              "name": "motion-interactive",
              "value": "fast · standard",
              "use": "Hover/focus/press chrome on anything clickable. Replaces transition-colors."
            },
            {
              "name": "motion-press",
              "value": "fast · scale settle",
              "use": "Tactile press. Always paired with motion-interactive."
            },
            {
              "name": "motion-fade",
              "value": "enter base / exit fast",
              "use": "Scrims and backdrops."
            },
            {
              "name": "motion-pop",
              "value": "enter base · spring",
              "use": "Anchored or centred surfaces: popovers, menus, dialogs."
            },
            {
              "name": "motion-slide-{up,down,left,right}",
              "value": "enter base / exit fast",
              "use": "Directional surfaces: sheets, toasts."
            },
            {
              "name": "motion-disclosure",
              "value": "base · standard",
              "use": "Height changes: accordion, collapsible."
            },
            {
              "name": "motion-icon-swap",
              "value": "enter · emphasized cross-fade",
              "use": "Two icons of one control trading places: play/pause, outline/fill, copy/check."
            },
            {
              "name": "motion-glide",
              "value": "slow · emphasized · expressive",
              "use": "ONE indicator travelling to the selected option: tabs, segmented thumb, active dot."
            },
            {
              "name": "motion-shake",
              "value": "~400ms decaying · expressive",
              "use": "A refused answer: wrong code, invalid submit. Plays while data-shake is set (useShake). Never the only signal."
            },
            {
              "name": "motion-tick",
              "value": "fast fade + base wipe · expressive",
              "use": "A check mark that draws itself in. Exits only fade."
            },
            {
              "name": "motion-appear",
              "value": "fast fade + base scale",
              "use": "A small control mounting in place: a clear button, a send arrow, a badge. @starting-style, no JS."
            },
            {
              "name": "motion-arrive",
              "value": "base · decelerate · staggered · expressive",
              "use": "Items a user action brings into a list: a folder's children on expand, a row just added. Never on every render."
            },
            {
              "name": "motion-size",
              "value": "base · emphasized · expressive",
              "use": "An element easing between intrinsic sizes when its label changes: a two-step confirm, Copy → Copied."
            },
            {
              "name": "motion-bloom",
              "value": "slower · 0 → 1.2 → 1 · expressive",
              "use": "A small glyph landing in its on state: a liked heart, a picked rating, a toast's status icon. Remount it (key) to replay; never on the resting state."
            },
            {
              "name": "<Burst>",
              "value": "slower ring + thrown dots · expressive",
              "use": "The follow-through behind a bloom, in the theme's palette families. Only on a choice a person made: a like, a star, a finished task."
            },
            {
              "name": "motion-draw",
              "value": "slower · decelerate",
              "use": "SVG line art drawing on when a <Reveal> scrolls in. The path needs pathLength=\"1\"; stagger siblings with --motion-draw-delay."
            },
            {
              "name": "motion-spin · pulse · shimmer · dot-bounce · ping",
              "value": "loops",
              "use": "Activity. Scale-aware, so reduced motion freezes them."
            }
          ]
        },
        {
          "title": "Easings",
          "terms": [
            {
              "name": "ease-standard",
              "value": "cubic-bezier(0.4, 0, 0.2, 1)",
              "use": "The default for state changes."
            },
            {
              "name": "ease-decelerate",
              "value": "cubic-bezier(0, 0, 0.2, 1)",
              "use": "Entrances: arrive fast, settle slowly."
            },
            {
              "name": "ease-emphasized",
              "value": "cubic-bezier(0.2, 0, 0, 1)",
              "use": "Large surfaces covering a lot of distance."
            },
            {
              "name": "ease-spring",
              "value": "~4% overshoot",
              "use": "A gentle pop on enter. Never on exit."
            },
            {
              "name": "ease-bounce",
              "value": "~10% overshoot",
              "use": "A playful pop, opt-in only. Enter only, never on exit."
            }
          ]
        },
        {
          "title": "Two levels",
          "note": "Essential motion answers the user; expressive motion narrates continuity. Expressive durations are also multiplied by --motion-expressive, which `subtle` sets to 0. Each level can only turn motion down from what surrounds it.",
          "terms": [
            {
              "name": "essential",
              "value": "always, unless off",
              "use": "Colour and focus feedback, press, overlay arrival, disclosure height, loaders, chart hover."
            },
            {
              "name": "expressive",
              "value": "full only",
              "use": "Glides, rolling numbers (NumberTicker), drawn ticks, blooms and bursts, shakes, staggers, chart arrival and morph, scroll reveals, spring overshoot."
            },
            {
              "name": "full",
              "value": "default",
              "use": "Both levels play. The crafted default."
            },
            {
              "name": "subtle",
              "value": "data-motion=\"subtle\"",
              "use": "Essential only; nothing overshoots. For dense tools, embedded widgets, readers who want calm without stillness."
            },
            {
              "name": "off",
              "value": "data-motion=\"off\" · reduce-motion",
              "use": "Nothing moves; every state still changes."
            },
            {
              "name": "where",
              "value": "provider · scope · prop",
              "use": "<MotionProvider policy> for the app, <MotionScope level> for a region, `motion` on a component that owns a flourish."
            }
          ]
        },
        {
          "title": "The four slots",
          "note": "Every interactive component answers all four, by filling the slot or declining it with a reason in meta.motion.",
          "terms": [
            {
              "name": "arrival",
              "value": "fade · slide · pop · Reveal",
              "use": "How does it enter?"
            },
            {
              "name": "response",
              "value": "motion-interactive · motion-press",
              "use": "What happens under the pointer?"
            },
            {
              "name": "transition",
              "value": "motion-disclosure · eased transform",
              "use": "How does it move between its own states?"
            },
            {
              "name": "activity",
              "value": "spin · pulse · shimmer",
              "use": "How do you tell working from frozen?"
            }
          ]
        }
      ],
      "rules": [
        {
          "rule": "Every motion has a reason: orientation, feedback, continuity or activity.",
          "why": "Motion with no reason is latency. If you cannot say which of the four it serves, remove it."
        },
        {
          "rule": "Reach for a recipe first; drop to tokens only when none fits.",
          "why": "Recipes are reviewed once and respect the kill switch. A bespoke transition string is reviewed never.",
          "enforcedBy": "sable-lint: transition-colors, transition-all"
        },
        {
          "rule": "Pop and slide exits are faster and do not overshoot; preserve timing chosen for other roles.",
          "why": "Dismissal should feel prompt. A disclosure or crossfade may need symmetric timing; a large reveal may need to settle. Choose by the interaction rather than applying one exit rule everywhere."
        },
        {
          "rule": "Prefer opacity and transform when they preserve the intended geometry; measure necessary layout motion.",
          "why": "Transform and opacity can avoid layout, but compositing is not guaranteed. Disclosure, useAutoSize and NumberTicker deliberately change flow. Bound that work; scaling text is not an equivalent resize."
        },
        {
          "rule": "Durations come from tokens, so --motion-scale can stop them.",
          "why": "prefers-reduced-motion and <MotionProvider> off both set --motion-scale to 0. A raw duration ignores that.",
          "enforcedBy": "sable-lint: raw-duration, builtin-animate"
        },
        {
          "rule": "Interactive elements always respond. Something styled for hover with no motion recipe snaps.",
          "why": "A snap between states reads as broken. The four prohibitive rules could not catch missing motion, so this one does.",
          "enforcedBy": "sable-lint: static-interactive"
        },
        {
          "rule": "JS motion reads useMotion().enabled and does nothing when it is false.",
          "why": "Reduced motion is an accessibility setting, not a style preference."
        },
        {
          "rule": "One thing travels; two things do not blink. When a selection, a value or a mark changes in place, move the one element that represents it.",
          "why": "A fill switching off here and on there is two events the eye has to connect. A glide, a roll or a draw is one, and it is most of what makes an interface feel made rather than assembled."
        },
        {
          "rule": "Flourishes are expressive: multiply their durations by --motion-expressive and gate JS ones on useMotion().expressive.",
          "why": "`subtle` promises the answers without the choreography. A glide on a plain token keeps playing after someone asked for calm."
        },
        {
          "rule": "A state change finishes its story: refused shakes and says why, success confirms in place, armed asks again.",
          "why": "Motion that starts a change and leaves the outcome to a snap reads as unfinished. ConfirmButton, OtpField's invalid shake and the copy-to-check swap are the reference cases."
        },
        {
          "rule": "Amplitude scales with smallness. A 16px glyph that turns on grows from nothing past its size; a surface travels from 0.96 and a press settles to 0.97.",
          "why": "The same 4% that is right for a dialog is invisible on an icon, which is why a state change on a small control used to read as a colour swap with no life in it. A dialog that overshot 20% would lurch. Size, not importance, sets how far a thing moves."
        },
        {
          "rule": "Stage a moment: the main object lands first, the follow-through after it.",
          "why": "A ring that opens, a glyph that blooms 90ms later, dots thrown 60ms after that read as one event with a cause and an effect. Everything starting on the same frame reads as a flash. LikeButton and the toast's status glyph are the reference cases."
        },
        {
          "rule": "Celebrate only what a person chose, and only at full motion.",
          "why": "A burst is a reply. On a like it is delight; on a system event, on load, or on every row of a list it is a notification wearing confetti. Under subtle the fill alone answers."
        },
        {
          "rule": "Component motion props and MotionScope only turn motion down.",
          "why": "`full` on a component means inherit. Nothing below the provider can switch motion back on for a reader who asked for it off."
        }
      ],
      "noGos": [
        {
          "never": "Tailwind's animate-spin / animate-pulse / animate-ping / animate-bounce.",
          "instead": "motion-spin, motion-pulse, motion-ping, motion-dot-bounce.",
          "why": "The built-ins ignore --motion-scale, so reduced motion cannot freeze them.",
          "enforcedBy": "sable-lint: builtin-animate"
        },
        {
          "never": "duration-150, duration-300, or any raw duration utility.",
          "instead": "duration-(--motion-duration-fast) and siblings.",
          "why": "Raw durations bypass the kill switch.",
          "enforcedBy": "sable-lint: raw-duration"
        },
        {
          "never": "transition-all, or transition-colors on its own.",
          "instead": "motion-interactive, or name the properties you animate.",
          "why": "transition-all animates unrelated layout changes and defeats the browser's pre-computation.",
          "enforcedBy": "sable-lint: transition-all, transition-colors"
        },
        {
          "never": "Motion on first paint of static content, or staggered entrances on every list.",
          "instead": "Reveal for one deliberate moment per view.",
          "why": "Entrance choreography repeated everywhere becomes a loading delay."
        },
        {
          "never": "The motion library in the core package.",
          "instead": "src/motion (WAAPI, IntersectionObserver, View Transitions).",
          "why": "Sable's motion layer is zero-dependency; drag, FLIP and velocity springs belong in an optional adapter."
        }
      ]
    },
    {
      "slug": "scrolling",
      "title": "Scrolling",
      "summary": "Every scroll container declares a policy. Vertical regions get a quiet bar that appears only while you are in them; horizontal strips get edge fades instead of a rail.",
      "headline": "2 policies · vertical gets a bar · horizontal gets a fade",
      "retrieve": "sable docs scrolling",
      "vocabularies": [
        {
          "title": "Policies",
          "terms": [
            {
              "name": "scrollbar-quiet",
              "value": "4px thumb · hidden at rest → 12% active → 16% hovered → 20% dragging",
              "use": "The default for vertical scrolling. Grows to 6px under the pointer."
            },
            {
              "name": "scrollbar-hidden",
              "value": "no bar",
              "use": "Only when something else carries the affordance — and you can name it (an edge fade, paging controls)."
            },
            {
              "name": "<Scroller>",
              "value": "edge fades + wheel mapping",
              "use": "Horizontal strips: media rows, chip rows, tab overflow."
            },
            {
              "name": "useScrollActivity",
              "value": "data-scrolling for ~600ms",
              "use": "Lets the bar respond to touch drags and programmatic scrolls, which hover cannot see."
            }
          ]
        }
      ],
      "rules": [
        {
          "rule": "Every overflow-*-auto|scroll declares scrollbar-quiet or scrollbar-hidden.",
          "why": "Left bare, the platform draws its own: on Windows, stepper arrows hard against the padding edge that poke out of rounded corners.",
          "enforcedBy": "sable-lint: unmanaged-overflow (also checked over every registry example)"
        },
        {
          "rule": "Vertical regions get a bar; horizontal regions get an edge fade.",
          "why": "A vertical list needs position feedback. A horizontal strip needs 'there is more this way', which a fade says better than a 4px rail."
        },
        {
          "rule": "A horizontal region must work without a horizontal input.",
          "why": "Most mice have no horizontal wheel. Scroller maps the vertical wheel sideways and handles arrow keys, Home and End."
        },
        {
          "rule": "Reveal on scrolling, not only on hover.",
          "why": "Touch drags and programmatic scrolls (a chat following a reply) hover nothing, and those are the moments a reader needs to see where they are."
        }
      ],
      "noGos": [
        {
          "never": "scrollbar-hidden on a vertical list with no fade or paging.",
          "instead": "scrollbar-quiet.",
          "why": "It leaves the reader with no sense of position and nothing to discover."
        },
        {
          "never": "A styled ::-webkit-scrollbar written per component.",
          "instead": "The scrollbar-quiet utility.",
          "why": "Chromium ignores ::-webkit-scrollbar once scrollbar-width is set; the utility handles both engines."
        }
      ]
    },
    {
      "slug": "accessibility",
      "title": "Accessibility",
      "summary": "Sable's components ship accessible behavior from Base UI. These rules cover what an app composing them still has to get right.",
      "headline": "WCAG AA · 44px touch targets · visible focus · reduced motion · logical properties",
      "retrieve": "sable docs accessibility",
      "vocabularies": [
        {
          "title": "Floors",
          "terms": [
            {
              "name": "Contrast",
              "value": "4.5:1 text · 3:1 UI and large text",
              "use": "Every semantic text/surface pair is checked per theme by contrast.test.ts."
            },
            {
              "name": "Hit area",
              "value": "44×44px on touch · 24×24px floor",
              "use": "A control that stands alone (a dialog's close, a banner's dismiss, a code block's copy, a carousel's arrows) grows its target to 44px under a coarse pointer without moving layout (hit-target, or lib/hit-target's hitTargetTouch inside components). Controls packed in a row (pagination numbers, calendar days, chips, tree disclosures) keep the WCAG 2.5.8 24px floor: their pitch sets their target, and a 44px slop would steal taps from the neighbour."
            },
            {
              "name": "Focus",
              "value": "ring-2 ring-ring, full opacity",
              "use": "Visible on every interactive element in light and dark. Under forced colors, where every box-shadow ring is dropped, styles.css puts a 2px Highlight outline on :focus-visible instead."
            },
            {
              "name": "Mobile input text",
              "value": "≥ 16px",
              "use": "iOS Safari zooms the page on focus below it."
            },
            {
              "name": "Reduced motion",
              "value": "--motion-scale: 0",
              "use": "Transitions resolve instantly; loaders hold their first frame."
            }
          ]
        }
      ],
      "rules": [
        {
          "rule": "Use the component, not a div with a click handler.",
          "why": "Base UI supplies roles, keyboard handling and focus management. A clickable div has none of them."
        },
        {
          "rule": "Every control has an accessible name.",
          "why": "Icon-only buttons take aria-label. Fields take a <Label> through <Field>, which also wires aria-describedby and aria-invalid."
        },
        {
          "rule": "A live region exists before it has anything to say.",
          "why": "Render role=\"status\" empty from the start and swap its text. A region inserted together with its content is announced inconsistently."
        },
        {
          "rule": "On client-side navigation, update document.title and move focus to the new view's h1.",
          "why": "Route changes are silent to assistive technology unless the app announces them. AppShell supplies the skip link and landmarks; the app does the rest."
        },
        {
          "rule": "Keep submit enabled; validate on submit and focus the first invalid field.",
          "why": "A disabled submit hides why it is disabled. Focus is the only way a screen-reader user finds the error."
        },
        {
          "rule": "Use logical properties: ms-/me-/ps-/pe-/text-start/inset-inline-*.",
          "why": "Flex and grid mirror for free under dir=\"rtl\"; hand-positioned elements do not.",
          "enforcedBy": "design-lint: physical-direction (ratchet)"
        },
        {
          "rule": "Decorative layers over content take pointer-events-none and aria-hidden.",
          "why": "Scrims, glows and fades otherwise swallow clicks on the controls beneath."
        },
        {
          "rule": "Check focus and disabled states under forced-colors: active.",
          "why": "Windows High Contrast overrides ring colors and erases opacity-based disabled styling."
        }
      ],
      "noGos": [
        {
          "never": "Color as the only signal (a red border with no message).",
          "instead": "Color plus text or an icon.",
          "why": "Roughly 1 in 12 men cannot tell red from green."
        },
        {
          "never": "Opacity on the focus ring.",
          "instead": "ring-ring at full opacity; tune the token in the theme.",
          "why": "A faded ring loses the contrast the theme tested.",
          "enforcedBy": "sable-lint: faded-focus-ring"
        },
        {
          "never": "A brand or status fill retuned under its old label — dark ink on a bright red that passes 4.5:1 at APCA Lc 42.",
          "instead": "A label that clears 4.5:1 and APCA Lc 60 in both modes. Move the fill's lightness, not its hue, keeping the ink its colour takes. A status colour on a surface is its own token (`--destructive-text`), so the fill can move freely.",
          "why": "The ratio alone passes labels that read muddy. A deliberate brand pair is allowed with a recorded reason (lint disable or preset exceptions).",
          "enforcedBy": "sable-lint: label-contrast"
        },
        {
          "never": "A label fill painted on a mark that carries no text — a meter, a segmented bar, a status dot, a chart series, a soft tint.",
          "instead": "The colour's `-mark` token (`bg-success-mark`, `bg-tone-warning-mark/15`): the same hue lifted and saturated, held to 2:1 on the page. Text contrast is for text; a graphic owes visibility, and 3:1 (WCAG 1.4.11) only when it is the sole carrier of its meaning.",
          "why": "A fill is pinned dark enough for a white label. On a bar or dot with nothing to label, that darkness only reads as mud: a brown warning, a forest-green success."
        },
        {
          "never": "Blocking paste, or type=\"number\" for codes and card numbers.",
          "instead": "type=\"text\" inputMode=\"numeric\" with the right autocomplete.",
          "why": "Blocking paste breaks password managers; number inputs scroll-change identifiers."
        },
        {
          "never": "forced-color-adjust: none to 'fix' high-contrast mode.",
          "instead": "Let the system colors apply; verify the result.",
          "why": "It removes the user's chosen colors exactly where they need them."
        },
        {
          "never": "outline: none without a replacement that survives forced colors.",
          "instead": "focus-visible:outline-hidden with focus-visible:ring-2 ring-ring. outline-hidden is a transparent outline that forced colors paint; a ring alone is a box-shadow, which they drop.",
          "why": "Keyboard users lose their place. styles.css restores an outline on :focus-visible under forced colors as a backstop, but a custom focus treatment in an app should not depend on it."
        }
      ]
    }
  ],
  "utilities": {
    "about": "The CSS layer between tokens and components: relative surfaces that derive hover and well fills from the surface they sit in, frames that compute concentric inner radii, state variants that match Base UI data attributes and ARIA alike, scroll policies, chrome type tiers, and the motion recipes. Reach for these before hand-writing CSS, mixing colours or writing a transition. Generated from src/utilities/utility-docs.ts — do not hand-edit.",
    "retrieve": "sable utility <name>",
    "elsewhere": {
      "typography": "The paired `text-*` page tiers (`text-heading-1`, `text-body-md`, `text-label-sm`, `text-mono-md`, …) are documented as `registry.json → tokens.typography` (named without the `text-` prefix). Retrieve one with `sable utility text-heading-1`, all with `sable token typography`."
    },
    "families": [
      "relative surface",
      "frame",
      "geometry",
      "state variant",
      "scroll",
      "text",
      "motion",
      "helper"
    ],
    "items": [
      {
        "name": "sable-surface",
        "kind": "utility",
        "family": "relative surface",
        "intent": "Paints an element as a semantic surface (card by default) and DERIVES its hover and active fills from it — background, ink, edge and both state colours from one role.",
        "whenToUse": "A bespoke container whose rows or buttons need hover/selected fills that sit the right step off the container in every theme. Pick the role with a modifier (`sable-surface-muted`, `-popover`, `-accent`); descendants using `sable-surface-interactive` or `sable-well` then compute against it.",
        "insteadOf": "`bg-card text-card-foreground border-border` plus a hand-mixed hover like `hover:bg-[color-mix(in_oklab,var(--foreground)_8%,var(--card))]`. The utility computes the same mix from whatever role you pick, so it stays one visible step in every preset and mode. Use a component (`Card`, `Panel`) first when one fits.",
        "example": "<div className=\"sable-surface sable-frame sable-frame-r-lg sable-frame-p-4\">…</div>",
        "keywords": [
          "surface",
          "container background",
          "card surface",
          "derived states",
          "relative colour",
          "relative color",
          "color-mix",
          "surface context"
        ],
        "pairsWith": [
          "sable-surface-interactive",
          "sable-well",
          "sable-frame"
        ]
      },
      {
        "name": "sable-surface-muted",
        "kind": "utility",
        "family": "relative surface",
        "intent": "Switches a `sable-surface` to the `muted` role: recessed background, `foreground` ink, `border` edge. Sets the surface variables only; it does not paint on its own.",
        "whenToUse": "With `sable-surface`, for a quiet, recessed container whose interactive rows still need derived hover/selected fills.",
        "insteadOf": "`bg-muted` alone, which leaves descendants' hover fills computed against the wrong surface. For a small recessed area INSIDE another surface (a track, a pad) use `sable-well` instead.",
        "example": "<div className=\"sable-surface sable-surface-muted sable-frame sable-frame-r-lg sable-frame-p-4\">…</div>",
        "keywords": [
          "muted surface",
          "recessed container",
          "quiet panel",
          "inert surface"
        ],
        "pairsWith": [
          "sable-surface"
        ]
      },
      {
        "name": "sable-surface-popover",
        "kind": "utility",
        "family": "relative surface",
        "intent": "Switches the surface context to the `popover` role (popover fill and ink, `border-floating` edge). Sets the variables only, so it can also be used ALONE to declare 'descendants sit on a popover'.",
        "whenToUse": "On a hand-composed floating panel (an inspector, a toolbar over a canvas) so `sable-well` and `sable-surface-interactive` inside it derive from the popover rather than the page. Alone, alongside `bg-popover text-popover-foreground`, it is purely that context hint; with `sable-surface` it also paints.",
        "insteadOf": "leaving the context unset. Then `sable-well` falls back to `--background`, which inside a popover in some dark modes lands within a step of the panel: the bug that tempts an outline on every well.",
        "example": "<aside className=\"sable-surface-popover bg-popover text-popover-foreground rounded-lg ring-1 ring-border-floating shadow-lg\">…</aside>",
        "keywords": [
          "popover surface",
          "floating panel",
          "inspector surface",
          "surface context",
          "elevated surface"
        ],
        "pairsWith": [
          "sable-surface",
          "sable-well",
          "sable-frame-popover"
        ]
      },
      {
        "name": "sable-surface-accent",
        "kind": "utility",
        "family": "relative surface",
        "intent": "Switches a `sable-surface` to the `accent` role: the transient-state fill with its paired ink. Sets the variables only.",
        "whenToUse": "With `sable-surface`, for a container that is itself in a highlighted/current state and still hosts interactive rows whose hover must step off it.",
        "insteadOf": "`bg-accent text-accent-foreground` on a container whose children then hover against the page colour. Accent is a STATE, not a decoration — don't use it to make a static section stand out.",
        "example": "<div className=\"sable-surface sable-surface-accent sable-frame sable-frame-r-md sable-frame-p-2\">…</div>",
        "keywords": [
          "accent surface",
          "highlighted container",
          "current section"
        ],
        "pairsWith": [
          "sable-surface"
        ]
      },
      {
        "name": "sable-surface-interactive",
        "kind": "utility",
        "family": "relative surface",
        "intent": "Hover / highlighted and pressed / selected fills for a row or button, derived from the surface it sits on. Hover = the surface's hover step (8% ink); active, selected or checked = its active step (12% ink inside a `sable-surface`, `accent` outside one).",
        "whenToUse": "A clickable row, list item or bespoke button inside a surface, where the hover colour must be one consistent step off THAT surface. Matches `:hover`, `[data-highlighted]` / `[data-active]` and `:active`, `[data-selected]` / `[data-checked]` / `aria-selected` / `aria-checked`, so Base UI items work without extra variants. Pair with `motion-interactive` for the transition.",
        "insteadOf": "`hover:bg-accent`, `hover:bg-muted` or a hand-written `color-mix(in oklab, var(--foreground) 8%, …)` hover. A fixed hover token is right on one surface and invisible or loud on the next; this one is computed from where the row actually is. Reach for `ListItem`, `Menu` or `Button variant=\"ghost\"` first when they fit.",
        "example": "<button className=\"sable-surface-interactive sable-frame-inner motion-interactive px-3 py-2 text-start text-body-sm\">Rename</button>",
        "keywords": [
          "hover colour",
          "hover color",
          "hover background",
          "selected background",
          "row hover",
          "surface hover",
          "pressed state",
          "active row",
          "list item hover"
        ],
        "pairsWith": [
          "sable-surface",
          "motion-interactive"
        ]
      },
      {
        "name": "sable-well",
        "kind": "utility",
        "family": "relative surface",
        "intent": "A recessed area ON whatever surface it sits in: 7% ink mixed into the inherited surface (`--sable-surface-bg`, the page background by default), so it is the same visible step on the page, in a card or in a popover.",
        "whenToUse": "A segmented-control track, a colour or XY pad, a preview well, a readout block inside a panel. Sable's Card (default), Popover, Dialog and Sheet declare their surface, so a well inside them derives from them automatically; on a hand-composed panel, put `sable-surface-popover` (or set `--sable-surface-bg`) on the panel yourself. Whatever sits ON the well takes the surface's own colour back (`bg-popover` inside a popover). A well takes no outline.",
        "insteadOf": "`bg-muted`, which is fixed: inside a popover it can sit within a step of the panel in some dark modes. And never a hand-mixed `color-mix(… var(--foreground) …)` or an outline on every well to compensate — that turns a panel into a stack of boxes. For a segmented control itself, use `ToggleGroup`; the well is for what no component draws.",
        "example": "<div className=\"sable-well rounded-md p-1\">…</div>",
        "keywords": [
          "well",
          "track",
          "recessed",
          "inset",
          "sunken",
          "pad",
          "segmented track background",
          "segmented control track",
          "trough",
          "preview well",
          "inset background"
        ],
        "pairsWith": [
          "sable-surface-popover",
          "rounded-concentric-*"
        ]
      },
      {
        "name": "sable-frame",
        "kind": "utility",
        "family": "frame",
        "intent": "A bordered, padded, rounded container that computes the radius its children need: `--sable-frame-inner-radius` = radius − padding − border width, floored at `radius-sm`.",
        "whenToUse": "A container whose children have their own rounded backgrounds (rows, tiles, a nested preview), so the corners nest concentrically and keep doing so when the radius ladder is rescaled. Defaults: `radius-lg`, `--spacing(4)` padding (1rem at the default scale, and it follows the density control), a 1px edge from the surface (`--sable-surface-edge`, else `border`). Size it with `sable-frame-r-*` / `sable-frame-p-*`; children take `sable-frame-inner`.",
        "insteadOf": "`rounded-lg p-4 border` on the parent plus a guessed `rounded-sm` on each child — the guess is concentric only at the default ladder. For a one-off nested corner without a frame, `rounded-concentric-*`.",
        "example": "<div className=\"sable-frame sable-surface sable-frame-r-lg sable-frame-p-4\"><div className=\"sable-frame-inner sable-well p-3\">…</div></div>",
        "keywords": [
          "frame",
          "nested container",
          "bordered container",
          "concentric container",
          "padded border box"
        ],
        "pairsWith": [
          "sable-frame-inner",
          "sable-frame-r-*",
          "sable-frame-p-*",
          "sable-surface"
        ]
      },
      {
        "name": "sable-frame-popover",
        "kind": "utility",
        "family": "frame",
        "intent": "The popup frame recipe: `radius-md`, `--spacing(1)` padding, the `border-floating` edge and `shadow-lg`, applied over `sable-frame`.",
        "whenToUse": "A hand-composed floating list or panel that must match Sable's menus (with `sable-frame sable-surface sable-surface-popover`); rows inside take `sable-frame-inner`.",
        "insteadOf": "Copying a Menu's class string. And use `Menu`, `Select`, `Popover` or `Combobox` first — they own focus and dismissal; this is only for floating chrome no component covers.",
        "example": "<div className=\"sable-frame sable-surface sable-surface-popover sable-frame-popover\">…</div>",
        "keywords": [
          "popup frame",
          "floating list",
          "menu container",
          "dropdown panel"
        ],
        "pairsWith": [
          "sable-frame",
          "sable-surface-popover"
        ]
      },
      {
        "name": "sable-frame-tool",
        "kind": "utility",
        "family": "frame",
        "intent": "The frame for edge-to-edge tool chrome at the theme's radius, with no padding. It publishes concentric geometry for what's inside: `--panel-inset` (row side padding, grown so rows clear the corner), `--panel-field-radius` (compact fields curve parallel to the frame) and `--panel-edge` (the first and last section's extra top and bottom). PanelSection and the xs field shell read them. Applied over `sable-frame`.",
        "whenToUse": "Framing PanelSections, ScrubFields, a Tree, a StatusBar or a PanelGroup outside a Workspace (a docs demo, a floating inspector). Add `overflow-hidden` to clip to the corners.",
        "insteadOf": "`rounded-lg border overflow-hidden` by hand: the panel keeps its square-column 8px inset and small field radius, so a rounded preset crowds the first label and last field into the curve.",
        "example": "<div className=\"sable-frame sable-frame-tool overflow-hidden bg-panel\" data-density=\"compact\"><PanelSection title=\"Layer\">…</PanelSection></div>",
        "keywords": [
          "panel frame",
          "inspector frame",
          "tool panel",
          "workspace demo",
          "concentric"
        ],
        "pairsWith": [
          "sable-frame"
        ]
      },
      {
        "name": "sable-frame-borderless",
        "kind": "utility",
        "family": "frame",
        "intent": "Sets a `sable-frame`'s border width to 0 while keeping the inner-radius math correct.",
        "whenToUse": "A frame that separates by fill or space rather than an edge (a well, a tinted group) but still needs concentric children.",
        "insteadOf": "`border-0` on a `sable-frame`, which removes the border but leaves 1px in the inner-radius calculation.",
        "example": "<div className=\"sable-frame sable-frame-borderless sable-well sable-frame-r-md sable-frame-p-1\">…</div>",
        "keywords": [
          "no border frame",
          "borderless",
          "frame without edge"
        ],
        "pairsWith": [
          "sable-frame"
        ]
      },
      {
        "name": "sable-frame-r-*",
        "kind": "utility",
        "family": "frame",
        "intent": "Sets a `sable-frame`'s outer radius from the radius ladder (`sable-frame-r-lg`) or an arbitrary value (`sable-frame-r-[14px]`).",
        "whenToUse": "Whenever a frame should not be the default `radius-lg`. The inner radius follows automatically.",
        "insteadOf": "`rounded-*` on a `sable-frame` — that changes the painted corner but not `--sable-frame-inner-radius`, so the children stop nesting.",
        "example": "<div className=\"sable-frame sable-frame-r-md sable-frame-p-2\">…</div>",
        "keywords": [
          "frame radius",
          "outer radius",
          "frame corner"
        ],
        "pairsWith": [
          "sable-frame",
          "sable-frame-inner"
        ]
      },
      {
        "name": "sable-frame-p-*",
        "kind": "utility",
        "family": "frame",
        "intent": "Sets a `sable-frame`'s padding on the spacing scale (`sable-frame-p-2` = `--spacing(2)`), feeding the inner-radius math. On the scale, so the density control moves it.",
        "whenToUse": "Whenever a frame's inset is not the default `--spacing(4)`.",
        "insteadOf": "`p-*` on a `sable-frame` — the padding changes but the inner radius is still computed from the default `--spacing(4)`, so the children's corners are wrong.",
        "example": "<div className=\"sable-frame sable-frame-r-lg sable-frame-p-2\">…</div>",
        "keywords": [
          "frame padding",
          "frame inset"
        ],
        "pairsWith": [
          "sable-frame",
          "sable-frame-inner"
        ]
      },
      {
        "name": "sable-frame-inner",
        "kind": "utility",
        "family": "frame",
        "intent": "Takes the radius its `sable-frame` ancestor computed (outer − inset − border), never below `radius-sm`: concentric when the child sits near the frame edge (a popover row), the theme's small radius when it sits deep inside a padded card (where the subtraction would leave a near-square row). Falls back to `radius-sm` outside a frame.",
        "whenToUse": "On every rounded child of a `sable-frame`: rows, tiles, an inner well, a nested image.",
        "insteadOf": "A hardcoded `rounded-sm` on the child, which drifts the moment a theme or the customizer rescales radii.",
        "example": "<div className=\"sable-frame sable-frame-r-lg sable-frame-p-2\"><button className=\"sable-frame-inner sable-surface-interactive px-3 py-2\">…</button></div>",
        "keywords": [
          "inner radius",
          "nested radius",
          "child corner",
          "concentric child"
        ],
        "pairsWith": [
          "sable-frame"
        ]
      },
      {
        "name": "rounded-concentric-*",
        "kind": "utility",
        "family": "geometry",
        "intent": "A border radius computed as an outer radius minus an inset: `rounded-concentric-<radius>/<spacing>`, floored at `radius-xs` so a deep inset never leaves a 1-2px sliver. `rounded-concentric-md/1` = `radius-md` − `spacing-1`.",
        "whenToUse": "A one-off rounded element nested inside another — a tab trigger inside a tab list, a thumb inside a track, a row inside a well — where a `sable-frame` would be overkill. The outer radius and the inset are the parent's.",
        "insteadOf": "Picking the next ladder step down by eye (`rounded-sm` inside `rounded-md p-1`). That is concentric only at the default ladder; the utility recomputes from live tokens. Registered in `cn()` as a radius, so it correctly overrides a component's own `rounded-*`.",
        "example": "<div className=\"sable-well rounded-md p-1\"><button className=\"rounded-concentric-md/1 px-2 py-1\">…</button></div>",
        "keywords": [
          "nested radius",
          "inner corner",
          "concentric corners",
          "inner radius",
          "radius minus padding",
          "nested rounded"
        ],
        "pairsWith": [
          "sable-well",
          "sable-frame-inner"
        ]
      },
      {
        "name": "popup-inset",
        "kind": "utility",
        "family": "geometry",
        "intent": "The padding of a popup list, derived from the popup's radius: a third of `radius-md`, at least `--spacing(1)`. A rounder popup gets more room, and the floor is on the spacing scale, so the density control moves it.",
        "whenToUse": "On a hand-composed rounded-md popup that holds a list of rows. Sable's Menu, Select, Combobox and ContextMenu already use it.",
        "insteadOf": "`p-1`. A fixed inset at a larger radius preset leaves the rows' corners approaching half their height, so every row turns into a pill.",
        "example": "<div className=\"rounded-md bg-popover popup-inset shadow-md\">…</div>",
        "keywords": [
          "popup padding",
          "menu padding",
          "list inset",
          "dropdown padding"
        ],
        "pairsWith": [
          "rounded-popup-item",
          "popup-bleed"
        ]
      },
      {
        "name": "rounded-popup-item",
        "kind": "utility",
        "family": "geometry",
        "intent": "The row radius that nests inside a `popup-inset` popup: `radius-md` minus the popup inset, clamped at zero.",
        "whenToUse": "On every row inside a `popup-inset` container.",
        "insteadOf": "`rounded-sm` on menu rows, which matches no ladder exactly (a 12px popup with a 4px inset and 1px border wants 7px rows).",
        "example": "<div role=\"option\" className=\"rounded-popup-item px-2 py-1.5 sable-highlighted:bg-accent\">…</div>",
        "keywords": [
          "menu item radius",
          "option radius",
          "row corner",
          "list item radius"
        ],
        "pairsWith": [
          "popup-inset"
        ]
      },
      {
        "name": "popup-bleed",
        "kind": "utility",
        "family": "geometry",
        "intent": "A negative inline margin of exactly one `popup-inset`, so a separator inside a padded popup runs edge to edge at every radius and density.",
        "whenToUse": "On a hand-composed separator (a 1px rule) inside a `popup-inset` popup. Sable's MenuSeparator, ContextMenuSeparator and SelectSeparator already use it.",
        "insteadOf": "`-mx-1`, which matches the inset only at the default ladder and stops short of both edges once a rounder preset or a roomier density grows it. design-lint flags it (`popup-separator-bleed`).",
        "example": "<div role=\"separator\" className=\"popup-bleed my-1 h-px bg-border\" />",
        "keywords": [
          "separator bleed",
          "menu divider",
          "full width separator",
          "negative margin",
          "edge to edge rule"
        ],
        "pairsWith": [
          "popup-inset"
        ]
      },
      {
        "name": "sable-highlighted",
        "kind": "variant",
        "family": "state variant",
        "intent": "A variant (`sable-highlighted:`) matching the keyboard/pointer-highlighted item: `[data-highlighted]`, `[data-active]`, `[data-active-item]`.",
        "whenToUse": "Styling the current item in a list, menu, combobox or listbox — Base UI and ARIA-style composites mark it differently, this matches all of them.",
        "insteadOf": "`data-[highlighted]:bg-accent data-[active]:bg-accent …` repeated per attribute, or `hover:` alone (which misses keyboard navigation).",
        "example": "<div role=\"option\" className=\"sable-highlighted:bg-accent sable-highlighted:text-accent-foreground\">…</div>",
        "keywords": [
          "highlighted",
          "keyboard focus item",
          "active item",
          "current option",
          "data-highlighted"
        ]
      },
      {
        "name": "sable-selected",
        "kind": "variant",
        "family": "state variant",
        "intent": "A variant (`sable-selected:`) matching a selected or checked element: `[data-selected]`, `[data-checked]`, `[aria-selected=true]`, `[aria-checked=true]`.",
        "whenToUse": "The chosen row, the pressed segment, the checked option — whichever attribute the primitive happens to set.",
        "insteadOf": "Separate `data-[selected]:` / `data-[checked]:` / `aria-selected:` classes, one of which is always forgotten.",
        "example": "<div role=\"option\" className=\"sable-selected:bg-accent sable-selected:text-accent-foreground\">…</div>",
        "keywords": [
          "selected",
          "checked",
          "chosen",
          "pressed",
          "aria-selected",
          "selected state"
        ]
      },
      {
        "name": "sable-open",
        "kind": "variant",
        "family": "state variant",
        "intent": "A variant (`sable-open:`) matching an open trigger or disclosure: `[data-open]`, `[data-popup-open]`, `[data-panel-open]`, `[aria-expanded=true]`.",
        "whenToUse": "Rotating a chevron, holding a trigger's pressed look while its menu or panel is open.",
        "insteadOf": "`data-[popup-open]:` on one trigger and `aria-expanded:` on the next.",
        "example": "<button className=\"motion-interactive sable-open:bg-accent sable-open:text-accent-foreground\">…</button>",
        "keywords": [
          "open",
          "expanded",
          "disclosure open",
          "aria-expanded",
          "popup open"
        ]
      },
      {
        "name": "sable-disabled",
        "kind": "variant",
        "family": "state variant",
        "intent": "A variant (`sable-disabled:`) matching a disabled element: `:disabled`, `[disabled]`, `[data-disabled]`, `[aria-disabled=true]`.",
        "whenToUse": "Dimming or locking a bespoke element regardless of whether it is natively or ARIA-disabled.",
        "insteadOf": "`disabled:` alone, which misses `aria-disabled` and Base UI's `data-disabled` — the cases that stay focusable.",
        "example": "<div className=\"sable-disabled:pointer-events-none sable-disabled:opacity-50\">…</div>",
        "keywords": [
          "disabled",
          "aria-disabled",
          "inactive",
          "locked"
        ]
      },
      {
        "name": "sable-invalid",
        "kind": "variant",
        "family": "state variant",
        "intent": "A variant (`sable-invalid:`) matching an invalid field: `[aria-invalid=true]`, `[data-invalid]`.",
        "whenToUse": "The error edge or ink on a bespoke field wrapper. Use `Field` / `Input` first; they already style it.",
        "insteadOf": "`aria-invalid:` or `data-[invalid]:` alone — Base UI's Field sets one, native validation wiring the other.",
        "example": "<div className=\"ring-1 ring-border sable-invalid:ring-destructive\">…</div>",
        "keywords": [
          "invalid",
          "error state",
          "aria-invalid",
          "validation error"
        ]
      },
      {
        "name": "scrollbar-quiet",
        "kind": "utility",
        "family": "scroll",
        "intent": "A thin floating scrollbar: no stepper arrows, a 4px thumb inset from the edges, invisible at rest and fading in while the region is scrolled, hovered or focused.",
        "whenToUse": "Every VERTICAL scroll container (anything with `overflow-y: auto` or `scroll`). Add `useScrollActivity` so the thumb also appears on touch drags and programmatic scrolls. Required by design-lint's `unmanaged-overflow`.",
        "insteadOf": "A scroll container with no policy, which on Windows draws stepper arrows hard against the padding edge and out of any rounded corner. Never set `scrollbar-width` yourself — in Chromium it disables this utility.",
        "example": "<div className=\"max-h-80 overflow-y-auto scrollbar-quiet\">…</div>",
        "keywords": [
          "scrollbar",
          "thin scrollbar",
          "overlay scrollbar",
          "hide arrows",
          "scroll container",
          "overflow auto"
        ],
        "pairsWith": [
          "scrollbar-hidden"
        ]
      },
      {
        "name": "scrollbar-hidden",
        "kind": "utility",
        "family": "scroll",
        "intent": "Scrolls without ever drawing a bar.",
        "whenToUse": "HORIZONTAL strips whose edge fade or paging controls carry the 'there is more' affordance (it is `Scroller`'s horizontal default), a canvas panned by drag. You should be able to name what carries the affordance instead.",
        "insteadOf": "`scrollbar-quiet` on a vertical list. A vertical region with no bar and no fade tells a reader nothing about how far through they are.",
        "example": "<div className=\"flex gap-3 overflow-x-auto scrollbar-hidden\">…</div>",
        "keywords": [
          "hide scrollbar",
          "no scrollbar",
          "horizontal scroll",
          "carousel",
          "strip"
        ],
        "pairsWith": [
          "scrollbar-quiet"
        ]
      },
      {
        "name": "sable-list",
        "kind": "utility",
        "family": "text",
        "intent": "A bulleted list as typography: body type, a hanging muted marker, and item rhythm. Put it on a native `<ul>`.",
        "whenToUse": "Running content with bullets: release notes, a feature list, steps that are not ordered.",
        "insteadOf": "A stack of `<div>`s with a hand-drawn dot, or an unstyled `<ul>` that inherits the reset (no markers, no indent).",
        "example": "<ul className=\"sable-list\"><li>Faster sync</li><li>Offline drafts</li></ul>",
        "keywords": [
          "bullet list",
          "unordered list",
          "ul",
          "bullets",
          "list"
        ]
      },
      {
        "name": "sable-list-numbered",
        "kind": "utility",
        "family": "text",
        "intent": "A numbered list as typography: `sable-list` with decimal markers in tabular figures. Put it on a native `<ol>`.",
        "whenToUse": "Ordered content in running text: setup steps, a ranked list. For a stepped flow with state, use Stepper.",
        "insteadOf": "Numbers typed into the text, which neither renumber nor read as a list to assistive tech.",
        "example": "<ol className=\"sable-list-numbered\"><li>Install</li><li>Import the styles</li></ol>",
        "keywords": [
          "numbered list",
          "ordered list",
          "ol",
          "steps"
        ]
      },
      {
        "name": "sable-list-dl",
        "kind": "utility",
        "family": "text",
        "intent": "Label/value pairs on a native `<dl>`: muted label-tier `<dt>`s and body-tier `<dd>`s on a baseline-aligned two-column grid; long values wrap inside their column. Colour a status value with a `text-*` utility on its `<dd>`.",
        "whenToUse": "Read-only details: an order summary, a record's metadata, a settings summary, profile stats.",
        "insteadOf": "A grid of `<div>`s (screen readers lose the term/value pairing), or Table for a single record. For editable values use Form and Field.",
        "example": "<dl className=\"sable-list-dl\"><dt>Plan</dt><dd>Studio</dd><dt>Status</dt><dd className=\"text-success\">Active</dd></dl>",
        "keywords": [
          "description list",
          "definition list",
          "dl",
          "key value",
          "metadata",
          "details",
          "label value"
        ],
        "pairsWith": [
          "sable-list-dl-2"
        ]
      },
      {
        "name": "sable-list-dl-2",
        "kind": "utility",
        "family": "text",
        "intent": "Two label/value pairs a row once the nearest `@container` ancestor is at least 28rem wide. Add to `sable-list-dl`.",
        "whenToUse": "A compact metadata block in a wide card or panel. Put `@container` on a parent so it measures the room it actually has.",
        "insteadOf": "A viewport breakpoint, which gives a narrow card on a wide screen four columns it cannot fit.",
        "example": "<div className=\"@container\"><dl className=\"sable-list-dl sable-list-dl-2\">…</dl></div>",
        "keywords": [
          "two column details",
          "metadata grid",
          "dl columns"
        ],
        "pairsWith": [
          "sable-list-dl"
        ]
      },
      {
        "name": "text-overline",
        "kind": "utility",
        "family": "text",
        "intent": "The eyebrow / overline / kicker tier: small, letter-spaced, uppercase by default (a theme may set sentence case via `--type-overline-transform`).",
        "whenToUse": "A section eyebrow above a heading, a stat's label, a badge-style category line. Sits ABOVE and categorises.",
        "insteadOf": "`text-label-xs uppercase tracking-wider` assembled by hand, or `text-caption`, which sits BELOW and explains. In tool chrome, panel headers use `text-ui-section` instead.",
        "example": "<p className=\"text-overline text-muted-foreground\">Latest news</p>",
        "keywords": [
          "eyebrow",
          "overline",
          "kicker",
          "uppercase label",
          "section label",
          "small caps label"
        ]
      },
      {
        "name": "text-ui-title",
        "kind": "utility",
        "family": "text",
        "intent": "The title of what a panel or inspector shows — the open issue, the selected object: 14px at 600 on a 20px line, one step above `text-ui-md`.",
        "whenToUse": "The one title at the top of an inspector, a docked panel or a peek view inside the workspace register. Compact `text-title-lg` resolves to it on its own.",
        "insteadOf": "`text-ui-md` made heavier (a title the size of the description under it reads as a label), or `text-heading-*`, which is page structure rather than chrome.",
        "example": "<h2 className=\"text-ui-title text-panel-foreground\">Refine product detail page</h2>",
        "keywords": [
          "panel title",
          "inspector title",
          "issue title",
          "peek title",
          "selection header",
          "workspace title"
        ],
        "pairsWith": [
          "text-ui-body",
          "text-ui-md"
        ]
      },
      {
        "name": "text-ui-md",
        "kind": "utility",
        "family": "text",
        "intent": "Workspace-register chrome text, the default tier: ~12px at weight ~500 on 16px leading.",
        "whenToUse": "Labels and values in tool chrome — panels, inspectors, toolbars, trees — inside the workspace register.",
        "insteadOf": "`text-label-sm` or `text-body-sm` in a dense panel (the page register's weights read as shouting at this size), or a size class plus a weight class composed by hand.",
        "example": "<span className=\"text-ui-md text-panel-foreground\">Opacity</span>",
        "keywords": [
          "chrome text",
          "panel label",
          "workspace text",
          "inspector label",
          "tool ui text"
        ],
        "pairsWith": [
          "text-ui-sm",
          "text-ui-num"
        ]
      },
      {
        "name": "text-ui-sm",
        "kind": "utility",
        "family": "text",
        "intent": "Workspace chrome text, the compact tier: ~11px at weight ~500.",
        "whenToUse": "Secondary chrome: property names in a grid, status-bar items, tree rows in a compact density.",
        "insteadOf": "`text-label-xs`, a page-register tier tuned for different weights and leading.",
        "example": "<span className=\"text-ui-sm text-muted-foreground\">W</span>",
        "keywords": [
          "small chrome text",
          "compact label",
          "status bar text",
          "property name"
        ]
      },
      {
        "name": "text-ui-body",
        "kind": "utility",
        "family": "text",
        "intent": "The reading tier inside chrome: `text-ui-md`'s size at regular weight.",
        "whenToUse": "Descriptions, help text and empty-state copy inside a panel or inspector.",
        "insteadOf": "`text-ui-md`, whose medium weight makes a sentence read as a label; or `text-body-sm`, which is page-register.",
        "example": "<p className=\"text-ui-body text-muted-foreground\">Select a layer to edit its properties.</p>",
        "keywords": [
          "panel description",
          "help text",
          "chrome body",
          "inspector hint"
        ]
      },
      {
        "name": "text-ui-section",
        "kind": "utility",
        "family": "text",
        "intent": "Panel section headers in tool chrome: `text-ui-sm`'s size, a little heavier and tracked — not uppercase.",
        "whenToUse": "A `PanelSection` header or any group title inside a dense panel.",
        "insteadOf": "`text-overline`, whose all-caps reads louder than the content it labels at this density.",
        "example": "<h3 className=\"text-ui-section text-panel-foreground\">Layout</h3>",
        "keywords": [
          "panel header",
          "section header",
          "inspector heading",
          "group title"
        ]
      },
      {
        "name": "text-ui-micro",
        "kind": "utility",
        "family": "text",
        "intent": "The smallest chrome tier: ~10px at weight ~450. Use sparingly.",
        "whenToUse": "Chrome annotations — a unit suffix, a shortcut hint, a ruler tick label.",
        "insteadOf": "`text-[10px]`, which bypasses the theme and density hooks.",
        "example": "<kbd className=\"text-ui-micro text-muted-foreground\">⌘K</kbd>",
        "keywords": [
          "micro text",
          "tiny label",
          "annotation",
          "unit suffix",
          "shortcut hint"
        ]
      },
      {
        "name": "text-ui-num",
        "kind": "utility",
        "family": "text",
        "intent": "Numeric values in chrome: mono, tabular figures, at the `text-ui-sm` size.",
        "whenToUse": "Values in a property grid, a scrub field's readout, coordinates — any number that changes while you watch.",
        "insteadOf": "`text-ui-sm` (proportional digits make a column jitter while a slider drags) or `text-mono-sm`, which is page-register.",
        "example": "<span className=\"text-ui-num\">128</span>",
        "keywords": [
          "number",
          "tabular numbers",
          "numeric value",
          "readout",
          "monospace number"
        ]
      },
      {
        "name": "stream-tail",
        "kind": "utility",
        "family": "text",
        "intent": "The soft trailing edge of a live text stream: a slight blur plus a fading mask, so the newest token reads as 'more is coming' rather than a sentence that has ended. Static.",
        "whenToUse": "On the last run of text while a model or source is still streaming; remove it when the stream finishes. `StreamingText` applies it for you.",
        "insteadOf": "An animated fade or a hand-written `mask-image` gradient. Use `StreamingText` first; this is for a stream rendered without it.",
        "example": "<span className=\"stream-tail\">{latestChunk}</span>",
        "keywords": [
          "streaming",
          "stream edge",
          "typing",
          "llm output",
          "fade tail",
          "generating text"
        ],
        "pairsWith": [
          "motion-stream-in",
          "motion-caret"
        ]
      },
      {
        "name": "motion-swap-in",
        "kind": "utility",
        "family": "motion",
        "intent": "The current visual label resolving in with a small fade, slide and blur; expressive and token-scaled.",
        "whenToUse": "TextSwap owns replacement and accessibility. Retrieve its component before using these visual classes.",
        "insteadOf": "Remounting an entire status region, replaying on every render, or announcing both visual labels.",
        "example": "<TextSwap text=\"Saved\" />",
        "keywords": [
          "text swap",
          "replacement",
          "blur",
          "label"
        ],
        "pairsWith": [
          "motion-swap-out"
        ]
      },
      {
        "name": "motion-swap-out",
        "kind": "utility",
        "family": "motion",
        "intent": "The previous, aria-hidden visual label leaving without delaying current state.",
        "whenToUse": "The outgoing copy owned by TextSwap. Its animation ends transparent and never receives pointer events.",
        "insteadOf": "Keeping stale live text mounted or waiting for an exit before exposing the new label.",
        "example": "<TextSwap text=\"Ready\" effect=\"fade\" />",
        "keywords": [
          "text swap",
          "outgoing label",
          "crossfade"
        ],
        "pairsWith": [
          "motion-swap-in"
        ]
      },
      {
        "name": "motion-stack-card",
        "kind": "utility",
        "family": "motion",
        "intent": "A card returning between a compact collection and normal reading flow; expressive and token-scaled.",
        "whenToUse": "CardStack owns the overlap, expansion control, covered-card inertness and height measurement.",
        "insteadOf": "Building a hover-only stack whose covered controls remain focusable.",
        "example": "<CardStack label=\"Projects\"><Card>Research</Card><Card>Design</Card></CardStack>",
        "keywords": [
          "card stack",
          "collection",
          "fan"
        ],
        "pairsWith": [
          "motion-size"
        ]
      },
      {
        "name": "motion-interactive",
        "kind": "utility",
        "family": "motion",
        "intent": "The transition for interactive chrome: colour, background, border, shadow, opacity, fill, stroke, scale and translate at the fast duration and standard easing. Also removes the mobile tap delay and the platform's grey tap flash.",
        "whenToUse": "On anything clickable that changes on hover, focus, press or selection: a custom row, a tile, a link, an app-owned button. It is the `response` slot, and the only transition declarer such an element needs.",
        "insteadOf": "Tailwind's colour-only or all-property transition utilities with a hand-picked duration. Those ignore --motion-scale, skip the transform properties `motion-press` needs, and leave the 300ms tap delay on touch screens. sable-lint's `static-interactive` fires on a hover style with no recipe.",
        "example": "<a href=\"/inbox\" className=\"motion-interactive link-underline text-primary\">Inbox</a>",
        "keywords": [
          "transition",
          "hover transition",
          "hover animation",
          "focus transition",
          "interactive",
          "tap delay",
          "response"
        ],
        "pairsWith": [
          "motion-press",
          "sable-surface-interactive"
        ]
      },
      {
        "name": "motion-press",
        "kind": "utility",
        "family": "motion",
        "intent": "A small tactile settle (scale 0.97) while the element is pressed. Skips disabled elements. Declares only the pressed state, not a transition.",
        "whenToUse": "A pressable surface that is not a Sable Button (Button already has it): a tile, a card that acts as a button, an icon control.",
        "insteadOf": "An `active:` scale utility with its own transition, which fights `motion-interactive` for the transition property and keeps animating with motion off.",
        "example": "<button type=\"button\" className=\"motion-interactive motion-press sable-surface sable-frame sable-frame-r-lg sable-frame-p-4\">Open</button>",
        "keywords": [
          "press",
          "pressed state",
          "tap feedback",
          "active scale",
          "tactile",
          "click feedback"
        ],
        "pairsWith": [
          "motion-interactive"
        ]
      },
      {
        "name": "motion-fade",
        "kind": "utility",
        "family": "motion",
        "intent": "Opacity-only enter and exit, keyed to Base UI's `data-starting-style` / `data-ending-style`: fades in at the enter duration, out at the exit duration.",
        "whenToUse": "Scrims, backdrops and overlays that should appear without moving. The element rests visible; the data attributes supply the from and to.",
        "insteadOf": "A keyframe fade or a conditional opacity class, which cannot animate the exit of an element Base UI is unmounting.",
        "example": "<div className=\"motion-fade fixed inset-0 bg-overlay\" />",
        "keywords": [
          "fade",
          "backdrop",
          "scrim",
          "overlay fade",
          "enter exit",
          "opacity transition"
        ]
      },
      {
        "name": "motion-pop",
        "kind": "utility",
        "family": "motion",
        "intent": "Enter with a slight scale from the anchor edge (spring easing) and exit faster without overshoot, keyed to `data-starting-style` / `data-ending-style`. Scales from Base UI's `--transform-origin`.",
        "whenToUse": "Anchored or centred floating surfaces: popovers, menus, selects, tooltips, dialogs, command menus. Sable's own overlays already carry it.",
        "insteadOf": "A custom zoom keyframe, or a spring on exit, which draws the eye to what the user just dismissed.",
        "example": "<div className=\"motion-pop sable-surface-popover bg-popover text-popover-foreground rounded-lg shadow-lg\">…</div>",
        "keywords": [
          "pop",
          "popover animation",
          "menu animation",
          "dialog animation",
          "scale in",
          "zoom",
          "arrival"
        ],
        "pairsWith": [
          "motion-fade"
        ]
      },
      {
        "name": "motion-slide-up",
        "kind": "utility",
        "family": "motion",
        "intent": "Fade plus a 0.5rem rise on enter, reversed faster on exit, keyed to `data-starting-style` / `data-ending-style`. The suffix is the travel direction on enter.",
        "whenToUse": "A surface arriving from below: a toast at the bottom of the screen, a bottom bar, a banner under its trigger.",
        "insteadOf": "A translate keyframe with a literal duration, which keeps moving under reduced motion.",
        "example": "<div className=\"motion-slide-up sable-surface rounded-lg\">Saved</div>",
        "keywords": [
          "slide up",
          "rise",
          "toast animation",
          "enter from bottom",
          "directional"
        ],
        "pairsWith": [
          "motion-slide-down",
          "motion-slide-left",
          "motion-slide-right"
        ]
      },
      {
        "name": "motion-slide-down",
        "kind": "utility",
        "family": "motion",
        "intent": "Fade plus a 0.5rem drop on enter, reversed faster on exit, keyed to `data-starting-style` / `data-ending-style`.",
        "whenToUse": "A surface arriving from above: a top toast, a dropdown panel that reads better sliding than scaling.",
        "insteadOf": "A translate keyframe with a literal duration.",
        "example": "<div className=\"motion-slide-down sable-surface rounded-lg\">Connected</div>",
        "keywords": [
          "slide down",
          "drop in",
          "enter from top",
          "dropdown animation",
          "directional"
        ],
        "pairsWith": [
          "motion-slide-up"
        ]
      },
      {
        "name": "motion-slide-left",
        "kind": "utility",
        "family": "motion",
        "intent": "Fade plus a 0.5rem travel leftward on enter (it starts offset to the right), reversed faster on exit.",
        "whenToUse": "A surface arriving from the right edge: a side panel, a right-anchored toast.",
        "insteadOf": "A translate keyframe with a literal duration.",
        "example": "<aside className=\"motion-slide-left sable-surface\">…</aside>",
        "keywords": [
          "slide left",
          "enter from right",
          "side panel animation",
          "directional"
        ],
        "pairsWith": [
          "motion-slide-right"
        ]
      },
      {
        "name": "motion-slide-right",
        "kind": "utility",
        "family": "motion",
        "intent": "Fade plus a 0.5rem travel rightward on enter (it starts offset to the left), reversed faster on exit.",
        "whenToUse": "A surface arriving from the left edge: a navigation drawer, a left-anchored toast.",
        "insteadOf": "A translate keyframe with a literal duration.",
        "example": "<nav className=\"motion-slide-right sable-surface\">…</nav>",
        "keywords": [
          "slide right",
          "enter from left",
          "drawer animation",
          "directional"
        ],
        "pairsWith": [
          "motion-slide-left"
        ]
      },
      {
        "name": "motion-disclosure",
        "kind": "utility",
        "family": "motion",
        "intent": "Height plus fade for a panel that opens and closes: carries the overflow, the transition and the content fade. The component sets the target height and zeroes it on the starting/ending style.",
        "whenToUse": "A hand-built expanding region. Accordion and Collapsible already use it; reach for them first.",
        "insteadOf": "Animating max-height to a guessed number, or a show/hide with no transition. Height is the one sanctioned non-compositor property.",
        "example": "<div className=\"motion-disclosure h-[var(--collapsible-panel-height)]\">…</div>",
        "keywords": [
          "expand",
          "collapse",
          "accordion animation",
          "height transition",
          "disclosure",
          "reveal panel"
        ]
      },
      {
        "name": "motion-icon-swap",
        "kind": "utility",
        "family": "motion",
        "intent": "Cross-fades two glyphs stacked in one cell when a control's icon changes with its state: the outgoing one shrinks and blurs out, the incoming one resolves in. The inactive glyph is the one marked `aria-hidden=\"true\"` (or `data-active=\"false\"`).",
        "whenToUse": "Play/pause, mute/unmute, outline/fill, copy/check, menu/close: one control whose icon changes. Keep both icons mounted; the correct accessibility markup is also the animation hook.",
        "insteadOf": "Rendering one icon or the other (it snaps between two frames), or absolutely positioning the second icon, which collapses the wrapper. Under reduced motion the swap is instant and the glyph still changes.",
        "example": "<span className=\"motion-icon-swap\"><Icon name=\"play\" aria-hidden={playing} /><Icon name=\"pause\" aria-hidden={!playing} /></span>",
        "keywords": [
          "icon swap",
          "icon transition",
          "play pause",
          "toggle icon",
          "morph icon",
          "copy check",
          "icon animation"
        ],
        "pairsWith": [
          "motion-interactive"
        ]
      },
      {
        "name": "motion-glide",
        "kind": "utility",
        "family": "motion",
        "intent": "Timing for ONE element that travels to the selected option — position and size ease on the emphasized curve at the slow step. Expressive: `data-motion=\"subtle\"` makes it snap.",
        "whenToUse": "A selection indicator you position yourself: a custom nav's current-page bar, a segmented control's thumb, an active dot. Tabs, ToggleGroup `segmented`, ThemeSwitcher and Carousel already glide.",
        "insteadOf": "A fill or border on each option that switches on and off (two things blink instead of one thing moving), or a hand-written transition with a literal duration.",
        "example": "<span aria-hidden className=\"motion-glide absolute bottom-0 h-0.5 bg-foreground\" style={{ left: x, width: w }} />",
        "keywords": [
          "sliding indicator",
          "tab indicator",
          "segmented thumb",
          "active indicator",
          "glide",
          "underline animation",
          "selection animation"
        ],
        "pairsWith": [
          "motion-interactive"
        ]
      },
      {
        "name": "motion-shake",
        "kind": "utility",
        "family": "motion",
        "intent": "A short decaying horizontal shake that plays while `data-shake` is set. `useShake()` sets and clears the attribute and restarts it on a repeat refusal. Expressive: under `subtle` only the error colour remains.",
        "whenToUse": "An answer the system refused: a wrong one-time code, a submit with invalid fields, a rejected password. Always alongside the error colour and message, never instead of them. OtpField's `invalid` already shakes.",
        "insteadOf": "A keyframe shake with a literal duration, which keeps moving under reduced motion, or a shake with no error text.",
        "example": "const { shake, shakeProps } = useShake()\n<form className=\"motion-shake\" {...shakeProps} onSubmit={(e) => { if (!valid) { e.preventDefault(); shake() } }}>…</form>",
        "keywords": [
          "shake",
          "error animation",
          "wrong password",
          "invalid",
          "refuse",
          "wiggle",
          "nope"
        ],
        "pairsWith": [
          "motion-interactive"
        ]
      },
      {
        "name": "motion-tick",
        "kind": "utility",
        "family": "motion",
        "intent": "A selection mark that draws itself in from its leading edge (a clip-path wipe, so it works on any icon set) with an essential fade, keyed to Base UI's starting/ending style. Exits only fade. The wipe is expressive.",
        "whenToUse": "A check or success glyph that mounts with its state: a custom selection card's tick, a completed step. Checkbox and CheckboxCard already use it.",
        "insteadOf": "A scale-from-zero pop on a check mark, which reads as a stamp rather than a tick, or a path-length draw that needs to own the SVG.",
        "example": "<Base.Indicator className=\"motion-tick\"><Icon name=\"check\" /></Base.Indicator>",
        "keywords": [
          "check animation",
          "tick",
          "draw check",
          "success mark",
          "checkbox animation",
          "selection mark"
        ]
      },
      {
        "name": "motion-appear",
        "kind": "utility",
        "family": "motion",
        "intent": "Fades and scales a small control in on first render through `@starting-style` — no data attribute, no JS. The fade is essential, the scale is expressive. Removal is instant.",
        "whenToUse": "A control that mounts in place as state changes: a search field's clear button, a send button replacing a mic, a count badge that appears. Put it on a wrapper around a Sable Button or anything carrying `motion-interactive`, so the two do not fight over `transition-property`.",
        "insteadOf": "Conditionally rendering a control so it pops in on one frame, or wrapping a single icon button in Presence.",
        "example": "{value && <span className=\"flex motion-appear\"><Button size=\"icon-xs\" variant=\"ghost\" aria-label=\"Clear\"><Icon name=\"xmark\" /></Button></span>}",
        "keywords": [
          "appear",
          "mount animation",
          "pop in",
          "enter",
          "starting style",
          "clear button"
        ],
        "pairsWith": [
          "motion-icon-swap"
        ]
      },
      {
        "name": "motion-arrive",
        "kind": "utility",
        "family": "motion",
        "intent": "Items a user action brings into a list settle into place one after another: a short fade down from 0.25rem. Stagger with `--motion-arrive-delay` (raw ms; the recipe scales it). Expressive.",
        "whenToUse": "Only on items that are NEW because of something the user did: a folder's children on expand, a row just added, results that load in. Tree's expand already uses it.",
        "insteadOf": "A staggered entrance on every render of a list, which turns a list into a loading delay, or an inline keyframe animation with literal durations.",
        "example": "<li className=\"motion-arrive\" style={{ \"--motion-arrive-delay\": \"36ms\" } as CSSProperties}>{row.name}</li>",
        "keywords": [
          "stagger",
          "list animation",
          "arrival",
          "cascade",
          "new item",
          "expand children",
          "enter list"
        ],
        "pairsWith": [
          "motion-interactive"
        ]
      },
      {
        "name": "motion-bloom",
        "kind": "utility",
        "family": "motion",
        "intent": "A small glyph landing in its \"on\" state grows from nothing past its size (1.2) and settles. The amplitude a 16px glyph needs to read as an event; surfaces never bloom. A keyframe that plays on mount, so remount the glyph (a changing `key`) to replay it. `--motion-bloom-delay` holds it at nothing first (raw ms; the recipe scales it). Expressive.",
        "whenToUse": "A glyph that a person's choice turns on: a liked heart, a starred item, a status icon arriving in a toast. LikeButton and Toast already use it. Pair with <Burst> for the follow-through on a celebratory toggle.",
        "insteadOf": "A bigger motion-press or motion-pop on the whole control (a button or card that overshoots 20% lurches), or a hand-written scale keyframe with literal durations. Never on the resting state: a page that loads with a post already liked must not bloom every heart.",
        "example": "<span key={likes} className={liked ? \"motion-bloom\" : undefined}><Icon name=\"heart\" variant={liked ? \"solid\" : \"regular\"} /></span>",
        "keywords": [
          "pop",
          "overshoot",
          "like",
          "heart",
          "star",
          "celebrate",
          "glyph",
          "icon pop",
          "delight"
        ],
        "pairsWith": [
          "motion-interactive"
        ]
      },
      {
        "name": "motion-size",
        "kind": "utility",
        "family": "motion",
        "intent": "Eases an element between sizes: between a keyword and a length (0 ↔ auto) through `interpolate-size: allow-keywords`, and between measured pixel sizes when paired with `useAutoSize()`, so a button whose label changes stretches to the new width instead of jumping. A superset of motion-interactive's transition list, so it can sit on a Button. The size is expressive.",
        "whenToUse": "A control whose content changes length in place: a two-step confirm button, a Copy → Copied label, a chip that gains a count. ConfirmButton already uses it.",
        "insteadOf": "A hand-written width transition, or a fixed width that clips the longer label. A content-sized box computes `width: auto` before and after its label changes, so on its own the recipe has nothing to ease — that is what `useAutoSize()` is for.",
        "example": "const size = useAutoSize<HTMLButtonElement, HTMLSpanElement>()\n<button type=\"button\" ref={size.outerRef} className=\"motion-size\">\n\t<span ref={size.innerRef} className=\"inline-flex w-max\">{copied ? \"Copied\" : \"Copy link\"}</span>\n</button>",
        "keywords": [
          "width animation",
          "auto width",
          "label change",
          "resize animation",
          "interpolate size",
          "morph button"
        ],
        "pairsWith": [
          "motion-icon-swap"
        ]
      },
      {
        "name": "motion-spin",
        "kind": "utility",
        "family": "motion",
        "intent": "A continuous rotation for a spinner glyph, scaled by --motion-scale so reduced motion freezes it.",
        "whenToUse": "A loading glyph that is not the Spinner component (use Spinner first), such as an icon inside a busy button.",
        "insteadOf": "Tailwind's built-in spin animation, which ignores --motion-scale. sable-lint's `builtin-animate` flags it.",
        "example": "<Icon name=\"spinner\" className=\"motion-spin\" />",
        "keywords": [
          "spinner",
          "spin",
          "loading",
          "rotate",
          "busy",
          "activity"
        ],
        "pairsWith": [
          "motion-pulse"
        ]
      },
      {
        "name": "motion-orbit",
        "kind": "utility",
        "family": "motion",
        "intent": "A slow continuous rotation (24s by default) for ambient line art. `--motion-orbit-duration` sets the speed and `--motion-orbit-direction` the direction; it rotates about the centre of any viewBox.",
        "whenToUse": "The idle loop of an illustration or schematic after it draws on, usually with `motion-draw` on the same figure.",
        "insteadOf": "`motion-spin`, which is a loader's speed, or a hand-written keyframe that keeps turning under reduced motion.",
        "example": "<svg className=\"motion-orbit [--motion-orbit-duration:40s]\" viewBox=\"0 0 200 200\">…</svg>",
        "keywords": [
          "orbit",
          "slow rotation",
          "ambient",
          "rotate illustration",
          "decorative loop"
        ],
        "pairsWith": [
          "motion-draw"
        ]
      },
      {
        "name": "motion-pulse",
        "kind": "utility",
        "family": "motion",
        "intent": "A soft looping opacity pulse, scaled by --motion-scale.",
        "whenToUse": "A live or pending indicator: a recording dot, an unsaved marker, a pending status.",
        "insteadOf": "Tailwind's built-in pulse animation, which ignores --motion-scale. For a loading placeholder use Skeleton or `motion-shimmer`.",
        "example": "<span className=\"motion-pulse size-2 rounded-full bg-destructive\" />",
        "keywords": [
          "pulse",
          "breathing",
          "live indicator",
          "recording",
          "pending",
          "activity"
        ],
        "pairsWith": [
          "motion-ping"
        ]
      },
      {
        "name": "motion-shimmer",
        "kind": "utility",
        "family": "motion",
        "intent": "The skeleton sweep: one band of light that passes across every skeleton on screen in sequence, because the gradient is fixed to the viewport. Rests off-screen, so with motion off a skeleton is a calm block.",
        "whenToUse": "A hand-built loading placeholder. The Skeleton component already uses it.",
        "insteadOf": "A pulse on each block, or a per-box gradient, where a short line and a tall card sweep at different speeds.",
        "example": "<div className=\"motion-shimmer h-4 w-48 rounded-md bg-muted\" />",
        "keywords": [
          "shimmer",
          "skeleton",
          "loading placeholder",
          "sweep",
          "shine"
        ],
        "pairsWith": [
          "motion-text-shimmer"
        ]
      },
      {
        "name": "motion-text-shimmer",
        "kind": "utility",
        "family": "motion",
        "intent": "The sweep run through the glyphs instead of behind them, for a live status line. The gradient goes muted to foreground and back, so the text stays readable on every frame.",
        "whenToUse": "Status text while work is happening: \"Thinking…\", \"Searching\", \"Generating response\".",
        "insteadOf": "`motion-shimmer` on text, which paints a band behind real words and reads as a skeleton. Named `motion-*`, not `text-*`, so tailwind-merge does not drop the colour class beside it.",
        "example": "<span className=\"motion-text-shimmer text-body-sm\">Thinking…</span>",
        "keywords": [
          "text shimmer",
          "thinking",
          "generating",
          "status text",
          "loading text",
          "ai status"
        ],
        "pairsWith": [
          "motion-shimmer"
        ]
      },
      {
        "name": "motion-dot-bounce",
        "kind": "utility",
        "family": "motion",
        "intent": "A looping vertical bounce for one dot of a typing or waiting indicator. Offset each dot with an animation delay.",
        "whenToUse": "A three-dot typing indicator in a chat or assistant surface.",
        "insteadOf": "Tailwind's built-in bounce animation, which ignores --motion-scale.",
        "example": "<span className=\"motion-dot-bounce size-1.5 rounded-full bg-muted-foreground\" />",
        "keywords": [
          "typing indicator",
          "dots",
          "bounce",
          "waiting",
          "chat loading"
        ]
      },
      {
        "name": "motion-ping",
        "kind": "utility",
        "family": "motion",
        "intent": "A looping ring that expands and fades from a point, scaled by --motion-scale.",
        "whenToUse": "Drawing attention to a live point: a new-activity dot, a location marker, a beacon behind a status dot.",
        "insteadOf": "Tailwind's built-in ping animation, which ignores --motion-scale.",
        "example": "<span className=\"motion-ping absolute inset-0 rounded-full bg-success\" />",
        "keywords": [
          "ping",
          "beacon",
          "ripple",
          "attention",
          "live dot"
        ],
        "pairsWith": [
          "motion-pulse"
        ]
      },
      {
        "name": "animate-fade-in",
        "kind": "utility",
        "family": "motion",
        "intent": "A one-shot fade in on mount at the base duration, decelerating, with `both` fill so there is no flash before it starts.",
        "whenToUse": "Content that appears once when a route or panel mounts.",
        "insteadOf": "A keyframe with a literal duration. For content entering on scroll use Reveal (`motion-reveal`).",
        "example": "<section className=\"animate-fade-in\">…</section>",
        "keywords": [
          "fade in",
          "mount animation",
          "entrance",
          "page transition",
          "appear"
        ],
        "pairsWith": [
          "animate-fade-up",
          "animate-fade-down"
        ]
      },
      {
        "name": "animate-fade-up",
        "kind": "utility",
        "family": "motion",
        "intent": "A one-shot fade plus rise on mount at the slow duration, decelerating, with `both` fill.",
        "whenToUse": "A page section or list arriving from below on mount.",
        "insteadOf": "A translate keyframe with a literal duration. For scroll-triggered entrances use Reveal.",
        "example": "<div className=\"animate-fade-up\">…</div>",
        "keywords": [
          "fade up",
          "rise in",
          "entrance",
          "mount animation",
          "slide in"
        ],
        "pairsWith": [
          "animate-fade-in"
        ]
      },
      {
        "name": "animate-fade-down",
        "kind": "utility",
        "family": "motion",
        "intent": "A one-shot fade plus drop on mount at the slow duration, decelerating, with `both` fill.",
        "whenToUse": "Content arriving from above on mount, such as a notice under a header.",
        "insteadOf": "A translate keyframe with a literal duration.",
        "example": "<div className=\"animate-fade-down\">…</div>",
        "keywords": [
          "fade down",
          "drop in",
          "entrance",
          "mount animation"
        ],
        "pairsWith": [
          "animate-fade-in"
        ]
      },
      {
        "name": "motion-stream-in",
        "kind": "utility",
        "family": "motion",
        "intent": "Each token of a live stream resolves in from a slight blur once, on mount. Knows nothing of the final length, so there is no stagger.",
        "whenToUse": "Wrapping each arriving chunk of a streamed response. StreamingText already does it.",
        "insteadOf": "The reveal recipes, which stage text that is already there, or a typewriter effect.",
        "example": "<span key={chunk.id} className=\"motion-stream-in\">{chunk.text}</span>",
        "keywords": [
          "streaming",
          "token animation",
          "llm output",
          "typewriter",
          "generating"
        ],
        "pairsWith": [
          "stream-tail",
          "motion-caret"
        ]
      },
      {
        "name": "motion-caret",
        "kind": "utility",
        "family": "motion",
        "intent": "A caret that blinks only when idle and holds steady while `data-streaming=\"true\"`, so the blink returning signals the stream has finished.",
        "whenToUse": "The cursor at the end of streamed or typed text.",
        "insteadOf": "A caret that blinks while text is arriving, which sets two competing rhythms.",
        "example": "<span className=\"motion-caret\" data-streaming={streaming} aria-hidden=\"true\">▍</span>",
        "keywords": [
          "caret",
          "cursor",
          "blink",
          "typing cursor",
          "streaming"
        ],
        "pairsWith": [
          "motion-stream-in"
        ]
      },
      {
        "name": "motion-reveal",
        "kind": "utility",
        "family": "motion",
        "intent": "Fade plus a 0.75rem rise when `data-reveal` flips from \"out\" to \"in\". Out of view it rests hidden and nudged down; with motion off the content stays visible.",
        "whenToUse": "Through the Reveal and TextReveal components, which set `data-reveal` when the element scrolls into view. Use the class directly only on an element whose `data-reveal` you set yourself.",
        "insteadOf": "An IntersectionObserver plus hand-written opacity classes.",
        "example": "<Reveal><Card>…</Card></Reveal>",
        "keywords": [
          "scroll reveal",
          "reveal on scroll",
          "in view",
          "entrance",
          "scroll animation"
        ],
        "pairsWith": [
          "motion-draw"
        ]
      },
      {
        "name": "motion-draw",
        "kind": "utility",
        "family": "motion",
        "intent": "Draws an SVG path on when an ancestor's `data-reveal` flips to \"in\". The path needs `pathLength=\"1\"`. `--motion-draw-duration` and `--motion-draw-delay` (both scaled by --motion-scale) set its pace and stagger.",
        "whenToUse": "Line art and schematics inside a Reveal. Stagger sibling paths with `--motion-draw-delay`.",
        "insteadOf": "A hand-written dash-offset animation with literal timing, which keeps animating, or keeps its delay, under reduced motion.",
        "example": "<Reveal><svg viewBox=\"0 0 100 100\"><path className=\"motion-draw\" pathLength=\"1\" d=\"M10 50 L90 50\" /></svg></Reveal>",
        "keywords": [
          "draw on",
          "line art",
          "svg animation",
          "stroke animation",
          "illustration",
          "path draw"
        ],
        "pairsWith": [
          "motion-reveal",
          "motion-orbit"
        ]
      },
      {
        "name": "hit-target",
        "kind": "utility",
        "family": "helper",
        "intent": "Grows an element's tap target to 44px with a transparent `::after`, without moving its layout by a pixel. `--hit-target-size` overrides the size.",
        "whenToUse": "A deliberately small mark — a tag's remove ×, a tiny disclosure, a toast close — that must still meet the WCAG touch floor. Shrink it (`[--hit-target-size:32px]`) where targets sit side by side, or the later one steals the taps.",
        "insteadOf": "Padding the glyph up (moves it off the row's grid and pushes siblings) or a bigger icon. Never on an `<input>` or other replaced element — pseudo-elements silently do nothing there; wrap it in a label.",
        "example": "<button className=\"hit-target text-muted-foreground\" aria-label=\"Remove\"><Icon name=\"xmark\" /></button>",
        "keywords": [
          "touch target",
          "tap target",
          "hit area",
          "hit slop",
          "44px",
          "wcag target size",
          "small button"
        ]
      },
      {
        "name": "reveal-on-hover",
        "kind": "utility",
        "family": "helper",
        "intent": "Hides a row or tile action until its item is hovered or holds focus — on hover-capable devices only. Touch and no-hover devices always show it, and it fades with opacity, so it never leaves the tab order or the accessibility tree. The item is the nearest ancestor with `group` (or `data-reveal-scope`); an open popup keeps its trigger visible. `--reveal-offset` adds a short rise.",
        "whenToUse": "Secondary per-item actions in a dense list or grid — a tile's play button, a row's overflow menu or visibility toggle — where showing every action at rest would turn the list into a wall of controls. Put `group` on the item (the row, the tile), not on the list, and the class on the action or its wrapper.",
        "insteadOf": "`opacity-0 group-hover:opacity-100` (hidden forever on a phone), `hidden group-hover:flex` (drops it from the tab order and the accessibility tree), or a hand-written `[@media(hover:hover)]:opacity-0` pair (snaps, and misses focus and open menus). Not for a primary action — that stays visible.",
        "example": "<li className=\"group flex items-center gap-2\"><span className=\"flex-1\">Track</span><Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Like Track\" className=\"reveal-on-hover\"><Icon name=\"heart\" /></Button></li>",
        "keywords": [
          "show on hover",
          "hover reveal",
          "hover actions",
          "row actions",
          "hidden until hover",
          "group-hover opacity",
          "hover:hover",
          "touch visible",
          "focus-within"
        ],
        "pairsWith": [
          "motion-interactive"
        ]
      },
      {
        "name": "stretched-link",
        "kind": "utility",
        "family": "helper",
        "intent": "Makes one link cover its whole item with a transparent `::after`, so a tile or card is clickable everywhere while its other links and buttons stay separate controls. Focus draws the ring on the overlay, rounded by `--stretched-link-radius`.",
        "whenToUse": "A card, tile or row that IS a link but also holds a second control — a subtitle link to the artist, a play button, a menu. Put it on the primary link (usually the title), `relative` on the item, and `relative z-10` on every other control.",
        "insteadOf": "Wrapping the item in an `<a>` or `Card render={<a />}` — invalid as soon as it nests another link or button, which browsers re-parent and screen readers read as one long link. Not with `hit-target` on the same element (both own `::after`).",
        "example": "<article className=\"relative [--stretched-link-radius:var(--radius-lg)]\"><a href=\"/albums/1\" className=\"stretched-link\">Low tide</a><a href=\"/artists/2\" className=\"relative z-10\">Juno Avery</a></article>",
        "keywords": [
          "stretched link",
          "card link",
          "clickable card",
          "whole card clickable",
          "block link",
          "nested link",
          "link overlay"
        ],
        "pairsWith": [
          "reveal-on-hover"
        ]
      },
      {
        "name": "link-underline",
        "kind": "utility",
        "family": "helper",
        "intent": "An underline drawn from the font's own metrics (position and thickness `from-font`) with ink skipping descenders, so it retunes when a theme swaps typeface. Also carries the link's focus-visible outline in `--ring`, so a plain `<a>` meets the focus floor without app CSS.",
        "whenToUse": "Every plain text link — inline in running text or standalone (\"Forgot password?\"). Pair with `motion-interactive` for a colour change on hover.",
        "insteadOf": "`underline underline-offset-4 decoration-2` — tuned to one face and wrong for the next theme's. Animating thickness or offset is not supported; a growing underline is a separate pseudo-element.",
        "example": "<a href=\"/terms\" className=\"link-underline motion-interactive text-primary\">terms</a>",
        "keywords": [
          "underline",
          "link style",
          "inline link",
          "text link",
          "hyperlink"
        ]
      },
      {
        "name": "checkerboard",
        "kind": "utility",
        "family": "helper",
        "intent": "The transparency checkerboard, painted from `--panel` and a derived darker step so it reads in both modes. `--checkerboard-size` (default 16px) and `--checkerboard-alt` tune it.",
        "whenToUse": "Behind anything that can be translucent: a colour swatch with alpha, an image or artboard preview, an alpha slider track.",
        "insteadOf": "A hand-rolled `repeating-conic-gradient` with two hardcoded greys. Deliberately not named `bg-checkerboard`, so `cn()` never merges it away against a real `bg-*` colour — you can layer a colour over it.",
        "example": "<div className=\"checkerboard [--checkerboard-size:8px] size-6 rounded-sm\" />",
        "keywords": [
          "transparency",
          "alpha background",
          "checker",
          "transparent pattern",
          "swatch background"
        ]
      },
      {
        "name": "texture-dither",
        "kind": "utility",
        "family": "helper",
        "intent": "A faint pixel / halftone dither field that dissolves: a small pseudo-random tile of squares painted in `--border-strong` and faded out by a gradient mask. Static, pure CSS, follows every theme and mode. Hooks: `--dither-fade` (direction, any linear-gradient side or angle, default `to bottom`), `--dither-size` (tile, default 48px = 2px squares) and `--dither-color` (default `var(--border-strong)`).",
        "whenToUse": "Decoration at the top of a content area, a panel or a card, or behind an empty-state heading. Put it on its own `aria-hidden` element, `absolute -z-10` as the first child of a `relative isolate` parent, so the content after it paints on top with no z-index of its own. It sets `pointer-events: none` and no position, so it never takes layout or catches clicks.",
        "insteadOf": "A hand-written `radial-gradient` dot grid (reads as graph paper, not dither), a PNG noise texture, a canvas, or hardcoded greys. Deliberately not named `bg-dither`, so `cn()` never merges it away against a real `bg-*` colour class.",
        "example": "<div className=\"relative isolate\"><div aria-hidden className=\"texture-dither absolute inset-x-0 top-0 -z-10 h-40\" /></div>",
        "keywords": [
          "dither",
          "halftone",
          "pixel pattern",
          "dot pattern",
          "noise texture",
          "texture",
          "fade pattern",
          "empty state background",
          "decorative background"
        ],
        "pairsWith": [
          "checkerboard"
        ]
      }
    ]
  },
  "propSurface": {
    "about": "Every prop each exported component accepts, read from its TypeScript type — including what it forwards to its Base UI root, which the component's own props table does not restate. React's DOM attributes are omitted. `sable grade` judges props against this. Generated from src/index.ts — do not hand-edit.",
    "items": {
      "Accordion": [
        "className",
        "defaultValue",
        "disabled",
        "hiddenUntilFound",
        "keepMounted",
        "loopFocus",
        "multiple",
        "onValueChange",
        "orientation",
        "render",
        "style",
        "value"
      ],
      "AccordionItem": [
        "className",
        "disabled",
        "onOpenChange",
        "render",
        "style",
        "value"
      ],
      "AccordionPanel": [
        "className",
        "hiddenUntilFound",
        "keepMounted",
        "render",
        "style"
      ],
      "AccordionTrigger": [
        "className",
        "headingLevel",
        "indicator",
        "nativeButton",
        "render",
        "style"
      ],
      "ActivityHeatmap": [
        "activeDate",
        "categories",
        "data",
        "defaultActiveDate",
        "end",
        "formatValue",
        "label",
        "legend",
        "legendLabels",
        "levelScale",
        "levels",
        "loading",
        "locale",
        "monthLabels",
        "motion",
        "onActiveDateChange",
        "onSelectDate",
        "renderCell",
        "selectedDate",
        "size",
        "start",
        "stretch",
        "tone",
        "tooltip",
        "unit",
        "weekStart",
        "weekdayLabels",
        "year"
      ],
      "AgentAvatar": [
        "label",
        "live",
        "motion",
        "size",
        "state"
      ],
      "AlertDialog": [
        "actionsRef",
        "children",
        "defaultOpen",
        "defaultTriggerId",
        "handle",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "triggerId"
      ],
      "AlertDialogClose": [
        "className",
        "nativeButton",
        "render",
        "style"
      ],
      "AlertDialogContent": [
        "className",
        "closeLabel",
        "finalFocus",
        "initialFocus",
        "keepMounted",
        "render",
        "scroll",
        "showCloseButton",
        "size",
        "style"
      ],
      "AlertDialogDescription": [
        "className",
        "render",
        "style"
      ],
      "AlertDialogOverlay": [
        "className",
        "forceRender",
        "render",
        "size",
        "style"
      ],
      "AlertDialogTitle": [
        "className",
        "render",
        "style"
      ],
      "AlertDialogTrigger": [
        "className",
        "handle",
        "id",
        "nativeButton",
        "payload",
        "render",
        "style"
      ],
      "AppHeader": [
        "actions",
        "leading",
        "title"
      ],
      "AppShell": [
        "banners",
        "bottomNav",
        "children",
        "dock",
        "frame",
        "header",
        "mainId",
        "overlays",
        "sidebar",
        "skipLinkLabel"
      ],
      "AreaChart": [
        "activeIndex",
        "animate",
        "axisFormatter",
        "categoryTicks",
        "className",
        "curve",
        "data",
        "defaultActiveIndex",
        "domain",
        "fillStrength",
        "gradient",
        "grid",
        "index",
        "indexFormatter",
        "label",
        "legend",
        "lineWidth",
        "locale",
        "motion",
        "onActiveIndexChange",
        "referenceLines",
        "series",
        "stacked",
        "tooltip",
        "valueFormatter",
        "xAxis",
        "yAxis",
        "yAxisSide",
        "yAxisWidth"
      ],
      "AspectBox": [
        "ratio"
      ],
      "Attachment": [
        "actions",
        "icon",
        "meta",
        "name",
        "onOpen",
        "openLabel",
        "progress",
        "status",
        "thumbnail",
        "uploadingLabel",
        "variant"
      ],
      "Avatar": [
        "alt",
        "className",
        "cutout",
        "fallback",
        "fallbackDelay",
        "fit",
        "render",
        "seed",
        "shape",
        "size",
        "src",
        "status",
        "style",
        "tone",
        "variant"
      ],
      "AvatarFallback": [
        "className",
        "delay",
        "render",
        "style"
      ],
      "AvatarGroup": [
        "className",
        "countLabel",
        "fit",
        "max",
        "size",
        "surface",
        "total"
      ],
      "AvatarGroupCount": [
        "className",
        "count",
        "label",
        "render",
        "shape",
        "size",
        "style",
        "tone"
      ],
      "AvatarImage": [
        "className",
        "fit",
        "onLoadingStatusChange",
        "render",
        "style"
      ],
      "AvatarRoot": [
        "className",
        "render",
        "shape",
        "size",
        "style",
        "tone"
      ],
      "Badge": [
        "appearance",
        "dot",
        "icon",
        "pulse",
        "size",
        "tone"
      ],
      "Banner": [
        "action",
        "appearance",
        "dismissLabel",
        "dismissible",
        "label",
        "live",
        "onDismiss",
        "sticky",
        "tone"
      ],
      "BarChart": [
        "activeIndex",
        "animate",
        "axisFormatter",
        "barWidth",
        "categoryTicks",
        "className",
        "colorBy",
        "data",
        "defaultActiveIndex",
        "domain",
        "grid",
        "index",
        "indexFormatter",
        "label",
        "labels",
        "legend",
        "locale",
        "motion",
        "negativeTone",
        "onActiveIndexChange",
        "orientation",
        "radius",
        "referenceLines",
        "series",
        "stacked",
        "tooltip",
        "valueFormatter",
        "xAxis",
        "yAxis",
        "yAxisSide",
        "yAxisWidth"
      ],
      "BottomNavItem": [
        "active",
        "badge",
        "icon",
        "label",
        "render",
        "showLabel"
      ],
      "BreadcrumbLink": [
        "render"
      ],
      "BreadcrumbSeparator": [
        "children"
      ],
      "Browser": [
        "elevation",
        "url"
      ],
      "Bubble": [
        "align",
        "tail",
        "variant"
      ],
      "BubbleReaction": [
        "active",
        "avatars",
        "count",
        "emoji",
        "label",
        "motion"
      ],
      "BubbleReactionAdd": [
        "label",
        "motion",
        "onSelect",
        "reactions",
        "selected"
      ],
      "BubbleReactions": [
        "align"
      ],
      "Burst": [
        "className",
        "count",
        "motion",
        "palette",
        "particle",
        "playOnMount",
        "trigger"
      ],
      "Button": [
        "badge",
        "bleed",
        "iconEnd",
        "iconStart",
        "loading",
        "loadingLabel",
        "onClick",
        "render",
        "size",
        "variant"
      ],
      "Calendar": [
        "ISOWeek",
        "animate",
        "aria-label",
        "aria-labelledby",
        "autoFocus",
        "bare",
        "broadcastCalendar",
        "captionLayout",
        "className",
        "classNames",
        "components",
        "dateLib",
        "defaultMonth",
        "dir",
        "disableNavigation",
        "disabled",
        "endMonth",
        "excludeDisabled",
        "firstWeekContainsDate",
        "fixedWeeks",
        "footer",
        "formatters",
        "fromDate",
        "fromMonth",
        "fromYear",
        "hidden",
        "hideNavigation",
        "hideWeekdays",
        "id",
        "initialFocus",
        "labels",
        "lang",
        "locale",
        "max",
        "min",
        "mode",
        "modifiers",
        "modifiersClassNames",
        "modifiersStyles",
        "month",
        "motion",
        "navLayout",
        "nonce",
        "noonSafe",
        "numberOfMonths",
        "numerals",
        "onDayBlur",
        "onDayClick",
        "onDayFocus",
        "onDayKeyDown",
        "onDayKeyPress",
        "onDayKeyUp",
        "onDayMouseEnter",
        "onDayMouseLeave",
        "onDayPointerEnter",
        "onDayPointerLeave",
        "onDayTouchCancel",
        "onDayTouchEnd",
        "onDayTouchMove",
        "onDayTouchStart",
        "onMonthChange",
        "onNextClick",
        "onPrevClick",
        "onSelect",
        "onWeekNumberClick",
        "pagedNavigation",
        "required",
        "resetOnSelect",
        "reverseMonths",
        "reverseYears",
        "role",
        "selected",
        "showOutsideDays",
        "showWeekNumber",
        "startMonth",
        "style",
        "styles",
        "timeZone",
        "title",
        "toDate",
        "toMonth",
        "toYear",
        "today",
        "useAdditionalDayOfYearTokens",
        "useAdditionalWeekYearTokens",
        "weekStartsOn"
      ],
      "Card": [
        "density",
        "render",
        "variant"
      ],
      "CardContent": [
        "flush"
      ],
      "CardFooter": [
        "actions"
      ],
      "CardHeader": [
        "divided"
      ],
      "CardList": [
        "divided"
      ],
      "CardListLabel": [
        "render"
      ],
      "CardStack": [
        "collapseLabel",
        "defaultExpanded",
        "expandLabel",
        "expanded",
        "label",
        "motion",
        "onExpandedChange",
        "trigger"
      ],
      "CardTitle": [
        "render"
      ],
      "CaretMenu": [
        "children",
        "className",
        "label",
        "status",
        "trigger"
      ],
      "CaretMenuItem": [
        "description",
        "disabled",
        "icon",
        "onSelect"
      ],
      "Carousel": [
        "arrowClassName",
        "arrows",
        "autoplay",
        "children",
        "className",
        "counter",
        "defaultIndex",
        "dotLabel",
        "dots",
        "dotsLabel",
        "draggable",
        "gap",
        "index",
        "label",
        "loop",
        "motion",
        "nextLabel",
        "onIndexChange",
        "pauseLabel",
        "playLabel",
        "positionLabel",
        "previousLabel",
        "slideClassName",
        "slideLabel",
        "slidesToShow"
      ],
      "Center": [
        "max"
      ],
      "ChatComposer": [
        "actions",
        "allowEmpty",
        "attachLabel",
        "attachments",
        "busy",
        "defaultValue",
        "disabled",
        "fieldRef",
        "footer",
        "invalid",
        "label",
        "leading",
        "motion",
        "onAttach",
        "onSend",
        "onStop",
        "onValueChange",
        "placeholder",
        "sendLabel",
        "sendOn",
        "stopLabel",
        "value"
      ],
      "Checkbox": [
        "checked",
        "className",
        "defaultChecked",
        "disabled",
        "form",
        "id",
        "indeterminate",
        "inputRef",
        "motion",
        "name",
        "nativeButton",
        "onCheckedChange",
        "parent",
        "readOnly",
        "render",
        "required",
        "style",
        "uncheckedValue",
        "value"
      ],
      "CheckboxCard": [
        "checked",
        "className",
        "defaultChecked",
        "description",
        "disabled",
        "form",
        "icon",
        "id",
        "indeterminate",
        "inputRef",
        "motion",
        "name",
        "nativeButton",
        "onCheckedChange",
        "parent",
        "readOnly",
        "render",
        "required",
        "style",
        "title",
        "tone",
        "uncheckedValue",
        "value"
      ],
      "CheckboxGroup": [
        "allValues",
        "children",
        "className",
        "defaultValue",
        "disabled",
        "onValueChange",
        "render",
        "style",
        "value"
      ],
      "CodeBlock": [
        "code",
        "copiedLabel",
        "copyLabel",
        "filename",
        "highlight",
        "prompt",
        "showCopy",
        "wrap"
      ],
      "CodeHighlightProvider": [
        "children",
        "highlight"
      ],
      "Col": [
        "span",
        "start"
      ],
      "Collapsible": [
        "className",
        "defaultOpen",
        "disabled",
        "onOpenChange",
        "open",
        "render",
        "style"
      ],
      "CollapsibleIndicator": [
        "className",
        "direction"
      ],
      "CollapsiblePanel": [
        "className",
        "hiddenUntilFound",
        "keepMounted",
        "render",
        "style"
      ],
      "CollapsibleTrigger": [
        "className",
        "nativeButton",
        "render",
        "style"
      ],
      "ColorField": [
        "allowAlpha",
        "allowTransparent",
        "eyedropperLabel",
        "form",
        "hexLabel",
        "label",
        "name",
        "onValueChange",
        "readOnly",
        "required",
        "swatches",
        "transparentLabel",
        "value"
      ],
      "Columns": [
        "count",
        "gap"
      ],
      "Combobox": [
        "actionsRef",
        "autoComplete",
        "autoHighlight",
        "children",
        "defaultInputValue",
        "defaultOpen",
        "defaultValue",
        "disabled",
        "filter",
        "filteredItems",
        "form",
        "grid",
        "highlightItemOnHover",
        "highlightMatches",
        "id",
        "inline",
        "inputRef",
        "inputValue",
        "isItemEqualToValue",
        "itemToStringLabel",
        "itemToStringValue",
        "items",
        "limit",
        "locale",
        "loopFocus",
        "modal",
        "multiple",
        "name",
        "onInputValueChange",
        "onItemHighlighted",
        "onOpenChange",
        "onOpenChangeComplete",
        "onValueChange",
        "open",
        "openOnInputClick",
        "readOnly",
        "required",
        "value",
        "virtualized"
      ],
      "ComboboxChips": [
        "chipLabel",
        "className",
        "disabled",
        "removeLabel",
        "render",
        "size",
        "style",
        "toggleLabel"
      ],
      "ComboboxClear": [
        "className",
        "disabled",
        "keepMounted",
        "nativeButton",
        "render",
        "style"
      ],
      "ComboboxContent": [
        "align",
        "className",
        "finalFocus",
        "initialFocus",
        "render",
        "scroll",
        "side",
        "sideOffset",
        "style"
      ],
      "ComboboxEmpty": [
        "className",
        "render",
        "style"
      ],
      "ComboboxGroup": [
        "className",
        "items",
        "render",
        "style"
      ],
      "ComboboxGroupLabel": [
        "className",
        "render",
        "style"
      ],
      "ComboboxInput": [
        "className",
        "disabled",
        "render",
        "size",
        "style",
        "toggleLabel"
      ],
      "ComboboxItem": [
        "children",
        "className",
        "disabled",
        "index",
        "nativeButton",
        "onClick",
        "render",
        "style",
        "value"
      ],
      "ComboboxItemIndicator": [
        "children",
        "className",
        "keepMounted",
        "render",
        "style"
      ],
      "ComboboxList": [
        "children",
        "className",
        "render",
        "style"
      ],
      "ComboboxPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "ComboboxValue": [
        "children",
        "placeholder"
      ],
      "ComboboxVirtualList": [
        "children",
        "className",
        "groupLabelHeight",
        "itemClassName",
        "itemHeight",
        "overscan",
        "renderGroupLabel"
      ],
      "CommandMenu": [
        "children",
        "clearLabel",
        "description",
        "emptyMessage",
        "filter",
        "finalFocus",
        "highlightMatches",
        "inputProps",
        "items",
        "listClassName",
        "onOpenChange",
        "onQueryChange",
        "open",
        "placeholder",
        "query",
        "resultCountLabel",
        "scope",
        "searchLabel",
        "title"
      ],
      "CommandMenuGroup": [
        "children",
        "label"
      ],
      "CommandMenuItem": [
        "children",
        "detail",
        "disabled",
        "hint",
        "icon",
        "leading",
        "onSelect",
        "stacked"
      ],
      "CommandMenuPanel": [
        "children",
        "clearLabel",
        "elevation",
        "emptyMessage",
        "filter",
        "highlightMatches",
        "inputProps",
        "items",
        "listClassName",
        "onQueryChange",
        "placeholder",
        "query",
        "resultCountLabel",
        "scope",
        "searchLabel",
        "title"
      ],
      "CommandMenuTrigger": [
        "onOpen",
        "placeholder",
        "shortcut",
        "size"
      ],
      "ConfirmButton": [
        "badge",
        "bleed",
        "children",
        "confirmHint",
        "confirmLabel",
        "confirmVariant",
        "icon",
        "iconEnd",
        "motion",
        "onConfirm",
        "size",
        "timeout",
        "variant"
      ],
      "ContextCard": [
        "actionsRef",
        "children",
        "defaultOpen",
        "defaultTriggerId",
        "handle",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "triggerId"
      ],
      "ContextCardArrow": [
        "className",
        "render",
        "style"
      ],
      "ContextCardContent": [
        "align",
        "className",
        "render",
        "side",
        "sideOffset",
        "style"
      ],
      "ContextCardPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "ContextCardTrigger": [
        "className",
        "closeDelay",
        "delay",
        "handle",
        "payload",
        "render",
        "style"
      ],
      "ContextMenu": [
        "actionsRef",
        "children",
        "closeParentOnEsc",
        "defaultOpen",
        "defaultTriggerId",
        "disabled",
        "handle",
        "highlightItemOnHover",
        "loopFocus",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "orientation",
        "triggerId"
      ],
      "ContextMenuCheckboxItem": [
        "checked",
        "className",
        "closeOnClick",
        "defaultChecked",
        "disabled",
        "id",
        "label",
        "nativeButton",
        "onCheckedChange",
        "onClick",
        "render",
        "shortcut",
        "style"
      ],
      "ContextMenuContent": [
        "align",
        "children",
        "className",
        "finalFocus",
        "id",
        "render",
        "side",
        "sideOffset",
        "style"
      ],
      "ContextMenuGroup": [
        "children",
        "className",
        "render",
        "style"
      ],
      "ContextMenuGroupLabel": [
        "className",
        "render",
        "style"
      ],
      "ContextMenuItem": [
        "className",
        "closeOnClick",
        "description",
        "disabled",
        "icon",
        "id",
        "label",
        "nativeButton",
        "onClick",
        "render",
        "shortcut",
        "style",
        "variant"
      ],
      "ContextMenuLinkItem": [
        "className",
        "closeOnClick",
        "description",
        "icon",
        "id",
        "label",
        "newTabLabel",
        "render",
        "style"
      ],
      "ContextMenuPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "ContextMenuRadioGroup": [
        "children",
        "className",
        "defaultValue",
        "disabled",
        "onValueChange",
        "render",
        "style",
        "value"
      ],
      "ContextMenuRadioItem": [
        "className",
        "closeOnClick",
        "disabled",
        "id",
        "indicatorSide",
        "label",
        "nativeButton",
        "onClick",
        "render",
        "style",
        "value"
      ],
      "ContextMenuSeparator": [
        "className",
        "orientation",
        "render",
        "style"
      ],
      "ContextMenuSubmenu": [
        "actionsRef",
        "children",
        "closeParentOnEsc",
        "defaultOpen",
        "defaultTriggerId",
        "disabled",
        "handle",
        "highlightItemOnHover",
        "loopFocus",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "orientation",
        "triggerId"
      ],
      "ContextMenuSubmenuTrigger": [
        "className",
        "closeDelay",
        "delay",
        "disabled",
        "icon",
        "id",
        "label",
        "nativeButton",
        "onClick",
        "openOnHover",
        "render",
        "style",
        "value"
      ],
      "ContextMenuTrigger": [
        "className",
        "render",
        "style"
      ],
      "DataTable": [
        "caption",
        "collapsible",
        "columns",
        "data",
        "defaultSort",
        "empty",
        "expandedGroups",
        "groupBy",
        "groups",
        "isRowSelected",
        "locale",
        "manualSorting",
        "onExpandedGroupsChange",
        "onRowClick",
        "onSelectedKeysChange",
        "onSortChange",
        "rowKey",
        "rowSelectionLabel",
        "selectAllLabel",
        "selectedKeys",
        "sort"
      ],
      "DatePicker": [
        "className",
        "defaultTime",
        "defaultValue",
        "disabled",
        "form",
        "formatOptions",
        "granularity",
        "hourLabel",
        "locale",
        "maxDate",
        "minDate",
        "minuteLabel",
        "minuteStep",
        "mode",
        "name",
        "onChange",
        "onValueChange",
        "placeholder",
        "readOnly",
        "required",
        "size",
        "timeLabel",
        "value"
      ],
      "DateTile": [
        "date",
        "locale"
      ],
      "Density": [
        "children",
        "value"
      ],
      "DensityValue": [
        "children",
        "value"
      ],
      "DestructiveActionModal": [
        "cancelLabel",
        "children",
        "confirmLabel",
        "confirmText",
        "confirmingLabel",
        "description",
        "onConfirm",
        "onOpenChange",
        "open",
        "pending",
        "title"
      ],
      "Dialog": [
        "actionsRef",
        "children",
        "defaultOpen",
        "defaultTriggerId",
        "disablePointerDismissal",
        "handle",
        "modal",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "triggerId"
      ],
      "DialogClose": [
        "className",
        "nativeButton",
        "render",
        "style"
      ],
      "DialogContent": [
        "className",
        "closeLabel",
        "finalFocus",
        "initialFocus",
        "keepMounted",
        "render",
        "scroll",
        "showCloseButton",
        "size",
        "style"
      ],
      "DialogDescription": [
        "className",
        "render",
        "style"
      ],
      "DialogOverlay": [
        "className",
        "forceRender",
        "render",
        "size",
        "style"
      ],
      "DialogPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "DialogTitle": [
        "className",
        "render",
        "style"
      ],
      "DialogTrigger": [
        "className",
        "handle",
        "id",
        "nativeButton",
        "payload",
        "render",
        "style"
      ],
      "DisclosurePicker": [
        "className",
        "defaultOpen",
        "disabled",
        "form",
        "id",
        "name",
        "onOpenChange",
        "open",
        "render",
        "required",
        "size",
        "style",
        "value"
      ],
      "DisclosurePickerEmpty": [
        "children",
        "className"
      ],
      "DisclosurePickerList": [
        "aria-label",
        "children",
        "onValueChange",
        "value"
      ],
      "DisclosurePickerOption": [
        "children",
        "className",
        "disabled",
        "media",
        "note",
        "onRemove",
        "removeLabel",
        "textValue",
        "value"
      ],
      "DisclosurePickerPanel": [
        "children",
        "className",
        "hiddenUntilFound",
        "keepMounted",
        "render",
        "search",
        "style"
      ],
      "DisclosurePickerTrigger": [
        "children",
        "className",
        "label",
        "media",
        "nativeButton",
        "render",
        "style"
      ],
      "EmptyState": [
        "action",
        "code",
        "description",
        "icon",
        "size",
        "surface",
        "title",
        "tone"
      ],
      "Entity": [
        "action",
        "density",
        "interactive",
        "leading",
        "onSelect",
        "render",
        "selected",
        "subtitle",
        "subtitleWrap",
        "title"
      ],
      "Feedback": [
        "heading",
        "label",
        "motion",
        "onSubmit",
        "placeholder",
        "ratingLabel",
        "ratings",
        "submitLabel",
        "successMessage"
      ],
      "Field": [
        "children",
        "className",
        "description",
        "disabled",
        "error",
        "label",
        "labelTrailing",
        "messages",
        "name",
        "orientation",
        "required",
        "trailing",
        "validate",
        "validationDebounceTime",
        "validationMode"
      ],
      "Fieldset": [
        "className",
        "render",
        "style",
        "variant"
      ],
      "FieldsetLegend": [
        "className",
        "render",
        "style"
      ],
      "FileDropzone": [
        "accept",
        "acceptLabel",
        "aria-invalid",
        "description",
        "disabled",
        "formatError",
        "icon",
        "label",
        "maxFiles",
        "maxSize",
        "multiple",
        "onFilesAccepted",
        "onFilesRejected",
        "required",
        "size"
      ],
      "FontPicker": [
        "className",
        "defaultOpen",
        "disabled",
        "emptyLabel",
        "fonts",
        "form",
        "id",
        "label",
        "listLabel",
        "loadFont",
        "name",
        "onOpenChange",
        "onValueChange",
        "open",
        "options",
        "render",
        "required",
        "searchLabel",
        "searchPlaceholder",
        "searchable",
        "size",
        "style",
        "value"
      ],
      "Form": [
        "actionsRef",
        "errors",
        "noValidate",
        "onFormSubmit",
        "onSubmit",
        "validationMode"
      ],
      "GlidingHighlight": [
        "active",
        "children",
        "highlightClassName",
        "orientation"
      ],
      "GradientArt": [
        "intensity",
        "seed",
        "tones",
        "variant"
      ],
      "Grid": [
        "cols",
        "gap",
        "minItemWidth",
        "track"
      ],
      "GridOverlay": [
        "className",
        "columns",
        "gap",
        "inset",
        "show"
      ],
      "Icon": [
        "className",
        "name",
        "spin",
        "title",
        "variant"
      ],
      "IconProvider": [
        "children",
        "defaultVariant",
        "set"
      ],
      "IconTile": [
        "appearance",
        "icon",
        "label",
        "size",
        "tone"
      ],
      "InlineStatus": [
        "icon",
        "size",
        "tone"
      ],
      "Input": [
        "size"
      ],
      "InputGroup": [
        "aria-describedby",
        "aria-invalid",
        "children",
        "disabled",
        "id",
        "leading",
        "required",
        "trailing"
      ],
      "Kbd": [
        "mod",
        "variant"
      ],
      "Label": [
        "eyebrow",
        "hint",
        "size"
      ],
      "LikeButton": [
        "bleed",
        "count",
        "defaultPressed",
        "format",
        "icon",
        "label",
        "motion",
        "onClick",
        "onPressedChange",
        "pressed",
        "size",
        "tone",
        "variant"
      ],
      "LineChart": [
        "activeIndex",
        "animate",
        "axisFormatter",
        "categoryTicks",
        "className",
        "colorBy",
        "curve",
        "data",
        "defaultActiveIndex",
        "domain",
        "dots",
        "grid",
        "index",
        "indexFormatter",
        "label",
        "labels",
        "legend",
        "lineWidth",
        "locale",
        "motion",
        "onActiveIndexChange",
        "referenceLines",
        "series",
        "tooltip",
        "valueFormatter",
        "xAxis",
        "yAxis",
        "yAxisSide",
        "yAxisWidth"
      ],
      "Marker": [
        "icon",
        "live",
        "shimmer",
        "spin",
        "variant"
      ],
      "Marquee": [
        "children",
        "controls",
        "direction",
        "fade",
        "gap",
        "label",
        "onPlayChange",
        "pauseLabel",
        "pauseOnHover",
        "play",
        "playLabel",
        "speed"
      ],
      "MediaImage": [
        "alt",
        "fallback",
        "fit",
        "loading",
        "position",
        "seed",
        "sizes",
        "src",
        "srcSet"
      ],
      "MediaTile": [
        "action",
        "alt",
        "aspect",
        "badge",
        "href",
        "loading",
        "meta",
        "position",
        "render",
        "seed",
        "size",
        "sizes",
        "src",
        "srcSet",
        "subtitle",
        "subtitleHref",
        "subtitleRender",
        "title",
        "titleAs"
      ],
      "Menu": [
        "actionsRef",
        "children",
        "closeParentOnEsc",
        "defaultOpen",
        "defaultTriggerId",
        "disabled",
        "handle",
        "highlightItemOnHover",
        "loopFocus",
        "modal",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "orientation",
        "triggerId"
      ],
      "Menubar": [
        "className",
        "disabled",
        "loopFocus",
        "modal",
        "orientation",
        "render",
        "style"
      ],
      "MenubarTrigger": [
        "children",
        "className",
        "closeDelay",
        "delay",
        "disabled",
        "handle",
        "nativeButton",
        "openOnHover",
        "payload",
        "render",
        "style"
      ],
      "MenuCheckboxItem": [
        "checked",
        "className",
        "closeOnClick",
        "defaultChecked",
        "disabled",
        "id",
        "label",
        "nativeButton",
        "onCheckedChange",
        "onClick",
        "render",
        "shortcut",
        "style"
      ],
      "MenuContent": [
        "align",
        "children",
        "className",
        "finalFocus",
        "id",
        "render",
        "side",
        "sideOffset",
        "style"
      ],
      "MenuGroup": [
        "children",
        "className",
        "render",
        "style"
      ],
      "MenuGroupLabel": [
        "className",
        "render",
        "style"
      ],
      "MenuItem": [
        "className",
        "closeOnClick",
        "description",
        "disabled",
        "icon",
        "id",
        "label",
        "nativeButton",
        "onClick",
        "render",
        "shortcut",
        "style",
        "variant"
      ],
      "MenuLinkItem": [
        "className",
        "closeOnClick",
        "description",
        "icon",
        "id",
        "label",
        "newTabLabel",
        "render",
        "style"
      ],
      "MenuPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "MenuRadioGroup": [
        "children",
        "className",
        "defaultValue",
        "disabled",
        "onValueChange",
        "render",
        "style",
        "value"
      ],
      "MenuRadioItem": [
        "className",
        "closeOnClick",
        "disabled",
        "id",
        "indicatorSide",
        "label",
        "nativeButton",
        "onClick",
        "render",
        "style",
        "value"
      ],
      "MenuReactions": [
        "className",
        "motion",
        "onSelect",
        "reactions",
        "render",
        "selected",
        "style"
      ],
      "MenuSeparator": [
        "className",
        "orientation",
        "render",
        "style"
      ],
      "MenuSubmenu": [
        "actionsRef",
        "children",
        "closeParentOnEsc",
        "defaultOpen",
        "defaultTriggerId",
        "disabled",
        "handle",
        "highlightItemOnHover",
        "loopFocus",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "orientation",
        "triggerId"
      ],
      "MenuSubmenuTrigger": [
        "className",
        "closeDelay",
        "delay",
        "disabled",
        "icon",
        "id",
        "label",
        "nativeButton",
        "onClick",
        "openOnHover",
        "render",
        "style",
        "value"
      ],
      "MenuTrigger": [
        "children",
        "className",
        "closeDelay",
        "delay",
        "disabled",
        "handle",
        "nativeButton",
        "openOnHover",
        "payload",
        "render",
        "style"
      ],
      "Message": [
        "align",
        "avatar",
        "avatarSize",
        "footer",
        "grouped",
        "header",
        "messageId"
      ],
      "MessageScroller": [
        "autoFollow",
        "followThreshold",
        "gap",
        "initialScroll",
        "jumpToLatest",
        "jumpToLatestLabel",
        "onFollowChange",
        "onVisibleMessagesChange",
        "ref"
      ],
      "Meter": [
        "aria-valuetext",
        "className",
        "format",
        "getAriaValueText",
        "locale",
        "max",
        "min",
        "render",
        "segments",
        "shape",
        "showValue",
        "size",
        "strokeWidth",
        "style",
        "tone",
        "value"
      ],
      "MeterIndicator": [
        "className",
        "render",
        "style",
        "tone"
      ],
      "MeterLabel": [
        "className",
        "render",
        "style"
      ],
      "MeterTrack": [
        "className",
        "render",
        "size",
        "style"
      ],
      "MeterValue": [
        "children",
        "className",
        "render",
        "style"
      ],
      "MiddleTruncate": [
        "endChars",
        "startChars",
        "text"
      ],
      "MotionProvider": [
        "children",
        "defaultPolicy",
        "onPolicyChange",
        "policy",
        "target"
      ],
      "MotionScope": [
        "children",
        "level"
      ],
      "NavigationMenu": [
        "actionsRef",
        "align",
        "className",
        "closeDelay",
        "defaultValue",
        "delay",
        "onOpenChangeComplete",
        "onValueChange",
        "orientation",
        "render",
        "sideOffset",
        "style",
        "value"
      ],
      "NavigationMenuContent": [
        "className",
        "keepMounted",
        "render",
        "style"
      ],
      "NavigationMenuItem": [
        "className",
        "render",
        "style",
        "value"
      ],
      "NavigationMenuLink": [
        "active",
        "className",
        "closeOnClick",
        "description",
        "render",
        "style"
      ],
      "NavigationMenuList": [
        "className",
        "render",
        "style"
      ],
      "NavigationMenuTrigger": [
        "className",
        "nativeButton",
        "render",
        "style"
      ],
      "Note": [
        "action",
        "icon",
        "title",
        "tone"
      ],
      "NotificationBadge": [
        "count",
        "dot",
        "max",
        "motion",
        "overlay",
        "size",
        "tone"
      ],
      "NumberField": [
        "allowOutOfRange",
        "allowWheelScrub",
        "className",
        "decrementLabel",
        "defaultValue",
        "disabled",
        "form",
        "format",
        "id",
        "incrementLabel",
        "inputRef",
        "largeStep",
        "locale",
        "max",
        "min",
        "name",
        "onValueChange",
        "onValueCommitted",
        "readOnly",
        "required",
        "size",
        "smallStep",
        "snapOnStep",
        "step",
        "steppers",
        "style",
        "value"
      ],
      "NumberTicker": [
        "format",
        "locales",
        "motion",
        "prefix",
        "suffix",
        "trend",
        "value"
      ],
      "OtpField": [
        "aria-invalid",
        "autoComplete",
        "autoSubmit",
        "className",
        "defaultValue",
        "disabled",
        "form",
        "getSlotLabel",
        "groupSize",
        "id",
        "inputMode",
        "length",
        "mask",
        "motion",
        "name",
        "normalizeValue",
        "onValueChange",
        "onValueComplete",
        "onValueInvalid",
        "readOnly",
        "required",
        "style",
        "validationType",
        "value"
      ],
      "OverflowMenu": [
        "align",
        "children",
        "icon",
        "label",
        "size"
      ],
      "Page": [
        "align",
        "as",
        "bleed",
        "gap",
        "inset",
        "max",
        "safeArea"
      ],
      "PageHeader": [
        "actions",
        "back",
        "description",
        "size",
        "title",
        "titleAs"
      ],
      "PageLoader": [
        "children",
        "fullscreen",
        "hideBar",
        "label"
      ],
      "Pagination": [
        "label",
        "nextLabel",
        "onPageChange",
        "page",
        "pageLabel",
        "pageLink",
        "previousLabel",
        "siblingCount",
        "total"
      ],
      "Panel": [
        "below",
        "children",
        "label",
        "narrow",
        "onOpenChange",
        "open",
        "scroll",
        "side",
        "width"
      ],
      "PanelResizer": [
        "className",
        "label",
        "max",
        "min",
        "onWidthChange",
        "side",
        "step",
        "width"
      ],
      "PanelSection": [
        "action",
        "title"
      ],
      "Phone": [
        "statusBar",
        "systemChrome"
      ],
      "PieChart": [
        "activeIndex",
        "animate",
        "categories",
        "centerLabel",
        "className",
        "data",
        "defaultActiveIndex",
        "donut",
        "index",
        "label",
        "labelContent",
        "labels",
        "legend",
        "locale",
        "motion",
        "onActiveIndexChange",
        "separator",
        "tooltip",
        "valueFormatter",
        "valueKey"
      ],
      "Pill": [
        "appearance",
        "icon",
        "selected",
        "size",
        "tone"
      ],
      "Popover": [
        "actionsRef",
        "children",
        "defaultOpen",
        "defaultTriggerId",
        "handle",
        "modal",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "triggerId"
      ],
      "PopoverArrow": [
        "className",
        "render",
        "style"
      ],
      "PopoverClose": [
        "className",
        "nativeButton",
        "render",
        "style"
      ],
      "PopoverContent": [
        "align",
        "anchor",
        "className",
        "finalFocus",
        "initialFocus",
        "render",
        "side",
        "sideOffset",
        "style"
      ],
      "PopoverDescription": [
        "className",
        "render",
        "style"
      ],
      "PopoverPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "PopoverTitle": [
        "className",
        "render",
        "style"
      ],
      "PopoverTrigger": [
        "className",
        "closeDelay",
        "delay",
        "handle",
        "id",
        "nativeButton",
        "openOnHover",
        "payload",
        "render",
        "style"
      ],
      "Presence": [
        "children",
        "duration",
        "easing",
        "offset",
        "onExitComplete",
        "show"
      ],
      "Progress": [
        "aria-valuetext",
        "className",
        "format",
        "getAriaValueText",
        "locale",
        "max",
        "min",
        "render",
        "size",
        "style",
        "value"
      ],
      "ProgressIndicator": [
        "className",
        "render",
        "style"
      ],
      "ProgressLabel": [
        "className",
        "render",
        "style"
      ],
      "ProgressTrack": [
        "className",
        "render",
        "size",
        "style"
      ],
      "ProgressValue": [
        "children",
        "className",
        "render",
        "style"
      ],
      "PropertyGroup": [
        "children",
        "className",
        "defaultOpen",
        "disabled",
        "label",
        "onOpenChange",
        "open",
        "render",
        "style",
        "summary"
      ],
      "PropertyPair": [
        "labels"
      ],
      "PropertyRow": [
        "children",
        "hint",
        "htmlFor",
        "label",
        "scrub",
        "stacked"
      ],
      "RadarChart": [
        "activeIndex",
        "animate",
        "className",
        "data",
        "defaultActiveIndex",
        "dots",
        "filled",
        "grid",
        "gridFill",
        "index",
        "label",
        "legend",
        "locale",
        "motion",
        "onActiveIndexChange",
        "radiusAxis",
        "series",
        "tooltip",
        "valueFormatter"
      ],
      "RadialChart": [
        "activeIndex",
        "animate",
        "categories",
        "centerLabel",
        "className",
        "data",
        "defaultActiveIndex",
        "index",
        "label",
        "labels",
        "legend",
        "locale",
        "max",
        "motion",
        "onActiveIndexChange",
        "stacked",
        "sweep",
        "tooltip",
        "track",
        "valueFormatter",
        "valueKey"
      ],
      "Radio": [
        "className",
        "disabled",
        "inputRef",
        "nativeButton",
        "readOnly",
        "render",
        "required",
        "style",
        "value"
      ],
      "RadioCard": [
        "className",
        "description",
        "descriptionClassName",
        "disabled",
        "icon",
        "inputRef",
        "nativeButton",
        "readOnly",
        "render",
        "required",
        "style",
        "title",
        "titleClassName",
        "tone",
        "trailing",
        "value"
      ],
      "RadioGroup": [
        "className",
        "defaultValue",
        "disabled",
        "form",
        "inputRef",
        "name",
        "onValueChange",
        "readOnly",
        "render",
        "required",
        "style",
        "value"
      ],
      "ReactionPicker": [
        "children",
        "className",
        "disabled",
        "loopFocus",
        "motion",
        "onSelect",
        "orientation",
        "reactions",
        "render",
        "selected",
        "style"
      ],
      "Region": [
        "as",
        "bleed",
        "inset",
        "max",
        "safeArea"
      ],
      "RelativeTime": [
        "date",
        "locale",
        "now"
      ],
      "Reveal": [
        "amount",
        "as",
        "delay",
        "once",
        "rootMargin",
        "when"
      ],
      "Row": [
        "align",
        "gap",
        "justify",
        "wrap"
      ],
      "SableThemeProvider": [
        "children",
        "colorStorageKey",
        "customThemes",
        "defaultPreference",
        "defaultThemeId",
        "onPreferenceChange",
        "onThemeIdChange",
        "preference",
        "target",
        "themeId",
        "themeStorageKey"
      ],
      "SableThemeScript": [
        "colorStorageKey",
        "customThemes",
        "defaultPreference",
        "defaultThemeId",
        "nonce",
        "themeStorageKey"
      ],
      "SafeArea": [
        "edges"
      ],
      "Scroller": [
        "label",
        "orientation",
        "smoothWheel",
        "viewportClassName",
        "wheelScroll"
      ],
      "ScrubField": [
        "className",
        "disabled",
        "dragLabel",
        "form",
        "icon",
        "id",
        "label",
        "max",
        "min",
        "name",
        "onGestureEnd",
        "onGestureStart",
        "onValueChange",
        "prefix",
        "readOnly",
        "step",
        "suffix",
        "value"
      ],
      "SearchInput": [
        "className",
        "clearLabel",
        "defaultValue",
        "inputClassName",
        "onClear",
        "onValueChange",
        "size",
        "value"
      ],
      "SectionHeader": [
        "actions",
        "description",
        "size",
        "title",
        "titleAs",
        "titleId"
      ],
      "SectionRail": [
        "motion",
        "offset",
        "onValueChange",
        "root",
        "sections",
        "side",
        "value"
      ],
      "SegmentedBar": [
        "label",
        "locale",
        "segments",
        "size"
      ],
      "Select": [
        "actionsRef",
        "autoComplete",
        "children",
        "defaultOpen",
        "defaultValue",
        "disabled",
        "form",
        "highlightItemOnHover",
        "id",
        "inputRef",
        "isItemEqualToValue",
        "itemToStringLabel",
        "itemToStringValue",
        "items",
        "modal",
        "multiple",
        "name",
        "onOpenChange",
        "onOpenChangeComplete",
        "onValueChange",
        "open",
        "readOnly",
        "required",
        "value"
      ],
      "SelectContent": [
        "align",
        "children",
        "className",
        "finalFocus",
        "render",
        "side",
        "sideOffset",
        "style"
      ],
      "SelectGroup": [
        "className",
        "render",
        "style"
      ],
      "SelectGroupLabel": [
        "className",
        "render",
        "style"
      ],
      "SelectItem": [
        "children",
        "className",
        "disabled",
        "label",
        "nativeButton",
        "render",
        "style",
        "value"
      ],
      "SelectPortal": [
        "className",
        "container",
        "render",
        "style"
      ],
      "SelectSeparator": [
        "className",
        "orientation",
        "render",
        "style"
      ],
      "SelectTrigger": [
        "children",
        "className",
        "disabled",
        "nativeButton",
        "placeholder",
        "render",
        "size",
        "style"
      ],
      "SelectValue": [
        "children",
        "className",
        "placeholder",
        "render",
        "style"
      ],
      "Separator": [
        "className",
        "label",
        "orientation",
        "render",
        "style"
      ],
      "SettingsMenu": [
        "actionsRef",
        "align",
        "children",
        "className",
        "closeParentOnEsc",
        "defaultOpen",
        "defaultTriggerId",
        "disabled",
        "handle",
        "highlightItemOnHover",
        "label",
        "loopFocus",
        "modal",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "orientation",
        "side",
        "size",
        "summary",
        "triggerId",
        "variant"
      ],
      "SettingsRow": [
        "children",
        "className",
        "disabled",
        "label",
        "value"
      ],
      "Sheet": [
        "actionsRef",
        "children",
        "defaultOpen",
        "defaultSnapPoint",
        "defaultTriggerId",
        "disablePointerDismissal",
        "handle",
        "modal",
        "onOpenChange",
        "onOpenChangeComplete",
        "onSnapPointChange",
        "open",
        "snapPoint",
        "snapPoints",
        "snapToSequentialPoints",
        "triggerId"
      ],
      "SheetClose": [
        "className",
        "nativeButton",
        "render",
        "style"
      ],
      "SheetContent": [
        "className",
        "closeLabel",
        "finalFocus",
        "initialFocus",
        "render",
        "showCloseButton",
        "side",
        "style"
      ],
      "SheetDescription": [
        "className",
        "render",
        "style"
      ],
      "SheetPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "SheetTitle": [
        "className",
        "render",
        "style"
      ],
      "SheetTrigger": [
        "className",
        "handle",
        "id",
        "nativeButton",
        "payload",
        "render",
        "style"
      ],
      "ShowMore": [
        "collapsedHeight",
        "collapsedLines",
        "lessLabel",
        "moreLabel"
      ],
      "Sidebar": [
        "collapsed",
        "icons",
        "motion",
        "surface",
        "variant"
      ],
      "SidebarAccount": [
        "avatar",
        "detail",
        "indicator",
        "label",
        "render"
      ],
      "SidebarBrand": [
        "label",
        "mark",
        "render"
      ],
      "SidebarGroup": [
        "label"
      ],
      "SidebarItem": [
        "active",
        "badge",
        "icon",
        "label",
        "render"
      ],
      "SideNav": [
        "activeVariant",
        "motion",
        "size"
      ],
      "SideNavGroup": [
        "label"
      ],
      "SideNavItem": [
        "active",
        "activeVariant",
        "badge",
        "icon",
        "label",
        "render",
        "size"
      ],
      "SimpleTooltip": [
        "actionsRef",
        "align",
        "children",
        "content",
        "defaultOpen",
        "defaultTriggerId",
        "disableHoverablePopup",
        "disabled",
        "handle",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "side",
        "sideOffset",
        "trackCursorAxis",
        "triggerId"
      ],
      "Slider": [
        "aria-label",
        "className",
        "defaultValue",
        "disabled",
        "form",
        "format",
        "getAriaLabel",
        "getAriaValueText",
        "largeStep",
        "locale",
        "max",
        "min",
        "minStepsBetweenValues",
        "name",
        "onValueChange",
        "onValueCommitted",
        "orientation",
        "ref",
        "step",
        "style",
        "thumbAlignment",
        "thumbCollisionBehavior",
        "value"
      ],
      "SliderControl": [
        "className",
        "render",
        "style"
      ],
      "SliderField": [
        "className",
        "defaultValue",
        "disabled",
        "form",
        "icon",
        "label",
        "max",
        "min",
        "name",
        "onValueChange",
        "onValueCommitted",
        "prefix",
        "size",
        "step",
        "suffix",
        "value"
      ],
      "SliderIndicator": [
        "className",
        "render",
        "style"
      ],
      "SliderRoot": [
        "className",
        "defaultValue",
        "disabled",
        "form",
        "format",
        "largeStep",
        "locale",
        "max",
        "min",
        "minStepsBetweenValues",
        "name",
        "onValueChange",
        "onValueCommitted",
        "orientation",
        "ref",
        "render",
        "step",
        "style",
        "thumbAlignment",
        "thumbCollisionBehavior",
        "value"
      ],
      "SliderThumb": [
        "className",
        "disabled",
        "getAriaLabel",
        "getAriaValueText",
        "index",
        "inputRef",
        "onBlur",
        "onFocus",
        "render",
        "style",
        "tabIndex"
      ],
      "SliderTrack": [
        "className",
        "render",
        "style"
      ],
      "SliderValue": [
        "children",
        "className",
        "render",
        "style"
      ],
      "Spacer": [
        "axis",
        "className",
        "grow",
        "size"
      ],
      "Sparkline": [
        "animate",
        "data",
        "label",
        "locale",
        "motion",
        "tone",
        "variant"
      ],
      "Spinner": [
        "appearance",
        "label",
        "size",
        "thickness"
      ],
      "SplitPane": [
        "collapseBelow",
        "gap",
        "primary",
        "ratio",
        "secondary"
      ],
      "Stack": [
        "align",
        "gap",
        "justify"
      ],
      "StatusBarGroup": [
        "align"
      ],
      "StatusDot": [
        "pulse",
        "size",
        "tone"
      ],
      "Stepper": [
        "current",
        "indicator",
        "orientation",
        "statusLabels"
      ],
      "StepperItem": [
        "description",
        "onSelect",
        "status",
        "title"
      ],
      "StreamingText": [
        "as",
        "caret",
        "split",
        "streaming",
        "text"
      ],
      "Switch": [
        "checked",
        "className",
        "defaultChecked",
        "disabled",
        "form",
        "id",
        "inputRef",
        "name",
        "nativeButton",
        "onCheckedChange",
        "readOnly",
        "render",
        "required",
        "style",
        "uncheckedValue",
        "value"
      ],
      "TableCell": [
        "numeric"
      ],
      "TableHead": [
        "numeric",
        "onSort",
        "sortDirection",
        "sortable"
      ],
      "Tabs": [
        "className",
        "defaultValue",
        "motion",
        "onValueChange",
        "orientation",
        "render",
        "style",
        "value"
      ],
      "TabsContent": [
        "className",
        "keepMounted",
        "render",
        "style",
        "value"
      ],
      "TabsList": [
        "activateOnFocus",
        "className",
        "loopFocus",
        "render",
        "style",
        "variant"
      ],
      "TabsPanel": [
        "className",
        "keepMounted",
        "render",
        "style",
        "value"
      ],
      "TabsTrigger": [
        "className",
        "disabled",
        "nativeButton",
        "render",
        "style",
        "value"
      ],
      "Textarea": [
        "autoResize"
      ],
      "TextReveal": [
        "amount",
        "as",
        "once",
        "rootMargin",
        "split",
        "stagger",
        "text",
        "when"
      ],
      "TextSwap": [
        "effect",
        "motion",
        "text"
      ],
      "ThemePreview": [
        "mode",
        "size",
        "theme"
      ],
      "ThemeSelector": [
        "label",
        "layout",
        "mode",
        "onValueChange",
        "themes",
        "value"
      ],
      "ThemeSwitcher": [
        "label",
        "motion",
        "onValueChange",
        "value"
      ],
      "ThinkingOrb": [
        "label",
        "mode",
        "paused",
        "size",
        "speed"
      ],
      "Tilt": [
        "maxAngle",
        "motion"
      ],
      "ToastAction": [
        "className",
        "nativeButton",
        "render",
        "style"
      ],
      "ToastClose": [
        "className",
        "dismissLabel",
        "nativeButton",
        "render",
        "style"
      ],
      "ToastContent": [
        "className",
        "render",
        "style"
      ],
      "ToastDescription": [
        "className",
        "render",
        "style"
      ],
      "ToastProvider": [
        "children",
        "closeIcon",
        "dismissLabel",
        "limit",
        "position",
        "stacked",
        "timeout",
        "viewportClassName"
      ],
      "ToastRoot": [
        "className",
        "render",
        "style",
        "swipeDirection",
        "toast"
      ],
      "ToastTitle": [
        "className",
        "render",
        "style"
      ],
      "ToastViewport": [
        "className",
        "position",
        "render",
        "stacked",
        "style"
      ],
      "Toggle": [
        "className",
        "defaultPressed",
        "disabled",
        "nativeButton",
        "onPressedChange",
        "pressed",
        "render",
        "style",
        "value"
      ],
      "ToggleGroup": [
        "appearance",
        "className",
        "defaultValue",
        "disabled",
        "loopFocus",
        "motion",
        "multiple",
        "onValueChange",
        "orientation",
        "render",
        "stretch",
        "style",
        "value"
      ],
      "ToggleGroupItem": [
        "className",
        "defaultPressed",
        "disabled",
        "nativeButton",
        "onPressedChange",
        "pressed",
        "render",
        "style",
        "value"
      ],
      "Toolbar": [
        "className",
        "disabled",
        "loopFocus",
        "orientation",
        "render",
        "style"
      ],
      "ToolbarButton": [
        "className",
        "disabled",
        "focusableWhenDisabled",
        "nativeButton",
        "render",
        "size",
        "style",
        "variant"
      ],
      "ToolbarGroup": [
        "className",
        "disabled",
        "render",
        "style"
      ],
      "ToolbarInput": [
        "className",
        "defaultValue",
        "disabled",
        "focusableWhenDisabled",
        "render",
        "style"
      ],
      "ToolbarLink": [
        "className",
        "render",
        "size",
        "style",
        "variant"
      ],
      "ToolbarSeparator": [
        "className",
        "orientation",
        "render",
        "style"
      ],
      "ToolCall": [
        "children",
        "defaultOpen",
        "error",
        "input",
        "name",
        "onOpenChange",
        "open",
        "output",
        "status",
        "statusLabel",
        "title"
      ],
      "Tooltip": [
        "actionsRef",
        "children",
        "defaultOpen",
        "defaultTriggerId",
        "disableHoverablePopup",
        "disabled",
        "handle",
        "onOpenChange",
        "onOpenChangeComplete",
        "open",
        "trackCursorAxis",
        "triggerId"
      ],
      "TooltipArrow": [
        "className",
        "render",
        "style"
      ],
      "TooltipContent": [
        "align",
        "className",
        "render",
        "side",
        "sideOffset",
        "style"
      ],
      "TooltipGroup": [
        "children",
        "motion"
      ],
      "TooltipPortal": [
        "className",
        "container",
        "keepMounted",
        "render",
        "style"
      ],
      "TooltipProvider": [
        "children",
        "closeDelay",
        "delay",
        "timeout"
      ],
      "TooltipTrigger": [
        "className",
        "closeDelay",
        "closeOnClick",
        "delay",
        "disabled",
        "handle",
        "payload",
        "render",
        "style"
      ],
      "Tree": [
        "motion",
        "selectionFollowsFocus"
      ],
      "TreeAddRow": [
        "depth",
        "icon",
        "label"
      ],
      "TreeEmpty": [
        "action",
        "depth",
        "dropTarget",
        "message"
      ],
      "TreeRow": [
        "accent",
        "actions",
        "children",
        "collapseLabel",
        "defaultExpanded",
        "depth",
        "dimmed",
        "disclosureIcon",
        "expandLabel",
        "expandable",
        "expanded",
        "icon",
        "onExpandedChange",
        "selectOnFocus",
        "selected",
        "subtree",
        "toggleLabel"
      ],
      "TreeSection": [
        "action",
        "hint",
        "title"
      ],
      "Video": [
        "controls",
        "onRequestPlay",
        "playLabel",
        "poster",
        "src"
      ],
      "ViewTransitionName": [
        "as",
        "name"
      ],
      "Workspace": [
        "bottomNav",
        "children",
        "density",
        "mainId",
        "skipLinkLabel",
        "statusBar",
        "toolbar"
      ]
    }
  },
  "providers": {
    "about": "App-level context providers: what each one does, whether an app needs it, where it goes, its props and a copyable example. App-wide providers are documented in src/providers/providers.meta.ts; a provider owned by one component (`partOf`) is documented in that component's meta and summarised here. Generated — do not hand-edit.",
    "retrieve": "sable provider <Name>",
    "items": [
      {
        "name": "CodeHighlightProvider",
        "partOf": "CodeBlock",
        "summary": "Supplies one highlighter to every CodeBlock beneath it, so an app wires highlighting once. Map the highlighter's token colors to Sable tone tokens so code follows the theme.",
        "signature": "{ highlight: (code: string) => ReactNode; children: ReactNode }",
        "import": "import { CodeHighlightProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "With a highlighter for the whole app",
            "code": "<CodeHighlightProvider highlight={(code) => <span dangerouslySetInnerHTML={{ __html: highlightToHtml(code) }} />}><CodeBlock code={\"const a = 1\"} /></CodeHighlightProvider>",
            "imports": "import { CodeBlock, CodeHighlightProvider } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "DensityProvider",
        "summary": "The bare React context behind density. It feeds only the React side, which is the half that reaches portaled popups; it renders no element and sets no `data-density`, so the CSS control ladder in its subtree does not change.",
        "required": "Optional, and rarely the right choice. To make a region compact use the Density component (or Workspace), which sets both the context and `data-density`.",
        "placement": "Around an element you already own that carries `data-density` itself.",
        "props": [
          {
            "name": "value",
            "type": "\"compact\" | \"comfortable\"",
            "description": "The density popups opened from this subtree should use."
          }
        ],
        "companions": [
          "Density",
          "useDensity",
          "useTypeTier"
        ],
        "related": [
          "Workspace"
        ],
        "import": "import { DensityProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "An element that sets data-density itself",
            "code": "function CompactRegion({ children }: { children: ReactNode }) {\n\treturn (\n\t\t<DensityProvider value=\"compact\">\n\t\t\t<section data-density=\"compact\">{children}</section>\n\t\t</DensityProvider>\n\t)\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { DensityProvider } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "IconProvider",
        "summary": "Supplies the icon set every <Icon> renders with, including the icons inside Sable's own components. Components name icons semantically (`chevron-down`, `check`); the set maps each name to artwork.",
        "required": "Required for icons. `<Icon>` has no built-in fallback: without a provider, icons render nothing and a development build warns once.",
        "placement": "Once, at the app root, above every Sable component.",
        "props": [
          {
            "name": "set",
            "type": "IconSet",
            "description": "The icon set: `reiconIconSet` from `@sableui/react/icons/reicon`, another complete set, or `composeIconSets(appExtras, reiconIconSet)` to add app icons over Reicon."
          },
          {
            "name": "defaultVariant",
            "type": "IconVariant",
            "default": "\"regular\"",
            "description": "Variant used when an <Icon> does not set one."
          }
        ],
        "companions": [
          "Icon",
          "composeIconSets",
          "useIconSet"
        ],
        "notes": [
          "The first set in composeIconSets that returns a node for a name wins, so app icons can also override Reicon's.",
          "List the names an app adds in .sable/icons.json ({ \"names\": [...] }) so `sable grade` does not report them as off-contract."
        ],
        "related": [
          "Icon"
        ],
        "import": "import { IconProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "Reicon, Sable's bundled set",
            "code": "export function Root({ children }: { children: ReactNode }) {\n\treturn <IconProvider set={reiconIconSet}>{children}</IconProvider>\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { reiconIconSet } from \"@sableui/react/icons/reicon\"\nimport { IconProvider } from \"@sableui/react\""
          },
          {
            "label": "App icons added over Reicon",
            "code": "const icons = composeIconSets(appIcons, reiconIconSet)\n\nexport function Root({ children }: { children: ReactNode }) {\n\treturn <IconProvider set={icons}>{children}</IconProvider>\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { reiconIconSet } from \"@sableui/react/icons/reicon\"\nimport { appIcons } from \"./icons\"\nimport { composeIconSets, IconProvider } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "MotionProvider",
        "summary": "Holds the app's motion policy and writes it as `data-motion` on <html>, which drives the `--motion-scale` and `--motion-expressive` switches every Sable motion recipe reads. Lets an app offer its own motion setting: full, subtle (feedback without flourishes) or off.",
        "required": "Optional. Without it, motion follows the visitor's OS `prefers-reduced-motion` setting, and useMotion() still works (its setPolicy does nothing).",
        "placement": "Once, at the app root, when the app has an in-app motion setting.",
        "props": [
          {
            "name": "defaultPolicy",
            "type": "\"system\" | \"full\" | \"subtle\" | \"reduced\" | \"off\"",
            "default": "\"system\"",
            "description": "Initial policy when uncontrolled. \"system\" defers to the OS preference. \"subtle\" keeps essential motion (feedback, overlays, disclosure, loaders) and drops expressive motion (glides, rolling numbers, drawn ticks, shakes, staggers, overshoot)."
          },
          {
            "name": "policy",
            "type": "\"system\" | \"full\" | \"subtle\" | \"reduced\" | \"off\"",
            "description": "Controlled policy. Pair with onPolicyChange."
          },
          {
            "name": "onPolicyChange",
            "type": "(policy) => void",
            "description": "Called whenever the policy changes."
          },
          {
            "name": "target",
            "type": "\"root\" | (() => HTMLElement | null)",
            "default": "\"root\"",
            "description": "Where to write `data-motion`. The default covers portaled overlays too; a getter scopes motion to a subtree."
          }
        ],
        "companions": [
          "useMotion",
          "useMotionLevel",
          "useReducedMotion",
          "MotionScope"
        ],
        "notes": [
          "JavaScript motion must read useMotion().enabled and do nothing when it is false; JavaScript flourishes read useMotion().expressive, which is also false under \"subtle\". CSS recipes follow on their own.",
          "Mapping the app's \"full\" choice back to \"system\" keeps honouring the OS reduce-motion preference; \"full\" itself forces motion on."
        ],
        "related": [
          "Switch",
          "ToggleGroup"
        ],
        "import": "import { MotionProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "At the app root",
            "code": "export function Root({ children }: { children: ReactNode }) {\n\treturn <MotionProvider defaultPolicy=\"system\">{children}</MotionProvider>\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { MotionProvider } from \"@sableui/react\""
          },
          {
            "label": "A reduce-motion setting",
            "code": "function ReduceMotionSetting() {\n\tconst { policy, setPolicy } = useMotion()\n\treturn (\n\t\t<Switch\n\t\t\tchecked={policy === \"reduced\"}\n\t\t\tonCheckedChange={(on) => setPolicy(on ? \"reduced\" : \"system\")}\n\t\t\taria-label=\"Reduce motion\"\n\t\t/>\n\t)\n}",
            "imports": "import { Switch, useMotion } from \"@sableui/react\""
          },
          {
            "label": "A three-way motion setting",
            "code": "function MotionSetting() {\n\tconst { policy, setPolicy } = useMotion()\n\treturn (\n\t\t<ToggleGroup\n\t\t\tappearance=\"segmented\"\n\t\t\tvalue={[policy === \"system\" ? \"full\" : policy]}\n\t\t\tonValueChange={(next) => next[0] && setPolicy(next[0] === \"full\" ? \"system\" : (next[0] as \"subtle\" | \"off\"))}\n\t\t\taria-label=\"Motion\"\n\t\t>\n\t\t\t<Toggle value=\"full\">Full</Toggle>\n\t\t\t<Toggle value=\"subtle\">Subtle</Toggle>\n\t\t\t<Toggle value=\"off\">Off</Toggle>\n\t\t</ToggleGroup>\n\t)\n}",
            "imports": "import { Toggle, ToggleGroup, useMotion } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "MotionScope",
        "summary": "Turns motion down for one region — a dense data view, an embedded widget, a screen a test captures — by writing `data-motion` on a box-less wrapper and passing the same level to useMotion() below it.",
        "required": "Optional. Reach for it when a whole region should be calmer than the app; for one component, use that component's `motion` prop.",
        "placement": "Around the region. It renders a `display: contents` element, so it adds no box to the layout.",
        "props": [
          {
            "name": "level",
            "type": "\"subtle\" | \"off\"",
            "description": "\"subtle\" keeps feedback, overlays, disclosure and loaders and drops glides, rolling numbers, drawn ticks, shakes and staggers. \"off\" stills everything. A scope can only turn motion down."
          }
        ],
        "companions": [
          "useMotionLevel",
          "MotionProvider"
        ],
        "notes": [
          "Overlays portal out of the DOM subtree, so their CSS follows the app-level policy; set it on MotionProvider to cover them too."
        ],
        "related": [
          "MotionProvider"
        ],
        "import": "import { MotionScope } from \"@sableui/react\"",
        "examples": [
          {
            "label": "A calm data view",
            "code": "export function Dashboard({ children }: { children: ReactNode }) {\n\treturn <MotionScope level=\"subtle\">{children}</MotionScope>\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { MotionScope } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "PresentationProvider",
        "summary": "Declares what its subtree is presented in, a page or a sheet. Action rows (CardFooter actions, SheetFooter) read it: on a page they are a short row; in a sheet they stack full width and pin to the bottom.",
        "required": "Optional. A bottom Sheet and IosSheet already provide \"sheet\", and Dialog, Popover and side Sheets provide \"page\". Mount it only for a container of your own that presents content like a sheet.",
        "placement": "Around the content of a custom sheet-like surface.",
        "props": [
          {
            "name": "value",
            "type": "\"page\" | \"sheet\"",
            "description": "What the subtree is presented in."
          }
        ],
        "companions": [
          "usePresentation"
        ],
        "related": [
          "Sheet",
          "Card"
        ],
        "import": "import { PresentationProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "A custom bottom drawer",
            "code": "function Drawer({ children }: { children: ReactNode }) {\n\treturn (\n\t\t<PresentationProvider value=\"sheet\">\n\t\t\t<div className=\"sable-surface-popover bg-popover text-popover-foreground\">{children}</div>\n\t\t</PresentationProvider>\n\t)\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { PresentationProvider } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "SableThemeProvider",
        "summary": "Applies and persists Sable's two theme axes on <html>: the colour preference (light, dark or system, written as the `.dark` class) and the design theme (written as `data-sable-theme`). Read and change both anywhere below it with useSableTheme().",
        "required": "Optional. Without it the app renders the default Sable theme in whatever mode the `dark` class on <html> says. Mount it when users can switch colour mode or theme, or to register an app-owned preset theme.",
        "placement": "Once, at the app root, above everything that renders Sable components or calls useSableTheme(). It writes to <html> by default so portaled overlays (dialogs, menus, toasts) share the same tokens.",
        "props": [
          {
            "name": "defaultPreference",
            "type": "\"light\" | \"dark\" | \"system\"",
            "default": "\"system\"",
            "description": "Colour preference on a first visit, before anything is stored. Pass \"dark\" (or a preset's `defaultMode`) to open in dark."
          },
          {
            "name": "preference",
            "type": "\"light\" | \"dark\" | \"system\"",
            "description": "Controlled colour preference. Pair with onPreferenceChange."
          },
          {
            "name": "onPreferenceChange",
            "type": "(preference) => void",
            "description": "Called whenever the colour preference is set."
          },
          {
            "name": "defaultThemeId",
            "type": "ThemeId | string",
            "default": "\"sable\"",
            "description": "Design theme on a first visit, before anything is stored."
          },
          {
            "name": "themeId",
            "type": "ThemeId | string",
            "description": "Controlled design theme id. Pair with onThemeIdChange."
          },
          {
            "name": "onThemeIdChange",
            "type": "(themeId) => void",
            "description": "Called whenever the design theme is set."
          },
          {
            "name": "colorStorageKey",
            "type": "string | null",
            "default": "SABLE_COLOR_STORAGE_KEY",
            "description": "localStorage key for the colour preference. null disables persistence. An app that sets `defaultThemeId` stores under `sable-color-preference:<id>`, so another Sable app on the origin can't change its mode. `themeId` alone doesn't: give that app its own key, or set `defaultThemeId` instead."
          },
          {
            "name": "themeStorageKey",
            "type": "string | null",
            "default": "SABLE_THEME_STORAGE_KEY",
            "description": "localStorage key for the design theme. null disables persistence. An app that sets `defaultThemeId` stores under `sable-theme-id:<id>`, so another Sable app on the origin can't replace its theme. Apps on the default theme share `sable-theme-id`, so one that lets users switch themes passes its own key. Pass a key too if `defaultThemeId` may change, or saved settings stay behind with the old id."
          },
          {
            "name": "target",
            "type": "\"root\" | (() => HTMLElement | null)",
            "default": "\"root\"",
            "description": "Where to write `.dark` and `data-sable-theme`. A getter scopes theming to a subtree; an inline arrow is fine (it is read when the mode or theme changes, not on every render)."
          },
          {
            "name": "customThemes",
            "type": "ThemeManifest[]",
            "description": "Extra theme manifests, for example `presetManifest(preset)` for an app-owned preset. Their ids become valid themeId values. Sable does not load their CSS: import it yourself."
          }
        ],
        "companions": [
          "useSableTheme",
          "SableThemeScript",
          "sableThemeScript",
          "ThemeSwitcher",
          "ThemeSelector",
          "applySableTheme",
          "applySableColorMode"
        ],
        "notes": [
          "Only the alternate design themes need theme CSS: import `@sableui/react/themes.css`, one `@sableui/react/theme/<id>.css`, or the scoped CSS from `sable preset --css`. Light/dark of the default theme needs nothing extra.",
          "A colour-mode toggle is the ThemeSwitcher component; it reads this provider.",
          "Server rendering: the provider never reads storage during render, so the server and the hydrating client agree, and the stored choice arrives in the re-render after hydration. The provider writes the DOM only after hydration. To have the FIRST paint right, inline the boot script in <head> — `<SableThemeScript …/>` in a server layout, or `<script>${sableThemeScript(options)}</script>` in a static index.html — with the same options as the provider, and put `suppressHydrationWarning` on <html>. Without it a light-preference visitor briefly sees the default mode."
        ],
        "related": [
          "ThemeSwitcher",
          "ThemeSelector"
        ],
        "import": "import { SableThemeProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "At the app root, following the visitor's OS",
            "code": "export function Root({ children }: { children: ReactNode }) {\n\treturn <SableThemeProvider>{children}</SableThemeProvider>\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { SableThemeProvider } from \"@sableui/react\""
          },
          {
            "label": "Dark by default, with an app-owned preset theme",
            "code": "const customThemes = [presetManifest(parsePreset(presetJson))]\n\nexport function Root({ children }: { children: ReactNode }) {\n\treturn (\n\t\t<SableThemeProvider defaultPreference=\"dark\" defaultThemeId=\"my-preset\" customThemes={customThemes}>\n\t\t\t{children}\n\t\t</SableThemeProvider>\n\t)\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { parsePreset, presetManifest } from \"@sableui/react/presets\"\nimport presetJson from \"../.sable/presets/my-preset.json\"\nimport { defaultThemeId, SableThemeProvider } from \"@sableui/react\""
          },
          {
            "label": "Server-rendered (Next.js app/layout.tsx), with no first-paint flash",
            "code": "export default function RootLayout({ children }: { children: ReactNode }) {\n\treturn (\n\t\t<html lang=\"en\" suppressHydrationWarning>\n\t\t\t<head>\n\t\t\t\t<SableThemeScript defaultPreference=\"dark\" />\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<SableThemeProvider defaultPreference=\"dark\">{children}</SableThemeProvider>\n\t\t\t</body>\n\t\t</html>\n\t)\n}",
            "imports": "import type { ReactNode } from \"react\"\nimport { SableThemeProvider, SableThemeScript } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "ToastProvider",
        "partOf": "Toast",
        "summary": "Wraps Base UI Toast.Provider and renders the themed Viewport + toast list. Mount once near the app root, above any caller of useToast().",
        "signature": "{ children, timeout?, limit?, closeIcon?, dismissLabel?, position?, stacked?, viewportClassName? }",
        "import": "import { ToastProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "Stacked",
            "code": "<ToastProvider stacked position=\"bottom-right\">{children}</ToastProvider>",
            "imports": "import { ToastProvider } from \"@sableui/react\""
          },
          {
            "label": "Provider with app chrome",
            "code": "<ToastProvider position=\"bottom-right\" limit={3}><AppShell><Region max=\"feed\"><Button onClick={() => toast.success(\"Saved\")}>Save</Button></Region></AppShell></ToastProvider>",
            "imports": "import { AppShell, Button, Region, toast, ToastProvider } from \"@sableui/react\""
          }
        ]
      },
      {
        "name": "TooltipProvider",
        "partOf": "Tooltip",
        "summary": "Wraps an app or group of Tooltips to share open/close delays. Once one tooltip is open, adjacent tooltips open instantly.",
        "signature": "Base UI Tooltip.Provider props (delay, closeDelay, timeout)",
        "import": "import { TooltipProvider } from \"@sableui/react\"",
        "examples": [
          {
            "label": "Basic",
            "code": "<TooltipProvider><Tooltip><TooltipTrigger render={<Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Info\"><Icon name=\"info\" /></Button>} /><TooltipContent>Saved to your workspace.</TooltipContent></Tooltip></TooltipProvider>",
            "imports": "import { Button, Icon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"@sableui/react\""
          }
        ]
      }
    ]
  }
}
