BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/command

command

yyc3-knowledge-base/command
UnverifiedComponent

shadcn/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/YYC-Cube/YYC3-Knowledge-Base/main/YYC3-D/ui/apps/v4/command.json

Source

registry/new-york-v4/ui/command.tsxraw.githubusercontent.com/YYC-Cube/YYC3-Knowledge-Base/main/YYC3-D/ui/apps/v4/command.json
1"use client"
2
3import * as React from "react"
4import { type DialogProps } from "@radix-ui/react-dialog"
5import { Command as CommandPrimitive } from "cmdk"
6import { Search } from "lucide-react"
7
8import { cn } from "@/lib/utils"
9import { Dialog, DialogContent } from "@/registry/new-york/ui/dialog"
10
11const Command = React.forwardRef<
12 React.ElementRef<typeof CommandPrimitive>,
13 React.ComponentPropsWithoutRef<typeof CommandPrimitive>
14>(({ className, ...props }, ref) => (
15 <CommandPrimitive
16 ref={ref}
17 className={cn(
18 "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
19 className
20 )}
21 {...props}
22 />
23))
24Command.displayName = CommandPrimitive.displayName
25
26const CommandDialog = ({ children, ...props }: DialogProps) => {
27 return (
28 <Dialog {...props}>
29 <DialogContent className="overflow-hidden p-0">
30 <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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">
31 {children}
32 </Command>
33 </DialogContent>
34 </Dialog>
35 )
36}
37
38const CommandInput = React.forwardRef<
39 React.ElementRef<typeof CommandPrimitive.Input>,
40 React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
41>(({ className, ...props }, ref) => (
42 <div className="flex items-center border-b px-3" cmdk-input-wrapper="">
43 <Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
44 <CommandPrimitive.Input
45 ref={ref}
46 className={cn(
47 "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
48 className
49 )}
50 {...props}
51 />
52 </div>
53))
54
55CommandInput.displayName = CommandPrimitive.Input.displayName
56
57const CommandList = React.forwardRef<
58 React.ElementRef<typeof CommandPrimitive.List>,
59 React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
60>(({ className, ...props }, ref) => (
61 <CommandPrimitive.List
62 ref={ref}
63 className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
64 {...props}
65 />
66))
67
68CommandList.displayName = CommandPrimitive.List.displayName
69
70const CommandEmpty = React.forwardRef<
71// … truncated

What it pulls in

npm packages

  • cmdk

Other registry items

  • dialog

Files it writes

  • registry/new-york-v4/ui/command.tsx

Facts

Registry
shadcn/ui
Type
registry:ui
Access
Unverified
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
2 days ago

Go to the source

ui.shadcn.com YYC-Cube/YYC3-Knowledge-Base on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 411 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcn/uiComponentsUnverified1 dep
alertalertshadcn/uiComponentsUnverifiedno deps
alert-dialogalert-dialogshadcn/uiComponentsUnverified1 dep
aspect-ratioaspect-ratioshadcn/uiComponentsUnverified1 dep
avataravatarshadcn/uiComponentsUnverified1 dep
badgebadgeshadcn/uiComponentsUnverified1 dep
breadcrumbbreadcrumbshadcn/uiComponentsUnverified1 dep
buttonbuttonshadcn/uiComponentsUnverified1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex