Components
← All components

Sidebar

stimeo--sidebar

A responsive collapsible sidebar: an inline rail that becomes a modal off-canvas panel below a breakpoint.

  • Dialog (Modal)

The stimeo--sidebar controller has no dedicated APG pattern: the base is Disclosure (the trigger's aria-expanded controls the panel) and, below the breakpoint, it borrows the Dialog (Modal) focus behavior via the shared FocusTrap (the same trap used by dialog / alert-dialog / drawer). Above the breakpoint it is an inline, non-modal rail that toggles expanded/collapsed and persists that preference in localStorage. Below it, it becomes an overlay off-canvas panel: opening moves focus in, traps Tab, locks background scroll, makes the background inert, and Escape or a backdrop click closes it and restores focus. role="dialog" is intentionally not applied, so the landmark stays an aside/nav. Narrow the demo below 600px to see the overlay mode. Behavior only — the rail width, slide, and backdrop are this Playground's CSS.

running

Keyboard

KeyAction
Esc Close the overlay (below the breakpoint) and return focus to the trigger.
Tab / Shift+Tab Cycle focus within the panel while the overlay is open (focus trap).