• Docs
  • Components
  • Sidebar

Sidebar - Aspect UI

The Sidebar component provides a collapsible panel typically used for navigation or filters. It supports fixed or overlay positioning, responsive behavior, and custom content.

Table of Contents#


PropTypeDefaultDescription
childrenReactNode-Content inside the Sidebar, typically SidebarItems, SidebarHeader, etc.
classNamestring''Additional CSS classes for the sidebar container.
breakPointsm md lg xl 2xl none'md'Responsive breakpoint at which the sidebar behavior changes.
...restHTMLAttributes<HTMLElement>-Additional HTML attributes passed to the root sidebar element.

SidebarContainer Props#


PropTypeDefaultDescription
childrenReactNode-Content inside the Sidebar container.
classNamestring''Additional CSS classes for the sidebar container wrapper.
...restHTMLAttributes<HTMLElement>-Additional HTML attributes passed to the container element.

SidebarFooter Props#


PropTypeDefaultDescription
childrenReactNode-Content inside the sidebar footer.
classNamestring''Additional CSS classes for the sidebar footer container.
...restHTMLAttributes<HTMLElement>-Additional HTML attributes passed to the footer element.

SidebarHeader Props#


PropTypeDefaultDescription
childrenReactNode-Content inside the sidebar header.
classNamestring''Additional CSS classes for the sidebar header container.
...restHTMLAttributes<HTMLElement>-Additional HTML attributes passed to the header element.

SidebarItem Props#


PropTypeDefaultDescription
childrenReactNode-Content inside the sidebar item.
onClick() => void undefined-Callback fired when the sidebar item is clicked.
classNamestring''Additional CSS classes for the sidebar item.
...restHTMLAttributes<HTMLElement>-Additional HTML attributes passed to the sidebar item.

SidebarToggleButton Props#


PropTypeDefaultDescription
classNamestring''Additional CSS classes for the toggle button.
variantprimary secondary success warning link outline ghost icon withIcon default'default'Visual style variant of the toggle button.
sizesmall medium large'medium'Size of the toggle button.
iconReactNode<Menu />Icon displayed inside the toggle button.
...restButtonHTMLAttributes<HTMLButtonElement>-Additional button HTML attributes passed to the toggle button.

SidebarProvider Props#


PropTypeDefaultDescription
childrenReactNode-Elements that should have access to the sidebar context (wrapped components).