Skip to catalog content
Mado UI Open-code components

Source-owned · zero runtime dependencies

block · command-palette

Command palette

A modal command finder composed from native dialog and editable combobox contracts.

Install with npx @madojs/ui@latest add command-palette.

Command palette

Project commands

Open one native modal search surface without replacing dialog, form or text-input behavior.

Run a command

Search the commands available in this catalog preview.

2 commands available.

Escape closes suggestions first, then the dialog.

No command has been run.

Composition

  • Compose a labelled native dialog from header, close form, search form, editable combobox, status and footer regions.
  • Open it with showModal(); command data, matching, execution and the global shortcut stay in application code.

Public API

element dialog
Browser-owned modal lifecycle and Escape close request.
class mado-ui-command-palette-*
Root, header, title, close, content, search, status, footer, hint, shortcut and submit hooks.
export madoUiCombobox()
Optional progressive enhancement for the palette's editable suggestions.

Detected public classes

  • .mado-ui-command-palette
  • .mado-ui-command-palette-close
  • .mado-ui-command-palette-content
  • .mado-ui-command-palette-footer
  • .mado-ui-command-palette-header
  • .mado-ui-command-palette-hint
  • .mado-ui-command-palette-label
  • .mado-ui-command-palette-search
  • .mado-ui-command-palette-shortcut
  • .mado-ui-command-palette-status
  • .mado-ui-command-palette-submit
  • .mado-ui-command-palette-title

Detected public CSS properties

  • --mado-ui-color-action
  • --mado-ui-color-action-contrast
  • --mado-ui-color-action-hover
  • --mado-ui-color-border
  • --mado-ui-color-surface
  • --mado-ui-color-surface-soft
  • --mado-ui-color-text
  • --mado-ui-color-text-muted
  • --mado-ui-combobox-listbox-inline-size
  • --mado-ui-combobox-listbox-max-block-size
  • --mado-ui-command-palette-backdrop
  • --mado-ui-command-palette-background
  • --mado-ui-command-palette-border
  • --mado-ui-command-palette-close-background
  • --mado-ui-command-palette-close-color
  • --mado-ui-command-palette-close-hover-background
  • --mado-ui-command-palette-close-hover-color
  • --mado-ui-command-palette-color
  • --mado-ui-command-palette-compact-padding
  • --mado-ui-command-palette-content-gap
  • --mado-ui-command-palette-content-padding
  • --mado-ui-command-palette-control-border
  • --mado-ui-command-palette-control-height
  • --mado-ui-command-palette-control-padding
  • --mado-ui-command-palette-control-radius
  • --mado-ui-command-palette-disabled-opacity
  • --mado-ui-command-palette-focus
  • --mado-ui-command-palette-focus-ring
  • --mado-ui-command-palette-footer-gap
  • --mado-ui-command-palette-footer-padding-block-start
  • --mado-ui-command-palette-header-gap
  • --mado-ui-command-palette-header-padding
  • --mado-ui-command-palette-hint-color
  • --mado-ui-command-palette-inline-size
  • --mado-ui-command-palette-label-color
  • --mado-ui-command-palette-max-block-size
  • --mado-ui-command-palette-radius
  • --mado-ui-command-palette-results-inline-size
  • --mado-ui-command-palette-results-max-block-size
  • --mado-ui-command-palette-search-gap
  • --mado-ui-command-palette-shadow
  • --mado-ui-command-palette-shortcut-background
  • --mado-ui-command-palette-shortcut-border
  • --mado-ui-command-palette-shortcut-color
  • --mado-ui-command-palette-shortcut-shadow
  • --mado-ui-command-palette-status-color
  • --mado-ui-command-palette-submit-background
  • --mado-ui-command-palette-submit-color
  • --mado-ui-command-palette-submit-hover-background
  • --mado-ui-command-palette-submit-hover-color
  • --mado-ui-command-palette-title-size
  • --mado-ui-focus-ring
  • --mado-ui-radius-md
  • --mado-ui-radius-sm
  • --mado-ui-shadow-panel
  • --mado-ui-space-1
  • --mado-ui-space-2
  • --mado-ui-space-3
  • --mado-ui-space-4

Accessibility contract

  • The dialog needs a visible accessible heading, and the combobox needs its own visible label.
  • Update one stable status node when result counts change; announce command outcomes only when the surrounding application needs it.

Keyboard

  • Tab and Escape follow the native modal dialog contract; the nested combobox owns suggestion arrows and Enter.
  • A global opening shortcut must ignore editable controls and IME composition, and must never replace an essential visible control.

Focus

  • Move initial focus to the query input when opening and return focus to the invoker when closing.

Fallback

  • Without combobox enhancement, the dialog, labelled input, datalist, close button and submit form remain usable native controls.

Installation graph

Direct dependencies

Resolved install order

Copied source

The CLI resolves each registry source path into the configured project target. Links below point to the exact catalog build tag.