◂ Control Room

Component Browser

83 components · exercised in all states

Diagonal primitives

primitivesblockstable

Four shapes with four fixed meanings (Law 4): chevron=direction, notch=state, wedge=focus, arrow-rail=sequence. Max 15° off-axis.

route
chevron · direction
held
notch · state
active
wedge · focus
queuerunverify
arrow-rail · sequence

variants

shapechevron · notch · wedge · arrow-rail

tokens

--sig-workchevron / active step
--sig-waitnotch
--sig-accentwedge
--borderedges

Key hint

primitivescomponentstable

A keycap badge for a keyboard shortcut. Decorative (aria-hidden) — the real binding rides aria-keyshortcuts on the action. Main actions show it always; secondary use the hint variant, revealed on host hover/focus or a global peek.

playground · editable props
mounting…

props · <CrKbd />

keysstringThe key label, e.g. "I", "⌘K", "esc".
hint?booleanSecondary hint — hidden until the host is hovered/focused or the root is peeking.
on?booleanRendered on a signal-filled surface (inside a filled button) — keys off currentColor.
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

flaghint · on

tokens

--panel-2keycap fill
--brd-hairkeycap border
--shadow-off-smkeycap depth

Button

actioncomponentstable

Primary action with the signature mechanical snap-press; secondary 'controls' variant for utilities.

playground · editable props
mounting…

props · <CrButton />

children?any
disabled?boolean
emphasis?"solid" | "outline" | "ghost" | "link"
href?string
keyshortcuts?stringAnnounce a keyboard shortcut (maps to aria-keyshortcuts), e.g. "i" or "Alt+N".
onClick?() => void
signal?"work" | "wait" | "done" | "err" | "accent" | "accent2"
size?"md" | "sm"
type?"button" | "submit" | "reset"
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

emphasissolid · outline · ghost · link
signalwork · wait · done · err · accent · accent2
sizemd · sm
staterest · active · kick

tokens

--sig-waitprimary fill
--panelcontrols fill
--brd-heavyprimary border
--shadow-offpress offset
--on-sigtext

Toolbar

actioncomponentstable

WAI-ARIA toolbar — a labelled group of controls with a single tab stop and roving-tabindex arrows. Two modes: wrap your own controls as children, or pass items[] and (with overflow) collapse the buttons that don't fit into a “⋯ more” menu (priority+, measured via ResizeObserver).

playground · editable props
mounting…

props · <CrToolbar />

labelstring
children?anySimple mode: wrap your own controls as children (roving tabindex, no menu).
items?CrToolbarItem[]Data-driven mode: render these as bar buttons. Enables `overflow`.
orientation?"horizontal" | "vertical"`horizontal` (default) uses ←/→; `vertical` uses ↑/↓ (children mode only).
overflow?booleanWith `items`: collapse the buttons that don't fit into a "⋯ more" menu * instead of letting them wrap/overflow (priority+ pattern).
unstyled?boolean
pt?CrPassThrough<"item" | "menu" | "menuitem" | "more" | "root">
dt?CrDesignTokens

variants

modechildren · items · items + overflow
orientationhorizontal · vertical

tokens

--cr-toolbar-bgbar surface
--cr-toolbar-borderbar border

Calendar

formscomponentstable

Month calendar grid — role=grid with roving tabindex (arrows move day/week, PageUp/Down step months, Enter/Space select). Fully controlled, SSR-safe (month + today injected, never read from the clock).

playground · editable props
mounting…

props · <CrCalendar />

label?string
labels?Record<string, any>
locale?string
max?string
min?stringSelectable range, inclusive, `YYYY-MM-DD`.
month?string
onMonthChange?(month: string) => void
onSelect?(iso: string) => void
switcher?boolean
today?stringToday, `YYYY-MM-DD` (injected — omit to not ring a "today" cell).
value?stringSelected date, `YYYY-MM-DD` (controlled).
weekStart?"sunday" | "monday"First day of the week. Default "sunday".
yearSpan?number
unstyled?boolean
pt?CrPassThrough<"day" | "grid" | "header" | "monthSelect" | "next" | "prev" | "root" | "weekday" | "yearSelect">
dt?CrDesignTokens

variants

weekStartsunday · monday

tokens

--cr-calendar-selected-bgselected-day fill (a state — Law 2)
--cr-calendar-today-ringtoday ring

Checkbox / Radio

formscomponentstable

Square checkbox and radio (radius 0); checked fills to --sig-work with an --on-sig mark.

playground · editable props
mounting…

props · <CrChoice />

labelstring
checked?boolean
disabled?boolean
invalid?boolean
name?string
onChange?(checked: boolean) => void
type?"checkbox" | "radio"
unstyled?boolean
pt?CrPassThrough<"input" | "label" | "root">
dt?CrDesignTokens

variants

kindcheckbox · radio
stateunchecked · checked · disabled

tokens

--boardfill
--sig-workchecked fill
--on-sigmark

Choice group

formscomponentstable

Grouped choices for both types, rendering CrChoice. type="radio" is a radiogroup of native radios sharing one name (browser-supplied roving tabindex + arrow selection); type="checkbox" is a group of independently tabbable boxes with arrows inert.

playground · editable props
mounting…

props · <CrChoiceGroup />

optionsCrChoiceOption[]
disabled?boolean
invalid?boolean
label?string
name?string
onChange?(value: string) => voidFires with the new value — `type="radio"` only.
onChangeMany?(values: string[]) => voidFires with the full next selection — `type="checkbox"` only.
row?booleanLay the choices out in a row.
type?"checkbox" | "radio"
value?stringSelected value — `type="radio"` only (controlled).
values?string[]Selected values — `type="checkbox"` only (controlled).
unstyled?boolean
pt?CrPassThrough<"choice" | "root">
dt?CrDesignTokens

variants

proptype · value · values · row · invalid

tokens

--cr-check-checkedchecked fill
--cr-check-markchecked mark
--cr-field-borderbox border

Combobox

formscomponentstable

Autocomplete — an input (role=combobox) filtering a listbox; ↑/↓ move the active option (aria-activedescendant), Enter selects, Esc closes. Active row shows an ascii ▸ marker.

playground · editable props
mounting…

props · <CrCombobox />

invalid?boolean
label?stringAccessible name for the field.
onChange?(value: string) => void
options?CrComboOption[]Static option list (filtered client-side). Omit when using `source`.
placeholder?string
source?(query: string) => any
value?stringSelected value (controlled out; the field seeds its text from it).
unstyled?boolean
pt?CrPassThrough<"empty" | "input" | "list" | "option" | "root" | "scrim">
dt?CrDesignTokens

variants

propvalue · options

tokens

--boardinput
--sig-workactive option + ▸ marker
--panellist

Cron field

formscomponentstable

A proper cron-expression form field: label + input + quick presets + a live human-readable readout. The translation is injected as `description` (compute with cronstrue in the host) so the design system stays dependency-free; validity is message-driven via `error` (no hand-set `invalid`), wired like CrField (aria-invalid + aria-describedby).

playground · editable props
mounting…

props · <CrCronField />

idstringTies the label, input and messages together — required for a real field.
valuestring
description?string
disabled?boolean
error?string
hint?string /** Validation message for an unparseable / rejected expression. Its presence is * the single source of truth: it sets aria-invalid, shows the error, and links * it via aria-describedby. There is no hand-set `invalid` boolean — validity is * a message from the host's parser/validator, not a guess. */Static help text (shown when there's no description and no error).
label?stringVisible label. Omit and the input still gets an accessible name.
name?stringSubmitted field name.
onBlur?() => void
onChange?(value: string) => void
presets?CrCronPreset[]Quick-fill presets.
required?boolean
unstyled?boolean
pt?CrPassThrough<"error" | "hint" | "input" | "label" | "out" | "preset" | "presets" | "req" | "root">
dt?CrDesignTokens

variants

propid · label · value · presets · description · error

tokens

--boardinput
--sig-workreadout
--sig-errerror message + border

Date-time

formscomponentstable

A styled native date/time input (datetime-local / date / time) — the browser owns the picker, keyboard, and locale.

playground · editable props
mounting…

props · <CrDateTime />

disabled?boolean
kind?"datetime-local" | "date" | "time"input type — datetime-local (default), date, or time.
label?string
max?string
min?string
onChange?(value: string) => void
value?string
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

kinddatetime-local · date · time

tokens

--boardfield
--borderborder

FileUpload

formscomponentstable

File dropzone over a real native <input type=file> — click/keyboard opens the picker, drag-drop is accepted, dragover is announced via data-state. Selected files listed.

playground · editable props
mounting…

props · <CrFileUpload />

labelstring
accept?string`accept` attribute forwarded to the native input (e.g. ".csv,image/*").
disabled?boolean
files?string[]Selected files to display (consumer maps a FileList → names). Display only.
hint?stringSecondary hint line under the prompt (e.g. "CSV up to 10 MB").
multiple?boolean
onFiles?(files: any) => voidFires with the native FileList on pick or drop.
unstyled?boolean
pt?CrPassThrough<"file" | "input" | "list" | "prompt" | "root">
dt?CrDesignTokens

variants

stateidle · dragover

tokens

--cr-fileupload-active-borderdragover accent border (a state — Law 2)

Form

formscomponentstable

Schema-driven form. Feed it a Form Model + a validate() function (built by the headless forms core from an ArkType type OR a JSON Schema) and it renders and validates the whole form — value/touched/error state, validate on blur + submit, re-check on change once touched.

playground · editable props
mounting…

props · <CrForm />

disabled?boolean
errors?Record<string, string>
errorSummary?boolean
id?string
mode?stringWhen a field FIRST validates: "blur" (default) · "change" · "submit".
onChange?(values: Record<string, any>) => void
onReset?() => void
onSubmit?(values: Record<string, any>) => void | Promise<void>May be async — the submit button shows its pending state until it settles.
pendingLabel?stringSubmit-button label while an async submit/validate is in flight.
resetLabel?string
resettable?boolean
revalidateMode?stringAfter a field has validated once, when it re-checks: "change" (default) · "blur".
submitLabel?string
title?string
validate?(values: Record<string, any>) => Record<string, string> | Promise<Record<string, string>>`(values) => errors | Promise<errors>` where errors is `{ [dottedPath]: msg }` * ({} = valid). May be **async** (return a Promise) for server-side checks. * Wire @alebianco/cr-utils/forms here in targets where a function prop can return a value * (React/Vue/Svelte/Solid/Angular).
values?Record<string, any>
unstyled?boolean
pt?CrPassThrough<"actions" | "root" | "row" | "title">
dt?CrDesignTokens

variants

kindtext · email · url · number · select · textarea · checkbox · autocomplete · group · array

tokens

--inklabels
--sig-errerror border/marker/required
--boardcontrol surface

Form Field

formscomponentstable

Label + control + hint/error wrapper; error state shows a non-color ✗ marker.

playground · editable props
mounting…

props · <CrField />

idstring
labelstring
disabled?boolean
error?stringValidation message. Its presence drives aria-invalid + the error style.
hint?string
name?stringSubmitted field name.
onBlur?() => void
onChange?(value: string) => void
placeholder?string
required?boolean
type?stringInput type — text · email · url · password · search · tel.
value?string
pt?CrPassThrough<"error" | "hint" | "input" | "label" | "req" | "root">
dt?CrDesignTokens

variants

statedefault · error

tokens

--inklabel
--mutedhint
--sig-errerror border/marker

InputGroup

formscomponentstable

An input flanked by decorative prefix / suffix addons (protocol, currency, unit). Addons are aria-hidden; give the field a label. For a validated field use Field or Form.

playground · editable props
mounting…

props · <CrInputGroup />

disabled?boolean
id?string
invalid?boolean
label?stringAccessible name for the input.
onInput?(value: string) => void
placeholder?string
prefix?stringLeading addon (e.g. "https://", a currency, an icon glyph). Decorative.
suffix?stringTrailing addon (e.g. a unit like "GB", "%"). Decorative.
type?stringInput type — text · email · url · number · search · tel.
value?string
pt?CrPassThrough<"addon" | "input" | "root">
dt?CrDesignTokens

variants

propprefix · suffix

tokens

--panel-2addon fill
--bordercontour
--mutedaddon text

Number field

formscomponentstable

Number input with −/+ steppers, clamped to min/max; the native input keeps its own keyboard.

playground · editable props
mounting…

props · <CrNumberField />

valuenumber
disabled?boolean
invalid?boolean
label?string
max?number
min?number
onChange?(value: number) => void
step?number
pt?CrPassThrough<"btn" | "input" | "root">
dt?CrDesignTokens

variants

propvalue · min · max · step

tokens

--boardfield
--panelstepper buttons
--state-disabled-opdisabled at bounds

PinInput

formscomponentstable

One-time-code / PIN entry — N single-digit cells acting as one field; typing advances, Backspace steps back, arrows move, paste fills across. role=group with per-cell labels.

playground · editable props
mounting…

props · <CrPinInput />

invalid?boolean
label?stringAccessible name for the group. Default "Verification code".
labels?Record<string, any>Override this component's built-in English strings. Any key you omit * falls back to the app-level `messages` from context, then to the built-in * default. See lib/messages.ts for the keys.
length?numberNumber of digit cells. Default 6.
onChange?(code: string) => voidFires on every change with the current (partial) code.
onComplete?(code: string) => voidFires once every cell is filled.
unstyled?boolean
pt?CrPassThrough<"cell" | "root">
dt?CrDesignTokens

variants

proplength

tokens

--panel-2cell fill
--bordercell border
--sig-workfocused cell

Rating

formscomponentstable

Star-rating control — a radiogroup with roving tabindex (interactive) or an inert score readout (readonly). Geometric-glyph marks (no icon font); fill encodes the value.

playground · editable props
mounting…

props · <CrRating />

disabled?boolean
label?string
max?numberNumber of steps. Default 5.
onChange?(value: number) => void
readonly?booleanRead-only display (no radiogroup, no keyboard) — e.g. a score readout.
value?numberCurrent rating (0..max). Controlled.
unstyled?boolean
pt?CrPassThrough<"root" | "star">
dt?CrDesignTokens

variants

modeinteractive · readonly

tokens

--cr-rating-onfilled-star colour (a state, not a per-item hue — Law 2)
--cr-rating-offempty-star colour

Select

formscomponentstable

Native select styled to the chassis.

playground · editable props
mounting…

props · <CrSelect />

optionsstring[]
disabled?boolean
id?string
invalid?booleanMarks the control invalid for assistive tech (sets aria-invalid). Visual * error styling comes from a wrapping CrField — this is the a11y half only.
label?string
unstyled?boolean
pt?CrPassThrough<"option" | "root">
dt?CrDesignTokens

variants

staterest · focus · disabled · error

tokens

--boardfill
--inktext

Slider

formscomponentstable

Styled native range input — square track + thumb, keyboard for free (arrows, Home/End, PageUp/Down).

playground · editable props
mounting…

props · <CrSlider />

valuenumber
disabled?boolean
label?string
max?number
min?number
onChange?(value: number) => void
step?number
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

propvalue · min · max · step

tokens

--sig-workthumb
--panel-2track
--bordertrack/thumb border

Switch

formscomponentstable

button[role=switch] toggle; on = --sig-done track.

playground · editable props
mounting…

props · <CrSwitch />

checked?boolean
disabled?boolean
invalid?boolean
label?string
onChange?(next: boolean) => void
unstyled?boolean
pt?CrPassThrough<"root" | "track">
dt?CrDesignTokens

variants

stateoff · on · disabled

tokens

--panel-2off track
--sig-doneon track
--mutedoff knob
--on-sigon knob

TagsInput

formscomponentstable

Token entry — Enter or comma adds a tag, Backspace on an empty field removes the last, each tag has a labelled remove button. role=group; duplicates ignored.

playground · editable props
mounting…

props · <CrTagsInput />

invalid?boolean
label?stringAccessible name for the group + entry field.
labels?Record<string, any>Override this component's built-in English strings. Any key you omit * falls back to the app-level `messages` from context, then to the built-in * default. See lib/messages.ts for the keys.
onChange?(tags: string[]) => void
placeholder?string
value?string[]Seed tags.
unstyled?boolean
pt?CrPassThrough<"input" | "label" | "list" | "remove" | "root" | "tag">
dt?CrDesignTokens

variants

propvalue

tokens

--paneltag fill
--bordercontour
--sig-errremove affordance

Text Input

formscomponentstable

Single-line text input on a recessed board surface; square, inked, focus-ringed.

playground · editable props
mounting…

props · <CrInput />

clearable?booleanShow a clear button when the field has a value.
disabled?boolean
icon?stringIcon name rendered inside the field, leading edge.
id?string
invalid?boolean
label?string
name?string
onBlur?() => void
onChange?(value: string) => void
onClear?() => voidFires when the clear button is pressed.
placeholder?string
required?boolean
type?string
value?string
dt?CrDesignTokens

variants

staterest · focus · disabled · error

tokens

--boardfill
--borderborder
--inktext
--mutedplaceholder
--sig-workfocus ring

Textarea

formscomponentstable

Multi-line text input; vertically resizable.

playground · editable props
mounting…

props · <CrTextarea />

disabled?boolean
id?string
invalid?boolean
label?string
name?string
onBlur?() => void
onChange?(value: string) => void
placeholder?string
required?boolean
value?string
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

staterest · focus · disabled · error

tokens

--boardfill
--inktext

ToggleChip

formscomponentstable

Interactive multi-select filter pill (role=checkbox). Distinct from the static Chip and single-select Segmented; several toggle independently. On/off announced via aria-checked + data-state.

playground · editable props
mounting…

props · <CrToggleChip />

labelstring
badge?string | number | boolean
disabled?boolean
onToggle?() => void
pressed?booleanOn/off state (multi-select filter semantics — use several independently).
unstyled?boolean
pt?CrPassThrough<"badge" | "root">
dt?CrDesignTokens

variants

stateoff · on

tokens

--cr-togglechip-on-bgON-state fill (a state, not a per-option identity hue — Law 2)

Breadcrumb

navigationcomponentstable

Navigation trail — an aria-hidden "▸" separator between crumbs (override with `separator`); the last crumb is the current page (aria-current).

playground · editable props
mounting…

props · <CrBreadcrumb />

itemsCrCrumb[]
label?string
separator?stringSeparator drawn between crumbs. Default "▸". Always aria-hidden.
unstyled?boolean
pt?CrPassThrough<"item" | "link" | "root" | "separator">
dt?CrDesignTokens

variants

propitems

tokens

--mutedcrumbs + separators
--inkcurrent page

Overflow

navigationcomponentstable

An a11y-correct "+N more" disclosure for truncated lists; a button (aria-expanded) with onToggle, or an inert count. The accessible name always includes the noun.

playground · editable props
mounting…

props · <CrOverflow />

countnumberHow many items are hidden.
nounstringNoun for the accessible name, e.g. "sessions" → "show 3 more sessions".
expanded?booleanWhether the hidden items are currently revealed.
onToggle?() => voidWhen omitted, the control is inert (a plain "+N" count, not a button).
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

modetoggle · static

Pagination

navigationcomponentstable

Controlled pager — prev/next plus a windowed run of page numbers with ellipses; current page keyed and aria-current.

playground · editable props
mounting…

props · <CrPagination />

pagenumberCurrent page, 1-based (controlled).
totalnumberTotal number of pages.
labels?Record<string, any>Override this component's built-in English strings. Any key you omit falls * back to the app-level `messages` from context, then to the built-in default. * See lib/messages.ts for the keys.
onChange?(page: number) => void
unstyled?boolean
pt?CrPassThrough<"btn" | "ellipsis" | "root">
dt?CrDesignTokens

variants

proppage · total

tokens

--panelbutton fill
--brd-hairbutton border
--sig-workcurrent page
--state-disabled-opdisabled prev/next

Rail + Nav

navigationcomponentstable

Primary navigation — persistent left chassis; active item keyed to accent, count badge to its state.

playground · editable props
mounting…

props · <CrNav />

itemsCrNavItem[]
brand?string
children?any
labels?Record<string, any>Override this component's built-in English strings. Any key you omit falls * back to the app-level `messages` from context, then to the built-in default. * See lib/messages.ts for the keys.
unstyled?boolean
pt?CrPassThrough<"badge" | "brand" | "item" | "list" | "root">
dt?CrDesignTokens

variants

itemdefault · active
badgeoff · on

tokens

--railrail background
--rail-inkrail text
--sig-accentactive item
--sig-errattention badge
--brd-heavyright border

Segmented control

navigationcomponentstable

Single-select connected button bar (role=radiogroup, roving tabindex; ←/→/Home/End). Same semantics as a radio group, distinct connected visual.

playground · editable props
mounting…

props · <CrSegmented />

optionsCrSegmentedOption[]
label?string
onChange?(value: string) => void
value?stringSelected value (controlled).
unstyled?boolean
pt?CrPassThrough<"opt" | "root">
dt?CrDesignTokens

variants

propvalue

tokens

--sig-workselected segment
--panelsegment fill
--borderdividers

Stepper

navigationcomponentstable

Numbered progress indicator for a multi-step flow — ordered list with done/active/upcoming states; current step carries aria-current, optional navigable step buttons.

playground · editable props
mounting…

props · <CrStepper />

stepsCrStepperStep[]
active?numberZero-based index of the current step.
onStep?(index: number) => void
unstyled?boolean
pt?CrPassThrough<"btn" | "dot" | "hint" | "item" | "label" | "root" | "text">
dt?CrDesignTokens

variants

stateupcoming · active · done

tokens

--sig-workactive step
--sig-donecompleted step
--mutedupcoming step
--borderconnector line

Tabs

navigationcomponentstable

Tab strip (role=tablist) with a keyed underline on the active tab; scalar active-index state.

playground · editable props
mounting…

props · <CrTabs />

tabsstring[]
active?numberInitially-active tab index.
id?string
onChange?(index: number) => void
unstyled?booleanDrop the `cr-*` classes on this instance (keep behavior + data-part hooks).
pt?CrPassThrough<"root" | "tab">Pass-through per part: `{ tab: { class, "data-testid", onMouseEnter, … } }`.
dt?CrDesignTokens

variants

propactive

tokens

--borderbaseline
--sig-workactive underline
--mutedinactive label

Tree

navigationcomponentstable

Hierarchical tree (role=tree) for nested data like a worker→session fleet. Rendered as a flat list of visible rows; full keyboard nav (arrows expand/collapse/step, Home/End) and aria-level/aria-expanded.

playground · editable props
mounting…

props · <CrTree />

nodesCrTreeNode[]
defaultExpanded?string[]Node ids expanded on first render.
label?string
onSelect?(id: string) => void
unstyled?boolean
pt?CrPassThrough<"item" | "lead" | "root" | "twist">
dt?CrDesignTokens

variants

propnodes · defaultExpanded

tokens

--sig-workopen twist + selection
--mutedtwist / leaf marker
--state-hover-mixrow hover

Command palette

overlaycomponentstable

A ⌘K command palette on the native dialog (focus-trap + Esc + backdrop). The input is a combobox driving a listbox — focus stays in the field while ↑/↓ move the active option (aria-activedescendant), Enter runs it; live query filter with per-command keycap hints.

playground · editable props
mounting…

props · <CrPalette />

commandsCrCommand[]
onClose?() => void
onRun?(id: string) => voidFires with the chosen command id.
open?booleanControlled visibility — open with ⌘K/Ctrl+K from the host.
placeholder?string

variants

propopen · commands · placeholder

tokens

--panelpalette fill
--boardsearch field
--sig-workactive option
--shadow-off-lgpalette shadow

Drawer

overlaycomponentstable

An edge sheet on the native dialog (focus-trap + Esc + backdrop) — slides from the left or right, full height. For detail/inspector panels.

playground · editable props
mounting…

props · <CrDrawer />

children?any
onClose?() => void
open?boolean
side?"left" | "right"Which edge it slides from.
title?string
pt?CrPassThrough<"body" | "box" | "close" | "head" | "root" | "title">
dt?CrDesignTokens

variants

sideleft · right

tokens

--panelsheet fill
--brd-brushedge border
--shadow-off-lgsheet shadow

Hover card

overlaycomponentstable

A rich hover/focus card for structured content (Tooltip is for plain text, Menu for actions). CSS-driven reveal with an open delay; the trigger is focusable so keyboard users get it too.

playground · editable props
mounting…

props · <CrHoverCard />

labelstringTrigger text (focusable so keyboard users get the card too).
children?any
placement?string
title?stringAccessible name for the card panel.
unstyled?boolean
pt?CrPassThrough<"panel" | "root" | "trigger">
dt?CrDesignTokens

variants

placementbottom-start · bottom-end · top-start · top-end · left · right

tokens

--panelcard fill
--shadow-offcard shadow
--z-overlaystacking layer

Menu

overlaycomponentstable

Dropdown menu — a trigger toggles a role=menu panel; a transparent full-viewport scrim closes it on outside click (no global listeners). Optional danger items.

playground · editable props
mounting…

props · <CrMenu />

itemsCrMenuItem[]
labelstring
onSelect?(index: number) => voidFires with the selected item index.
placement?string
unstyled?boolean
pt?CrPassThrough<"item" | "panel" | "root" | "trigger">
dt?CrDesignTokens

variants

placementbottom-start · bottom-end · top-start · top-end · left · right

tokens

--panelpanel fill
--shadow-off-smpanel shadow
--state-hover-mixitem hover
--sig-errdanger item

Modal

overlaycomponentstable

Native <dialog> modal; browser owns focus-trap, Esc, and backdrop.

playground · editable props
mounting…

props · <CrModal />

children?any
onClose?() => void
open?boolean
title?string
pt?CrPassThrough<"body" | "close" | "head" | "root" | "title">
dt?CrDesignTokens

variants

stateclosed · open

tokens

--panelsurface
--borderframe
--shadow-colhard offset shadow
--mass::backdrop scrim

Popover

overlaycomponentstable

Generic anchored overlay for arbitrary content — a trigger toggles a floating panel; scrim closes on outside click, Esc closes and returns focus. Use Menu for a list of actions.

playground · editable props
mounting…

props · <CrPopover />

labelstringTrigger button text.
children?any
placement?string
title?stringAccessible name for the panel.
unstyled?boolean
pt?CrPassThrough<"panel" | "root" | "scrim" | "trigger">
dt?CrDesignTokens

variants

placementbottom-start · bottom-end · top-start · top-end · left · right

tokens

--panelpanel fill
--shadow-offpanel shadow
--z-overlaystacking layer

Toast

overlaycomponentstable

Transient status readout keyed to a machine signal; err announces assertively.

playground · editable props
mounting…

props · <CrToast />

children?any
duration?numberAuto-dismiss after N ms. Omit to make it sticky.
message?string
onClose?() => void
signal?"work" | "wait" | "done" | "err"Machine signal the toast reports. `err` uses role=alert + assertive.
pt?CrPassThrough<"close" | "msg" | "root">
dt?CrDesignTokens

variants

signalwork · wait · done · err

tokens

--sig-workdefault / work fill
--sig-donedone fill
--sig-waitwait fill
--sig-errerr fill
--on-sigtext on work/wait/done
--on-errtext on err

Toast region

overlaycomponentstable

A fixed screen anchor that stacks live toasts (parent owns the list). Each row is its own live region — err announces assertively — so nothing double-announces. Consecutive toasts with the same message and signal pack into one row with an aria-hidden ×N counter, so a repeat updates the count instead of re-announcing. Bottom anchors stack newest nearest the edge.

playground · editable props
mounting…

props · <CrToastRegion />

toastsCrToastItem[]
labels?Record<string, any>Override this component's built-in English strings. Any key you omit falls * back to the app-level `messages` from context, then to the built-in default. * See lib/messages.ts for the keys.
onDismiss?(id: string | number) => void
position?"tr" | "br" | "tl" | "bl" | "tc" | "bc" | "ml" | "mr" | "mc"
unstyled?boolean
pt?CrPassThrough<"close" | "count" | "msg" | "root" | "toast">
dt?CrDesignTokens

variants

positiontr · br · tl · bl · tc · bc · ml · mr · mc

tokens

--z-overlaystacking layer
--sig-errerror toast fill

Tooltip

overlaycomponentstable

Hint bubble revealed on hover/focus; role=tooltip wired via aria-describedby, pure-CSS reveal.

playground · editable props
mounting…

props · <CrTooltip />

children?any
label?string
pt?CrPassThrough<"bubble" | "root" | "trigger">
dt?CrDesignTokens

variants

placementbottom-start · bottom-end · top-start · top-end · left · right

tokens

--panel-2bubble surface
--borderframe
--muteddotted trigger underline
--z-overlaystacking

Accordion

layoutcomponentstable

Collapsible sections — header buttons (aria-expanded + aria-controls) reveal region panels. single = exclusive; ↑/↓/Home/End move between headers.

playground · editable props
mounting…

props · <CrAccordion />

itemsCrAccordionItem[]
defaultOpen?number[]Indexes open on first render.
single?booleanOnly one panel open at a time.
unstyled?boolean
pt?CrPassThrough<"chevron" | "header" | "item" | "panel" | "root">
dt?CrDesignTokens

variants

propsingle · defaultOpen

tokens

--borderdividers
--sig-workopen chevron
--state-hover-mixheader hover

Bezel + Screen

layoutcomponentstable

The only legal host for texture (Law 6) — a physical instrument enclosing a recessed, halftoned screen.

playground · editable props
mounting…

props · <CrBezel />

children?any

tokens

--brd-brushcasing
--panel-2casing fill
--boardscreen fill
--halftonescreen texture
--halftone-sizetexture cell

Breach

layoutcomponentstable

The one sanctioned rule-break per screen (Law 9) — soft corner, colour glow, blurred blob, optional gradient wash — to spotlight the single most exceptional item.

playground · editable props
mounting…

props · <CrBreach />

alive?booleanSlow living glow (off under prefers-reduced-motion).
children?any
signal?"work" | "wait" | "done" | "err" | "accent2"Signal that keys the glow. Defaults to accent (omit for accent).
wash?booleanAdd the gradient wash over the surface.

variants

signalaccent · work · wait · done · err · accent2
flagwash · alive

tokens

--breach-radiusthe soft corner
--breach-blurblurred-blob softness
--breach-glow-sizeglow radius
--sig-accentdefault glow hue

Data grid

layoutcomponentstable

A dense, VIRTUALIZED data grid for large datasets: only the rows in (or near) the viewport are in the DOM, so thousands of rows scroll smoothly. Fixed row height; sortable headers (asc → desc → none, stable); optional row selection (checkbox column + select-all + aria-selected); sticky header; grid a11y (role=grid/row/columnheader/gridcell, aria-sort, aria-rowcount). Div-grid (not a <table>) so virtualization offsets cleanly across all targets.

playground · editable props
mounting…

props · <CrDataGrid />

columnsCrGridColumn[]
rowsany[]
emptyLabel?string
height?numberscroll viewport height in px (default 320).
id?stringTies the active-cell id together for keyboard nav (default "cr-grid").
labels?Record<string, any>Override this component's built-in English strings. Any key you omit falls * back to the app-level `messages` from context, then to the built-in default. * See lib/messages.ts for the keys.
onSelectionChange?(keys: string[]) => void
onSortChange?(key: string, dir: string) => void
rowHeight?number | ((row: any, index: number) => number)
rowKey?stringrow field used as the stable key (default: the row index).
selectable?booleanshow a leading checkbox column for row selection.
unstyled?boolean
pt?CrPassThrough<"cell" | "checkbox" | "empty" | "glyph" | "head" | "root" | "row" | "rows" | "sizer" | "sort" | "viewport">`checkbox` is a NESTED SECTION: its value is a `pt` for the inner CrCheckbox * (`pt={{ checkbox: { root: { "data-testid": "row-select" } } }}`), not an * attribute bag for an element.
dt?CrDesignTokens

variants

propcolumns · rows · selectable · height · rowHeight · rowKey

tokens

--boardgrid + row fill
--panelsticky header
--sig-workselected row + sort glyph

Data list

layoututilitystable

Key → value readout (dl/dt/dd) on a two-column grid — mono/label keys, data-register values. For detail panels.

worker
nova-01
uptime
41h 12m
key → value

variants

classcr-dl · cr-dl__k · cr-dl__v

tokens

--mutedkeys
--inkvalues

Instrument shell

layoutblockstable

The dashboard chassis — composes the nav rail and a board (masthead/hero + panels).

playground · editable props
mounting…

props · <CrInstrument />

children?any
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

tokens

--brd-brushouter chassis
--boardboard fill
--shadow-off-lgchassis shadow

Panel

layoutcomponentstable

A composed instrument bay — eyebrow, ghost index, title, lede, body and a pinned footer; the system's workhorse surface.

playground · editable props
mounting…

props · <CrPanel />

ambient?"scan" | "pulse"Ambient loop — reuses the shipped `.cr-anim-*` classes; off under reduced motion.
bleed?"halftone" | "dither" | "scan" | "glass"Masked edge texture. Law 6 caps this at ONE bled panel per screen.
children?any
eyebrow?stringMono label above the title. Real text — put a readable unit id HERE, not in `index`.
footer?stringPinned to the bottom edge — the stamped plate line.
index?stringStamped ghost numeral, top-right. Decorative: aria-hidden, never a datum.
inset?boolean
lede?stringStandfirst under the title, ruled off with the second key.
marks?booleanRegistration ticks — reuses the shipped `.cr-mark` preset.
title?string
tone?"work" | "wait" | "done" | "err" | "idle" | "accent"Keys the eyebrow to a machine state (Law 2 — a hue asserts a real state).
weight?"default" | "major"
unstyled?boolean
pt?CrPassThrough<
dt?CrDesignTokens

variants

weightdefault · major
insetfalse · true
tonework · wait · done · err · idle · accent
marksfalse · true
bleedhalftone · dither · scan · glass
ambientscan · pulse

tokens

--panelsurface fill
--panel-2inset variant fill
--bordercontour
--brdborder weight (default)
--brd-heavyborder weight (major)
--shadow-offhard offset shadow
--shadow-colshadow color
--sig-accent-2lede rule (second key)
--mutedeyebrow + footer, and the ghost index mix
--halftoneedge-bleed texture (Law 6)
--ditheredge-bleed texture (Law 6)
--scanlineedge-bleed texture (Law 6)
--decoration-intensitybleed loudness dial

Resizable

layoutcomponentstable

Two panes with a draggable divider. Panes are children (CSS-grid sized); the handle is a WAI-ARIA window splitter (role=separator, focusable, aria-valuenow, arrow/Home/End keys). Pointer-capture drag.

playground · editable props
mounting…

props · <CrResizable />

children?anyExactly TWO panes — the leading (left/top) and trailing (right/bottom).
defaultSize?numberInitial size of the leading pane, in percent (default 50).
label?stringAccessible name for the drag handle.
max?number
min?numberClamp for the leading pane, in percent (defaults 10 / 90).
orientation?stringSplit axis: "horizontal" (default, side-by-side) · "vertical" (stacked).
pt?CrPassThrough<"root" | "separator">
dt?CrDesignTokens

variants

orientationhorizontal · vertical

tokens

--borderdivider + frame
--sig-workactive divider

ScrollArea

layoutcomponentstable

A container with cross-browser styled scrollbars (thin, inked, neon thumb) that keep the Control Room look. Keyboard-scrollable; with a label it's a named role=group.

playground · editable props
mounting…

props · <CrScrollArea />

axis?stringScroll axis: "y" (default) · "x" · "both".
children?any
label?string
maxHeight?stringMax size along the scroll axis (e.g. "16rem", "40vh").
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

axisy · x · both

tokens

--sig-workscrollbar thumb
--panel-2scrollbar track

Table

layoutcomponentstable

Dense operator table on the same chassis as a panel; mono/label headers, data-register cells. Optional column sort, row selection (checkbox + aria-selected), and a sticky header.

playground · editable props
mounting…

props · <CrTable />

columnsstring[]
rowsstring[][]
labels?Record<string, any>Override this component's built-in English strings. Any key you omit falls * back to the app-level `messages` from context, then to the built-in default. * See lib/messages.ts for the keys.
onSelect?(indexes: number[]) => voidFires with the ORIGINAL row indexes currently selected.
selectable?booleanShow a leading checkbox column and track selected rows.
sortable?booleanClick a header to sort by that column.
sticky?booleanHeader sticks to the top of the nearest scroll container.
unstyled?boolean
pt?CrPassThrough<"body" | "checkbox" | "head" | "indicator" | "root" | "row" | "sort" | "td" | "th">`checkbox` is a NESTED SECTION: its value is a `pt` for the inner CrCheckbox * (`pt={{ checkbox: { root: { "data-testid": "row-select" } } }}`), not an * attribute bag. * * RENAMED from `check`, which until the checkbox was extracted was a flat bag * applied straight to an inline `<input>`. Both shapes are structurally valid * `CrPTSection`s — its index signature accepts any key — so reusing the name * would let old `pt={{ check: { class: "big" } }}` keep compiling while silently * doing nothing: the child would look for `root` and find `class`. The rename * turns that into a compile error instead.
dt?CrDesignTokens

variants

propsortable · selectable · sticky

tokens

--panelfill
--borderouter border
--mutedheader text
--brd-hairrow separators
--sig-worksort indicator + selected-row wash
--state-hover-mixrow hover

Alert

statecomponentstable

Inline callout keyed to a signal (work/wait/done/err) — a left brush-bar in the signal hue, optional dismiss. err announces assertively (role=alert).

playground · editable props
mounting…

props · <CrAlert />

children?any
dismissible?booleanShow a dismiss ✕.
message?string
onClose?() => void
signal?"work" | "wait" | "done" | "err"Signal the alert carries (Law 2). Defaults to work.
title?string
pt?CrPassThrough<"body" | "close" | "icon" | "msg" | "root" | "title">
dt?CrDesignTokens

variants

signalwork · wait · done · err

tokens

--sig-workinfo key
--sig-errerror key
--panelfill

Chip

statecomponentstable

A compact standalone tag/label keyed to a signal (Law 2); defaults to done; stamp-in when added.

playground · editable props
mounting…

props · <CrChip />

children?any
signal?"work" | "wait" | "done" | "err" | "idle" | "accent"Signal the chip carries (Law 2). Defaults to done.
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle · accent
stampoff · on

tokens

--sig-donedefault fill
--sig-workalt fill
--on-sigtext
--borderoutline

Drip / error surface

statecomponentstable

The house glitch for failure — vertical downward bleed in --drip over a --sig-err field. Errors only.

playground · editable props
mounting…

props · <CrDrip />

titlestring
pt?CrPassThrough<"root" | "sub" | "title">
dt?CrDesignTokens

tokens

--sig-errfield
--dripbleed hue
--borderoutline

EmptyState / ErrorState

statecomponentstable

Zero-data (calm) and failure (error keying + drip) fallbacks for any panel — must not look alike.

playground · editable props
mounting…

props · <CrEmptyState />

messagestring
children?any
unstyled?boolean
pt?CrPassThrough<"message" | "root">
dt?CrDesignTokens

variants

kindempty · error

tokens

--mutedempty text
--stageempty calm accent
--sig-errerror keying

Keyed contact sheet

stateblockstable

A grid of uniform state-keyed tiles that reads as one instrument, not competing stages (Law 2).

playground · editable props
mounting…

tokens

--brd-brushsheet border
--bordertile dividers

Progress

statecomponentstable

Task progress and capacity / utilisation (role=progressbar) — determinate fills to value/max; indeterminate runs an animated hazard sweep. An optional label renders inline before the track.

playground · editable props
mounting…

props · <CrProgress />

indeterminate?booleanUnknown-duration work — an animated hazard sweep, no numeric value.
label?stringOptional inline caption rendered before the bar.
max?number
signal?"work" | "wait" | "done" | "err" | "idle"Signal for the fill (canonical vocabulary): work · wait · done · err · idle.
value?number0..max. Ignored when indeterminate.
unstyled?boolean
pt?CrPassThrough<"fill" | "label" | "root" | "track">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle

tokens

--sig-workdefault fill
--panel-2track
--brd-hairtrack outline

RelativeTime

statecomponentstable

Relative-time display ("5m ago") as a semantic <time>; the clock is injected as a prop so SSR and client agree (no hydration flicker).

playground · editable props
mounting…

props · <CrRelativeTime />

timenumberThe moment to describe, epoch milliseconds.
locale?string
now?number
prefix?stringRendered before the phrase, e.g. "updated ".
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

SessionRow

statecomponentstable

One row of a live list — the densest unit; calm at rest, one-shot glitch on a real state change.

playground · editable props
mounting…

props · <CrSessionRow />

namestring
statusstring
children?any
event?boolean
signal?"work" | "wait" | "done" | "err" | "idle"
unstyled?boolean
pt?CrPassThrough<"dot" | "name" | "root" | "status">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle
eventoff · on

tokens

--inkname
--mutedstatus
--borderdivider

Shape

statecomponentstable

Severity glyph — polygon side-count encodes danger/focus (fewer sides = more urgent); a shape channel beside colour (Law 4).

playground · editable props
mounting…

props · <CrShape />

severity"crit" | "warn" | "work" | "ok" | "idle"
label?stringAccessible name — shape/colour must never be the only carrier of meaning.

variants

severitycrit · warn · work · ok · idle

tokens

--sig-errcrit (triangle) fill
--sig-waitwarn (diamond) fill
--sig-workwork (pentagon) fill
--sig-doneok (hexagon) fill
--sig-idleidle (circle) fill

Skeleton

stateutilitystable

Loading placeholder — a blocky pulse (never rounded). Sizes: --line, --text, --block; give it a width inline.

loading

variants

classcr-skeleton--line · cr-skeleton--text · cr-skeleton--block

tokens

--panel-2placeholder fill

Spinner

statecomponentstable

Indeterminate loading indicator — role=status with an accessible label; the cells are aria-hidden and honour reduced-motion. `signal` keys the cells to the canonical vocabulary. For a known fraction, or a static capacity reading, use Progress.

playground · editable props
mounting…

props · <CrSpinner />

label?stringAccessible label announced by screen readers. Defaults to "Loading".
signal?"work" | "wait" | "done" | "err" | "idle"Signal for the cells (canonical vocabulary): work · wait · done · err · idle. Defaults to work.
size?stringSize token: "sm" · "lg" (default medium).
unstyled?boolean
pt?CrPassThrough<"ring" | "root">
dt?CrDesignTokens

variants

sizesm · md · lg
signalwork · wait · done · err · idle

tokens

--cr-spinner-accentcells (defaults to --sig-work)
--sig-errcells when signal=err

StatusDot

statecomponentstable

The smallest state readout — a square keyed to the signal ramp, with an aria-label naming the state.

playground · editable props
mounting…

props · <CrStatusDot />

labelstring
signal?"work" | "wait" | "done" | "err" | "idle"
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle

tokens

--sig-workstate fill (example)
--borderoutline

Tag

statecomponentstable

Inline status label inside dense content; variants map to the signal ramp.

playground · editable props
mounting…

props · <CrTag />

children?any
signal?"work" | "wait" | "done" | "err" | "idle" | "accent"
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle · accent

tokens

--sig-donenow/shipped
--sig-workwork
--sig-waitlater/pending
--sig-errno/ruled-out
--on-sigtext

Timeline

statecomponentstable

Vertical event timeline — an ordered list of moments on a rail, each with a signal-coloured node, machine time, title and optional detail. Presentational; node colour is the semantic signal.

playground · editable props
mounting…

props · <CrTimeline />

itemsCrTimelineItem[]
label?string
unstyled?boolean
pt?CrPassThrough<"detail" | "item" | "node" | "root" | "time" | "title">
dt?CrDesignTokens

variants

signalwork · done · wait · err

tokens

--cr-timeline-railthe connecting rail (chrome)

Ascii

mediacomponentstable

Seeded ASCII/Unicode density field (braille/block/ramp) for dead space — whisper contrast, aria-hidden, mask-faded off content.

playground · editable props
mounting…

props · <CrAscii />

seedstring
height?number
variant?"braille" | "block" | "ramp"
width?number

variants

variantbraille · block · ramp

tokens

--mutedglyph ink
--fieldrelated background field

ASCII separators & lists

mediautilitystable

Character-flavored detail utilities: .cr-sep / .cr-sep-label box-rule separators (dashed/dotted, labeled), .cr-list ascii-marker lists (▸ · » +), and .cr-leader dot-leader rows (label ····· value).

recent events

  • stream opened
  • SSE closed
uptime41h
labeled rule

variants

classcr-sep · cr-sep--dot · cr-sep--double · cr-sep-label · cr-list · cr-list--dot · cr-list--tick · cr-list--plus · cr-leader

tokens

--mutedrule / marker ink
--sig-work▸ / » markers

Chrome

mediacomponentstable

Seeded instrument chrome strip — a pixel-art metal bar with a deterministically varied graduated scale, panel seams, registration mark, wear scratches, and an indicator LED.

playground · editable props
mounting…

props · <CrChrome />

seedstringSame seed → same hardware strip (deterministic variance).
width?numberStrip width in px (height is fixed at 26).

variants

propseed · width

tokens

--rail-inkmetal highlight (kit pieces)
--sig-workLED default hue

Decoration utilities

mediautilitystable

The FUI/decoration utility layer for dead space and chassis edges: styled scrollbar, tick-ruler edge, whisper drafting field, hazard stripe, and the Breach blur-blob. All aria-hidden, non-interactive, whisper contrast — never on a content field.

playground · editable props
mounting…

variants

classcr-scrollbar · cr-scrollbar--local · cr-ruler · cr-bg--field · cr-stripe · cr-blob · cr-trim · cr-trim--4 · cr-mark

tokens

--mutedruler ticks, trim brackets
--fielddrafting-field background
--sig-waithazard stripe hue
--borderregistration-mark ink

Dither

mediacomponentstable

Seeded Bayer 4×4 ordered dither / halftone field — hardware surfaces only (Law 6); the genuine texture the CSS tokens approximate.

playground · editable props
mounting…

props · <CrDither />

seedstringAny string — same seed always yields the same field (identity from seed).
height?number
mode?"bayer" | "halftone"`bayer` = ordered 1-bit dither; `halftone` = variable-density dots.
state?"working" | "waiting" | "idle" | "error" | "done"Machine state; keys the ink hue. Omit for a seed-picked signal.
width?number

variants

modebayer · halftone
stateworking · waiting · idle · error · done

tokens

--boardfield ground
--sig-workworking hue
--sig-accentdefault ink (seeded)
--sig-errerror hue
--sig-accent-2done/acid hue

Icon

mediacomponentstable

The house operational glyph set — 24×24, currentColor, single 2px stroke, square caps to match the neobrutalist geometry. Decorative by default; pass a label to name it.

playground · editable props
mounting…

props · <CrIcon />

namestring
label?string
size?number
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

nameplay · pause · stop · retry · deploy · scan · search · alert · error · done · clock · cpu · logs · filter · sliders · close · chevron · plus · minus · trash · external · copy · session · menu
size16 · 20 · 24

tokens

--inkinherited stroke colour (currentColor)

Seeded pixel-cat

mediacomponentexperimental

Identity+state sprite: fur/markings from the session id, pose from state; deterministic paint() to canvas.

playground · editable props
mounting…

props · <CrCat />

seedstring
state"working" | "waiting" | "idle" | "error" | "done"
size?number

variants

stateworking · waiting · idle · error · done
frame0 · 1 · 2 · 3

tokens

--sig-workeye color by state (via stateHex)

Sigil

mediacomponentstable

Seeded cyber-sigil — a retro-futuristic pixel glyph generated from a seed; optional state keys the hue.

playground · editable props
mounting…

props · <CrSigil />

seedstringAny string — same seed always yields the same sigil (identity from seed).
size?number
state?"working" | "waiting" | "idle" | "error" | "done"Optional machine state; keys the glow hue like the seeded cat.

variants

stateworking · waiting · idle · error · done

tokens

--sig-workworking hue
--sig-accentdefault glyph hue (seeded)
--sig-errerror hue
--sig-accent-2done/acid hue

Telemetry

mediacomponentstable

Seeded NERV-style decorative telemetry string (hex id, byte, channel tag, mini bar) for a frame corner. Decoration, not data — every field is unitless so it cannot be mistaken for a real measurement.

playground · editable props
mounting…

props · <CrTelemetry />

seedstring
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

propseed

tokens

--mutedtext

Bar chart

chartcomponentstable

Categorical bar chart — baseline-anchored bars with rounded data-ends, a 2px surface gap, optional dashed target line, monospace value/category labels.

playground · editable props
mounting…

props · <CrBarChart />

dataCrBarDatum[]
axis?booleanShow the numbered y-axis (nice ticks + gridlines). Default true.
height?numberviewBox height (aspect); the plot scales to its container width.
label?stringAccessible name for the whole figure.
max?numberForce the top of the scale; otherwise a "nice" max is derived from the data (and target).
showValues?booleanPrint each bar's value above it.
target?numberDraw a dashed reference line at this value (a budget / SLO).
unit?stringSuffix appended to each y-tick label (e.g. "ms", "%").
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle · accent · accent2

tokens

--panel-2plot surface
--sig-workfirst categorical hue
--sig-errtarget line

Line chart

chartcomponentstable

Time-series line chart — recessive grid, non-scaling 2px lines, a data-end dot per series, tick labels and a legend for ≥2 series. One y-axis only.

playground · editable props
mounting…

props · <CrLineChart />

seriesCrLineSeries[]
area?booleanFill under each line with a faint tint.
axis?booleanShow the numbered y-axis (nice ticks + gridlines). Default true.
height?numberviewBox height (aspect); the plot scales to its container width.
label?stringAccessible name for the whole figure.
labels?string[]X-axis tick labels for the categorical (index) x-axis, drawn left→right.
max?number
min?numberForce the y-scale; otherwise a "nice" scale is derived from the data.
unit?stringSuffix appended to each y-tick label (e.g. "ms", "%").
x?number[]
xBreak?booleanCollapse idle gaps (nights / weekends / holidays) on the continuous x-axis so * session data reads without empty stretches — a trading-style "broken" axis. * Requires `x` sorted ascending; a dashed marker shows each collapsed gap.
xBreakGap?numberGap (ms) above which a span is collapsed. Default: ~3× the typical sample gap.
xFiscalStart?numberFiscal year start month 1–12 (default 1 = calendar). Year/quarter ticks then * anchor to it and label FY/Q (FY named by the ending calendar year).
xFormat?(value: number) => stringEscape hatch: format each x-tick (and the hover stamp) yourself, given the * raw x value. Overrides the built-in labels (locale / week / fiscal / clock). * Positions still come from the active scale.
xLocale?stringBCP-47 tag for the axis's month/weekday names. This is the per-instance * override on the shared locale cascade: it falls back to the app-level * `locale` from context, then "en". (Distinct from `xZone`, which is the IANA * time zone — language and zone are orthogonal.)
xTime?boolean
xWeek?stringWeekly ticks as dates ("3 Mar", default) or ISO week numbers ("W10").
xZone?stringIANA time zone for the calendar x-axis (e.g. "Europe/Rome"). Default "UTC".
yScale?stringY-axis scale: "linear" (default) or "log" (base-10, for wide-range metrics * like latency percentiles). Log needs positive data; ≤0 values are clamped to * the axis floor. Domain snaps to powers of ten.
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle · accent · accent2

tokens

--panel-2plot surface
--sig-workfirst categorical hue
--inkgrid (mixed to ~16%)

Sparkline

chartcomponentstable

Inline micro line/area chart for a KPI or table cell — no axes, a crisp non-scaling 2px stroke, a data-end dot. Stretches to fill its box.

playground · editable props
mounting…

props · <CrSparkline />

datanumber[]The series to draw. Sampled left→right; the last point gets the end dot.
area?booleanFill the area under the line (a faint tint).
height?numberviewBox height; the sparkline stretches to fill its box width.
label?stringAccessible name — the reading it stands in for (e.g. "p95 latency").
signal?"work" | "wait" | "done" | "err" | "idle" | "accent" | "accent2"Signal tone for the line/area/dot (canonical vocabulary).
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle · accent · accent2

tokens

--sig-workdefault line/area/dot
--paneldot halo

Stacked bar

chartcomponentstable

A single composition bar ("stacked progress") — signal-toned segments sized by share, with a 2px surface gap and a legend (label · value · %). Compose several for a comparison.

playground · editable props
mounting…

props · <CrStackedBar />

segmentsCrStackSegment[]
label?string
showLegend?booleanShow the legend row (swatch · label · value · %). Default true.
unstyled?boolean
pt?CrPassThrough<"root">
dt?CrDesignTokens

variants

signalwork · wait · done · err · idle · accent · accent2

tokens

--sig-worka segment tone
--panel-2track

Avatar

identitycomponentstable

Image with an initials fallback and optional presence dot. With a src it's an img[alt=name]; without one the wrapper is role=img[aria-label=name] over the initials.

playground · editable props
mounting…

props · <CrAvatar />

pt?CrPassThrough<"img" | "initials" | "root" | "status">
dt?CrDesignTokens

variants

statusonline · idle · busy · offline
sizesm · md · lg

tokens

--panel-2fallback fill
--borderring
--sig-doneonline dot

Hero

identitycomponentstable

The one region that keys to the state needing attention; keys to --stage when calm.

playground · editable props
mounting…

props · <CrHero />

bigstring
children?any
state?"accent" | "wait" | "err" | "calm"
sub?string
unstyled?boolean
pt?CrPassThrough<"big" | "root" | "sub">
dt?CrDesignTokens

variants

stateaccent · wait · err · calm

tokens

--sig-accentdefault keyed fill
--sig-waitwait state fill
--sig-errerror state fill
--stagecalm state fill
--on-sigtext on fill

Masthead

identitycomponentstable

The stark title card — page identity and headline state in the display register; optional drip host.

playground · editable props
mounting…

props · <CrMasthead />

titlestring
children?any
eyebrow?string
unstyled?boolean
pt?CrPassThrough<"eyebrow" | "root" | "title">
dt?CrDesignTokens

variants

glitchoff · drip

tokens

--panelfill
--brd-heavyborder weight
--shadow-off-lglarge offset shadow
--sig-workeyebrow (or --stage when calm)

Key hints (peek + legend)

behaviorcomponentstable

While the reveal key (default Alt) is held, sets data-cr-keys on the root so every secondary key hint fades in at once (a peek-all-shortcuts gesture). Pass `hints` to also render a shortcut legend: `+` joins a chord ("Ctrl+K"), a space joins a sequence ("g p"), and the two are drawn differently — a `+` glyph vs a "then" separator. Each binding carries a spoken aria-label and the keycaps are aria-hidden; aria-keyshortcuts is emitted only for single-step bindings, since ARIA reads a space there as "or" rather than "then". With no `hints` it renders nothing visible.

playground · editable props
mounting…

props · <CrKeyHints />

hints?CrKeyHint[]Bindings to render as a legend. Omit for the headless peek-only behavior.
label?stringAccessible name for the legend list. Default "Keyboard shortcuts".
revealKey?stringHold this key to reveal every secondary key-hint at once. Default "Alt".
unstyled?boolean
pt?CrPassThrough<"chord" | "item" | "kbd" | "keys" | "label" | "plus" | "root" | "then">
dt?CrDesignTokens

variants

prophints · revealKey · label