expo-router
Navigation and routing with Expo Router: file-based and dynamic routes, Link previews and context menus, native Stack, modals and form sheets, NativeTabs, headers, toolbars and search bars.
Install
npx skills add https://github.com/expo/skills --skill expo-routerToolbars and headers
Add native iOS toolbar items to Stack screens. Items can be placed in the header (left/right) or in a bottom toolbar area.
Important: iOS only. Available in Expo SDK 55+.
Notes app example
Mail inbox example
Placement
"left"- Header left"right"- Header right"bottom"(default) - Bottom toolbar
Components
Button
- Icon button:
<Stack.Toolbar.Button icon="star.fill" onPress={() => {}} /> - Text button:
<Stack.Toolbar.Button onPress={() => {}}>Done</Stack.Toolbar.Button>
Props: icon, image, onPress, disabled, hidden, variant ("plain" | "done" | "prominent"), tintColor
Menu
Dropdown menu for grouping actions.
Menu Props: All Button props plus title, inline, palette, elementSize ("small" | "medium" | "large")
MenuAction Props: icon, onPress, isOn, destructive, disabled, subtitle
When creating a palette with dividers, use inline combined with elementSize="small". palette will not apply dividers on iOS 26.
Spacer
View
Embed custom React Native components. When adding a custom view make sure that there is only a single child with explicit width and height.
You can pass custom components to views as well:
Recommendations
- When creating more complex headers, extract them to a single component
- When using
Stack.Toolbar, make sure that allStack.Toolbar.*components are wrapped insideStack.Toolbarcomponent.
This will not work:
This will work:
Limitations
- iOS only
placement="bottom"can only be used inside screen components (not in layout files)Stack.Toolbar.Badgeonly works withplacement="left"or"right"- Header Spacers require explicit
width
Reference
Docs https://docs.expo.dev/versions/unversioned/sdk/router - read to see the full API.