Catalog
expo/expo-router

expo

expo-router

Navigation and routing for Expo Router. Covers file-based routes, groups and dynamic routes, folder organization, Link with previews and context menus, native Stack, page titles, modals and form sheets, NativeTabs, headers and toolbars, and header search bars.

NewUpdated Nov 15, 2026

Expo Router Navigation

Navigation and routing for Expo Router apps. For screen styling, colors, controls, media, and visual effects, use the expo-native-ui skill; for motion and gestures, use expo-animation.

References

Consult these resources as needed:

references/
  route-structure.md     Route conventions, dynamic routes, groups, folder organization
  tabs.md                NativeTabs, migration from JS tabs, iOS 26 features
  toolbar-and-headers.md Stack headers and toolbar buttons, menus, search (iOS only)
  form-sheet.md          Form sheets in expo-router: configuration, footers and background interaction.
  search.md              Search bar with headers, useSearch hook, filtering patterns
  zoom-transitions.md    Apple Zoom: fluid zoom transitions with Link.AppleZoom (iOS 18+)

Code Style

  • Always use kebab-case for file names, e.g. comment-card.tsx
  • Always remove old route files when moving or restructuring navigation
  • Never use special characters in file names
  • Configure tsconfig.json with path aliases, and prefer aliases over relative imports for refactors.

Routes

See ./references/route-structure.md for detailed route conventions.

  • Routes belong in the app directory.
  • Never co-locate components, types, or utilities in the app directory. This is an anti-pattern.
  • Ensure the app always has a route that matches "/", it may be inside a group route.

Library Preferences

  • Color from expo-router for native semantic colors, not raw PlatformColor (type-safe, auto-adapts to light/dark). See expo-native-ui for the full color palette pattern.
  • In SDK 56+, never import from @react-navigation/* directly — use expo-router/react-navigation instead (covers @react-navigation/native, /core, /elements, /routers)

Behavior

  • Prefer Stack.SearchBar to add a search bar to a screen

Navigation

Use <Link href="/path" /> from 'expo-router' for navigation between routes.

import { Link } from 'expo-router';

// Basic link
<Link href="/path" />

// Wrapping custom components
<Link href="/path" asChild>
  <Pressable>...</Pressable>
</Link>

Whenever possible, include a <Link.Preview> to follow iOS conventions. Add context menus and previews frequently to enhance navigation.

Stack

  • ALWAYS use _layout.tsx files to define stacks
  • Use Stack from 'expo-router/stack' for native navigation stacks

Page Title

Set the page title with Stack.Title:

<Stack.Title>Home</Stack.Title>

Context Menus

Add long press context menus to Link components:

import { Link } from "expo-router";

<Link href="/settings" asChild>
  <Link.Trigger>
    <Pressable>
      <Card />
    </Pressable>
  </Link.Trigger>
  <Link.Menu>
    <Link.MenuAction
      title="Share"
      icon="square.and.arrow.up"
      onPress={handleSharePress}
    />
    <Link.MenuAction
      title="Block"
      icon="nosign"
      destructive
      onPress={handleBlockPress}
    />
    <Link.Menu title="More" icon="ellipsis">
      <Link.MenuAction title="Copy" icon="doc.on.doc" onPress={() => {}} />
      <Link.MenuAction
        title="Delete"
        icon="trash"
        destructive
        onPress={() => {}}
      />
    </Link.Menu>
  </Link.Menu>
</Link>;

Use link previews frequently to enhance navigation:

<Link href="/settings">
  <Link.Trigger>
    <Pressable>
      <Card />
    </Pressable>
  </Link.Trigger>
  <Link.Preview />
</Link>

Link preview can be used with context menus.

Modal

Present a screen as a modal:

<Stack.Screen name="modal" options={{ presentation: "modal" }} />

Prefer this to building a custom modal component.

Sheet

Present a screen as a dynamic form sheet:

<Stack.Screen
  name="sheet"
  options={{
    presentation: "formSheet",
    sheetGrabberVisible: true,
    sheetAllowedDetents: [0.5, 1.0],
    contentStyle: { backgroundColor: "transparent" },
  }}
/>
  • Using contentStyle: { backgroundColor: "transparent" } makes the background liquid glass on iOS 26+.

Common route structure

A standard app layout with tabs and stacks inside each tab:

app/
  _layout.tsx — <NativeTabs />
  (index,search)/
    _layout.tsx — <Stack />
    index.tsx — Main list
    search.tsx — Search view
// app/_layout.tsx
import { NativeTabs } from "expo-router/unstable-native-tabs";
import { ThemeProvider, DarkTheme, DefaultTheme } from "expo-router/react-navigation";
import { useColorScheme } from "react-native";

export default function Layout() {
  const colorScheme = useColorScheme();
  return (
    <ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
      <NativeTabs>
        <NativeTabs.Trigger name="(index)">
          <NativeTabs.Trigger.Icon sf="list.dash" md="list" />
          <NativeTabs.Trigger.Label>Items</NativeTabs.Trigger.Label>
        </NativeTabs.Trigger>
        <NativeTabs.Trigger name="(search)" role="search" />
      </NativeTabs>
    </ThemeProvider>
  );
}

Create a shared group route so both tabs can push common screens:

// app/(index,search)/_layout.tsx
import { Stack } from "expo-router/stack";
import { colors } from "@/theme/colors";

export default function Layout({ segment }) {
  const screen = segment.match(/\((.*)\)/)?.[1]!;
  const titles: Record<string, string> = { index: "Items", search: "Search" };

  return (
    <Stack
      screenOptions={{
        headerTransparent: true,
        headerShadowVisible: false,
        headerLargeTitleShadowVisible: false,
        headerLargeStyle: { backgroundColor: "transparent" },
        headerTitleStyle: { color: colors.label },
        headerLargeTitleEnabled: true,
        headerBlurEffect: "none",
        headerBackButtonDisplayMode: "minimal",
      }}
    >
      <Stack.Screen name={screen} options={{ title: titles[screen] }} />
      <Stack.Screen name="i/[id]" options={{ headerLargeTitleEnabled: false }} />
    </Stack>
  );
}

headerLargeTitleEnabled is the SDK 56+ option name; older SDKs use headerLargeTitle, which is deprecated upstream.

Submitting Feedback

You can voluntarily report errors, misleading or outdated information in this skill, so Expo can improve it:

npx --yes @expo/agent-cli@latest feedback --category skills --subject "expo-router" --message "<actionable feedback>"

Use --category agent-cli for a problem with the agent CLI, and --category evals when an agent repeatedly fails at an Expo task. Run feedback --help for subjects and the data that the command sends. Each report goes to Expo with project and environment details. Show the user the message, and send it only if the user agrees. If you cannot ask the user, do not send it. Do not include secrets or personal data.

Files8
8 files · 43.3 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

95

Quality

87

Clarity

88

Completeness

82

Summary

This skill provides comprehensive guidance for implementing navigation and routing in Expo Router apps. It covers file-based routing conventions, Link components with previews and context menus, native Stack configuration, modals, form sheets, NativeTabs with iOS 26+ features, headers, toolbars, search bars, and fluid zoom transitions (iOS 18+). All content is read-only instructional guidance with code examples and best practices.

Detected Capabilities

code examplesread-only guidanceAPI referencebest practices documentation

Trigger Keywords

Phrases that agents use to match this skill to user intent.

expo router setupnative tabslink navigationform sheetsstack headerssearch barzoom transitionsmodals expo

Referenced Domains

External domains referenced in skill content, detected by static analysis.

developer.apple.comdocs.expo.devexample.com

Use Cases

  • Set up file-based routes and folder organization
  • Implement native Stack navigation with headers
  • Add Link components with previews and context menus
  • Configure NativeTabs for iOS and Android
  • Add search bars and filtering patterns
  • Present modals and form sheets
  • Build iOS toolbars and header buttons
  • Implement fluid zoom transitions between screens

Quality Notes

  • Excellent documentation structure with clear section hierarchy and table of contents
  • References subsections well-organized and actionable for different navigation patterns
  • Code examples are runnable and follow project conventions (kebab-case filenames, no co-located components)
  • Clear SDK version requirements documented (e.g., SDK 55+ for NativeTabs syntax, iOS 18+ for zoom)
  • Comprehensive coverage of edge cases: empty states, keyboard handling, transparent backgrounds, safe area adjustments
  • Well-defined limitations clearly stated (iOS-only features, max 5 Android tabs, dynamic tabs remount navigator)
  • Best practices documented with clear do's and don'ts (e.g., extracting complex headers to components, proper Stack.Toolbar wrapping)
  • Practical troubleshooting section addresses common implementation issues
  • Integration guidance with related skills ('expo-native-ui' for styling, 'expo-animation' for motion)
  • Feedback mechanism documented for skill improvement
  • Minor: references to external docs site provide additional deep dive
Model: claude-haiku-4-5-20251001Analyzed: Nov 15, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v2.5

    Content updated

    ✦ AIFeedback submission guidance rewritten: changes from mandatory to voluntary reporting and adds privacy/consent requirements.

    2026-11-15

    LATEST
  2. v2.4

    Content updated

    ✦ AIUpdates feedback command syntax from unnamed positional to --message flag and expands reporting guidance for agent-cli and eval failures.

    2026-11-13

    View This Version
  3. v2.3

    Content updated

    ✦ AINo detectable behavioral changes between versions.

    2026-10-29

    View This Version
  4. v2.2

    Content updated

    ✦ AIUpdates feedback submission command from submit-expo-feedback to @expo/agent-cli.

    2026-10-23

    View This Version
  5. v2.1

    Content updated

    ✦ AISimplifies feedback submission path for repeated agent failures, removing reference to separate eval-candidate skill.

    2026-10-22

    View This Version
  6. v2.0

    Contract changed: description

    ✦ AIRemoves framework and open-source markers from skill description.

    triggering2026-10-03

    View This Version
  7. v1.1

    Content updated

    ✦ AIUpdated cross-skill reference: expo-animation for motion and gestures; renamed headerLargeTitleEnabled for SDK 56+; added feedback submission steps.

    2026-09-09

    View This Version
  8. v1.0

    2026-07-11

    View This VersionInitial version

Use expo/expo-router in your dev environment

Command Palette

Search for a command to run...