Home / File/ item-dropdown.tsx — ui Source File

item-dropdown.tsx — ui Source File

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

File tsx DocumentationAtlas SearchAPI 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  15a2ea91_6e5e_8e68_a980_93d389f43be6["item-dropdown.tsx"]
  00c9789a_2f63_b98d_c90d_4d6abf3582ce["avatar"]
  15a2ea91_6e5e_8e68_a980_93d389f43be6 --> 00c9789a_2f63_b98d_c90d_4d6abf3582ce
  4544fa74_9b37_0912_c55e_f4ff161b8e83["button"]
  15a2ea91_6e5e_8e68_a980_93d389f43be6 --> 4544fa74_9b37_0912_c55e_f4ff161b8e83
  c4ec47ed_7434_868c_4320_f03b26dfd4e8["dropdown-menu"]
  15a2ea91_6e5e_8e68_a980_93d389f43be6 --> c4ec47ed_7434_868c_4320_f03b26dfd4e8
  6dd5189d_43e3_a38a_acbe_4ea1ae186ae2["item"]
  15a2ea91_6e5e_8e68_a980_93d389f43be6 --> 6dd5189d_43e3_a38a_acbe_4ea1ae186ae2
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  15a2ea91_6e5e_8e68_a980_93d389f43be6 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style 15a2ea91_6e5e_8e68_a980_93d389f43be6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { Avatar, AvatarFallback, AvatarImage } from "@/examples/base/ui/avatar"
import { Button } from "@/examples/base/ui/button"
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "@/examples/base/ui/dropdown-menu"
import {
  Item,
  ItemContent,
  ItemDescription,
  ItemMedia,
  ItemTitle,
} from "@/examples/base/ui/item"
import { ChevronDownIcon } from "lucide-react"

const people = [
  {
    username: "shadcn",
    avatar: "https://github.com/shadcn.png",
    email: "shadcn@vercel.com",
  },
  {
    username: "maxleiter",
    avatar: "https://github.com/maxleiter.png",
    email: "maxleiter@vercel.com",
  },
  {
    username: "evilrabbit",
    avatar: "https://github.com/evilrabbit.png",
    email: "evilrabbit@vercel.com",
  },
]

export function ItemDropdown() {
  return (
    <DropdownMenu>
      <DropdownMenuTrigger render={<Button variant="outline" />}>
        Select <ChevronDownIcon />
      </DropdownMenuTrigger>
      <DropdownMenuContent className="w-48" align="end">
        <DropdownMenuGroup>
          {people.map((person) => (
            <DropdownMenuItem key={person.username}>
              <Item size="xs" className="w-full p-2">
                <ItemMedia>
                  <Avatar className="size-[--spacing(6.5)]">
                    <AvatarImage src={person.avatar} className="grayscale" />
                    <AvatarFallback>{person.username.charAt(0)}</AvatarFallback>
                  </Avatar>
                </ItemMedia>
                <ItemContent className="gap-0">
                  <ItemTitle>{person.username}</ItemTitle>
                  <ItemDescription className="leading-none">
                    {person.email}
                  </ItemDescription>
                </ItemContent>
              </Item>
            </DropdownMenuItem>
          ))}
        </DropdownMenuGroup>
      </DropdownMenuContent>
    </DropdownMenu>
  )
}

Subdomains

Functions

Dependencies

  • avatar
  • button
  • dropdown-menu
  • item
  • lucide-react

Frequently Asked Questions

What does item-dropdown.tsx do?
item-dropdown.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in item-dropdown.tsx?
item-dropdown.tsx defines 1 function(s): ItemDropdown.
What does item-dropdown.tsx depend on?
item-dropdown.tsx imports 5 module(s): avatar, button, dropdown-menu, item, lucide-react.
Where is item-dropdown.tsx in the architecture?
item-dropdown.tsx is located at apps/v4/examples/base/item-dropdown.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/base).

Analyze Your Own Codebase

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

Try Supermodel Free