Status pill and dot (shape + colour), buttons, KPI, sparkline, segmented control, tabs, data table, command palette, panel stack, splitter, chart patterns, monogram.
$ npx shadcn@latest add @highcommand/uiCopies the source into your project and pulls in what it needs (1 other item). First time? Add the registry to components.json.
The kit's button: a native `button` (type "button" unless you pass one) that takes every button attribute.
variantVariant"default"Visual weight: default (outline), primary (filled), danger or ghost (default `default`).
size"sm" | "lg"—Small or large; omit for the standard size.
refRef<HTMLButtonElement>—Ref to the underlying `button` element.
Also takes the HTML attributes of its root element.
<StatusPill />3 propsA status as a coloured pill with a dot and a label.statusrequiredStatus—Which status it shows; sets the colour.
childrenReactNode—Replaces the label (default: the status's own name).
classNamestring—Extra class names for the pill.
<StatusDot />2 propsA bare status dot, for dense rows where a pill would be too wide.statusrequiredStatus—Which status it shows; sets the colour.
labelstring—Accessible name; without it the dot is read as plain decoration.
<Badge />4 propsNeutral label chip.childrenrequiredReactNode—The chip's text.
monoboolean—Set it in the mono face, for values and ids.
accentboolean—Draw it in the accent colour, to mark a selection or focus.
classNamestring—Extra class names for the chip.
<TierBadge />1 propsShows how much an agent may do on its own (observe, recommend, or act after approval), as an icon and label with a hover hint.tierrequiredTier—The autonomy level to show.
<DisplayFigure />1 propsA display figure (the kpi role, Geist Pixel Circle): the face has no tabular figures, so each digit sits in a fixed cell (`.hq-figd`) and a changing figure never shifts sideways.textrequiredstring—The figure to draw; each digit gets a fixed-width cell, other characters pass through.
<KPI />8 propsA key-figure tile: a caption, a large value, and optional sub-text, source line and sparkline.labelrequiredstring—The caption above the figure.
valuerequiredReactNode—The figure; a string is drawn in fixed-width digit cells so it never shifts as it changes.
subReactNode—Small text beside the figure (a unit or a delta).
statusStatus—Colours the tile and puts a status dot before the label.
sourcestring—A small line under the figure naming where the number comes from.
onOpenProvenance() => void—Makes the whole tile a button that fires this on click, to open the source records.
sparkReactNode—A decorative chart (usually a `Sparkline`) at the tile's foot; hidden from screen readers.
classNamestring—Extra class names for the tile.
<KPIStrip />1 propsA row of `KPI` tiles laid out as one strip.childrenrequiredReactNode—The `KPI` tiles.
<Prov />2 propsClickable number / record id that opens provenance.childrenrequiredReactNode—The number or id shown as the link's text.
onClick() => void—Fires when it is pressed.
<Sparkline />5 propsA tiny line chart of a series, scaled to its own min and max, with a dot on the last value; renders nothing for fewer than two points.datarequirednumber[]—The series, oldest first.
widthnumber80Width in px (default 80).
heightnumber22Height in px (default 22).
classNamestring—Extra class names for the svg.
labelstring—Accessible description; without it the chart is hidden from screen readers.
<TimelineItem />6 propsOne entry in a `Timeline`: a timestamp, a status-coloured dot on the rail, and the event's content.timerequiredstring—The timestamp text, shown as given.
childrenrequiredReactNode—The event's content.
kindstring—A short type label shown before the content.
statusStatus"neutral"Colours the rail dot (default `neutral`).
isNewboolean—Marks the entry as newly arrived (sets `data-new` for styling).
futureboolean—Marks the entry as still to come (sets `data-future` for styling).
<Timeline />1 propsA vertical event rail: an ordered list of `TimelineItem`s.childrenrequiredReactNode—The `TimelineItem` entries, in display order.
<EmptyState />4 propsCentred "nothing here" message with an icon, a title, optional detail and an optional action.titlerequiredstring—The headline.
iconReactNode—Replaces the default inbox icon.
childrenReactNode—Detail text under the title.
actionReactNode—A control shown last, such as a `Button`.
<ErrorState />3 propsCentred failure message (announced as an alert) with an optional Retry button.titlestring"Could not load this"The headline (default "Could not load this").
childrenReactNode—Detail text under the title.
onRetry() => void—Shows a Retry button that fires this when pressed; without it there is no button.
<Loading />3 propsSkeleton rows with a scan line.rowsnumber5How many skeleton rows to draw (default 5).
labelstring"Loading"The visible text and accessible name (default "Loading").
iconReactNode—Replaces the spinner icon.
<Tag />4 propsAnother name for `Badge`: a neutral label chip with the same props.childrenrequiredReactNode—The chip's text.
monoboolean—Set it in the mono face, for values and ids.
accentboolean—Draw it in the accent colour, to mark a selection or focus.
classNamestring—Extra class names for the chip.
<ApproveButton />1 propsApprove: filled primary.childrenReactNode—Button label (default "Approve").
Also takes the HTML attributes of its root element.
<RejectButton />1 propsReject: danger-outline.childrenReactNode—Button label (default "Reject").
Also takes the HTML attributes of its root element.
<Key />1 propsOne key cap.krequiredKeyName—`mod` (Ctrl or the Command mark), `enter`, `up` or `down` are drawn as symbols; any other text is shown as written.
<KeyHint />2 propsA chord or sequence of keys: `<KeyHint keys={["mod", "K"]} />` reads "Ctrl K" on Windows and Linux, ⌘ K on a Mac.keysrequiredKeyName[]—The keys in order, each a `KeyName`.
classNamestring—Extra class names for the group.
<DataTable />7 propsDense (28px) or comfortable (32px) table.columnsrequiredColumn<T>[]—The columns in order; each has a header and a `render` for its cell.
rowsrequiredT[]—The data, one table row each.
rowKeyrequired(r: T) => string—A unique, stable key for a row.
selectedKeystring—The `rowKey` of the row to mark selected.
onOpen(r: T) => void—Makes rows focusable and clickable; fires with the row on click or Enter.
comfortableboolean—Use the 32px row height instead of the dense 28px.
captionstring—An accessible table name, hidden from view.
<Tabs />4 propsTabs with their panels rendered for you (Radix tabs); use `TabList` instead when the page renders the panel itself.tabsrequiredTabDef[]—The tabs in order; each carries its label, optional count badge and panel content.
defaultValuestring—The tab open at first when uncontrolled (default: the first tab).
valuestring—The open tab's value; pass it with `onValueChange` to control the tabs.
onValueChange(v: string) => void—Fires with the tab's `value` when a different tab is chosen.
<TabList />10 propsTabs whose panel the page renders itself (a route parameter picks it): the WAI-ARIA tabs pattern on buttons, with a roving tabindex, the arrow keys, Home and End selecting as they move.tabsrequired{ value: V; label: ReactNode; title?: string }[]—The tabs in order; `title` is the hover tooltip.
valuerequiredV—The selected tab's value.
onChangerequired(v: V) => void—Fires with the new tab's value on click, or when arrow, Home or End keys move the selection.
labelrequiredstring—The tab list's accessible name.
idBasestring—Prefix for the tabs' ids; required with `panelId`.
panelIdstring—The id of the `tabpanel` the tabs control (sets `aria-controls`).
classNamestring—Extra class names added to the list.
listClassNamestring"hq-tabs-list"Replaces the list's base class (default `hq-tabs-list`).
tabClassNamestring"hq-tabs-trigger"Replaces each tab's class (default `hq-tabs-trigger`).
testidstring—Test id of the list; each tab is `${testid}-${value}`.
<Segmented />8 propsCompact single-choice control (speed, direction).valuerequiredT—The selected option's value.
optionsrequired{ value: T; label: string; mono?: boolean; title?: string }[]—The choices in order; `mono` sets a value-like label in the mono face and `title` is that option's tooltip.
onChangerequired(v: T) => void—Fires with the option's value when a button is pressed.
labelrequiredstring—The group's accessible name.
disabledboolean—Disables every button.
classNamestring—Extra class names for the group.
testIdstring—Sets `data-testid` on the group; each button gets `${testId}-${value}`.
titlestring—Tooltip on every button (why the group is disabled, say): a title on the group alone shows nothing over a disabled button. An option's own `title` takes precedence.
<PanelStack />6 propsRight-hand object panel stack.panelsrequiredPanelEntry[]—The stack, oldest first; the last entry is shown and the earlier ones are the breadcrumb.
onPoprequired(toIndex: number) => void—Fires with the index to return to: a crumb's own index, or the second-to-last when Back or Esc pops one.
onClose() => void—Fires when the only panel is closed (its X button or Esc).
onExpand(p: PanelEntry) => void—Shows an "Open full view" button; fires with the current panel when pressed.
escapeEnabledbooleantrueWhether Esc pops the stack (default true).
popOutPopOut—Open the stack in its own window, or bring it back.
<PanelSection />3 propsA titled block inside a panel's body.childrenrequiredReactNode—The section's content.
titlestring—A small heading above the content.
asideReactNode—Content aligned to the right end of the heading (only shown with a `title`).
<DecisionBar />1 propsThe action row for a decision in a panel, usually an `ApproveButton` and a `RejectButton`.childrenrequiredReactNode—The buttons.
<PopControls />3 propsThe pop-out controls every surface's head carries, in one order: "Keep on top" (only while the surface is in its own window; pressed for the window on top, and pressing it on another window swaps them), then pop out / bring back.poprequiredPopOut—The surface's pop-out state and actions.
namerequiredstring—What pops, in a few words ("the queue"); used in the buttons' accessible names.
testIdrequiredstring—`data-testid` of the pop-out button (the pin button's is `${testId}-pin`); also added to it as a class.
<Splitter />18 propsThe draggable, keyboard-operable handle between two panes (see `SplitterProps`).labelrequiredstring—What it sizes, in the product's words: "Queue width", "Panel width", "Activity bar height".
orientationrequired"vertical" | "horizontal"—The separator's own direction: `vertical` stands between two panes side by side (it resizes widths); `horizontal` lies between rows.
edgerequired"left" | "right" | "top" | "bottom"—Which edge of its (positioned) parent it lies on.
valuerequirednumber—The pane's current size in px.
minrequirednumber—Smallest size in px.
maxrequirednumber—Largest size in px.
defaultValuerequirednumber—The size Enter or a double click returns to.
growrequired1 | -1—+1 when moving right (or down) makes the pane bigger, -1 when moving left (or up) does: a pane left of its handle is +1.
onChangerequired(v: number) => void—Fires with the new size once a drag ends or a key moves it.
snapsreadonly number[][]Sizes in px it snaps to (when dragging, within 8px of one); with `discrete`, the only sizes allowed.
discretebooleanfalseOnly the snap points are sizes (the activity bar's three heights).
stepnumber16Px moved per arrow key press (default 16).
onLive(v: number) => void—Fires with the size on every frame of a drag, and with the starting size if the drag is cancelled.
controlsstring—The id of the pane it sizes.
valueText(v: number) => string—The value in words (defaults to "312 pixels").
titlestring—The hint shown on hover (defaults to the label and how to reset).
testIdstring—Sets `data-testid` on the handle.
classNamestring—Extra class names for the handle.
<CommandPalette />5 propsThe search palette (Ctrl K, or ⌘ K on a Mac): navigate, run commands, find any object by name, number, id or tracking number.openrequiredboolean—Whether the palette is shown; it renders nothing while false.
onOpenChangerequired(o: boolean) => void—Fires with false when Esc or a click outside closes it, and after an item is chosen.
itemsrequiredPaletteItem[]—Everything it can find or run, grouped by each item's `group`; an item's `onSelect` runs when it is chosen.
placeholderstring"Search accounts, orders, shipments, or run a command"The search box's placeholder (default: a hint to search accounts, orders and shipments or run a command).
onQueryChange(q: string) => void—Called as the user types, so a host can fetch server-side results.
<StatusPatterns />0 propsRenders the hidden SVG pattern definitions (`STATUS_PATTERN_IDS`); mount it once per page.No props.
<Monogram />4 propsThe initials tile.namerequiredstring—The account's name; its initials are drawn on the tile.
rolerequiredRoleName—Sets the tile's colour (customer, supplier or carrier).
sizenumber28Tile size in px (default 28).
classNamestring—Extra class names for the tile.
<RolePill />2 propsA role as a small outline pill in its colour.rolerequiredRoleName—The role to show; sets the label and colour.
classNamestring—Extra class names for the pill.
mix(a: string, b: string, t: number): stringMix `a` toward `b` by t (0..1).
useWidth(ref: RefObject<HTMLElement | null>): numberThe width in px of the element in `ref`, kept current as it resizes (0 until measured).
cx(...a: (string | false | null | undefined)[]): stringJoins class names with spaces, skipping false, null, undefined and empty strings.
usePlatform(): PlatformThe platform for things CSS cannot switch (aria-keyshortcuts, a title). "other" on the server and in the hydration pass.
modShortcut(os: Platform, key: string): string`aria-keyshortcuts` for the platform's primary modifier and a key: "Meta+K" on a Mac, "Control+K" elsewhere.
tabId(idBase: string, value: string): stringThe id of a `TabList` tab, for its panel's `aria-labelledby`.
durOf(el: Element, token: string, fallback: number): numberA duration token in ms, read where the element lives (reduced motion collapses every one of them).
ghostOf<T extends HTMLElement>(el: T): TA copy that reads as the element and is nothing to anyone but the eye: no ids or test ids, no names, hidden, inert, not hit-testable.
leave(el: HTMLElement, how: LeaveHow): voidPlay `how` on a ghost of `el`, which React is about to remove. Call it from a ref callback's cleanup: the element is still in place and laid out then. Nothing is inserted until the commit is over, and only if the element really went (a ref that detaches and re-attaches, as React's development double-mount does, leaves no ghost).
leavePanel(el: HTMLElement, replacedBy?: string | undefined): voidThe panel stack's exit: the copy slides back toward the right edge it came from, over the map that already took the room. `replacedBy` (a selector): when an element matching it takes the panel's place in the same parent (a keyed drawer that swapped rows), there is no ghost, because a replacement just settles.
useLeaveRef<T extends HTMLElement>(how: LeaveHow, ref?: RefObject<T | null> | undefined): (el: T | null) => (() => void) | undefinedA stable ref callback that plays `how` when the element goes and also keeps `ref` (when given) pointing at it: for an element that needs a ref of its own (focus on open, arrow keys) as well as its exit.
useMoving(value: unknown, ref: RefObject<HTMLElement | null>, property: string): booleanTrue from the render in which `value` changes until `ref`'s `property` transition has run its course: a style that animates a layout change (the rail's width, the activity bar's height) is switched on only while someone makes that change, never for a value applied on load (the first frames are out before it counts). Off again when the transition ends, when none started (reduced motion, no change of size), or after a few seconds whatever happens.
reducedMotion(): booleanTrue when the person has asked their system for reduced motion (`prefers-reduced-motion: reduce`); false where matchMedia is missing (SSR).
leaveUp(el: HTMLElement | null): (() => void) | undefinedStable ref callbacks (React 19 runs the returned cleanup when the element goes).
leaveDown(el: HTMLElement | null): (() => void) | undefinedRef callback: the element's exit rises from its anchor below and settles back down (`leave` "down").
leaveCollapse(el: HTMLElement | null): (() => void) | undefinedRef callback: the element's exit closes its height to nothing so what follows slides up (`leave` "collapse").
initials(name: string): stringTwo letters for a name: the first letters of its first two words, leaving out "The", "&" and company suffixes ("Frontera Supply Co." is FS).
accountRoles(roles: readonly string[], capabilities?: readonly string[]): RoleName[]Account roles as stored (roles: buyer, seller; capabilities: carrier) in display order: customer, supplier, carrier.
primaryRole(roles: readonly RoleName[]): RoleNameThe role that colours the tile: customer first (what is sold to them), then carrier (every carrier is also a supplier in the data, so "supplier" would hide it), then supplier. An account with no role is a customer by default.
simulate(hex: string, cvd: Cvd): string`hex` as seen with `cvd` (a hex colour).
lab(hex: string): [number, number, number]CIELAB (D65) of a hex colour.
deltaE(a: string, b: string): numberCIEDE2000 colour difference between two hex colours.
minPairDelta(colors: Record<string, string>, cvd: Cvd): { delta: number; pair: [string, string]; }The smallest CIEDE2000 difference between any two of `colors` as seen with `cvd`, and the pair it is between.
Install this free piece now; the Pro pieces drop in on top of it, in the same app. Pro is $79 once.