CommandPalette
Searches static, remote and registered shortcut commands with retained refresh results and app-owned recents.@gemologic/sheen · overlaysPlayground
This example has no scalar controls. Its validated source remains interactive below.
<ShortcutProvider development><CommandPalette sources={sources} /></ShortcutProvider>Variant matrix
Application commands
Anatomy
- Package
@gemologic/sheen- Source
packages/ui/src/primitives/CommandPalette.tsx- Tokens
--sheen-color-bg-raised--sheen-color-border--sheen-color-bg-selected--sheen-elevation-overlay
Accessibility
Role: dialog containing a combobox and listboxKeyboard: mod+k, ArrowUp, ArrowDown, Enter, EscapeDo
- Provide stable command IDs and server-known initial remote results.
Do not
- Do not read recents on mount or blank accepted results during remote search.
Generated props
| Name | Type | Default | Description |
|---|---|---|---|
sources * | readonly CommandPaletteSource[] | — | Static and abortable remote command sources with stable IDs. |
open | boolean | — | Controlled open state. |
defaultOpen | boolean | false | Initial uncontrolled open state. |
onOpenChange | (open: boolean) => void | — | Receives open-state requests. |
recents | CommandPaletteRecents | — | Server-known recent IDs plus app-owned persistence. |
shortcutScope | string | global | Scope where mod+k opens the mounted palette. |
onSourceError | (sourceId: string, error: unknown) => void | — | Reports a failed remote source without clearing accepted results. |
onCommandError | (commandId: string, error: unknown) => void | — | Reports a selected command failure. |
class | string | — | Additional class on the command root. |