Command
Command palette: search anything and run actions from the keyboard.
Usage
import { Command } from '@smartui/react';
import '@smartui/react/styles.css';When to use
- Dashboards with many pages and records.
When not to use
- The only way to reach a feature.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen, onOpenChange | boolean, (open) => void | required | |
groups | { title, items: { key, label }[] }[] | required | |
onAction | (key) => void | - |
Accessibility
- Arrow keys move, Enter runs, Escape closes.