Command
A command palette component for keyboard-driven interactions.
Anatomy
Usage
With Dialog
With Icons
With Shortcuts
With Loading State
Command.Root Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
className | string | — |
asChild | boolean | — |
label | string | — |
shouldFilter | boolean | — |
filter | CommandFilter | — |
value | string | — |
onValueChange | function | — |
loop | boolean | — |
disablePointerSelection | boolean | — |
vimBindings | boolean | — |
Command.Dialog Props
| Prop | Type | Default |
|---|---|---|
trigger | ReactNode | — |
title | ReactNode | — |
description | ReactNode | — |
footer | ReactNode | — |
panelProps | any | — |
blur | boolean | — |
children | ReactNode | — |
open | boolean | — |
defaultOpen | boolean | — |
onOpenChange | function | — |
modal | boolean | — |
commandProps | see more | "{}" |
Command.Empty Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
className | string | — |
asChild | boolean | — |
Command.Group Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
className | string | — |
asChild | boolean | — |
heading | ReactNode | — |
value | string | — |
forceMount | boolean | — |
Command.Input Props
| Prop | Type | Default |
|---|---|---|
className | string | — |
children | ReactNode | — |
asChild | boolean | — |
value | string | — |
onValueChange | function | — |
Command.Item Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
className | string | — |
asChild | boolean | — |
disabled | boolean | — |
onSelect | function | — |
value | string | — |
keywords | string[] | — |
forceMount | boolean | — |
Command.List Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | — |
className | string | — |
asChild | boolean | — |
label | string | — |
Command.Separator Props
| Prop | Type | Default |
|---|---|---|
className | string | — |
children | ReactNode | — |
asChild | boolean | — |
alwaysRender | boolean | — |
Command.Shortcut Props
| Prop | Type | Default |
|---|---|---|
className | string | — |
children | ReactNode | — |