Skip to content

cmdk vs Radix Primitives

Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.

cmdk

Open source · MIT

Unstyled React command menu component with built-in filtering and keyboard navigation.

Radix Primitives

Open source · MIT

Unstyled, accessible React UI components for building your own design system.

The short answer

Choose cmdk if you need…

  • React developers adding a command palette or search-and-jump menu to a web app
  • Teams that want full control over the look of the menu rather than a pre-styled widget
  • Apps that need items composed from custom components or static JSX
  • Projects that already use Radix UI, since the dialog builds on it

Choose Radix Primitives if you need…

  • Developers building a custom design system who want accessible base components
  • Teams adding accessible interactive widgets to an existing web app incrementally
  • React developers who want to control styling themselves

Side-by-side

cmdkRadix Primitives
TypeLibraryLibrary
PriceFree and open sourceFree and open source
LicenceMITMIT
GitHub stars13.1k19.5k
Setup difficultyBeginnerIntermediate
How you get itInstall with a package managerClone and build from source
Main languageTypeScriptTypeScript
Last code update12 months ago22 days ago

What each one is

cmdk

cmdk is a React component for building a command menu, the kind of searchable popup that opens with Cmd+K or Ctrl+K. You render a list of items and it filters and sorts them as the user types. It can also be used as an accessible combobox, and it ships without default styling so you can design it yourself.

Radix Primitives

Radix Primitives is a collection of low-level user interface components, such as building blocks for menus, dialogs and similar controls. The README describes a focus on accessibility, customization and developer experience. Teams can use them as the base layer of a design system or adopt them one at a time.

Best for

cmdk

  • React developers adding a command palette or search-and-jump menu to a web app
  • Teams that want full control over the look of the menu rather than a pre-styled widget
  • Apps that need items composed from custom components or static JSX
  • Projects that already use Radix UI, since the dialog builds on it

Radix Primitives

  • Developers building a custom design system who want accessible base components
  • Teams adding accessible interactive widgets to an existing web app incrementally
  • React developers who want to control styling themselves

Strengths

cmdk

  • Filters and sorts items automatically, so developers do not have to write that logic
  • Fully composable API, so items can be wrapped in other components
  • Styling hooks through data-attributes starting with cmdk- make custom design straightforward

Radix Primitives

  • Stated focus on accessibility, customization and developer experience
  • Can be adopted incrementally rather than all at once
  • Open source under the MIT License with a large community following (about 19,400 stars)

Not ideal for

cmdk

  • Non-developers looking for a ready-made app; this is a component you must write code to use
  • Projects not using React, since the library is built specifically for React
  • Teams wanting a visually finished menu out of the box, because the component is intentionally unstyled

Radix Primitives

  • People who want ready-made, styled components out of the box, since the README describes these as low-level primitives
  • Non-developers looking for a finished website or app builder
  • Projects that do not use React, since the topics and description point to React

Trade-offs

cmdk

  • Requires you to supply all visual styling, which adds design work
  • Advanced features such as useCommandState are described as not for common use
  • Documentation in the README is limited to the component API and examples; setup beyond that is not covered here

Radix Primitives

  • Low-level by design, so you must add your own styling and layout work
  • The README is short and points to external docs for component details
  • No formal release is listed, so you need to check the changelog for versioning

Getting started

cmdk

Install the package

pnpm install cmdk
Step-by-step guide: how to use cmdk

Radix Primitives

Install pnpm

npm install -g pnpm

Install dependencies

pnpm install
Step-by-step guide: how to use Radix Primitives

Frequently asked questions

What is the difference between cmdk and Radix Primitives?

cmdk: Unstyled React command menu component with built-in filtering and keyboard navigation. Radix Primitives: Unstyled, accessible React UI components for building your own design system. cmdk suits react developers adding a command palette or search-and-jump menu to a web app, while Radix Primitives suits developers building a custom design system who want accessible base components.

Are cmdk and Radix Primitives free?

cmdk: Free and open source. Radix Primitives: Free and open source.

Which is easier to set up, cmdk or Radix Primitives?

cmdk is easier to get started with (rated beginner); Radix Primitives is rated intermediate and usually needs more setup.

Is cmdk or Radix Primitives more popular?

Radix Primitives has more GitHub stars (19.5k) than cmdk (13.1k). Popularity isn't the same as fit — check which one matches your use case above.

What are other alternatives to cmdk and Radix Primitives?

Other options people compare them with include downshift, shadcn/ui, Headless UI, Base UI, Evergreen.

Keep comparing

Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.