/
githubmirror
/
ui
Обзор
Документация
Войти
/
githubmirror
/
ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
apps/v4/examples/aria/command-groups.tsx
79 строк
2 KB
shadcn
feat: aria (#11208)
17 июл 2026, 18:20
Не верифицирован
17 июл 2026, 18:20
2b89d67
Код
Авторство
О чём код?
"use client" import * as React from "react" import { CalculatorIcon, CalendarIcon, CreditCardIcon, SettingsIcon, SmileIcon, UserIcon, } from "lucide-react" import { Button } from "@/styles/aria-nova/ui/button" import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "@/styles/aria-nova/ui/command" export function CommandWithGroups() { const [open, setOpen] = React.useState(false) return ( <div className="flex flex-col gap-4"> <Button onClick={() => setOpen(true)} variant="outline" className="w-fit"> Open Menu </Button> <CommandDialog open={open} onOpenChange={setOpen}> <Command> <CommandInput placeholder="Type a command or search..." /> <CommandList renderEmptyState={() => ( <CommandEmpty>No results found.</CommandEmpty> )} > <CommandGroup heading="Suggestions"> <CommandItem textValue="Calendar"> <CalendarIcon /> <span>Calendar</span> </CommandItem> <CommandItem textValue="Search Emoji"> <SmileIcon /> <span>Search Emoji</span> </CommandItem> <CommandItem textValue="Calculator"> <CalculatorIcon /> <span>Calculator</span> </CommandItem> </CommandGroup> <CommandSeparator /> <CommandGroup heading="Settings"> <CommandItem textValue="Profile"> <UserIcon /> <span>Profile</span> <CommandShortcut>⌘P</CommandShortcut> </CommandItem> <CommandItem textValue="Billing"> <CreditCardIcon /> <span>Billing</span> <CommandShortcut>⌘B</CommandShortcut> </CommandItem> <CommandItem textValue="Settings"> <SettingsIcon /> <span>Settings</span> <CommandShortcut>⌘S</CommandShortcut> </CommandItem> </CommandGroup> </CommandList> </Command> </CommandDialog> </div> ) }