Add a tab bar
A tab bar gives your app the bottom navigation most iPhone apps have. Each tab opens one route.
1. Declare the tabs
Section titled “1. Declare the tabs”In .ynch/navigation.json, add a tabBar beside routes:
{ "schemaVersion": "1.0.0", "initialRoute": "home", "routes": [ { "id": "home", "screenId": "home", "label": "Home", "parameters": {} }, { "id": "about", "screenId": "about", "label": "About", "parameters": {} } ], "tabBar": { "items": [ { "routeId": "home", "label": "Home", "icon": "home" }, { "routeId": "about", "label": "About", "icon": "activity" } ] }}The rules:
- Two to five tabs.
- Each tab points at a different route, and that route takes no parameters.
- The
initialRoutemust be one of the tabs. iconis one of the built-in icons.
Selecting a tab opens its screen with nothing to go back to. Screens you open from there stay inside the tab.
2. Choose the look
Section titled “2. Choose the look”Three optional settings, each from a fixed list:
| Setting | Values | Default |
|---|---|---|
style |
floating (a rounded bar inset from the edges) or full-width (edge to edge, attached to the bottom) |
floating |
material |
solid (your theme’s surface color) or glass |
solid |
labels |
shown or hidden (icons only) |
shown |
"tabBar": { "items": [ ... ], "style": "full-width", "material": "glass"}glass is Liquid Glass on iOS 26 and later. On earlier versions it is drawn as a blurred, translucent bar.
The selected tab uses your theme’s primary color and the others use muted. With labels hidden, the label is still what VoiceOver reads.
3. Check and upload
Section titled “3. Check and upload”npx ynch checknpx ynch uploadThe look options need a current version of the Ynch app on your iPhone. An older version shows the default bar.