Optional
animation?: ScreenProps["stackAnimation"]Optional
animationChanges the duration (in milliseconds) of slide_from_bottom
, fade_from_bottom
, fade
and simple_push
transitions on iOS. Defaults to 350
.
The duration of default
and flip
transitions isn't customizable.
ios
Optional
animationThe type of animation to use when this screen replaces another screen. Defaults to pop
.
Supported values:
Only supported on iOS and Android.
Optional
autoWhether the home indicator should prefer to stay hidden on this screen. Defaults to false
.
ios
Optional
contentStyle object for the scene content.
Optional
customWhether the gesture to dismiss should use animation provided to animation
prop. Defaults to false
.
Doesn't affect the behavior of screens presented modally.
ios
Optional
freezeWhether inactive screens should be suspended from re-rendering. Defaults to false
.
Defaults to true
when enableFreeze()
is run at the top of the application.
Requires react-native-screens
version >=3.16.0.
Only supported on iOS and Android.
Optional
fullWhether the gesture to dismiss should work on the whole screen. Using gesture to dismiss with this option results in the same
transition animation as simple_push
. This behavior can be changed by setting customAnimationOnGesture
prop. Achieving the
default iOS animation isn't possible due to platform limitations. Defaults to false
.
Doesn't affect the behavior of screens presented modally.
ios
Optional
gestureSets the direction in which you should swipe to dismiss the screen.
When using vertical
option, options fullScreenGestureEnabled: true
, customAnimationOnGesture: true
and animation: 'slide_from_bottom'
are set by default.
Supported values:
vertical
– dismiss screen verticallyhorizontal
– dismiss screen horizontally (default)ios
Optional
gestureWhether you can use gestures to dismiss this screen. Defaults to true
.
Only supported on iOS.
ios
Optional
header?: ((props) => ReactNode)Function that given HeaderProps
returns a React Element to display as a header.
Optional
headerBoolean indicating whether to show the menu on longPress of iOS >= 14 back button. Defaults to true
.
Requires react-native-screens
version >=3.3.0.
Only supported on iOS.
ios
Optional
headerImage to display in the header as the icon in the back button. Defaults to back icon image for the platform
Optional
headerTitle string used by the back button on iOS.
Defaults to the previous scene's title, or "Back" if there's not enough space.
Use headerBackTitleVisible: false
to hide it.
Only supported on iOS.
ios
Optional
headerStyle object for header back title. Supported properties:
Only supported on iOS.
ios
Optional
headerWhether the back button title should be visible or not.
Only supported on iOS.
ios
Optional
headerWhether the back button is visible in the header.
You can use it to show a back button alongside headerLeft
if you have specified it.
This will have no effect on the first screen in the stack.
Optional
headerFunction which returns a React Element to render as the background of the header.
This is useful for using backgrounds such as an image, a gradient, blur effect etc.
You can use this with headerTransparent
to render content underneath a translucent header.
Optional
headerBlur effect for the translucent header.
The headerTransparent
option needs to be set to true
for this to work.
Only supported on iOS.
ios
Optional
headerStyle of the header when a large title is shown.
The large title is shown if headerLargeTitle
is true
and
the edge of any scrollable content reaches the matching edge of the header.
Supported properties:
Only supported on iOS.
ios
Optional
headerWhether to enable header with large title which collapses to regular header on scroll.
For large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as ScrollView
or FlatList
.
If the scrollable area doesn't fill the screen, the large title won't collapse on scroll.
You also need to specify contentInsetAdjustmentBehavior="automatic"
in your ScrollView
, FlatList
etc.
Only supported on iOS.
ios
Optional
headerWhether drop shadow of header is visible when a large title is shown.
Only supported on iOS.
ios
Optional
headerStyle object for large title in header. Supported properties:
Only supported on iOS.
ios
Optional
headerFunction which returns a React Element to display on the left side of the header.
This replaces the back button. See headerBackVisible
to show the back button along side left element.
Optional
headerFunction which returns a React Element to display on the right side of the header.
Optional
headerOptions to render a native search bar.
You also need to specify contentInsetAdjustmentBehavior="automatic"
in your ScrollView
, FlatList
etc.
If you don't have a ScrollView
, specify headerTransparent: false
.
Only supported on iOS and Android.
Optional
headerWhether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
Optional
headerWhether to show the header. The header is shown by default.
Setting this to false
hides the header.
Optional
headerStyle object for header. Supported properties:
Optional
headerTint color for the header. Changes the color of back button and title.
Optional
headerString or a function that returns a React Element to be used by the header.
Defaults to screen title
or route name.
When a function is passed, it receives tintColor
andchildren
in the options object as an argument.
The title string is passed in children
.
Note that if you render a custom element by passing a function, animations for the title won't work.
Optional
headerHow to align the the header title.
Defaults to left
on platforms other than iOS.
Not supported on iOS. It's always center
on iOS and cannot be changed.
Optional
headerStyle object for header title. Supported properties:
Optional
headerBoolean indicating whether the navigation bar is translucent.
Setting this to true
makes the header absolutely positioned,
and changes the background color to transparent
unless specified in headerStyle
.
Optional
navigationSets the navigation bar color. Defaults to initial navigation bar color.
android
Optional
navigationSets the visibility of the navigation bar. Defaults to false
.
android
Optional
orientation?: ScreenProps["screenOrientation"]The display orientation to use for the screen.
Supported values:
Only supported on iOS and Android.
Optional
presentation?: Exclude<ScreenProps["stackPresentation"], "push"> | "card"How should the screen be presented.
Supported values:
Only supported on iOS and Android.
Optional
statusSets the status bar animation (similar to the StatusBar
component).
Requires setting View controller-based status bar appearance -> YES
(or removing the config) in your Info.plist
file.
Only supported on iOS.
ios
Optional
statusSets the status bar color (similar to the StatusBar
component). Defaults to initial status bar color.
android
Optional
statusWhether the status bar should be hidden on this screen.
Requires setting View controller-based status bar appearance -> YES
in your Info.plist file.
Only supported on iOS.
ios
Optional
statusSets the status bar color (similar to the StatusBar
component).
Requires setting View controller-based status bar appearance -> YES
(or removing the config) in your Info.plist
file.
Only supported on iOS.
ios
Optional
statusSets the translucency of the status bar. Defaults to false
.
android
Optional
title?: stringString that can be displayed in the header as a fallback for headerTitle
.
How the screen should animate when pushed or popped.
Supported values:
Only supported on iOS and Android.