sidebar.tsx — ui Source File
Architecture documentation for sidebar.tsx, a tsx file in the ui codebase. 12 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c3d1b2a8_7455_5144_ec35_453b78980e06["sidebar.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 08a0262d_09c3_24fd_0121_edb115ae800b["use-mobile"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 08a0262d_09c3_24fd_0121_edb115ae800b 191e4a89_25e4_f7a3_d5fb_d71d101e0990["utils"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 191e4a89_25e4_f7a3_d5fb_d71d101e0990 4b1d2128_46d9_46f0_b915_b6e1925b7876["button"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 4b1d2128_46d9_46f0_b915_b6e1925b7876 9af00736_7b63_3c3c_87d0_68c5200c5d80["input"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 9af00736_7b63_3c3c_87d0_68c5200c5d80 b9edc1c7_b7c5_336c_067b_ecb7e26f1bc3["separator"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> b9edc1c7_b7c5_336c_067b_ecb7e26f1bc3 8484953e_a2b0_c9dc_4839_3020572ff080["sheet"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 8484953e_a2b0_c9dc_4839_3020572ff080 7ac49d97_b5c4_1dd6_0a10_1d4895a02c4c["skeleton"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 7ac49d97_b5c4_1dd6_0a10_1d4895a02c4c 2e5ffaa4_e254_231d_7f3e_d1b7ff0bfae7["tooltip"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 2e5ffaa4_e254_231d_7f3e_d1b7ff0bfae7 25383e8d_ca91_a50e_c3a8_5f228d02e1df["class-variance-authority"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 25383e8d_ca91_a50e_c3a8_5f228d02e1df d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 9c463da6_747b_38dc_586b_cbb4873070b1["radix-ui"] c3d1b2a8_7455_5144_ec35_453b78980e06 --> 9c463da6_747b_38dc_586b_cbb4873070b1 style c3d1b2a8_7455_5144_ec35_453b78980e06 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { useIsMobile } from "@/examples/radix/hooks/use-mobile"
import { cn } from "@/examples/radix/lib/utils"
import { Button } from "@/examples/radix/ui/button"
import { Input } from "@/examples/radix/ui/input"
import { Separator } from "@/examples/radix/ui/separator"
import {
Sheet,
SheetContent,
SheetDescription,
SheetHeader,
SheetTitle,
} from "@/examples/radix/ui/sheet"
import { Skeleton } from "@/examples/radix/ui/skeleton"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/examples/radix/ui/tooltip"
import { cva, type VariantProps } from "class-variance-authority"
import { PanelLeftIcon } from "lucide-react"
import { Slot } from "radix-ui"
const SIDEBAR_COOKIE_NAME = "sidebar_state"
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
const SIDEBAR_WIDTH = "16rem"
const SIDEBAR_WIDTH_MOBILE = "18rem"
const SIDEBAR_WIDTH_ICON = "3rem"
const SIDEBAR_KEYBOARD_SHORTCUT = "b"
type SidebarContextProps = {
state: "expanded" | "collapsed"
open: boolean
setOpen: (open: boolean) => void
openMobile: boolean
setOpenMobile: (open: boolean) => void
isMobile: boolean
toggleSidebar: () => void
}
const SidebarContext = React.createContext<SidebarContextProps | null>(null)
function useSidebar() {
const context = React.useContext(SidebarContext)
if (!context) {
throw new Error("useSidebar must be used within a SidebarProvider.")
}
return context
}
function SidebarProvider({
defaultOpen = true,
open: openProp,
onOpenChange: setOpenProp,
className,
style,
children,
// ... (642 more lines)
Domain
Subdomains
Functions
- Sidebar()
- SidebarContent()
- SidebarFooter()
- SidebarGroup()
- SidebarGroupAction()
- SidebarGroupContent()
- SidebarGroupLabel()
- SidebarHeader()
- SidebarInput()
- SidebarInset()
- SidebarMenu()
- SidebarMenuAction()
- SidebarMenuBadge()
- SidebarMenuButton()
- SidebarMenuItem()
- SidebarMenuSkeleton()
- SidebarMenuSub()
- SidebarMenuSubButton()
- SidebarMenuSubItem()
- SidebarProvider()
- SidebarRail()
- SidebarSeparator()
- SidebarTrigger()
- open()
- useSidebar()
Types
Dependencies
- button
- class-variance-authority
- input
- lucide-react
- radix-ui
- react
- separator
- sheet
- skeleton
- tooltip
- use-mobile
- utils
Source
Frequently Asked Questions
What does sidebar.tsx do?
sidebar.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in sidebar.tsx?
sidebar.tsx defines 25 function(s): Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, and 15 more.
What does sidebar.tsx depend on?
sidebar.tsx imports 12 module(s): button, class-variance-authority, input, lucide-react, radix-ui, react, separator, sheet, and 4 more.
Where is sidebar.tsx in the architecture?
sidebar.tsx is located at apps/v4/examples/radix/ui/sidebar.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/radix/ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free