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
  9eac2ef1_6eee_114a_f4d8_f902be1f8816["item-dropdown.tsx"]
  ec3aa9ae_e596_5628_1560_c37c71899cb4["avatar"]
  9eac2ef1_6eee_114a_f4d8_f902be1f8816 --> ec3aa9ae_e596_5628_1560_c37c71899cb4
  4b1d2128_46d9_46f0_b915_b6e1925b7876["button"]
  9eac2ef1_6eee_114a_f4d8_f902be1f8816 --> 4b1d2128_46d9_46f0_b915_b6e1925b7876
  c4660ec2_c67c_8de8_aea3_ab3bf7989b6f["dropdown-menu"]
  9eac2ef1_6eee_114a_f4d8_f902be1f8816 --> c4660ec2_c67c_8de8_aea3_ab3bf7989b6f
  c68c8707_2b57_a84c_88d0_54d7bfae76d0["item"]
  9eac2ef1_6eee_114a_f4d8_f902be1f8816 --> c68c8707_2b57_a84c_88d0_54d7bfae76d0
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  9eac2ef1_6eee_114a_f4d8_f902be1f8816 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style 9eac2ef1_6eee_114a_f4d8_f902be1f8816 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { Avatar, AvatarFallback, AvatarImage } from "@/examples/radix/ui/avatar"
import { Button } from "@/examples/radix/ui/button"
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "@/examples/radix/ui/dropdown-menu"
import {
  Item,
  ItemContent,
  ItemDescription,
  ItemMedia,
  ItemTitle,
} from "@/examples/radix/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 asChild>
        <Button variant="outline">
          Select <ChevronDownIcon />
        </Button>
      </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/radix/item-dropdown.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/radix).

Analyze Your Own Codebase

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

Try Supermodel Free