Components

Command

A searchable command list for quick actions, palette-style shortcuts, and lightweight pickers.

Tap to show a QR code for the Expo showcase deep link. The web preview below runs in the browser.

Loading...

Installation

Install the registry item directly, then add any package dependencies if you are setting the component up manually.

1

Install the component

Run the registry command below to add command to your project.

watermelon add command
2

Import the component

Import Command from your local UI registry output.

Import

import { Command } from "@/components/ui/command";

Import

Import

import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandShortcut,
} from "@/components/ui/command";

Usage

Use command for searchable action lists and compact palettes.

Loading...

API Reference

proptypedefaultdescription
valuestring-Unique searchable value for each command item.
onSelect(value: string) => void-Called when an item is chosen.