⌘K Base is a Fast, composable, unstyled command menu for React.
This is a port of ⌘K using Base UI's Dialog internally. It was originally created by Paco Coursey.
To start using ⌘K Base, install it in your project:
npm install cmdk-base
Use the Command in your application:
import { Command } from "cmdk-base"
function CommandMenu() {
return (
<Command label="Command Menu">
<Command.Input />
<Command.List>
<Command.Empty>No results found.</Command.Empty>
<Command.Group heading="Letters">
<Command.Item>a</Command.Item>
<Command.Item>b</Command.Item>
<Command.Separator />
<Command.Item>c</Command.Item>
</Command.Group>
<Command.Item>Apple</Command.Item>
</Command.List>
</Command>
)
}
You can use original ⌘K documentation for more information.