Skip to content

Expo Router v6 adds link previews, native tabs and web modals

updated

Expo has released Expo Router v6, which focuses on native feel by exposing native APIs through React-first abstractions, along with more server features for advanced web cases.

The release introduces <Link.Preview> and <Link.Menu> for Apple platforms, adding long-press context menus, link previews and transitions to Expo Router iOS apps. No extra imports are required: existing Link components are wrapped with <Link.Trigger> and the <Link.Preview /> component is added. Links can be nested for different interactive zones, and custom views allow advanced previews, such as playing videos when long-pressing thumbnails.

The menu system exposes UIContextMenuInteraction APIs, supporting nested menus, SF Icons, toggles and keeping menus open after interaction.

Native tabs

Native tabs are in early beta, marked unstable and subject to breaking changes. They are available on iOS and Android, with a new Radix-based web implementation. NativeTabs use a Trigger concept for adding routes to a layout, giving more control over hiding and removing tabs.

On Apple platforms they offer bouncing transitions between routes, automatic scroll-to-top, and iPad, tvOS and desktop support. On Android they support Material themes and improved keyboard support. Recommendations include SF Symbols on iOS, Material design icons on Android, Material or Lucide icons on web, platform colors such as PlatformColor("label") for dynamic tints, and a custom web tab system using _layout.web.tsx. JS <Tabs/> and headless tabs remain available. Better iPad support, more iOS 18 features, improved web support and scroll-to-top on Android are planned.

Modals on web

This experimental feature is enabled with EXPO_UNSTABLE_WEB_MODAL=1. Web modals emulate iPhone and iPad native modal animations, gestures and layouts, using Radix and Vaul, and can be pulled down to dismiss. Additions include better desktop support using iPad techniques, form sheet support and detents. More improvements are coming.

Server middleware and rewrites

As part of a larger effort toward full SSR for web, experimental middleware can be defined in app/+middleware.ts to run before server requests. Client-side navigation does not go through the server. Features include basic redirecting and authorization, running at the edge with EAS Hosting, and matchers for HTTP methods and path patterns. A static rewrites config is also available, and redirects now support external URLs.

Other improvements

  • Improved layout performance on heavy routes
  • Sitemap and root +not-found moved to the virtual root navigator
  • Fewer react-native-web warnings in the default template
  • Improved unhandled promise rejections for Splash Screen

Expo will host a livestream on September 24th with demos and Q&A with the Router team.

Example

<Link>
  <Link.Trigger><Card /></Link.Trigger>
  <Link.Preview />
  <Link.Menu>
    <Link.MenuAction title="Share" onPress={share} />
  </Link.Menu>
</Link>

Video

Source: expo.dev