Command
⌘K palette
A search-and-run palette for apps with many commands — ⌘K to open, type, Enter. It helps people who know what they want; it doesn't replace visible navigation.
Use it for actions and navigation, not for picking values (that's Combobox). Items carry a group, optional keywords and a shortcut label.
Basic
or press ⌘K
Inline
New project⌘N
Open recent…⌘O
Save all⌥⌘S
Toggle theme
Zoom in⌘+
Go to character…
Go to news
- ⌘K / Ctrl+K opens it (
hotkey), except inside rich-text editors, where that key already inserts a link. - The input is a combobox over the result list: ↑ / ↓ move, Enter runs, Home / End jump. Groups (
group) are labelled; "No results" is announced. keywordsadd search terms;filterreplaces matching;inlinerenders it in the page instead of a modal.
Usage
ts
import { BlessCommand } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
items* | BlessCommandItem[] | — | |
placeholder | string | "Type a command…" | |
label | string | "Search commands" | accessible name of the search input |
emptyText | string | "No results." | |
hotkey | boolean | true | bind ⌘K / Ctrl+K to open |
inline | boolean | — | render inline instead of inside a modal |
filter | ((item: BlessCommandItem, query: string) => boolean) | — | |
open | boolean | false |
Events
| Name | Payload | Description |
|---|---|---|
update:open | [value: boolean] | |
select | [item: BlessCommandItem] |
Slots
| Name | Scope | Description |
|---|---|---|
item | { item: BlessCommandItem; } | |
footer | — |