0
Components
API reference

Command

A command palette built with Dialog and Autocomplete for searching and running commands.

Installation

Usage

Examples

With Keyboard Shortcut

API Reference

Command

The root component that wraps Autocomplete with command palette defaults: inline, open={true}, autoHighlight="always", and keepHighlight={true}.

PropTypeDefaultDescription
itemsreadonly unknown[]-Items (or groups) used to filter and render the list
openbooleantrueControls whether the command is open
autoHighlightboolean | "always""always"Controls automatic highlighting of items
keepHighlightbooleantrueKeeps the highlighted item while the list updates
...propsBase UI Autocomplete Root props-All other Autocomplete props are supported

CommandDialog

Alias for Dialog.Root from Base UI.

PropTypeDescription
openbooleanControls whether the dialog is open
onOpenChange(open: boolean) => voidCallback fired when the open state changes
...propsBase UI Dialog Root propsAll standard dialog attributes are supported

CommandDialogTrigger

The trigger button that opens the command dialog.

PropTypeDescription
renderReact.ReactElementElement to render as the trigger
classNamestringAdditional CSS classes
...propsBase UI Dialog Trigger propsAll standard dialog trigger attributes are supported

CommandDialogPopup

The popup container that renders the command palette inside a dialog portal, backdrop, and viewport.

PropTypeDescription
classNamestringAdditional CSS classes
portalPropsDialog.Portal.PropsProps forwarded to the internal portal
...propsBase UI Dialog Popup propsAll standard dialog popup attributes are supported

CommandInput

The search input field with an integrated search icon.

PropTypeDefaultDescription
placeholderstring-Placeholder text for the input
variant"filled" | "outline""outline"Visual variant of the input
classNamestring-Additional CSS classes
...propsBase UI Autocomplete Input props-All standard autocomplete input attributes are supported

CommandPanel

The bordered container that wraps CommandList and CommandEmpty.

PropTypeDescription
classNamestringAdditional CSS classes
...propsReact.ComponentProps<"div">All standard div attributes are supported

CommandList

A scrollable container for command items. Wraps AutocompleteList.

PropTypeDescription
classNamestringAdditional CSS classes
...propsBase UI Autocomplete List propsAll standard autocomplete list attributes are supported

CommandEmpty

Displays a message when no results are found.

PropTypeDescription
classNamestringAdditional CSS classes
...propsBase UI Autocomplete Empty propsAll standard autocomplete empty attributes are supported

CommandGroup

Groups related command items together. Wraps AutocompleteGroup.

PropTypeDescription
itemsreadonly unknown[]The array of items in this group
classNamestringAdditional CSS classes
...propsBase UI Autocomplete Group propsAll standard autocomplete group attributes are supported

CommandGroupLabel

Displays a label for a command group.

PropTypeDescription
classNamestringAdditional CSS classes
...propsBase UI Autocomplete Group Label propsAll standard autocomplete group label attributes are supported

CommandCollection

Used within CommandGroup to render grouped items. Alias for AutocompleteCollection.

PropTypeDescription
...propsBase UI Autocomplete Collection propsAll standard autocomplete collection attributes are supported

CommandItem

An individual selectable command item. Wraps AutocompleteItem.

PropTypeDescription
valueunknownThe value of the item
classNamestringAdditional CSS classes
...propsBase UI Autocomplete Item propsAll standard autocomplete item attributes are supported

CommandSeparator

A visual divider between command groups or items.

PropTypeDescription
classNamestringAdditional CSS classes
...propsBase UI Autocomplete Separator propsAll standard autocomplete separator attributes are supported

CommandShortcut

Displays keyboard shortcuts inside a CommandItem.

PropTypeDescription
classNamestringAdditional CSS classes
...propsReact.ComponentProps<"kbd">All standard kbd attributes are supported

CommandFooter

A footer section for displaying hints or keyboard shortcuts below CommandPanel.

PropTypeDescription
classNamestringAdditional CSS classes
...propsReact.ComponentProps<"div">All standard div attributes are supported

© taut ui — built with Base UI and Tailwind CSS v4.