For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
119

Command

Command menu for search and quick actions.

No results found.
Suggestions
Calendar
Search Emoji
Calculator
Settings
Profile⌘P
Billing⌘B
Settings⌘S
import {
  Calculator,
  Calendar,
  CreditCard,
  Settings,
  Smile,

About

The <Command /> component uses the cmdk component by Dip.

Installation

$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.com/r/command.json

Usage

import {
  Command,
  CommandDialog,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
  CommandSeparator,
  CommandShortcut,
} from "@/components/ui/command";
<Command className="max-w-sm rounded-lg border">
  <CommandInput placeholder="Type a command or search..." />
  <CommandList>
    <CommandEmpty>No results found.</CommandEmpty>
    <CommandGroup heading="Suggestions">
      <CommandItem>Calendar</CommandItem>
      <CommandItem>Search Emoji</CommandItem>
      <CommandItem>Calculator</CommandItem>
    </CommandGroup>
    <CommandSeparator />
    <CommandGroup heading="Settings">
      <CommandItem>Profile</CommandItem>
      <CommandItem>Billing</CommandItem>
      <CommandItem>Settings</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

Composition

Use the following composition to build a Command:

Command
├── CommandInput
└── CommandList
    ├── CommandEmpty
    ├── CommandGroup
    │   ├── CommandItem
    │   └── CommandItem
    ├── CommandSeparator
    └── CommandGroup
        ├── CommandItem
        └── CommandItem

Basic

A simple command menu in a dialog.

Command Palette

Search for a command to run...

"use client";

import * as React from "react";

import { Button } from "@/components/ui/button";
import {

Shortcuts

Command Palette

Search for a command to run...

"use client";

import { CreditCardIcon, SettingsIcon, UserIcon } from "lucide-react";
import * as React from "react";

import { Button } from "@/components/ui/button";

Groups

A command menu with groups, icons and separators.

Command Palette

Search for a command to run...

"use client";

import {
  CalculatorIcon,
  CalendarIcon,
  CreditCardIcon,

Scrollable

Scrollable command menu with multiple items.

Command Palette

Search for a command to run...

"use client";

import {
  BellIcon,
  CalculatorIcon,
  CalendarIcon,

RTL

To enable RTL support in shadcn/ui, see the RTL configuration guide.

لم يتم العثور على نتائج.
اقتراحات
التقويم
البحث عن الرموز التعبيرية
الآلة الحاسبة
الإعدادات
الملف الشخصي⌘P
الفوترة⌘B
الإعدادات⌘S
"use client";

import {
  Calculator,
  Calendar,
  CreditCard,

API Reference

See the cmdk documentation for more information.