iOS modals in either router
Choose system presentations and scoped overlays in Expo Router or React Navigation.
Use a native-stack presentation when a screen owns navigation, keyboard and system dismissal. Use Dialog for a short decision, Menu for a list of actions and Bottom Sheet for a task that stays on the current screen.
Native presentations
useModalPresets() resolves the active surface and sheet radius. It returns ordinary native-stack options, without importing a navigator. The pageSheet preset maps to presentation: 'modal'; pageSheet is not a native-stack presentation string.
| Preset | Native-stack presentation | Intended job |
|---|---|---|
pageSheet / modal | modal | A separate screen with system dismissal |
formSheet | formSheet | A focused form with fractional detents |
fullScreen | fullScreenModal | A task needing the entire screen |
Expo Router:
import { Stack } from 'expo-router';
import { useModalPresets } from '@/components/swipeui/overlay/modal-presets';
export default function Layout() {
const presets = useModalPresets();
return (
<Stack>
<Stack.Screen name="edit-route" options={presets.formSheet} />
</Stack>
);
}React Navigation native stack:
const presets = useModalPresets();
<Stack.Navigator>
<Stack.Screen name="EditRoute" component={EditRouteScreen} options={presets.formSheet} />
</Stack.Navigator>;Detents must be ascending fractions above zero and at most one; Android accepts at most three. The preset validates these constraints. Grabber configuration is iOS only. Test content sizing on both platforms: Android form-sheet content should not depend on an unconstrained flex: 1 child. Prefer measured or intrinsically sized content, with scrolling for larger forms. System animation and iOS 26 appearance belong to the installed router/screens/OS versions; SwipeUI does not replace their physics.
Put overlays inside each native presentation
Place one OverlayProvider near the app root. Wrap the content of each native modal screen with OverlayScope so its dialogs and menus render above that presentation. A root absolute view cannot cover a separate native presentation. Reprovide application context inside a portal when its content depends on a provider below the host.
import { OverlayScope } from '@/components/swipeui/lib/overlay-host';
export function EditRouteScreen() {
return (
<OverlayScope>
<RouteForm />
</OverlayScope>
);
}The host retains closing content through its exit, keeps only the front modal accessible, handles Back/escape and attempts heading/return focus. Keep a stable trigger ref for programmatic presentations. Device focus and native layer behavior still need runtime verification.
Build the modal screen
Use iOS Native Modal for the title, actions, keyboard-aware scroll body and local overlay scope. Register a named screen in your navigator and open it with ordinary router navigation. Keep form state on that screen. Call the router's back action after a successful save.
See Overlay recipes for a linked two-screen flow and a complete Spotlight Tour setup.