Loading...
Installation
Install the following dependencies:
Copy and paste the following code into your project.
Loading...
Update the import paths to match your project setup.
Composition
SidebarProvider ├── Sidebar │ ├── SidebarHeader │ ├── SidebarContent │ │ └── SidebarGroup │ │ ├── SidebarGroupLabel │ │ ├── SidebarGroupAction (optional) │ │ └── SidebarGroupContent │ │ └── SidebarMenu │ │ └── SidebarMenuItem │ │ ├── SidebarMenuButton │ │ ├── SidebarMenuAction (optional) │ │ └── SidebarMenuBadge (optional) │ ├── SidebarFooter │ └── SidebarRail (optional) ├── SidebarTrigger └── SidebarInset
Examples
Default
Loading...
Floating
Loading...
In A Dialog
Loading...
Menu Actions
Loading...
API Reference
Sidebar
| Prop | Type | Default |
|---|---|---|
variant | "default" | "outline" | "default" |
size | "default" | "sm" | "lg" | "default" |
Context, Hooks, and Types
| Export | API |
|---|---|
SidebarProvider | Provides an externally created API to the component tree. |
useSidebar | Creates or accesses the component API. |
Angular
React
Solid
Svelte
Vue