modern-cmdk
The definitive command palette engine for the modern web.
Documentation · Getting Started · API Reference · Examples
A ground-up rewrite of cmdk for React 19, written in modern ECMAScript: a framework-agnostic command-palette state machine (search, frecency ranking, keyboard shortcuts) with a thin React adapter on top. This repository is a pnpm monorepo holding the library, its docs site and its tooling.
Usage, install, peers and sizes are documented once, in the modern-cmdk package README, which is also the npm page. The cmdk migration codemods have their own package, modern-cmdk-codemod, and a migration guide.
| Package | What it is | npm status |
|---|---|---|
modern-cmdk |
Core engine, React adapter (modern-cmdk/react, modern-cmdk/react/dialog), default styles and the deprecated modern-cmdk codemod bin (until 2.0) |
Published |
modern-cmdk-codemod |
The cmdk migration codemods (npx modern-cmdk-codemod <transform> <dir or glob>), strict by default; replaces the modern-cmdk bin |
Prepared for its first publish (owner-gated) |
create-modern-cmdk |
Project scaffolding with two templates (react-basic, react-dialog); react-full is a deprecated alias of react-basic, removed in create-modern-cmdk 2.0 | Published |
modern-cmdk-search-wasm |
Rust/WASM fuzzy search (trigram index) | Experimental, private (0.9.0), unpublished |
vscode-modern-cmdk |
VS Code snippets extension | Private; not on the VS Code Marketplace (the npm 1.0.0 was an accidental publish) |
abcrimson.github.io/modern-cmdk -- Getting Started | Installation | Core API | React API | Theming | Accessibility | Benchmarks | Architecture | Migration from cmdk
git clone https://github.com/ABCrimson/modern-cmdk.git && cd modern-cmdk
pnpm install --frozen-lockfile && pnpm build && pnpm testDevelopment uses the Node version in .nvmrc (Node 28 nightly 28.0.0-nightly20261107a43bfb5bb2) and the engines floor of the root package.json, with pnpm 12.
| Command | Description |
|---|---|
pnpm build |
Build all packages |
pnpm test |
Unit tests (Vitest 5, happy-dom) |
pnpm test:e2e |
E2E tests (Playwright; Chromium, with Firefox and WebKit opt-in via E2E_ENGINES=all) |
pnpm bench |
Benchmarks (Vitest bench mode) |
pnpm lint |
Lint (Biome) |
pnpm typecheck |
Type-check (TypeScript 7.1.0-dev.20261107.1) |
pnpm size |
Build, then the size-limit budgets |
pnpm docs:dev |
Docs dev server (VitePress) |
See CONTRIBUTING.md for the full guide and ARCHITECTURE.md for the technical design.
Report vulnerabilities privately as described in SECURITY.md; do not open a public issue.
MIT -- Copyright (c) 2026 Albert Badalov