About Sidebar
Sidebar is a collapsible vertical navigation component for applications. It provides primary navigation and can be configured to collapse into a compact bar or hide completely.Components
The Sidebar package includes many subcomponents:- Sidebar - Main container
- SidebarBody - Main content area
- SidebarHeader - Top section with logo/title
- SidebarHeaderLabel - Header text
- SidebarHeaderIconButton - Header action button
- SidebarFooter - Bottom section
- SidebarCollapseButton - Toggle collapse state
- SidebarNavigation - Navigation list container
- SidebarNavigationItem - Navigation link
- SidebarNavigationDisclosure - Collapsible nav section
- SidebarNavigationSeparator - Visual divider
- SidebarBetaBadge - Beta feature indicator
- SidebarPushContentWrapper - Pushes content when sidebar opens
- SidebarOverlayContentWrapper - Overlays content when sidebar opens
Installation
Usage
Props
Sidebar
SidebarNavigation
SidebarNavigationItem
SidebarNavigationDisclosure
Collapsible navigation section with state management:Variants
Compact Variant
Shows icons when collapsed, full content when expanded:Default Variant
Completely hides when collapsed:Responsive Behavior
On mobile (breakpoint 0), the sidebar becomes a full-width overlay regardless of variant.Accessibility
- Sidebar uses semantic HTML with
<aside>element - Navigation requires
aria-labelfor context - Skip links enable keyboard navigation to main sections
- Collapse state is announced to screen readers
- Focus management when opening/closing
Animation
Sidebar uses spring animations for smooth transitions when expanding/collapsing.Related components
- Topbar - Horizontal top navigation
- Page Header - Page title and actions