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

nav-documents.tsx — ui Source File

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

File tsx ComponentRegistry ChartRegistry 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  d15e096d_05b6_75bf_ccbe_f1021e2935b3["nav-documents.tsx"]
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  d15e096d_05b6_75bf_ccbe_f1021e2935b3 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  f16f43cb_04fd_5f33_2140_7eafce119350["dropdown-menu"]
  d15e096d_05b6_75bf_ccbe_f1021e2935b3 --> f16f43cb_04fd_5f33_2140_7eafce119350
  742f06fb_c1e8_243e_1fc4_8b1cf11704c2["sidebar"]
  d15e096d_05b6_75bf_ccbe_f1021e2935b3 --> 742f06fb_c1e8_243e_1fc4_8b1cf11704c2
  style d15e096d_05b6_75bf_ccbe_f1021e2935b3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import {
  FolderIcon,
  MoreHorizontalIcon,
  ShareIcon,
  type LucideIcon,
} from "lucide-react"

import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "@/registry/default/ui/dropdown-menu"
import {
  SidebarGroup,
  SidebarGroupLabel,
  SidebarMenu,
  SidebarMenuAction,
  SidebarMenuButton,
  SidebarMenuItem,
  useSidebar,
} from "@/registry/default/ui/sidebar"

export function NavDocuments({
  items,
}: {
  items: {
    name: string
    url: string
    icon: LucideIcon
  }[]
}) {
  const { isMobile } = useSidebar()

  return (
    <SidebarGroup className="group-data-[collapsible=icon]:hidden">
      <SidebarGroupLabel>Documents</SidebarGroupLabel>
      <SidebarMenu>
        {items.map((item) => (
          <SidebarMenuItem key={item.name}>
            <SidebarMenuButton asChild>
              <a href={item.url}>
                <item.icon />
                <span>{item.name}</span>
              </a>
            </SidebarMenuButton>
            <DropdownMenu>
              <DropdownMenuTrigger asChild>
                <SidebarMenuAction
                  showOnHover
                  className="rounded-sm data-[state=open]:bg-accent"
                >
                  <MoreHorizontalIcon />
                  <span className="sr-only">More</span>
                </SidebarMenuAction>
              </DropdownMenuTrigger>
              <DropdownMenuContent
                className="w-24 rounded-lg"
                side={isMobile ? "bottom" : "right"}
                align={isMobile ? "end" : "start"}
              >
                <DropdownMenuItem>
                  <FolderIcon />
                  <span>Open</span>
                </DropdownMenuItem>
                <DropdownMenuItem>
                  <ShareIcon />
                  <span>Share</span>
                </DropdownMenuItem>
              </DropdownMenuContent>
            </DropdownMenu>
          </SidebarMenuItem>
        ))}
        <SidebarMenuItem>
          <SidebarMenuButton className="text-sidebar-foreground/70">
            <MoreHorizontalIcon className="text-sidebar-foreground/70" />
            <span>More</span>
          </SidebarMenuButton>
        </SidebarMenuItem>
      </SidebarMenu>
    </SidebarGroup>
  )
}

Subdomains

Functions

Dependencies

  • dropdown-menu
  • lucide-react
  • sidebar

Frequently Asked Questions

What does nav-documents.tsx do?
nav-documents.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in nav-documents.tsx?
nav-documents.tsx defines 1 function(s): NavDocuments.
What does nav-documents.tsx depend on?
nav-documents.tsx imports 3 module(s): dropdown-menu, lucide-react, sidebar.
Where is nav-documents.tsx in the architecture?
nav-documents.tsx is located at deprecated/www/registry/default/blocks/dashboard-01/components/nav-documents.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/blocks/dashboard-01/components).

Analyze Your Own Codebase

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

Try Supermodel Free