Overlays · Command

Command

⌘K command palette. Soma owns fuzzy scoring (computeFuzzyScore), keyboard nav (arrow + vim bindings + typeahead + loop + grid columns + RTL), item visibility and the imperative CommandApi. Eidos paints the palette chrome, exposes size (sm/md/lg), adds Item.Icon / Item.Shortcut sub-parts, and provides a <Command.Dialog> composition wired to the eidos Dialog with an optional mod+k shortcut binding.

parts{compiled.parts.order.length} events{events.length} sizes3 apg combobox ↗ {#if lastInvoked} last{lastInvoked} {/if}
No commands match. Files 📄 New file ⌘N 📁 Open file… ⌘O 💾 Save file ⌘S Edit ↶ Undo ⌘Z ↷ Redo ⇧⌘Z 🔍 Find in file ⌘F Help 📚 Open documentation ↗ ℹ︎ About (disabled)
trace {#if trace.length === 0} type or arrow-nav to highlight, Enter to invoke {:else} {#each trace.slice(0, 3) as entry} {entry.event} · {entry.family}{entry.intent ? ' · ' + entry.intent : ''} {fmtTime(entry.at)} {/each} {/if} value {value || '—'}
No matches. Quick actions + New project ⌘N 🔍 Global search ⌘P ⚙︎ Open settings ⌘,
{#if tab === 'live'}

Controls

Soma owns scoring + keyboard nav. Eidos adds size on the root and the Item.Icon / Item.Shortcut layout sub-parts.

soma Provider props
eidos visual size
eidos Dialog mode · built on top of <Dialog> with optional shortcut binding
soma headless · inline palette svelte
{somaSnippet}
eidos visual · size + Item sub-parts svelte
{eidosSnippet}
eidos modal · Command.Dialog with mod+k binding svelte
{dialogSnippet}
{/if} {#if tab === 'api'}

API reference

13 soma parts plus 3 eidos additions: Command.Dialog (wraps eidos Dialog), Command.Item.Icon and Command.Item.Shortcut (Item layout sub-parts).

Provider (Command)
PropTypeDefaultDescription
value bindablestring''Currently highlighted item value.
search bindablestring''Current search string.
shouldFilterbooleantrueWhether to run the scoring filter over items.
filterCommandFilterFncomputeFuzzyScoreCustom scoring function. Return 0 to exclude.
loopbooleanfalseLoop keyboard navigation at the edges.
vimBindingsbooleantrueCtrl+N/J = next, Ctrl+P/K = previous.
columnsnumber1Grid columns — arrows move ±1 (Right/Left) or ±columns (Down/Up).
disablePointerSelectionbooleanfalseHovering items doesn't change the highlight.
dir'ltr' | 'rtl'from soma configGrid arrow inversion in RTL.
size eidosResponsiveProp<'sm' | 'md' | 'lg'>'md'Visual size — input height + item height + font.
shortcut eidosstring | string[]—Optional keyboard shortcut (e.g. 'mod+k') that toggles open. Requires bindable open.
Item
PropTypeDefaultDescription
valuestringrequiredUnique value used by the scorer.
keywordsreadonly string[][]Text aliases the scorer also matches.
disabledbooleanfalseDisable activation. Still focusable.
forceMountbooleanfalseRender even when filtered out.
onSelect() => void—Fired on Enter or click.
Item.Icon / Item.Shortcut eidos

Sub-parts of Item. Both accept children; the recipe handles layout — Icon is a leading flex slot, Shortcut is pushed to row's end via margin-inline-start: auto. Pair with <Kbd> for richer shortcut styling.

Command.Dialog eidos
PropTypeDefaultDescription
open bindablebooleanfalseDialog open state.
shortcutstring | string[] | null'mod+k'Keyboard binding(s) to toggle. null disables.
size'sm' | 'md' | 'lg''md'Inner Command palette size.
dialogSizeDialogSize'md'Eidos Dialog panel size (sm | md | lg | xl | full).
modal · label · value · search · shouldFilter · filter · loop · …pass-through—Forwarded to Dialog + Command.
{/if} {#if tab === 'morfo'}

morfo · declarative contract

Source: src/uix/morfo/components/command.ts.

FieldValue
name"{commandMorfo.name}"
kebab"{commandMorfo.kebab}"
scope[{commandMorfo.scope.map((s) => `"${s}"`).join(', ')}]
parts.length{commandMorfo.parts.length}
events.length{events.length}
Parts
{#each partsList as part (part.kebab)} {/each}
PartMarkerElementRoleArchetypeStatesOptional
{part.kebab} [{part.marker}] <{part.defaultElement}> {part.role ?? '—'} {part.archetype ?? '—'} {part.states.length ? part.states.join(' | ') : '—'} {part.optional ? 'yes' : 'no'}
Events declaration
{#each events as action (action.name)} {@const sem = action.semantic} {@const intentDecl = 'intent' in sem ? sem.intent : undefined} {@const intentStr = typeof intentDecl === 'string' ? intentDecl : intentDecl ? `fromProp:${(intentDecl as { fromProp?: string }).fromProp ?? '?'}` : '—'} {/each}
namefamilyverbsequenceintenttarget
{action.name} {sem.family} {sem.verb ?? '—'} {sem.sequence ?? 'pre'} {intentStr} {action.target}
{/if} {#if tab === 'sema'}

sema · events + perceptual signature

One event: commit-invoke fires when the user activates a highlighted Item (Enter or click). Verb submit, intent fulfill.

{#each events as action (action.name)} {@const intentDecl = 'intent' in action.semantic ? action.semantic.intent : undefined} {@const effectiveIntent = typeof intentDecl === 'string' ? intentDecl : undefined} {/each}
NameFamilyVerbSequenceIntentPlay
{action.name} {action.semantic.family} {action.semantic.verb ?? '—'} {action.semantic.sequence ?? 'pre'} {effectiveIntent ?? '—'}
{/if} {#if tab === 'recipe'}

Eidos recipe

Selectors at src/uix/eidos/components/command/command.css. Inside <Command.Dialog> the dialog panel chrome comes from dialog.css and the inner palette uses these selectors.

SelectorSourceWhat it paints
[data-command]eidosPalette container — flex column, border, surface bg.
[data-command][data-size]eidosSize variant — input + item heights, font-size.
[data-command-input]morfoSearch input row + divider.
[data-command-list], [data-command-viewport]morfoScrolling list.
[data-command-item], [data-command-link-item]morfoRow — flex, padding, gap.
[data-command-item][data-selected]morfoHighlighted row tint.
[data-command-item-icon], [data-command-item-shortcut]eidosItem sub-part layout slots — icon fixed, shortcut auto-end.
[data-command-group-heading]morfoMuted uppercase group label.
[data-command-separator]morfo1px divider between groups.
{/if} {#if tab === 'a11y'}

Accessibility

Follows the APG combobox pattern with a listbox popup. Input has role="combobox"; List is role="listbox"; each Item is role="option".

Keyboard
KeyAction
ArrowDown / ArrowUpMove highlight ±1 (or ±columns if columns > 1).
ArrowRight / ArrowLeftIn grid mode, move ±1 column (RTL inverts).
Ctrl+N / Ctrl+JNext (vim binding, if vimBindings=true).
Ctrl+P / Ctrl+KPrevious (vim binding).
Home / EndFirst / last visible item.
EnterActivate highlighted item — fires onSelect + commit-invoke.
EscapeClear search (or close dialog if inside Command.Dialog).
mod+kToggle dialog open/close (if shortcut is configured).
ARIA contract
PartAttributeValue
inputrole"combobox"
inputaria-expanded"true" (always while palette is mounted)
inputaria-controls{``}
inputaria-activedescendant{``}
listrole"listbox"
itemrole"option"
itemaria-selected"true" (when highlighted)
itemaria-disabled"true" (when disabled)
{/if}