---
name: add-react-native-tabs-and-stacks
description: Adds bottom tabs, a stack or a drawer to an existing React Native project, including headers and safe areas. Use when the user wants tabs, a stack, a drawer, or a header on a screen that is already there.
license: MIT
metadata:
  category: apps
  tags: "react-native,navigation,cross-platform"
  author: johnny-bravo
  version: "1.0"
  updated: "2026-11-09"
  status: published
  aliases: "react navigation, bottom tabs, stack navigator, drawer"
  source_url: "https://github.com/callstackincubator/agent-skills/tree/59e9d17446a248b21d86f078fcd0bd2d36db1ca4/skills/react-navigation"
  source_license: MIT
  copyright: "Copyright (c) 2026 Callstack Incubator"
  original_author: "Callstack Incubator (agent-skills, react-navigation)"
  modified: "Adapted by TheSkillVault: rewritten as a short React Navigation 7 checklist (match the existing API, tabs, stack, safe area); dropped the reference-file map; added gotchas and done-when. Independent how-to, not a Callstack product manual."
  imported_on: "2026-11-09"
---

# Add navigation to a React Native project

React Navigation 7 draws the stacks, tabs and drawers. Match the style the project already uses. A new project with no navigator yet should use the static API.

## When to use
- Screens exist and the user wants bottom tabs or a stack on top of them.
- A header title, back button or drawer is missing.
- Content sits under the status bar or the home indicator.

## When not to use
- Skip this when you still need to create the Expo project. The hub skill covers `create-expo-app` and Expo Router file routes.
- Skip this for a native SwiftUI or Compose sheet inside Expo. That is a different skill.
- The project is a website, not React Native.

## Steps
1. Check the installed major version. These steps are for React Navigation 7. If `package.json` shows version 6, do not mix the two APIs.
2. If navigators already exist, copy their style. Static configuration for a project that already uses it. Component-based navigators if that is what the files already do.
3. A brand-new navigator should use the static API: a config object lists the screens, and the navigator reads that config.
4. Top-level sections on a phone go in a bottom tab navigator, about three to five items. Do not put one-off actions in the tab bar.
5. Screens that push on top of each other go in a stack. Set the header title there, not with a fake bar inside the screen.
6. Wrap the tree in the safe-area provider so the first and last rows clear the notch and the home indicator.
7. Run it on a phone-sized simulator and a wider window. Tabs should stay visible. The stack back control should pop a screen.

## Gotchas
- Do not store passwords, tokens or session secrets in route params. Params are easy to log.
- A drawer and bottom tabs together is easy to get wrong. Pick one top-level pattern.
- Expo Router file routes are not the React Navigation object API. Do not paste stack code into an Expo Router layout if the project already uses files under its route folder.
- This is an independent how-to adapted from Callstack's skill. It is not official React Navigation support.

## Portability
The same navigator ideas exist in SwiftUI and Jetpack Compose, but the components differ. If you use Expo Router, keep file-based tabs and stacks instead of adding a second navigator library.

## Done when
- The top-level sections are tabs or a drawer, and detail screens push on a stack.
- Content clears the safe areas.
- The version in `package.json` matches the API you wrote.

## Example prompt
"Add bottom tabs for Home, Orders and Account to this React Native project, with a stack on Orders so a detail screen can push."

---
Adapted from "react-navigation" in callstackincubator/agent-skills (MIT, Copyright (c) 2026 Callstack Incubator). See LICENSE.txt.
