Sidebar
Organism
App navigation rail with collapsible sections and active highlighting. The sidebar on the left of this page is a thin adapter over this very Sidebar component: it feeds the docs' nav tree in and gets the same collapse, accordion, and active-highlight behavior back.
Playground
Every control sets a real prop of SidebarProps. The JSX below updates as you go.
Web
iOS
Android
JSX · SidebarProps
Variants
2 examples from src/organisms/sidebar/sidebar.md, each rendered live from its own JSX.
Anatomy
1
Rail
2
Section label
3
Item
4
Active item
5
Footer
Dimmed parts appear only in some states or variants.
Props
35 props on SidebarProps, grouped as they are declared in source. Required props are marked *.
Accessibility and keyboard
Keyboard
Tab
Moves between links
Enter
Follows the link
Semantics
Roles
button
navigation
States
expanded
selected
ARIA on web
aria-current
aria-expanded
aria-label
Below the platform minimum, the touch area grows to 44 pt on iOS and 48 dp on Android without moving the layout.
From the docs
On the web a hovered row's wash (the palette's translucent hover) fades in over 150 ms and back out when the pointer leaves, in the rail and the drill-down alike; the pressed and active fills still switch at once, and Reduce Motion makes the wash instant.
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
The one Sidebar below is the whole story: on desktop it is the collapsible accordion rail (tap the header chevron to shrink it to icons); narrow the window to a phone and the same component becomes a start-edge drill-down Liquid Glass menu opened by the top bar's hamburger, exactly like this page's own left nav. AppShell is the docs' live app frame (the top bar and placeholder page); the Sidebar wiring is the part you copy.
In glass mode the active row paints a control-layer pane behind its icon, label and badge; the drill-down drawer keeps its own row treatment. Solid mode keeps the skin's own row fill.
On the web a hovered row's wash (the palette's translucent hover) fades in over 150 ms and back out when the pointer leaves, in the rail and the drill-down alike; the pressed and active fills still switch at once, and Reduce Motion makes the wash instant.
Add responsive to make it adapt across breakpoints: it stays the accordion rail on desktop, and at and below the lg breakpoint (1024px) it becomes a start-edge (left, RTL-aware) navigation drawer that drills through the same sections one level at a time (tap a group to slide in to its rows, back to return). Drive the drawer's open state with open / onOpenChange from your own hamburger button; the header and footer slots pin above and below the drill-down, just as in the rail. The drawer slides from the start (left) edge by default; drawerRight, drawerTop, and drawerBottom change which edge it slides in from. (This page's own left nav does exactly this: an accordion rail here, a drill-down drawer on a phone.)
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
--bg2
--fd
--fm
--ft
--ion-soft
--ion-tx
--ln
--sf2
--sf3
--tx2
--tx3