Sidebar

The ArcadiaSidebar component provides a collapsible navigation panel with a built-in toggle button.

Basic Usage

<ArcadiaSidebar @bind-Visible="sidebarOpen" Width="280px">
    <nav>
        <a href="/">Home</a>
        <a href="/docs">Documentation</a>
        <a href="/settings">Settings</a>
    </nav>
</ArcadiaSidebar>

Parameters

ParameterTypeDefaultDescription
VisiblebooltrueWhether the sidebar is expanded. Supports two-way binding.
Widthstring"260px"Expanded width of the sidebar.
CollapsedWidthstring"64px"Collapsed width of the sidebar.
Positionstring"left"Position: "left" or "right".
OverlayboolfalseWhether the sidebar uses overlay mode on mobile.
ChildContentRenderFragment?nullNavigation items and other sidebar content.
Classstring?nullAdditional CSS class names.
Stylestring?nullInline CSS styles.

Events

EventTypeDescription
VisibleChangedEventCallback<bool>Fired when the sidebar visibility changes.

Accessibility

  • Uses <aside> with role="navigation" and aria-label="Sidebar navigation".
  • The toggle button has aria-expanded and a dynamic aria-label (“Collapse sidebar” / “Expand sidebar”).
  • In overlay mode, clicking the overlay backdrop collapses the sidebar.
  • Toggle icon is marked aria-hidden="true".