Home / File/ combobox-dropdown-menu.tsx — ui Source File

combobox-dropdown-menu.tsx — ui Source File

Architecture documentation for combobox-dropdown-menu.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  b44239f4_04d5_a85b_9210_ad049187b8c5["combobox-dropdown-menu.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  b44239f4_04d5_a85b_9210_ad049187b8c5 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  b44239f4_04d5_a85b_9210_ad049187b8c5 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"]
  b44239f4_04d5_a85b_9210_ad049187b8c5 --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939
  64c05bed_da32_06a4_3b53_12b3830eb50b["command"]
  b44239f4_04d5_a85b_9210_ad049187b8c5 --> 64c05bed_da32_06a4_3b53_12b3830eb50b
  194a9418_8170_2169_6f94_b2f555b74f26["dropdown-menu"]
  b44239f4_04d5_a85b_9210_ad049187b8c5 --> 194a9418_8170_2169_6f94_b2f555b74f26
  style b44239f4_04d5_a85b_9210_ad049187b8c5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { MoreHorizontal } from "lucide-react"

import { Button } from "@/registry/new-york/ui/button"
import {
  Command,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
} from "@/registry/new-york/ui/command"
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuItem,
  DropdownMenuLabel,
  DropdownMenuSeparator,
  DropdownMenuShortcut,
  DropdownMenuSub,
  DropdownMenuSubContent,
  DropdownMenuSubTrigger,
  DropdownMenuTrigger,
} from "@/registry/new-york/ui/dropdown-menu"

const labels = [
  "feature",
  "bug",
  "enhancement",
  "documentation",
  "design",
  "question",
  "maintenance",
]

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

Dependencies

  • button
  • command
  • dropdown-menu
  • lucide-react
  • react

Frequently Asked Questions

What does combobox-dropdown-menu.tsx do?
combobox-dropdown-menu.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in combobox-dropdown-menu.tsx?
combobox-dropdown-menu.tsx defines 1 function(s): ComboboxDropdownMenu.
What does combobox-dropdown-menu.tsx depend on?
combobox-dropdown-menu.tsx imports 5 module(s): button, command, dropdown-menu, lucide-react, react.
Where is combobox-dropdown-menu.tsx in the architecture?
combobox-dropdown-menu.tsx is located at deprecated/www/registry/new-york/examples/combobox-dropdown-menu.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/examples).

Analyze Your Own Codebase

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

Try Supermodel Free