Layout

AppCommandPalette

The Ctrl/⌘ K palette that searches every page the user can open and a few global actions.

components/layout/AppCommandPalette.vue
View in the demo
Press Ctrl/⌘ K in the demo to open it. These docs use their own search, which works the same way.

Pages come from useNavigation(); add global actions to its actions list. The Keyboard shortcuts guide shows how.

Create actions

With an empty query the palette also offers a Create group: "Compose email", "New event", "New product"… Each one opens its page with ?new, and the page opens its create form. An action shows only when its route exists and, when it is gated, when the user has the permission.

Add one in two steps. First, an entry in createCandidates in components/layout/AppCommandPalette.vue, with its title under commandPalette.create in locales/<code>/common.json:

ts
...(can('reports.create')
  ? [
      {
        key: 'create:report',
        group: 'create',
        title: t('commandPalette.create.report'),
        icon: 'file-plus',
        to: `/reports?${CREATE_INTENT_QUERY}`,
      },
    ]
  : []),

Then let the page open its form when it arrives with ?new, through useCreateIntent():

ts
const formPanel = ref<InstanceType<typeof ReportFormPanel>>()

useCreateIntent(() => formPanel.value?.create())
In the starter
The starter has no demo pages, so its createCandidates list is empty and the palette shows no Create group until you add your first module.

API

This component has no props, slots or events of its own.

© 2026 melsami UI.
Developer documentation for melsami UI.