Skip to system
09 / Shell & navigation

Every route keeps an exit

Back, theme, matcher, tray, mobile index, page stepper and footer share safe areas, hierarchy and layer ownership.

productiontop-escape.tsx + theme-toggle.tsx + companion-tray.tsx--top-control-*--persistent-bottom-offset--layer-*

Interactive shell anatomy

Switch route responsibility, viewport and local theme. The same exits, safe areas and persistent layers stay legible.

desktop · light · catalog
PETS67Catalog
Try “review TypeScript”
Catalog

Find a pet

PETS67Local-first companion selector
productionsrc/components/product-footer.tsx--command-height--arcade-depth-control--radius-control

Footer command anatomy

Every destination is a complete tactile button: a semantic leading icon, an explicit label and one trailing direction cue. Color identifies the destination family but never carries the label alone.

DestinationLeading iconAccentTrailing cue
CatalogLayoutGridBlueArrowRight
Visual SystemPaletteLimeArrowRight
Version historyHistoryPinkArrowRight

Navigation owners

TopEscapetop-escape.tsx

Always exposes a deterministic exit.

ThemeToggletheme-toggle.tsx

System, Light and Dark with persisted preference.

Matchercatalog-explorer.tsx

Search, filters and sort form one command island.

Companion Traycompanion-tray.tsx

Persistent selected and saved state above safe area.

System indexvisual-system-shell.tsx

Desktop sidebar becomes a bottom mobile dock.

Page steppervisual-system-shell.tsx

Previous and next preserve documentation order.

Product Footer(product)/layout.tsx

One shared footer after every product main.

productionsrc/components/companion-tray.tsx--persistent-bottom-offset--floating-ui-clearance

320px Companion Tray stress

Long pet names and saved-list overflow stay inside the local tray. Task-critical names wrap; the saved list scrolls without moving the persistent close command.

67
Using todayOtvertka-67
2 saved pets

Safe-area and layer contract

SurfaceLayerAnchorCollision rule
Back + Theme100Top safe areaEqual height and extrusion
Matcher popover200 / 210Top command islandClears both side controls
Mobile index / Tray100 / 145 localPersistent bottom offsetOnly one route-owned dock
Dialog300 / 400ViewportOwns focus and blocks background
Toast500Safe top or bottomAbove dialogs; never under a hard shadow
Skip link600+Top-leftVisible only on keyboard focus