Command

Fast, composable command menu on bits-ui Command. Fuzzy-filter as you type, arrow-key through results, Enter to commit — or wrap in a Dialog for a ⌘K palette.

Usage

Inverted

Set variant="inverted" on the root for a dark surface over a light app — Bloom's signature command identity. Surface and accent CSS vars swap at the root, so item rows, input, separators, and indicators flip contrast automatically.

With icon

Drop a Remix icon (the <Icon> primitive) as the first child of Command.Item. Spacing is set by the item's flex layout.

With shortcut

Command.Shortcut is a right-aligned hint slot — pair it with a leading icon for the canonical command-row shape.

In dialog (⌘K palette)

Wrap Command in Dialog for a centered command palette. Use p-0 on the dialog content so the command's own padding stands.

Empty

Command.Empty renders only when the active filter yields zero results. Type into the input below to see it appear.

Command.Root props

Inherits bits-ui Command.Root props via spread.

PropTypeDescription
'default' | 'inverted'Surface treatment. Inverted swaps popover/accent CSS vars at the root so all child rows, input, and indicators flip contrast.
string (bindable)The currently highlighted item value. Two-way bindable.
CommandRootApi | null (bindable)Bind to access the underlying command instance for programmatic control.
(value: string, search: string, keywords?: string[]) => numberCustom scoring function. Return >0 to include, 0 to filter out.
booleanDisable to own filtering entirely (e.g. server-driven search).

Command.Item props

PropTypeDescription
stringUnique key used by the filter. Defaults to the item label text.
'rect' | 'pill'Visual variant controlling item appearance and spacing.
(value: string) => voidFires when the item is committed via Enter or click.
booleanSkips the item in filtering and keyboard navigation.