Command
rivelle/commandFreeComponent
A fast, composable command menu and search surface.
Live preview
live · rendered by the registry
Rendered by rivelle on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://rivelle.dev/r/command.jsonSource
1"use client"23import * as React from "react"4import { Command as CommandPrimitive } from "cmdk"5import { Search } from "lucide-react"67import { cn } from "@/lib/utils"89function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) { return <CommandPrimitive data-slot="command" className={cn("flex size-full flex-col overflow-hidden rounded-2xl border border-foreground/10 bg-popover/96 text-popover-foreground shadow-[0_24px_70px_-30px_color-mix(in_oklch,var(--foreground)_30%,transparent),inset_0_1px_0_color-mix(in_oklch,var(--background)_65%,transparent)] backdrop-blur-xl", className)} {...props} /> }10function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) { return <div className="flex h-12 items-center gap-2.5 border-b border-foreground/8 px-4"><Search className="size-4 shrink-0 text-primary" /><CommandPrimitive.Input className={cn("flex h-11 w-full bg-transparent py-3 text-sm font-medium outline-none placeholder:font-normal placeholder:text-muted-foreground/70 disabled:opacity-45", className)} {...props} /></div> }11function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) { return <CommandPrimitive.List className={cn("max-h-72 overflow-y-auto overflow-x-hidden p-1.5", className)} {...props} /> }12function CommandEmpty(props: React.ComponentProps<typeof CommandPrimitive.Empty>) { return <CommandPrimitive.Empty className="py-8 text-center text-sm text-muted-foreground" {...props} /> }13function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) { return <CommandPrimitive.Group className={cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-[0.66rem] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:tracking-[0.08em] [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase", className)} {...props} /> }14function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) { return <CommandPrimitive.Separator className={cn("-mx-1 h-px bg-border", className)} {...props} /> }15// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from rivelle
All 83 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | rivelle | Components | Free | 2 deps | |
| Alertalert | rivelle | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | rivelle | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | rivelle | Components | Free | 1 dep | |
| Avataravatar | rivelle | Components | Free | 1 dep | |
| Badgebadge | rivelle | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | rivelle | Components | Free | 2 deps | |
| Buttonbutton | rivelle | Components | Free | 2 deps |
