CommandPalette
⌘K: every page and action, grouped; nested pages; async groups with a quiet progress line.
function Basic() {
const [open, setOpen] = useState(false);
return (
<>
<Button leadingIcon={icons.search} onClick={() => setOpen(true)} size="lg">
Search
</Button>
<CommandPalette open={open} onOpenChange={setOpen} groups={groups} hotkey={false} />
</>
);
}import { CommandPalette } from "@logicplanes/kaeso-ui";Props
defaultQuerystringStart with this query (documentation).
emptyTextReactNodeDefaults to "No results" in the provider's language.
groupsCommandGroup[]The commands, in groups with a heading each.
hotkeybooleanOpen with ⌘K / Ctrl+K anywhere (default true).
inlinebooleanRender without a portal, for documentation and state matrices.
keyHintsbooleanA footer with the keys (↑ ↓ to navigate, ↵ to open, esc to close). Off by default: key hints only where asked for.
onOpenChange((open: boolean) => void)Called when it opens or closes.
onQueryChange((query: string) => void)Called as the query changes, for async groups.
openbooleanWhether it is open, when you control it.
placeholderstringDefaults to "Search or run a command" in the provider's language.