Skip to main content
‹ Screen options
Types

Types

The types of screen options.

SectionScreen optionsDraftDocumented, not reviewed yet: the API can change.

OptionsChain​

Class

The modifiers of the options of a screen. Each modifier returns a copy with the options merged over the ones before, so the last one wins; options() takes anything the modifiers don't cover.

class OptionsChain
MemberTypeDescription
optionsoptions(options: Options): this

Any options.

topBartopBar(topBar: OptionsTopBar): this
largeTitlelargeTitle(largeTitle: boolean | OptionsTopBarLargeTitle = true): this
iOSiPadOSAndroid (not supported)
backButtonbackButton(backButton: OptionsTopBarBackButton): this
hideTopBarhideTopBar(hidden = true): this

Hides the top bar; hideTopBar(fullScreen) takes the value from state, false shows it.

hideBottomTabshideBottomTabs(hidden = true): this

Hides the tab bar under this screen; false shows it.

layoutlayout(layout: OptionsLayout): this
safeAreasafeArea(...edges: SafeAreaEdge[]): this

The edges on which the screen keeps its content out of its safe area (bars, status bar, home indicator, cutout); none with no edge. Without it: the top and the sides, but those where the content goes under a bar; the bottom is free, and a list keeps clear of it with useSafeAreaInsets(). A large title leaves the top out by itself.

backgroundColorbackgroundColor(backgroundColor: Color): this
orientationorientation(...orientation: LayoutOrientation[]): this
verticalBarsverticalBars(verticalBars = true): this

false: the bars of the screen stay horizontal on iPhone Duo.

iOSiPadOSAndroid (not supported)
statusBarstatusBar(statusBar: OptionsStatusBar): this
navigationBarnavigationBar(navigationBar: NavigationBarOptions): this
scrollEdgeEffectscrollEdgeEffect(scrollEdgeEffect: OptionsScrollEdgeEffect): this
iOSiPadOSAndroid (not supported)
popGesturepopGesture(popGesture: boolean | 'edge'): this
iOSiPadOSAndroid (not supported)
hardwareBackButtonhardwareBackButton(hardwareBackButton: HardwareBackButtonOptions): this
animationsanimations(animations: Pick<AnimationOptions, 'push' | 'pop'>): this
bottomTabsbottomTabs(bottomTabs: OptionsBottomTabs): this
sideMenusideMenu(sideMenu: OptionsSideMenu): this
iosios(build: (options: this) => this): this

Modifiers for iOS only.

androidandroid(build: (options: this) => this): this

Modifiers for Android only.

Defined in src/api/options/OptionsChain.ts ↗

ScreenOptionsInput​

Type

The options of a screen: options as they are, or a chain built from its props, the theme and the context.

type ScreenOptionsInput<Props> =
Options | ((options: ScreenOptions, props: Props, 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/screens/defineScreen.ts ↗

OptionsEnvironment​

Interface

What the options of a screen can read besides its props, as they are when a command shows the screen.

interface OptionsEnvironment
MemberTypeDescription
themeRequiredNavigationTheme
contextRequiredRegisteredContext
Defined in src/api/screens/defineScreen.ts ↗

Options​

Interface

The options of a screen or a container. A screen shows its own options over those of its containers (its stack, its tabs, its side menu), and all of them over the default options of the app. Objects merge key by key, arrays and values replace what was there, and a key left out keeps what the layers below give.

interface Options
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/interfaces/Options.ts ↗

Color​

Type

A color of an option: a color string ('#1E88E5', 'rgba(0,0,0,0.5)', 'red'), a PlatformColor or DynamicColorIOS, or { light, dark } for each appearance. null takes the color away: the element shows as the platform draws it without the option, also over a color its stack, its tabs or the default options give. A color string the app can't parse counts as not set.

type Color = ColorValue | ThemeColor | null
MemberTypeDescription
lightColorValue

The color in the light appearance: a color string or a PlatformColor.

darkColorValue

The color in the dark appearance: a color string or a PlatformColor.

Defined in src/interfaces/options/common.ts ↗

ImageResource​

Type

An image of an option: require('./icon.png'), a source with a uri (a file, an asset of the app's bundle, a data: address on iOS), the name of an Android drawable resource, or a different icon for each platform ({ ios, android }). Remote addresses (https:) are not loaded, apart from Metro's assets in development; an image that doesn't load leaves its element without an icon and reports the error in development.

type ImageResource = ImageRequireSource | ImageURISource | string | PlatformIcon
MemberTypeDescription
iosstring | ImageRequireSource | ImageURISource

The icon on iOS: the name of an SF Symbol, or an image.

androidstring | ImageRequireSource | ImageURISource

The icon on Android: the name of a drawable resource of the app, or an image.

Defined in src/interfaces/options/common.ts ↗

PlatformIcon​

Interface

A different icon for each platform: { ios: 'square.and.arrow.up', android: 'ic_share' }. A string is the name of an SF Symbol on iOS and of a drawable resource of the app on Android; an image source works on either side. A platform without its side shows no icon.

interface PlatformIcon
MemberTypeDescription
iosstring | ImageRequireSource | ImageURISource

The icon on iOS: the name of an SF Symbol, or an image.

androidstring | ImageRequireSource | ImageURISource

The icon on Android: the name of a drawable resource of the app, or an image.

Defined in src/interfaces/options/common.ts ↗