Pixelact Command
pixelact-ui/commandFreeComponent
A simple command component.
Live preview
live · rendered by the registry
Rendered by Pixelact UI on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://pixelactui.com/r/command.jsonSource
1import { Command as CommandPrimitive } from "cmdk";23import { cn } from "@/lib/utils";45import {6 Command as ShadcnCommand,7 CommandDialog as ShadcnCommandDialog,8 CommandEmpty as ShadcnCommandEmpty,9 CommandGroup as ShadcnCommandGroup,10 CommandItem as ShadcnCommandItem,11 CommandList as ShadcnCommandList,12 CommandSeparator as ShadcnCommandSeparator,13 CommandShortcut as ShadcnCommandShortcut,14} from "@/components/ui/command";15import {16 Dialog,17 DialogContent,18 DialogDescription,19 DialogHeader,20 DialogTitle,21} from "@/components/ui/dialog";2223import "@/components/ui/pixelact-ui/styles/styles.css";2425function Command({26 className,27 ...props28}: React.ComponentProps<typeof CommandPrimitive>) {29 return (30 <ShadcnCommand31 data-slot="command"32 className={cn(33 "shadow-(--pixel-box-shadow) box-shadow-margin bg-popover text-popover-foreground flex h-full !w-full flex-col overflow-hidden rounded-none",34 className35 )}36 {...props}37 />38 );39}4041function CommandDialog({42 title = "Command Palette",43 description = "Search for a command to run...",44 children,45 ...props46}: React.ComponentProps<typeof Dialog> & {47 title?: string;48 description?: string;49}) {50 return (51 <ShadcnCommandDialog {...props}>52 <DialogHeader className="sr-only">53 <DialogTitle>{title}</DialogTitle>54 <DialogDescription>{description}</DialogDescription>55 </DialogHeader>56 <DialogContent className="overflow-hidden p-0">57 <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">58 {children}59 </Command>60 </DialogContent>61 </ShadcnCommandDialog>62 );63}6465function CommandInput({66 className,67 ...props68}: React.ComponentProps<typeof CommandPrimitive.Input>) {69 return (70 <CommandPrimitive.Input71 data-slot="command-input"72 className={cn(73 "pixel-font border-b-2 p-4 border-muted placeholder:text-muted-foreground flex h-10 w-full rounded-none bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",74 className75 )}76 {...props}77 />78 );79}8081function CommandList({82// … truncated
What it pulls in
Other registry items
Files it writes
More from Pixelact UI
All 28 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Pixelact Accordionaccordion | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alertalert | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alert Dialogalert-dialog | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Avataravatar | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Badgebadge | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Breadcrumbbreadcrumb | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Buttonbutton | Pixelact UI | Components | Free | no deps · 3 files | |
| Pixelact Calendarcalendar | Pixelact UI | Components | Free | no deps · 2 files |
