v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

CommandPalette

Search and run a small command collection.

Interactive preview

Quick actions

Save projectWorkspace command
Duplicate projectWorkspace command
Archive projectWorkspace command

Usage

import { CommandPalette } from "@devvy-ui/react";

<CommandPalette title="Quick actions" open={open} onOpenChange={setOpen} items={commands} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
itemsCommandItem[]requiredUnique ids, labels, optional descriptions/disabled and callbacks.
Dialog propsDialogPropsrequiredTitle, visibility, focus and dismissal.
placeholderstringSearch commands…Search hint.

Accessibility & behavior

Platform Behavior & Guidelines

Uses native Dialog and a search combobox. Arrow keys select enabled results, Enter runs, Escape dismisses. The app owns any global keyboard shortcut.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add command-palette

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

CommandPalette.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.