Overlays

Command palette.

A keyboard route to the next page or action.

LIVE PREVIEWTry it. It works.

Install the source

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/command.json

Registry setup · Examples · API and behavior · Open the playground

COMPLETE EXAMPLES

Use it in context.

Each example includes its imports, data and state. The preview runs that same source. Include the stylesheet once in your application.

Search real local actions

The palette invokes its own callbacks and leaves global shortcuts unregistered in this embedded example.

Loads this example when you need it.

Keyboard

  • Type to filter actions.
  • Arrow keys move; Enter activates; Escape dismisses.

States covered

  • Closed
  • Filtered list
  • Action feedback

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-basic-command.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import {useState} from 'react';
import {Button,CommandPalette,UIProvider} from '@bld8/ui';
import '@bld8/ui/styles.css';
export default function CommandExample(){const [status,setStatus]=useState('');return <UIProvider><CommandPalette title="Example quick actions" trigger={<Button>Open example command palette</Button>} items={[{id:'new',label:'Create local example',keywords:['add','new'],onSelect:()=>setStatus('Local example created.')},{id:'review',label:'Mark example reviewed',onSelect:()=>setStatus('Example marked reviewed.')} ]}/><p role="status">{status}</p></UIProvider>;}

Quick reference

React / TypeScript
<CommandPalette shortcut title="Quick actions"
  trigger={<Button>Search</Button>}
  items={[{id:"new",label:"New project",keywords:["create"],onSelect:createProject}]} />

In the workspace or ZIP starter, import components from @bld8/ui and include @bld8/ui/styles.css once. Registry installations use your local bld8/ source path. Wrap overlays in UIProvider.

API & behaviour

Base UI Combobox inside Dialog supplies arrows, active-descendant focus, Enter selection and Escape dismissal. Items accept descriptions, keywords, category, Lucide icon and disabled. open/onOpenChange and defaultOpen are supported. Register shortcut (Ctrl/Command+K) on only one palette per app. Shortcut is off by default. Your callbacks own navigation and actions.

CommandPalette

CommandPalette public properties
PropTypeDefault
itemsRequiredCommandItem[]—
defaultOpenboolean | undefinedfalse
onOpenChange((open: boolean) => void) | undefined—
openboolean | undefined—
placeholderstring | undefined'Search pages and actions…'
shortcutboolean | undefined

Register Ctrl/Command+K once per application. Disabled by default.

false
titlestring | undefined'Quick actions'
triggerReactElement<unknown, string | JSXElementConstructor<any>> | undefined—

CommandItem

CommandItem public properties
PropTypeDefault
idRequiredstring—
labelRequiredstring—
onSelectRequired() => void—
categorystring | undefined—
descriptionstring | undefined—
disabledboolean | undefined—
iconLucideIcon | undefined—
keywordsstring[] | undefined—

Tables come from the public TypeScript declarations. Related types and function parameters are shown alongside their component. A dash means no default is declared at the public function boundary.

Related controls

Notes to self

Test this component with real content, keyboard input and both themes. The example is a starting point; labels, error handling and behaviour still need to fit the application.