Settings command
Search settings from a command bar.
- Theme
- Match my device
- Language
- English
- Weekly digest
- On
When to use
- A large settings area people cannot scan.
When not to use
- A short settings page.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/settings-command
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
SettingsCommand
6 props
PropTypeDefault
open *boolean—
onOpenChange *(open: boolean) => void—
settings *readonly SettingCommand[]—
onToggle *(id: string, value: boolean) => void—
onChoose *(id: string, value: string) => void—
onNavigate *(id: string) => void—
Keyboard
- ↓
- Moves to the next item or value.
- ↑
- Moves to the previous item or value.
- Enter
- Activates the focused control.
- Escape
- Closes or cancels, then returns focus to where it came from.
Accessibility
It exposes combobox, listbox, option, presentation and status semantics, with aria-hidden, aria-expanded, aria-controls, aria-activedescendant, aria-label and aria-selected kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/settings-command.mdThe index of every part is at /llms.txt.