Overview
Form
Navigation
Data Display
Organism
© 2026 SmartRest POS
Components
Sidebar
ShadcnA composable, themeable and customizable sidebar component.
Structure
Sidebar.Provider- Handles collapsible stateSidebar.Root- The sidebar containerSidebar.Header/Sidebar.Footer- Sticky header/footerSidebar.Content- Scrollable contentSidebar.Group- Section within contentSidebar.Menu- Menu items containerSidebar.Trigger- Toggle buttonSidebar.Inset- Main content wrapper
Basic Usage
This page itself uses the Sidebar component. Check the layout for a live example.
Sidebar.Root Props
| Prop | Type | Description |
|---|---|---|
side | "left" | "right" | The side of the sidebar |
variant | "sidebar" | "floating" | "inset" | The variant of the sidebar |
collapsible | "offcanvas" | "icon" | "none" | Collapsible state |
Menu Items
Theming
The Sidebar uses dedicated CSS variables for independent theming:
- --sidebar
- --sidebar-foreground
- --sidebar-primary
- --sidebar-primary-foreground
- --sidebar-accent
- --sidebar-accent-foreground
- --sidebar-border
- --sidebar-ring