Command
glasswave/commandFreeComponent
Command palette and searchable lists (cmdk).
Live preview
live · rendered by the registry
Rendered by glasswave on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glasswave.denizisik.com/r/command.jsonSource
1"use client";23import { Command as CommandPrimitive } from "cmdk";4import { Search } from "lucide-react";5import { forwardRef } from "react";6import { cn } from "@/lib/utils";78export const Command = forwardRef<9 HTMLDivElement,10 React.ComponentPropsWithoutRef<typeof CommandPrimitive>11>(({ className, ...props }, ref) => (12 <CommandPrimitive13 ref={ref}14 className={cn(15 "flex h-full w-full flex-col overflow-hidden rounded-[32px] bg-transparent text-current",16 className,17 )}18 {...props}19 />20));21Command.displayName = "Command";2223export const CommandInput = forwardRef<24 HTMLInputElement,25 React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>26>(({ className, ...props }, ref) => (27 <div28 className="flex items-center border-b border-black/[0.08] dark:border-white/10 px-3"29 cmdk-input-wrapper=""30 >31 <Search className="mr-2 size-4 shrink-0 text-current/50" aria-hidden />32 <CommandPrimitive.Input33 ref={ref}34 className={cn(35 "flex h-11 w-full rounded-none bg-transparent py-3 text-sm outline-none placeholder:text-current/45 disabled:cursor-not-allowed disabled:opacity-50",36 className,37 )}38 {...props}39 />40 </div>41));42CommandInput.displayName = CommandPrimitive.Input.displayName;4344export const CommandList = forwardRef<45 HTMLDivElement,46 React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>47>(({ className, ...props }, ref) => (48 <CommandPrimitive.List49 ref={ref}50 className={cn(51 "max-h-[min(320px,50vh)] overflow-y-auto overflow-x-hidden p-1",52 className,53 )}54 {...props}55 />56));57CommandList.displayName = CommandPrimitive.List.displayName;5859export const CommandEmpty = forwardRef<60 HTMLDivElement,61 React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>62>((props, ref) => (63 <CommandPrimitive.Empty64 ref={ref}65 className="py-6 text-center text-sm text-current/55"66 {...props}67 />68));69CommandEmpty.displayName = CommandPrimitive.Empty.displayName;7071export const CommandGroup = forwardRef<72 HTMLDivElement,73 React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>74>(({ className, ...props }, ref) => (75 <CommandPrimitive.Group76 ref={ref}77 className={cn(78 "overflow-hidden p-1 text-current [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-current/55",79 className,80 )}81 {...props}82 />83));84// … truncated
What it pulls in
npm packages
Files it writes
More from glasswave
All 60 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | glasswave | Components | Free | 2 deps | |
| Alertalert | glasswave | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | glasswave | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | glasswave | Components | Free | 1 dep | |
| Avataravatar | glasswave | Components | Free | 1 dep | |
| Badgebadge | glasswave | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | glasswave | Components | Free | 2 deps | |
| Buttonbutton | glasswave | Components | Free | 2 deps |
