registry:component
Command
v1.0.0ga
Command palette primitives built on cmdk.
Registry Endpoint
Open JSONnpx shadcn@latest add @aavya/ui-command
One-time setup — add the @aavya registry to your components.json so branded dependencies resolve to Aavya (not stock shadcn):
"registries": { "@aavya": "https://registry-dev.aavya.com/r/{name}.json" }Or install by full URL: npx shadcn@latest add https://registry-dev.aavya.com/r/ui-command.json
Live Preview
Open settings
Create component
Props
| Part | Prop | Type | Default |
|---|---|---|---|
| CommandDialog | title? | string | 'Command Palette' |
| CommandDialog | description? | string | 'Search for a command to run...' |
| CommandDialog | className? | string | — |
| CommandDialog | showCloseButton? | boolean | true |
Command forwards remaining props to CommandPrimitive props.
Usage Snippet
import { Command } from '@/components/ui/command'
export default function Example() {
return (
<div className="p-6">
<Command />
</div>
)
}
Source Preview
'use client'
import * as React from 'react'
import { Command as CommandPrimitive } from 'cmdk'
import { SearchIcon } from 'lucide-react'
import { cn } from '@/lib/utils'
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'
function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
return (
<CommandPrimitive
data-slot='command'
className={cn(
'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
className
)}
{...props}
/>
)
}
function CommandDialog({
title = 'Command Palette',
description = 'Search for a command to run...',
children,
className,
showCloseButton = true,
...props
}: React.ComponentProps<typeof Dialog> & {
title?: string
description?: string
className?: string
showCloseButton?: boolean
}) {
return (
<Dialog {...props}>
<DialogHeader className='sr-only'>
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
</DialogHeader>
<DialogContent className={cn('overflow-hidden p-0', className)} showCloseButton={showCloseButton}>
<Command className='[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-