command
agentmesh/commandFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/command.jsonSource
1"use client"23import * as React from "react"4import { Command as CommandPrimitive } from "cmdk"56import { cn } from "@/registry/base-vega/lib/utils"7import {8 Dialog,9 DialogContent,10 DialogDescription,11 DialogHeader,12 DialogTitle,13} from "@/registry/base-vega/ui/dialog"14import {15 InputGroup,16 InputGroupAddon,17} from "@/registry/base-vega/ui/input-group"18import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"1920function Command({21 className,22 ...props23}: React.ComponentProps<typeof CommandPrimitive>) {24 return (25 <CommandPrimitive26 data-slot="command"27 className={cn(28 "flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",29 className30 )}31 {...props}32 />33 )34}3536function CommandDialog({37 title = "Command Palette",38 description = "Search for a command to run...",39 children,40 className,41 showCloseButton = false,42 ...props43}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {44 title?: string45 description?: string46 className?: string47 showCloseButton?: boolean48 children: React.ReactNode49}) {50 return (51 <Dialog {...props}>52 <DialogHeader className="sr-only">53 <DialogTitle>{title}</DialogTitle>54 <DialogDescription>{description}</DialogDescription>55 </DialogHeader>56 <DialogContent57 className={cn(58 "top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",59 className60 )}61 showCloseButton={showCloseButton}62 >63 {children}64 </DialogContent>65 </Dialog>66 )67}6869function CommandInput({70 className,71 ...props72}: React.ComponentProps<typeof CommandPrimitive.Input>) {73 return (74 <div data-slot="command-input-wrapper" className="p-1 pb-0">75 <InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!">76 <CommandPrimitive.Input77 data-slot="command-input"78 className={cn(79 "w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",80 className81 )}82 {...props}83 />84 <InputGroupAddon>85 <IconPlaceholder86 lucide="SearchIcon"87 tabler="IconSearch"88 hugeicons="SearchIcon"89 phosphor="MagnifyingGlassIcon"90 remixicon="RiSearchLine"91 className="size-4 shrink-0 opacity-50"92 />93 </InputGroupAddon>94 </InputGroup>95 </div>96// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
