Skip to content
Components
@app-studio/components

Command

A versatile component for searching, filtering, and executing commands or actions.

View component source

Import

ts
import { Command } from '@app-studio/components';

New to the library? Complete installation and provider setup first.

Interactive examples

Try the component, then open Code to copy the complete example.

INTERACTIVE EXAMPLE

Loading preview…

Props

Required props are marked below. A dash indicates an unspecified default. Design system configuration can override implementation defaults.

Scroll horizontally to see every column.

Command
PropTypeDefaultDescription
open Requiredboolean—See the type and source declaration for this property.Source
onOpenChange Required(open: boolean) => void—See the type and source declaration for this property.Source
groupsCommandGroup[]—See the type and source declaration for this property.Source
commandsCommandItem[]—See the type and source declaration for this property.Source
placeholderstring—Hint displayed while the field is empty.Source
sizeCommandSize
"sm""md""lg"
—Size preset for the component.Source
variantCommandVariant
"outline""default""filled"
—Visual treatment of the component.Source
filter((value: string, item: CommandItem) => boolean)—See the type and source declaration for this property.Source
emptyState
View typestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null
—See the type and source declaration for this property.Source
footer
View typestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null
—See the type and source declaration for this property.Source
viewsCommandStyles—Style overrides for the named internal parts.Source

Command.Input

Scroll horizontally to see every column.

Command.Input
PropTypeDefaultDescription
value Requiredstring—Current controlled value. Update it from the matching change callback.Source
onValueChange Required(value: string) => void—Called when the selected value changes.Source
placeholderstring—Hint displayed while the field is empty.Source
views{ container?: ViewProps; input?: ViewProps; }—Style overrides for the named internal parts.Source

Command.List

Scroll horizontally to see every column.

Command.List
PropTypeDefaultDescription
children Required
View typestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null
—Content rendered inside the component.Source
views{ container?: ViewProps; }—Style overrides for the named internal parts.Source

Command.Group

Scroll horizontally to see every column.

Command.Group
PropTypeDefaultDescription
heading Requiredstring—See the type and source declaration for this property.Source
children Required
View typestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null
—Content rendered inside the component.Source
views{ container?: ViewProps; heading?: ViewProps; }—Style overrides for the named internal parts.Source

Command.Item

Scroll horizontally to see every column.

Command.Item
PropTypeDefaultDescription
item RequiredCommandItem—See the type and source declaration for this property.Source
selectedboolean—See the type and source declaration for this property.Source
onSelect(() => void)—See the type and source declaration for this property.Source
views{ container?: ViewProps; icon?: ViewProps; content?: ViewProps; name?: ViewProps; description?: ViewProps; shortcut?: ViewProps; }—Style overrides for the named internal parts.Source

Command.Empty

Scroll horizontally to see every column.

Command.Empty
PropTypeDefaultDescription
children
View typestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null
—Content rendered inside the component.Source
views{ container?: ViewProps; }—Style overrides for the named internal parts.Source

For shared layout, color, and responsive properties, read Styling & composition and Responsive layouts. Additional native element attributes depend on the target platform.

Usage guidance

  • Give controls a visible label or an accessible name, and verify keyboard interaction. See Accessibility.
  • For controlled inputs, update the value from the callback shown in the props table. Keep application state in your component or form library.
  • These previews run in the browser. Check React Native setup for platform requirements and differences.
Browse documentation source