Home / Function/ ComboboxDropdownMenu() — ui Function Reference

ComboboxDropdownMenu() — ui Function Reference

Architecture documentation for the ComboboxDropdownMenu() function in combobox-dropdown-menu.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  738f0598_abaf_902b_6b94_8c4fd9538bb1["ComboboxDropdownMenu()"]
  b44239f4_04d5_a85b_9210_ad049187b8c5["combobox-dropdown-menu.tsx"]
  738f0598_abaf_902b_6b94_8c4fd9538bb1 -->|defined in| b44239f4_04d5_a85b_9210_ad049187b8c5
  style 738f0598_abaf_902b_6b94_8c4fd9538bb1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/examples/combobox-dropdown-menu.tsx lines 39–102

export default function ComboboxDropdownMenu() {
  const [label, setLabel] = React.useState("feature")
  const [open, setOpen] = React.useState(false)

  return (
    <div className="flex w-full flex-col items-start justify-between rounded-md border px-4 py-3 sm:flex-row sm:items-center">
      <p className="text-sm font-medium leading-none">
        <span className="mr-2 rounded-lg bg-primary px-2 py-1 text-xs text-primary-foreground">
          {label}
        </span>
        <span className="text-muted-foreground">Create a new project</span>
      </p>
      <DropdownMenu open={open} onOpenChange={setOpen}>
        <DropdownMenuTrigger asChild>
          <Button variant="ghost" size="sm">
            <MoreHorizontal />
          </Button>
        </DropdownMenuTrigger>
        <DropdownMenuContent align="end" className="w-[200px]">
          <DropdownMenuLabel>Actions</DropdownMenuLabel>
          <DropdownMenuGroup>
            <DropdownMenuItem>Assign to...</DropdownMenuItem>
            <DropdownMenuItem>Set due date...</DropdownMenuItem>
            <DropdownMenuSeparator />
            <DropdownMenuSub>
              <DropdownMenuSubTrigger>Apply label</DropdownMenuSubTrigger>
              <DropdownMenuSubContent className="p-0">
                <Command>
                  <CommandInput
                    placeholder="Filter label..."
                    autoFocus={true}
                    className="h-9"
                  />
                  <CommandList>
                    <CommandEmpty>No label found.</CommandEmpty>
                    <CommandGroup>
                      {labels.map((label) => (
                        <CommandItem
                          key={label}
                          value={label}
                          onSelect={(value) => {
                            setLabel(value)
                            setOpen(false)
                          }}
                        >
                          {label}
                        </CommandItem>
                      ))}
                    </CommandGroup>
                  </CommandList>
                </Command>
              </DropdownMenuSubContent>
            </DropdownMenuSub>
            <DropdownMenuSeparator />
            <DropdownMenuItem className="text-red-600">
              Delete
              <DropdownMenuShortcut>⌘⌫</DropdownMenuShortcut>
            </DropdownMenuItem>
          </DropdownMenuGroup>
        </DropdownMenuContent>
      </DropdownMenu>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does ComboboxDropdownMenu() do?
ComboboxDropdownMenu() is a function in the ui codebase, defined in deprecated/www/registry/new-york/examples/combobox-dropdown-menu.tsx.
Where is ComboboxDropdownMenu() defined?
ComboboxDropdownMenu() is defined in deprecated/www/registry/new-york/examples/combobox-dropdown-menu.tsx at line 39.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free