Cmdk
lastmod 2025-03-18created 2025-03-181 edits
Fast, unstyled command menu React component.
Command menu component for React
Features
- Fast, composable command menu component (can also be used as a combobox)
- Automatically filters and sorts rendered items. Custom filter functions can be added
- Fully composable API - define custom components, filters, and sorting logic. Use with other components or JSX
- Good performance – smoothly handles up to 2,000–3,000 items
- Controlled input and output state: control state based on state changes and key input with value, onValueChange, onSelect, etc.
- Various styling options
- Style with CSS variables and data attributes (cmdk-)
- State and style of specific components can be customized
- Dialog support based on Radix UI's Dialog component
- Portal location and state can be controlled
Cons and limitations
- No virtualization support – performance degrades with large numbers of items
- Concurrent Mode not fully supported – some behavior may be unstable
- React Native not supported