$npx -y skills add callstackincubator/agent-skills --skill react-navigationProvides React Navigation UI patterns for stacks, tabs, drawers etc. Use when building navigation UIs with React Navigation, configuring headers, bottom sheets or handling safe areas and insets.
| 1 | # React Navigation |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Guide for building navigation UIs with React Navigation. |
| 6 | |
| 7 | This skill only applies to React Navigation 7. The API and patterns may not work with different versions. |
| 8 | |
| 9 | ## API Selection |
| 10 | |
| 11 | React Navigation offers two API - object-based `Static API` and component-based `Dynamic API`. |
| 12 | |
| 13 | - **Existing Apps**: Check the current navigation setup and follow the same API style when using the references |
| 14 | - **New Apps**: If the app does not have an existing navigation setup yet, prefer `Static API` |
| 15 | |
| 16 | ## When to Apply |
| 17 | |
| 18 | Reference this skill when: |
| 19 | |
| 20 | - Building navigation UI patterns such as stacks, tabs, drawers, sheets etc. |
| 21 | - Configuring headers and other built-in navigator UI |
| 22 | - Handling safe areas and insets in navigation UI |
| 23 | |
| 24 | ## References |
| 25 | |
| 26 | | File | Description | |
| 27 | | ------------------------------------------- | ------------------------------ | |
| 28 | | [stacks.md][stacks] | Stack based navigation | |
| 29 | | [form-sheet.md][form-sheet] | Bottom sheet and form sheets | |
| 30 | | [bottom-tabs.md][bottom-tabs] | Cross-platform bottom tabs | |
| 31 | | [native-bottom-tabs.md][native-bottom-tabs] | Native bottom tabs | |
| 32 | | [material-top-tabs.md][material-top-tabs] | Swipeable Top tabs | |
| 33 | | [drawers.md][drawers] | Drawer navigation and sidebars | |
| 34 | | [header.md][header] | Configuring headers | |
| 35 | | [safe-areas.md][safe-areas] | Safe-area handling | |
| 36 | |
| 37 | ## Problem -> Skill Mapping |
| 38 | |
| 39 | | Problem | Start With | |
| 40 | | ------------------------------------------------------------------------- | ------------------------------------------- | |
| 41 | | Showing screens and modals in a stack | [stacks.md][stacks] | |
| 42 | | Showing bottom sheets or form sheets | [form-sheet.md][form-sheet] | |
| 43 | | Showing screens in bottom tabs or responsive sidebars with web support | [bottom-tabs.md][bottom-tabs] | |
| 44 | | Showing screens in native tabs on iOS & Android | [native-bottom-tabs.md][native-bottom-tabs] | |
| 45 | | Showing content in swipeable top tabs | [material-top-tabs.md][material-top-tabs] | |
| 46 | | Using a drawer or sidebar | [drawers.md][drawers] | |
| 47 | | Configuring the header in bottom tab or drawer navigator | [header.md][header] | |
| 48 | | Handling safe-area such as status bar, header insets, tab bar insets etc. | [safe-areas.md][safe-areas] | |
| 49 | |
| 50 | [stacks]: references/stacks.md |
| 51 | [form-sheet]: references/form-sheet.md |
| 52 | [safe-areas]: references/safe-areas.md |
| 53 | [bottom-tabs]: references/bottom-tabs.md |
| 54 | [native-bottom-tabs]: references/native-bottom-tabs.md |
| 55 | [material-top-tabs]: references/material-top-tabs.md |
| 56 | [drawers]: references/drawers.md |
| 57 | [header]: references/header.md |