Skip to Content
Skip to content

Command

Neumorphic command palette on cmdk with the stock shadcn command API. A raised panel with a sunken search well.

Installation

bunx --bun shadcn@latest add https://neu.beyondtheinnovation.com/r/neu-command.json

Usage

import {
  Command,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
} from "@/components/ui/neu/command"
<Command>
  <CommandInput placeholder="Type a command or search..." />
  <CommandList>
    <CommandEmpty>No results found.</CommandEmpty>
    <CommandGroup heading="Suggestions">
      <CommandItem>Calendar</CommandItem>
      <CommandItem>Search</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

Dialog

CommandDialog opens the palette in a dialog and wraps its children in Command. title and description are read by screen readers only and default to "Command Palette" and "Search for a command to run...". Pass showCloseButton={false} to hide the close button.

<CommandDialog open={open} onOpenChange={setOpen} title="Search docs">
  <CommandInput placeholder="Type a command or search..." />
  <CommandList>
    <CommandEmpty>No results found.</CommandEmpty>
    <CommandGroup heading="Suggestions">
      <CommandItem>Calendar</CommandItem>
    </CommandGroup>
  </CommandList>
</CommandDialog>

On this page