cmdk (internal fork)
raw JSON → 0.3.1 verified Sat Apr 25 auth: no javascript
An internal fork of cmdk (v0.3.1) by Carlos Galarza, acting as a temporary workaround until the official cmdk build is available. This package provides a fast, composable, accessible command menu component for React 18+. It ships TypeScript types but lacks the long-term stability and support of the official package. Peer dependencies require React 18 and React DOM 18. The API mirrors cmdk, so consumers can migrate seamlessly once the official package releases a fix.
Common errors
error Module not found: Can't resolve 'carloslfu-cmdk-internal' ↓
cause Package not installed
fix
npm install carloslfu-cmdk-internal
error Attempted import error: 'Command' is not exported from 'carloslfu-cmdk-internal' ↓
cause Using default import instead of named import
fix
import { Command } from 'carloslfu-cmdk-internal'
Warnings
gotcha This is an internal fork meant as a temporary workaround. It may not receive updates and could diverge from the official cmdk package. ↓
fix Use the official 'cmdk' package once its build is available.
gotcha Peer dependencies require React 18.0.0 and React DOM 18.0.0 exactly (^18.0.0). Using other versions may cause runtime errors. ↓
fix Install or upgrade to React 18.
Install
npm install carloslfu-cmdk-internal yarn add carloslfu-cmdk-internal pnpm add carloslfu-cmdk-internal Imports
- Command wrong
import Command from 'carloslfu-cmdk-internal'correctimport { Command } from 'carloslfu-cmdk-internal' - useCommandState
import { useCommandState } from 'carloslfu-cmdk-internal' - default wrong
import Command from 'carloslfu-cmdk-internal'correctimport { Command } from 'carloslfu-cmdk-internal'
Quickstart
import React from 'react';
import { Command } from 'carloslfu-cmdk-internal';
function App() {
return (
<Command>
<Command.Input placeholder="Search..." />
<Command.List>
<Command.Empty>No results.</Command.Empty>
<Command.Group heading="Fruits">
<Command.Item value="apple">Apple</Command.Item>
<Command.Item value="banana">Banana</Command.Item>
</Command.Group>
</Command.List>
</Command>
);
}
export default App;