nav-workspaces.tsx — ui Source File
Architecture documentation for nav-workspaces.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c11dc4b7_ea2f_a924_4e84_1bf504a02e4c["nav-workspaces.tsx"] 6446fa60_a046_3422_5dd0_2a98daa65df9["collapsible"] c11dc4b7_ea2f_a924_4e84_1bf504a02e4c --> 6446fa60_a046_3422_5dd0_2a98daa65df9 1fee781a_1910_afaa_bb29_21305eb0ae61["sidebar"] c11dc4b7_ea2f_a924_4e84_1bf504a02e4c --> 1fee781a_1910_afaa_bb29_21305eb0ae61 de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"] c11dc4b7_ea2f_a924_4e84_1bf504a02e4c --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2 style c11dc4b7_ea2f_a924_4e84_1bf504a02e4c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@/registry/bases/radix/ui/collapsible"
import {
SidebarGroup,
SidebarGroupContent,
SidebarGroupLabel,
SidebarMenu,
SidebarMenuAction,
SidebarMenuButton,
SidebarMenuItem,
SidebarMenuSub,
SidebarMenuSubButton,
SidebarMenuSubItem,
} from "@/registry/bases/radix/ui/sidebar"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
export function NavWorkspaces({
workspaces,
}: {
workspaces: {
name: string
emoji: React.ReactNode
pages: {
name: string
emoji: React.ReactNode
}[]
}[]
}) {
return (
<SidebarGroup>
<SidebarGroupLabel>Workspaces</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{workspaces.map((workspace) => (
<Collapsible key={workspace.name}>
<SidebarMenuItem>
<SidebarMenuButton asChild>
<a href="#">
<span>{workspace.emoji}</span>
<span>{workspace.name}</span>
</a>
</SidebarMenuButton>
<CollapsibleTrigger asChild>
<SidebarMenuAction
className="bg-sidebar-accent text-sidebar-accent-foreground left-2 data-[state=open]:rotate-90"
showOnHover
>
<IconPlaceholder
lucide="ChevronRightIcon"
tabler="IconChevronRight"
hugeicons="ArrowRight01Icon"
phosphor="CaretRightIcon"
remixicon="RiArrowRightSLine"
/>
</SidebarMenuAction>
</CollapsibleTrigger>
<SidebarMenuAction showOnHover>
<IconPlaceholder
lucide="PlusIcon"
tabler="IconPlus"
hugeicons="PlusSignIcon"
phosphor="PlusIcon"
remixicon="RiAddLine"
/>
</SidebarMenuAction>
<CollapsibleContent>
<SidebarMenuSub>
{workspace.pages.map((page) => (
<SidebarMenuSubItem key={page.name}>
<SidebarMenuSubButton asChild>
<a href="#">
<span>{page.emoji}</span>
<span>{page.name}</span>
</a>
</SidebarMenuSubButton>
</SidebarMenuSubItem>
))}
</SidebarMenuSub>
</CollapsibleContent>
</SidebarMenuItem>
</Collapsible>
))}
<SidebarMenuItem>
<SidebarMenuButton className="text-sidebar-foreground/70">
<IconPlaceholder
lucide="MoreHorizontalIcon"
tabler="IconDots"
hugeicons="MoreHorizontalCircle01Icon"
phosphor="DotsThreeOutlineIcon"
remixicon="RiMoreLine"
/>
<span>More</span>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
)
}
Domain
Subdomains
Functions
Dependencies
- collapsible
- icon-placeholder
- sidebar
Source
Frequently Asked Questions
What does nav-workspaces.tsx do?
nav-workspaces.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-workspaces.tsx?
nav-workspaces.tsx defines 1 function(s): NavWorkspaces.
What does nav-workspaces.tsx depend on?
nav-workspaces.tsx imports 3 module(s): collapsible, icon-placeholder, sidebar.
Where is nav-workspaces.tsx in the architecture?
nav-workspaces.tsx is located at apps/v4/registry/bases/radix/blocks/sidebar-15/components/nav-workspaces.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/blocks/sidebar-15/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free