Skip to main content
‹ Theme and context
Types

Types

The types of theme and context.

SectionTheme and contextDraftDocumented, not reviewed yet: the API can change.
Interface

The look of the navigation: its bars, tabs and screen backgrounds. A color can be { light, dark }: the native side picks the one of the system's appearance. A color left out keeps the platform's look: on iOS 26 the glass bars, on Android the colors of the app's Material 3 theme (Theme.ApexNavigation: neutral grays).

interface NavigationTheme
MemberTypeDescription
colors{ primary?: Color; background?: Color; bar?: Color; text?: Color; border?: Color; badge?: Color; }
Defined in src/api/theme/theme.ts ↗

ResolvedNavigationTheme​

Interface

The theme as React content takes it: each color for the current appearance, ready for a style. A color the theme leaves out is undefined.

interface ResolvedNavigationTheme
MemberTypeDescription
colorsRequired{ [Key in keyof NonNullable<NavigationTheme['colors']>]?: ColorValue }
Defined in src/api/theme/theme.ts ↗

RegisteredContext​

Type

The type of the app's context, for useAppContext, navigation.getContext and the options. It is registered next to the app, interface Register { app: typeof App; context: AppContext }: read from the app it would go round, since the screens' options are part of the app's type.

type RegisteredContext = Register extends { context: infer Context } ? Context : unknown
Defined in src/api/types.ts ↗

AppOptionsInput​

Type

The default options of every screen: options as they are, or a chain built from the theme and the app's context. A chain is built again when the theme changes.

type AppOptionsInput =
Options | ((options: ScreenOptions, app: OptionsEnvironment) => ScreenOptions)
MemberTypeDescription
topBarOptionsTopBar

The bar at the top of a screen in a stack: its title, buttons, back button, search and look.

toolbarOptionsToolbar

The toolbar at the bottom of a screen in a stack.

iOSiPadOSAndroid (not supported)
scrollEdgeEffectOptionsScrollEdgeEffect

(iOS 26+) How the content fades or blurs where it scrolls under a bar.

bottomTabsOptionsBottomTabs

The tab bar of the tabs the screen is in, while the screen shows.

bottomTabOptionsBottomTab

The tab of a screen that is a tab of a tab bar (or the first screen of a stack that is one).

modalModalOptions

A screen shown as a modal: how it is presented, how it can be dismissed, its sheet.

modalPresentationStyleOptionsModalPresentationStyle

How a modal is presented: full screen, as a page sheet, a form sheet, a popover…

modalTransitionStyleOptionsModalTransitionStyle

The system transition of a modal: cover vertical, flip horizontal, cross dissolve, partial curl.

iOSiPadOSAndroid (not supported)
overlayOverlayOptions

A screen shown as an overlay: whether touches outside its content go through to what is below.

sideMenuOptionsSideMenu

The side menus of the side menu the screen is in: their visibility, width, gestures.

splitViewOptionsSplitView

The split view the screen is in: its columns, their widths, how they show.

layoutOptionsLayout

The screen's layout: its background, safe area, orientation.

statusBarOptionsStatusBar

The status bar while the screen shows.

navigationBarNavigationBarOptions

The navigation bar while the screen shows.

iOS (not supported)iPadOS (not supported)Android
animationsAnimationOptions

The transitions of the commands: push, pop, modals, the root, and elements that move between screens.

popGestureboolean | 'edge'

The swipe back in the stack: true from the edge and, on iOS 26, from anywhere in the content; 'edge' only from the edge, so horizontal gestures of the content (sliders, carousels) keep theirs; false no swipe, the back button still works. The top screen's value applies each time it shows, and at once through mergeOptions. Before iOS 26 'edge' is the same as true. Android has the system back instead and doesn't read it.

iOSiPadOSAndroid (not supported)
hardwareBackButtonHardwareBackButtonOptions

What the system back button and the back gesture do on the screen.

iOS (not supported)iPadOS (not supported)Android
fabOptionsFab

The floating action button of the screen.

iOS (not supported)iPadOS (not supported)Android
keyCommandsOptionsKeyCommand[]

The keyboard shortcuts of the screen, shown by the system when a hardware keyboard is held.

iOSiPadOSAndroid (not supported)
blurOnUnmountboolean

Whether a text field of the screen loses the focus, and the keyboard hides, as the screen leaves: when the transition that takes it away starts (a pop, a modal's dismiss, a new stack root or app root), so the keyboard doesn't stay up during the transition.

previewPreviewOptions

The preview of a pushed screen, for a view of the screen it is pushed from (iOS). Set by usePreview; apps don't set it.

Defined in src/api/theme/theme.ts ↗