Menu
View as Markdown

Components

Command

Live compiled demo for the Command component contract.

emptyidleOpen dashboard
data-stateopen, closed, active, inactive, highlighted, disabled
keyboardArrow keys move command options; Enter selects; Escape closes the dialog
change reasonstrigger-click, input, item-click, enter-key, escape-key, close-click, cancel-event, native-beforetoggle, programmatic

Usage

A searchable command palette that filters actions and runs the selected one.

  • Import the versioned component from @kovojs/ui/command.
  • Copy the source into your app with kovo add command when product code should own the implementation.

Source

  • Package source: packages/ui/src/command.tsx
  • Gallery fixture: examples/gallery/src/demo-fixtures.tsx
  • Interactive demo: examples/gallery/src/interactive/command-demo.tsx

Behavior contract

The rendered fixture above includes the component contract table. Interactive pages compile the authored TSX demo and then lift the same contract table from the static fixture, so the visible behavior and documented ARIA/data-state surface stay together.