8-bit Command
8bitcn/commandFreeComponent
A simple 8-bit command component
Install it
npx shadcn@latest add https://www.8bitcn.com/r/command.jsonSource
1"use client";23import { Command as CommandPrimitive } from "cmdk";45import { cn } from "@/lib/utils";67import { Separator } from "@/components/ui/8bit/separator";8import {9 Command as ShadcnCommand,10 CommandEmpty as ShadcnCommandEmpty,11 CommandGroup as ShadcnCommandGroup,12 CommandItem as ShadcnCommandItem,13 CommandList as ShadcnCommandList,14 CommandSeparator as ShadcnCommandSeparator,15 CommandShortcut as ShadcnCommandShortcut,16} from "@/components/ui/command";17import {18 Dialog,19 DialogContent,20 DialogDescription,21 DialogHeader,22 DialogTitle,23} from "@/components/ui/dialog";2425import "@/components/ui/8bit/styles/retro.css";2627function Command({28 className,29 ...props30}: React.ComponentProps<typeof CommandPrimitive>) {31 return (32 <div className={cn("relative !p-0", className)}>33 <ShadcnCommand34 data-slot="command"35 className={cn(36 "bg-popover text-popover-foreground flex h-full !w-full flex-col overflow-hidden rounded-md",37 "retro",38 className39 )}40 {...props}41 />4243 <div className="absolute -top-1.5 w-1/2 left-1.5 h-1.5 bg-foreground dark:bg-ring" />44 <div className="absolute -top-1.5 w-1/2 right-1.5 h-1.5 bg-foreground dark:bg-ring" />45 <div className="absolute -bottom-1.5 w-1/2 left-1.5 h-1.5 bg-foreground dark:bg-ring" />46 <div className="absolute -bottom-1.5 w-1/2 right-1.5 h-1.5 bg-foreground dark:bg-ring" />47 <div className="absolute top-0 left-0 size-1.5 bg-foreground dark:bg-ring" />48 <div className="absolute top-0 right-0 size-1.5 bg-foreground dark:bg-ring" />49 <div className="absolute bottom-0 left-0 size-1.5 bg-foreground dark:bg-ring" />50 <div className="absolute bottom-0 right-0 size-1.5 bg-foreground dark:bg-ring" />51 <div className="absolute top-1.5 -left-1.5 h-1/2 w-1.5 bg-foreground dark:bg-ring" />52 <div className="absolute top-1.5 -right-1.5 h-1/2 w-1.5 bg-foreground dark:bg-ring" />53 <div className="absolute bottom-1.5 -left-1.5 h-1/2 w-1.5 bg-foreground dark:bg-ring" />54 <div className="absolute bottom-1.5 -right-1.5 h-1/2 w-1.5 bg-foreground dark:bg-ring" />55 </div>56 );57}5859function CommandDialog({60 title = "Command Palette",61 description = "Search for a command to run...",62 children,63 ...props64}: React.ComponentProps<typeof Dialog> & {65 title?: string;66 description?: string;67}) {68 return (69 <Dialog {...props}>70 <DialogContent className="overflow-hidden p-0">71// … truncated
What it pulls in
Other registry items
Files it writes
More from 8bitcn
All 121 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 8-bit Accordionaccordion | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Alertalert | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Alert Dialogalert-dialog | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Avataravatar | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Badgebadge | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Breadcrumbbreadcrumb | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Buttonbutton | 8bitcn | Components | Free | no deps · 2 files | |
| 8-bit Button Groupbutton-group | 8bitcn | Components | Free | no deps · 4 files |
