Files
upstream-shadcn-ui/apps/v4/examples/aria/command-demo.tsx
upstream-mirror 1416db152c
All checks were successful
Release / Create Version PR or Publish Stable Release (push) Has been skipped
Release / Publish Prerelease to NPM (push) Has been skipped
Monitor Registries / Monitor registry health (push) Has been skipped
snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
2026-09-15 22:44:43 +05:00

66 lines
1.7 KiB
TypeScript

"use client"
import {
Calculator,
Calendar,
CreditCard,
Settings,
Smile,
User,
} from "lucide-react"
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
CommandShortcut,
} from "@/styles/aria-nova/ui/command"
export function CommandDemo() {
return (
<Command className="max-w-sm rounded-lg border">
<CommandInput placeholder="Type a command or search..." />
<CommandList
renderEmptyState={() => <CommandEmpty>No results found.</CommandEmpty>}
>
<CommandGroup heading="Suggestions">
<CommandItem textValue="Calendar">
<Calendar />
<span>Calendar</span>
</CommandItem>
<CommandItem textValue="Search Emoji">
<Smile />
<span>Search Emoji</span>
</CommandItem>
<CommandItem textValue="Calculator" isDisabled>
<Calculator />
<span>Calculator</span>
</CommandItem>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading="Settings">
<CommandItem textValue="Profile">
<User />
<span>Profile</span>
<CommandShortcut>⌘P</CommandShortcut>
</CommandItem>
<CommandItem textValue="Billing">
<CreditCard />
<span>Billing</span>
<CommandShortcut>⌘B</CommandShortcut>
</CommandItem>
<CommandItem textValue="Settings">
<Settings />
<span>Settings</span>
<CommandShortcut>⌘S</CommandShortcut>
</CommandItem>
</CommandGroup>
</CommandList>
</Command>
)
}