This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Build custom web modals
Edit page
Learn how to build modal overlays for web with Expo Router.
Expo Router no longer provides an experimental web modal implementation. On web, screens with presentation: 'modal' or presentation: 'formSheet' render as regular stack routes.
If you previously enabledEXPO_UNSTABLE_WEB_MODAL, remove it from your environment. ThewebModalStylescreen option and the--expo-router-modal-*CSS variables are no longer available.
Use a transparent overlay route
For most apps, use the built-in Stack and set the modal route to transparentModal on web. Expo Router keeps the previous route visible behind a transparent modal, so the route component only needs to render the backdrop and dialog.
Use a platform-specific component for the visual treatment. The web implementation handles the backdrop, the Escape key, and dismissal. The native implementation returns children unchanged, so modal.tsx can wrap its content in WebModal on every platform.
Build a custom navigator
For apps with several web modals, create a custom navigator with StackRouter. The navigator adds a modal screen option, renders the stack up to the last non-modal route, then layers each modal route on top. Style the overlay to match your app.
NativeStackViewis available in SDK 58 and later.