Implement mobile navigation
Builds mobile navigation and data screens with predictable back behavior, keyboard handling and complete content states.
mobile-navigation
See how it helpsWhen is it useful?
Use when routes, safe areas or screen states behave inconsistently.
What does it help you do?
- Defines route hierarchy and small stable route parameters.
- Handles safe areas, system back and keyboard overlap.
- Implements loading, empty, error and populated states with useful retry.
Try asking this
Implement order details entered from a list, retaining filters and proper back behavior after a failed refresh. Open an order from a filtered list, fail its refresh and navigate Back. Restore the list's filters and scroll position with a retry on the detail screen.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
Mobile Screens & Navigation
Turn the UI/UX designer's screen plans and interactions into predictable mobile flows that respect iOS and Android navigation habits, safe areas, software keyboards and screen sizes.
1. Navigation hierarchy, route params and back behavior
- Typed, serializable route parameters: pass only compact identifiers and filter primitives (
id,slug,tab)—never pass class instances, closures or large objects in navigation params, as they break deep links, URL restoration and OS state restoration (SavedStateHandle/RestorationMixin). - Auth and onboarding gates: use declarative guards (
<Stack.Protected guard={!!session}>in Expo Router,redirect+refreshListenableingo_router, or conditional root stacks) so sign-out or session expiry clears protected screens from the back stack without flashing private content. - Hardware & gesture back handling:
- Support iOS swipe-back and Android 14+ predictive back gestures (
PopScope<T>withcanPopandonPopInvokedWithResultin Flutter;BackHandler/beforeRemovein React Navigation;BackHandlerin Compose). - Dismiss open bottom sheets, dialogs or selection modes before popping the screen, and prompt or auto-save drafts before discarding unsaved form input.
- After login, onboarding or checkout, replace (
router.replace/context.go) rather than push so Back never returns to the completed step.
- Support iOS swipe-back and Android 14+ predictive back gestures (
2. Safe areas, edge-to-edge layout and virtual keyboard
- Safe areas & cutouts: use
react-native-safe-area-context(useSafeAreaInsets,SafeAreaView), FlutterSafeArea/MediaQuery.paddingOf(context), or ComposeWindowInsets.safeDrawingso notches, Dynamic Island, status bars and gesture bars never clip interactive controls, while backgrounds and scrolling lists bleed cleanly to the screen edge. - Keyboard avoidance & focus flow:
- Keep focused inputs and the primary submit button visible above the software keyboard (
KeyboardAvoidingViewwith platform behavior /react-native-keyboard-controller, FlutterScaffold(resizeToAvoidBottomInset: true)+SingleChildScrollView, ComposeimePadding()). - Set appropriate
keyboardType/textInputAction(next,done,search,send), chain focus between fields, and configurekeyboardShouldPersistTaps="handled"on scroll views so tapping a submit button while the keyboard is open works on the first tap.
- Keep focused inputs and the primary submit button visible above the software keyboard (
- Responsive & adaptive layout: test narrow phones (320 pt), large phones, tablets/foldables (
useWindowDimensions,LayoutBuilder) and system font scaling up to 200%.
3. Four mandatory states per data screen
- Loading: layout-stable skeleton or spinner plus pull-to-refresh (
RefreshControl/RefreshIndicator). - Empty: clear explanation and primary CTA when a list or search returns zero items.
- Error: clear reason (offline vs server error) with an inline Retry button that preserves filters/input.
- Populated: smooth content with touch targets
>= 44x44 pt(iOS) /48x48 dp(Android).
Before you finish
- Route params are typed IDs/primitives; auth gates and post-submit stack resets prevent dead ends.
- iOS swipe-back and Android predictive back / hardware back respect modals and unsaved drafts.
- Safe areas, keyboard avoidance (
imePadding/KeyboardAvoidingView) and tap-through while keyboard is open work. - Loading, empty, error (with retry) and populated states are all implemented.
Included files 2
LICENSE.txtSKILL.md
About this skill package
mobile-navigation
mobile-navigation: Build mobile apps that handle navigation, native integrations, offline data and interrupted sessions reliably.
Show less
mobile-navigation
mobile-navigation: Build mobile apps that handle navigation, native integrations, offline data and interrupted sessions reliably.
Includes the complete skill and its supporting files (2 files). The exact authored scope is preserved below.
Original skill description (source language)
Use when building or reviewing mobile screens, navigation stacks, tabs, modals, sheets, back-button handling, route parameters, auth guards or responsive screen layouts across iOS and Android.
Install the skill, review its source and trust settings, then enable it for the relevant project or agent.
Requirements
- Orqestria installed on your computer.
