Navigation
Where the places are: a sidebar on the desktop, tabs on a phone. The place under the cursor, or the tab that is lit, is the page.
Desktop
arkui::sidebar


arkui::sidebar
A column of places down the left of a window, grouped under headings; the one under the cursor is the page beside it.
Item { glyph, label, heading, trailing, press }count(n, lit)lit(i, cursor, focused)WIDTH (200)view(items, cursor, focused, width, padding, id)
Rules
- One highlight, not two: the cursor is what the page shows, marked always, lit only while the sidebar has the keys.
- A heading is drawn where the group changes, not stored as a row, so row n is the cursor's n.
- Its pixel of edge is part of its width.
Mobile
Where
ui/Tabs.kt: TabStack, Reselect, LocalReselect
How
- TabStack keeps each tab's content alive while another is shown, each with its Reselect in LocalReselect.
- Reselect.ask() is the lit tab tapped again.
Nothing shared for this on iOS yet.