Sidebar
A collapsible sidebar navigation component for app layouts.
Installation
bash
npx @smicolon/cli add sidebarRun init once per project before adding components. See Installation.
Preview
Components
Sidebar: Main containerSidebarHeader: Header sectionSidebarContent: Scrollable content areaSidebarFooter: Footer sectionSidebarGroup: Grouped items with labelSidebarItem: Navigation item with iconSidebarCollapseButton: Toggle collapse state
Props
| Prop | Type | Default | Description |
|---|---|---|---|
collapsed | boolean | false | Collapses it to icons only. |
onCollapsedChange | (collapsed) => void | — | Called when it collapses or expands. |
width | "sm" | "default" | "lg" | "default" | Width when expanded. |
children | ReactNode | — | The sidebar’s parts. |
className | string | — | Extra classes for the component. |