Home / Function/ DropdownMenuWithAvatar() — ui Function Reference

DropdownMenuWithAvatar() — ui Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  41376905_d22b_ed24_cf47_e04bd35e7618["DropdownMenuWithAvatar()"]
  9d186968_6524_fa81_1270_1b5830881a31["dropdown-menu-demo.tsx"]
  41376905_d22b_ed24_cf47_e04bd35e7618 -->|defined in| 9d186968_6524_fa81_1270_1b5830881a31
  style 41376905_d22b_ed24_cf47_e04bd35e7618 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(internal)/sink/components/dropdown-menu-demo.tsx lines 211–317

function DropdownMenuWithAvatar() {
  return (
    <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="IconChevronsUpDown"
            hugeicons="ChevronUpDownIcon"
            phosphor="CaretUpDownIcon"
            remixicon="RiExpandUpDownLine"
            className="text-muted-foreground ml-auto"
          />
        </Button>
      </DropdownMenuTrigger>
      <DropdownMenuContent
        className="w-(--radix-dropdown-menu-trigger-width) min-w-56"
        align="start"
      >
        <DropdownMenuLabel className="p-0 font-normal">
          <div className="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
            <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>
          </div>
        </DropdownMenuLabel>
        <DropdownMenuSeparator />
        <DropdownMenuGroup>
          <DropdownMenuItem>
            <IconPlaceholder
              lucide="SparklesIcon"
              tabler="IconSparkles"
              hugeicons="SparklesIcon"
              phosphor="SparklesIcon"
              remixicon="RiSparklingLine"
            />
            Upgrade to Pro
          </DropdownMenuItem>
        </DropdownMenuGroup>
        <DropdownMenuSeparator />
        <DropdownMenuGroup>
          <DropdownMenuItem>
            <IconPlaceholder
              lucide="BadgeCheckIcon"
              tabler="IconBadgeCheck"
              hugeicons="BadgeCheckIcon"
              phosphor="CheckCircleIcon"
              remixicon="RiVerifiedBadgeLine"
            />
            Account
          </DropdownMenuItem>
          <DropdownMenuItem>
            <IconPlaceholder
              lucide="CreditCardIcon"
              tabler="IconCreditCard"
              hugeicons="CreditCardIcon"
              phosphor="CreditCardIcon"
              remixicon="RiBankCardLine"
            />
            Billing
          </DropdownMenuItem>

Subdomains

Frequently Asked Questions

What does DropdownMenuWithAvatar() do?
DropdownMenuWithAvatar() is a function in the ui codebase, defined in apps/v4/app/(internal)/sink/components/dropdown-menu-demo.tsx.
Where is DropdownMenuWithAvatar() defined?
DropdownMenuWithAvatar() is defined in apps/v4/app/(internal)/sink/components/dropdown-menu-demo.tsx at line 211.

Analyze Your Own Codebase

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

Try Supermodel Free