jixoai-ui
the terminal design language
loading the style sheet…
Skip to content
docs · print medium: screen

registry:ui · ARIA

command — the composed ⌘K surface

A modal task on a native dialog: showModal gives the focus trap, Escape and the top layer. The family is composed cmdk-style — every CommandItem SELF-MATCHES against the context predicate (match may only answer inclusion; authored tree order is the byte-stable walk order), emptied groups and the no-matches state are pure CSS :has, and the combobox holds focus with aria-activedescendant. IME-safe, deterministic default match (equals > startsWith > token > includes > keywords as a boolean disjunction), per-item onselect — one execution path.

dialog + showModal self-matching items aria-activedescendant CSS :has group/empty IME-safe

command

Press ⌘K (or the button). Type 'open', walk with arrows, Enter to run — the open state and last action surface below. The disabled audit item renders but never walks, never activates.

or ⌘ + K anywhere
command-usage.svelte svelte
<script lang="ts">
  import Command, {
    CommandInput,
    CommandList,
    CommandEmpty,
    CommandGroup,
    CommandItem,
  } from '@ui/command/index';
  import Kbd from '@ui/kbd/kbd.svelte';
</script>

<!-- label = REQUIRED match text + accessible name; the authored tree
     order IS the walk order (the match predicate may only answer
     inclusion); hint is a snippet — the kbd glyph is authored
     content, never a string→glyph prop. -->
<Command bind:open hotkey>
  <CommandInput placeholder="run a command…" />
  <CommandList>
    <CommandEmpty>nothing matched</CommandEmpty>
    <CommandGroup heading="actions">
      <CommandItem label="Deploy site" onselect={() => deploy()}>
        Deploy site
        {#snippet hint()}<Kbd>⌘D</Kbd>{/snippet}
      </CommandItem>
      <CommandItem label="Run the audit" disabled>
        Run the audit
      </CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

<!-- ⌘K is bound by the component when hotkey; an app-owned trigger: -->
<PressButton onclick={() => (open = true)}>open</PressButton>
no matches — try 'open'
Deploy site ⌘D
Toggle theme ⌘J
Run the audit (soon)
Open the registry
Open tokens
Open GitHub

types

Command variants

Use the palette for keyboard-first actions, optional hotkeys, and batch selection.

command · types

Open
Queue
command-types-demo.svelte svelte
<script lang="ts">
  import Command, {
    CommandInput,
    CommandList,
    CommandGroup,
    CommandItem,
  } from '@ui/command/index';
</script>

<!-- single-shot: Enter runs and closes -->
<Command>
  <CommandInput placeholder="search actions" />
  <CommandList>
    <CommandGroup heading="actions">
      <CommandItem label="Open">Open</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

<!-- closeOnSelect={false}: batch selection keeps the palette open -->
<Command closeOnSelect={false}>
  <CommandInput placeholder="batch actions" />
  <CommandList>
    <CommandGroup heading="batch">
      <CommandItem label="Queue">Queue</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

usage

Usage

Compose the dialog root from its input, list, groups, empty state, and items.

Command usage
<script lang="ts">
  import Command, {
    CommandInput,
    CommandList,
    CommandEmpty,
    CommandGroup,
    CommandItem,
  } from '@ui/command/index';
  import Kbd from '@ui/kbd/kbd.svelte';
</script>

<!-- label = REQUIRED match text + accessible name; the authored tree
     order IS the walk order (the match predicate may only answer
     inclusion); hint is a snippet — the kbd glyph is authored
     content, never a string→glyph prop. -->
<Command bind:open hotkey>
  <CommandInput placeholder="run a command…" />
  <CommandList>
    <CommandEmpty>nothing matched</CommandEmpty>
    <CommandGroup heading="actions">
      <CommandItem label="Deploy site" onselect={() => deploy()}>
        Deploy site
        {#snippet hint()}<Kbd>⌘D</Kbd>{/snippet}
      </CommandItem>
      <CommandItem label="Run the audit" disabled>
        Run the audit
      </CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

<!-- ⌘K is bound by the component when hotkey; an app-owned trigger: -->
<PressButton onclick={() => (open = true)}>open</PressButton>

a11y

Accessibility

The input owns focus while the active option is announced through aria-activedescendant.

Keyboard

KeyAction
Arrow keysMove through visible, enabled options.
Home / EndJump to the first or last option.
EnterRun the active option and close by default.
EscapeClose the dialog and restore focus.

ARIA

AttributeValueDescription
rolecombobox / listbox / optionExposes the command palette interaction model.
aria-activedescendantoption idAnnounces the active option while input retains focus.
aria-expandedtrueIndicates the open listbox state.

theming

Density and tokens

The palette uses shared density tokens for its input, options, and empty state.

xs
Open
default
Open
lg
Open
TokenDefaultSource
--jx-hitdensity scaledensity
--jx-gapdensity scaledensity
--jx-insetdensity scaledensity
--jx-stackdensity scaledensity
--jx-textdensity scaledensity
--jx-text-secondarydensity scaledensity
--jx-linedensity scaledensity

axes

Universal props

The eight-axis surface (explicit-props): size · shape · radius · density · color · theme · elevation · motion — each axis takes named steps, auto (inherit the ambient context; stamps nothing), an exact number (px · coefficient · dp · hue per axis), or query() for responsive/container-conditional values. Own elevation level4 (the modal rung — the batch C dialog law: the palette is a native showModal() dialog); the shell's corner paint lives in the stylex atom (the consumed-radius swap is a payload-rebuild change, census-recorded).

Command · universal props

⌘K palette: the eight axes resolve on the top-layered dialog (self-carried), the list parts re-stamp through the same contract.

command-universal.svelte svelte
<Command density="small">…</Command>

api

API

Root props control lifecycle and matching; item props provide the searchable command contract.

Command

PropertyTypeDefaultDescription
open bindbooleanfalseBindable dialog open state.
hotkey booleanfalseOpt into ⌘K / Ctrl+K handling. On THIS docs site the key is shared: the site search palette also opens on ⌘K (window-level, both handlers fire) — the demo palette takes focus and closes on select; the site search stays until dismissed. Consumers embedding the palette elsewhere own their key without the collision.
match CommandMatch—Visibility-only matching predicate.
closeOnSelect booleantrueClose after a successful item selection.
label string'command palette'Accessible dialog and combobox label.

Universal props

PropertyTypeDefaultDescription
size'small' | 'medium' | 'large' | 'auto' | number'auto' · ambient scopethe base scale — root font-size; parts size in em
shape'round' | 'scoop' | 'bevel' | 'notch' | 'square' | 'squircle' | 'auto''auto' · ambient scopecorner geometry (CSS corner-shape; §14 degrade table)
radius'small' | 'medium' | 'large' | 'auto' | number'auto' · ambient scopecorner size; auto = the concentric broadcast (§3)
density'small' | 'medium' | 'large' | 'auto' | number'auto' · ambient scopespacing/leading scale over the kernel channels (§4)
color'primary' | 'secondary' | 'error' | 'warn' | 'success' | 'info' | 'auto' | number | string'auto' · ambient scopethe hue axis of the fixed oklch primary system (§5)
theme'light' | 'dark' | 'system' | 'auto''auto' · ambient scopelight/dark profile; system = the JS-mutable global (§6)
elevation'level-1' | 'level0' | 'level1' | 'level2' | 'level3' | 'level4' | 'level5' | 'auto' | number'auto' · ambient scopeofficial M3 levels over the surface ladder (§7)
motion'reduced' | 'subtle' | 'normal' | 'expressive' | 'auto' | number'auto' · ambient scopeintensity across the motion kernels (§8)

CommandItem

PropertyTypeDefaultDescription
label * string—Match text and accessible name.
keywords string—Additional match text.
disabled booleanfalseRenders but never walks or activates.
onselect () => void—Runs once when selected.
jixoai-ui ui.jixoai.com the jixoai design language

Theme

Brand hue

0°

Auto cycle · 24h