Home / File/ nav-user.tsx — ui Source File

nav-user.tsx — ui Source File

Architecture documentation for nav-user.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx ComponentRegistry UIPrimitives 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  d46b846d_08d0_b532_b85e_9736437c4f2d["nav-user.tsx"]
  33aff0f4_3c33_c7f6_34d2_7728d844b2e2["avatar"]
  d46b846d_08d0_b532_b85e_9736437c4f2d --> 33aff0f4_3c33_c7f6_34d2_7728d844b2e2
  ac307fe4_34c0_4667_089c_c9e7c15ca708["dropdown-menu"]
  d46b846d_08d0_b532_b85e_9736437c4f2d --> ac307fe4_34c0_4667_089c_c9e7c15ca708
  f1a5091e_9f4f_a457_6394_4e05eb42bbf1["sidebar"]
  d46b846d_08d0_b532_b85e_9736437c4f2d --> f1a5091e_9f4f_a457_6394_4e05eb42bbf1
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  d46b846d_08d0_b532_b85e_9736437c4f2d --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style d46b846d_08d0_b532_b85e_9736437c4f2d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import {
  Avatar,
  AvatarFallback,
  AvatarImage,
} from "@/registry/bases/base/ui/avatar"
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuItem,
  DropdownMenuLabel,
  DropdownMenuSeparator,
  DropdownMenuTrigger,
} from "@/registry/bases/base/ui/dropdown-menu"
import {
  SidebarMenu,
  SidebarMenuButton,
  SidebarMenuItem,
  useSidebar,
} from "@/registry/bases/base/ui/sidebar"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

export function NavUser({
  user,
}: {
  user: {
    name: string
    email: string
    avatar: string
  }
}) {
  const { isMobile } = useSidebar()
  return (
    <SidebarMenu>
      <SidebarMenuItem>
        <DropdownMenu>
          <DropdownMenuTrigger
            render={
              <SidebarMenuButton size="lg" className="aria-expanded:bg-muted" />
            }
          >
            <Avatar>
              <AvatarImage src={user.avatar} alt={user.name} />
              <AvatarFallback>CN</AvatarFallback>
            </Avatar>
            <div className="grid flex-1 text-left text-sm leading-tight">
              <span className="truncate font-medium">{user.name}</span>
              <span className="truncate text-xs">{user.email}</span>
            </div>
            <IconPlaceholder
              lucide="ChevronsUpDownIcon"
              tabler="IconSelector"
              hugeicons="UnfoldMoreIcon"
              phosphor="CaretUpDownIcon"
              remixicon="RiArrowUpDownLine"
              className="ml-auto size-4"
            />
          </DropdownMenuTrigger>
// ... (84 more lines)

Subdomains

Functions

Dependencies

  • avatar
  • dropdown-menu
  • icon-placeholder
  • sidebar

Frequently Asked Questions

What does nav-user.tsx do?
nav-user.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in nav-user.tsx?
nav-user.tsx defines 1 function(s): NavUser.
What does nav-user.tsx depend on?
nav-user.tsx imports 4 module(s): avatar, dropdown-menu, icon-placeholder, sidebar.
Where is nav-user.tsx in the architecture?
nav-user.tsx is located at apps/v4/registry/bases/base/blocks/sidebar-07/components/nav-user.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/blocks/sidebar-07/components).

Analyze Your Own Codebase

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

Try Supermodel Free