Sidebar
Navigation & ChromeSidebar
Application sidebar navigation container. Compose with SidebarBrand, SidebarOrgSwitcher, SidebarNav, and SidebarFooter.
Sidebar
Sidebar is a <aside> element. It extends HTMLAttributes<HTMLElement> with no additional custom props.
SidebarBrandProps props| Prop | Type | Default | Description |
|---|
logo | ReactNode | — | A logo or icon rendered before the brand name. |
children | ReactNode | — | Brand name text. |
SidebarOrgSwitcherProps props| Prop | Type | Default | Description |
|---|
initials | string | — | Initials shown in the org icon circle. |
name | string | — | Organization name. |
sub | string | — | Sub-label, e.g. plan tier or member count. |
SidebarNavItemProps props| Prop | Type | Default | Description |
|---|
icon | ReactNode | — | Icon displayed before the label. |
children | ReactNode | — | Label text. |
active | boolean | — | Highlights the item as the current page. |
count | ReactNode | — | Count badge displayed on the right. |
countTone | "default" | "warn" | "default" | Accent color for the count badge. |
href | string | — | If provided, renders as an <a> instead of a <button>. |
SidebarFooterProps props| Prop | Type | Default | Description |
|---|
usageLabel | ReactNode | — | Label for the usage meter, e.g. 'Storage'. |
usageValue | ReactNode | — | Value for the usage meter, e.g. '4.2 / 10 GB'. |
usagePercent | number | — | Fill percentage for the usage Meter, 0–100. |
links | ReactNode[] | — | Array of link elements rendered below the meter. |
userInitials | string | — | Initials for the user Avatar. |
userName | string | — | Display name of the current user. |
userEmail | string | — | Email of the current user. |
onUserMenu | () => void | — | Click handler for the user menu kebab button. |
Full sidebar compositionTSXimport {
Sidebar,
SidebarBrand,
SidebarOrgSwitcher,
SidebarNav,
SidebarNavGroup,
SidebarNavItem,
SidebarFooter,
} from "@solarius/onset";
import {
IconDashboard,
IconServer,
IconSettings,
IconUsers,
IconHelp,
IconFileText,
} from "@tabler/icons-react";
<Sidebar>
<SidebarBrand logo={<YourLogo />}>Solarius</SidebarBrand>
<SidebarOrgSwitcher initials="AC" name="Acme Corp" sub="Enterprise" />
<SidebarNav>
<SidebarNavGroup>
<SidebarNavItem icon={<IconDashboard size={16} />} active>
Dashboard
</SidebarNavItem>
<SidebarNavItem icon={<IconServer size={16} />} count={12}>
Infrastructure
</SidebarNavItem>
<SidebarNavItem icon={<IconUsers size={16} />}>Team</SidebarNavItem>
</SidebarNavGroup>
<SidebarNavGroup>
<SidebarNavItem icon={<IconSettings size={16} />}>
Settings
</SidebarNavItem>
<SidebarNavItem icon={<IconBell size={16} />} count={3} countTone="warn">
Notifications
</SidebarNavItem>
</SidebarNavGroup>
</SidebarNav>
<SidebarFooter
usageLabel="Storage"
usageValue="4.2 / 10 GB"
usagePercent={42}
links={[
<a key="help" href="#">
<IconHelp size={12} /> Help
</a>,
<a key="docs" href="#">
<IconFileText size={12} /> Docs
</a>,
]}
userInitials="JD"
userName="Jane Doe"
userEmail="jane@example.com"
onUserMenu={() => {}}
/>
</Sidebar>;