diff --git a/docs/app/components/content/examples/command-palette/CommandPaletteActionsSlotExample.vue b/docs/app/components/content/examples/command-palette/CommandPaletteActionsSlotExample.vue new file mode 100644 index 0000000000..773e8b1647 --- /dev/null +++ b/docs/app/components/content/examples/command-palette/CommandPaletteActionsSlotExample.vue @@ -0,0 +1,113 @@ + + + diff --git a/docs/content/docs/2.components/command-palette.md b/docs/content/docs/2.components/command-palette.md index 9d021fb437..f61487ad98 100644 --- a/docs/content/docs/2.components/command-palette.md +++ b/docs/content/docs/2.components/command-palette.md @@ -1007,6 +1007,20 @@ props: You can also use the `#item`, `#item-leading`, `#item-label` and `#item-trailing` slots to customize all items. :: +### With actions slot + +Use the `#actions` slot to add custom components in the input's trailing area, such as a [DropdownMenu](/docs/components/dropdown-menu) for filtering or status selection. + +::component-example +--- +collapse: true +name: 'command-palette-actions-slot-example' +class: '!p-0' +props: + autofocus: false +--- +:: + ## API ### Props diff --git a/playgrounds/nuxt/app/pages/components/command-palette.vue b/playgrounds/nuxt/app/pages/components/command-palette.vue index abf3b2916d..f8ddf33e2b 100644 --- a/playgrounds/nuxt/app/pages/components/command-palette.vue +++ b/playgrounds/nuxt/app/pages/components/command-palette.vue @@ -185,6 +185,7 @@ defineShortcuts({ + + -