Home / File/ sidebar-header.tsx — ui Source File

sidebar-header.tsx — ui Source File

Architecture documentation for sidebar-header.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
  46b9c4e5_0070_b374_580b_b76f89c32e0f["sidebar-header.tsx"]
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  46b9c4e5_0070_b374_580b_b76f89c32e0f --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  194a9418_8170_2169_6f94_b2f555b74f26["dropdown-menu"]
  46b9c4e5_0070_b374_580b_b76f89c32e0f --> 194a9418_8170_2169_6f94_b2f555b74f26
  6ff5c02b_2b25_4633_4ccd_fd28f2f55862["sidebar"]
  46b9c4e5_0070_b374_580b_b76f89c32e0f --> 6ff5c02b_2b25_4633_4ccd_fd28f2f55862
  style 46b9c4e5_0070_b374_580b_b76f89c32e0f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { ChevronDown } from "lucide-react"

import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "@/registry/new-york/ui/dropdown-menu"
import {
  Sidebar,
  SidebarHeader,
  SidebarInset,
  SidebarMenu,
  SidebarMenuButton,
  SidebarMenuItem,
  SidebarProvider,
  SidebarTrigger,
} from "@/registry/new-york/ui/sidebar"

export default function AppSidebar() {
  return (
    <SidebarProvider>
      <Sidebar>
        <SidebarHeader>
          <SidebarMenu>
            <SidebarMenuItem>
              <DropdownMenu>
                <DropdownMenuTrigger asChild>
                  <SidebarMenuButton className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground">
                    Select Workspace
                    <ChevronDown className="ml-auto" />
                  </SidebarMenuButton>
                </DropdownMenuTrigger>
                <DropdownMenuContent className="w-[--radix-popper-anchor-width]">
                  <DropdownMenuItem>
                    <span>Acme Inc</span>
                  </DropdownMenuItem>
                  <DropdownMenuItem>
                    <span>Acme Corp.</span>
                  </DropdownMenuItem>
                </DropdownMenuContent>
              </DropdownMenu>
            </SidebarMenuItem>
          </SidebarMenu>
        </SidebarHeader>
      </Sidebar>
      <SidebarInset>
        <header className="flex items-center justify-between px-4 h-12">
          <SidebarTrigger />
        </header>
      </SidebarInset>
    </SidebarProvider>
  )
}

Subdomains

Functions

Dependencies

  • dropdown-menu
  • lucide-react
  • sidebar

Frequently Asked Questions

What does sidebar-header.tsx do?
sidebar-header.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 sidebar-header.tsx?
sidebar-header.tsx defines 1 function(s): AppSidebar.
What does sidebar-header.tsx depend on?
sidebar-header.tsx imports 3 module(s): dropdown-menu, lucide-react, sidebar.
Where is sidebar-header.tsx in the architecture?
sidebar-header.tsx is located at deprecated/www/registry/new-york/internal/sidebar-header.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/internal).

Analyze Your Own Codebase

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

Try Supermodel Free