Home / Function/ DropdownMenuWithAvatar() — ui Function Reference

DropdownMenuWithAvatar() — ui Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  27ac328a_2095_231f_8473_4fe12854cf13["DropdownMenuWithAvatar()"]
  27bfb7fb_c5ea_fc51_35b4_305b0a010c9a["dropdown-menu-example.tsx"]
  27ac328a_2095_231f_8473_4fe12854cf13 -->|defined in| 27bfb7fb_c5ea_fc51_35b4_305b0a010c9a
  style 27ac328a_2095_231f_8473_4fe12854cf13 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/examples/dropdown-menu-example.tsx lines 535–635

function DropdownMenuWithAvatar() {
  const menuContent = (
    <>
      <DropdownMenuGroup>
        <DropdownMenuItem>
          <IconPlaceholder
            lucide="BadgeCheckIcon"
            tabler="IconRosetteDiscountCheck"
            hugeicons="CheckmarkBadgeIcon"
            phosphor="CheckCircleIcon"
            remixicon="RiCheckboxCircleLine"
          />
          Account
        </DropdownMenuItem>
        <DropdownMenuItem>
          <IconPlaceholder
            lucide="CreditCardIcon"
            tabler="IconCreditCard"
            hugeicons="CreditCardIcon"
            phosphor="CreditCardIcon"
            remixicon="RiBankCardLine"
          />
          Billing
        </DropdownMenuItem>
        <DropdownMenuItem>
          <IconPlaceholder
            lucide="BellIcon"
            tabler="IconBell"
            hugeicons="NotificationIcon"
            phosphor="BellIcon"
            remixicon="RiNotificationLine"
          />
          Notifications
        </DropdownMenuItem>
      </DropdownMenuGroup>
      <DropdownMenuSeparator />
      <DropdownMenuGroup>
        <DropdownMenuItem>
          <IconPlaceholder
            lucide="LogOutIcon"
            tabler="IconLogout"
            hugeicons="LogoutIcon"
            phosphor="SignOutIcon"
            remixicon="RiLogoutBoxLine"
          />
          Sign Out
        </DropdownMenuItem>
      </DropdownMenuGroup>
    </>
  )

  return (
    <Example title="With Avatar">
      <div className="flex items-center justify-between gap-4">
        <DropdownMenu>
          <DropdownMenuTrigger asChild>
            <Button
              variant="outline"
              className="h-12 justify-start px-2 md:max-w-[200px]"
            >
              <Avatar>
                <AvatarImage src="https://github.com/shadcn.png" alt="Shadcn" />
                <AvatarFallback className="rounded-lg">CN</AvatarFallback>
              </Avatar>
              <div className="grid flex-1 text-left text-sm leading-tight">
                <span className="truncate font-semibold">shadcn</span>
                <span className="text-muted-foreground truncate text-xs">
                  shadcn@example.com
                </span>
              </div>
              <IconPlaceholder
                lucide="ChevronsUpDownIcon"
                tabler="IconSelector"
                hugeicons="UnfoldMoreIcon"
                phosphor="CaretUpDownIcon"
                remixicon="RiArrowUpDownLine"
                className="text-muted-foreground ml-auto"
              />
            </Button>
          </DropdownMenuTrigger>
          <DropdownMenuContent className="w-(--radix-dropdown-menu-trigger-width) min-w-56">

Subdomains

Frequently Asked Questions

What does DropdownMenuWithAvatar() do?
DropdownMenuWithAvatar() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/examples/dropdown-menu-example.tsx.
Where is DropdownMenuWithAvatar() defined?
DropdownMenuWithAvatar() is defined in apps/v4/registry/bases/radix/examples/dropdown-menu-example.tsx at line 535.

Analyze Your Own Codebase

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

Try Supermodel Free