Install the package
Peer dependencies
cmdk requires React and ReactDOM as peer dependencies. Both React 18 and React 19 (including release candidates) are supported.
If your project already has React installed, no additional action is needed.
Radix UI dependencies
cmdk uses several Radix UI primitives internally. These are listed as regular dependencies and are installed automatically when you install cmdk.
You do not need to install these packages separately.
Client component requirement
Next.js App Router
In the Next.js App Router, all components are Server Components by default. Add the'use client' directive at the top of any file that imports from cmdk.
