Try it
Pick a position and a compact behaviour, then use the toggle itself to collapse and expand the rail. Shrink the browser window below 672px to see the drawer layout.
Positions
| Position | Expanded rail | Collapsed rail |
|---|---|---|
end | Brand, then the toggle at the far edge | Set by sidebarHeaderActionCompact |
start | Toggle first, then the brand, as a top bar would | Set by sidebarHeaderActionCompact |
edge | A small round tab on the rail's border, level with the brand | The same tab, pointing the other way |
The collapsed rail
The 56px rail has no room for the brand and the toggle side by side, so sidebarHeaderActionCompact picks how they share it:
stack: both, one above the other. Withstartthe toggle is on top, withendit is below.swap: the brand, which turns into the toggle under the pointer or keyboard focus. On a screen without hover it behaves asreplace, since a control that only appears on hover would be out of reach.replace: the toggle alone, in the brand's place.
On phones
Below collapseAt the rail becomes a drawer opened from the topbar's nav button, and the header action is not rendered at all. The nav button is already the control there, and a drawer has no compact form to collapse into. The drawer also always shows labels: someone who collapsed the rail on a desktop gets the full menu on their phone, while their saved choice is left alone for the next desktop visit.