Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Command Palette

Preview

Press ⌘ J (or Ctrl J) to open.

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/command-palette

Import the shared styles once in your application.

TSUsage
import CommandPalette from '@/components/beui/blocks/SearchPalette.vue'
import '@/components/beui/styles.css'

API Reference

items
SearchItem[]
Default—
shortcut?
string

Opens with Cmd/Ctrl + this key. Default: "k"

Defaultk
placeholder?
string
Default—
emptyMessage?
string
Default—
v-model:open?
boolean
Defaultundefined
labels?
Partial<typeof commandPaletteMessages>

Override any built-in string. `results` names items without a `group`.

Default—
defaultOpen?
boolean
Defaultfalse
morph?
boolean

Renders the morphing-search trigger copy; set by `MorphingSearch`.

Default—
iconOnly?
boolean
Default—
noTrigger?
boolean

Hide the built-in trigger button when the palette is opened from elsewhere.

Default—
@open-change?
(value: boolean) => void
Default—
@query-change?
(value: string) => void
Default—
@select?
(item: SearchItem) => void
Default—
#trigger?
slot
Default—
#item?
{ item: SearchItem }
Default—
#icon?
{ item: SearchItem }
Default—
#badge?
{ item: SearchItem }
Default—

Updated