Sidebar
A responsive collapsible sidebar with full keyboard navigation. Supports icon-only collapsed mode, mobile overlay, and cookie-persisted state.
$cookest-ui add sidebar
Full Sidebar
The complete Cookest app sidebar with groups, icons, and a trigger button. Click the toggle to collapse it.
| Prop | Type | Default | Description |
|---|---|---|---|
SidebarProvider | ReactNode | โ | Root context provider. Controls open state and persistence. |
defaultOpen | boolean | true | Default open state (uncontrolled). |
collapsible | "offcanvas" | "icon" | "none" | "offcanvas" | How the sidebar collapses โ icon-only or off-screen. |
side | "left" | "right" | "left" | Which side the sidebar is anchored to. |
SidebarTrigger | โ | โ | A toggle button to open/close the sidebar. |
SidebarInset | ReactNode | โ | The main content area beside the sidebar. |