Title text color
topBar: {
title: {
color: 'red'
}
}
Title font size
topBar: {
title: {
fontSize: 18
}
}
Title font
topBar: {
title: {
fontFamily: 'Helvetica'
}
}
TopBar background color
topBar: {
background: {
color: 'red'
}
}
Use a react view as the TopBar’s background or use a React view instead of the textual title.
topBar: {
background: {
component: {
name: 'example.CustomTopBarBackground'
}
},
title: {
component: {
name: 'example.CustomTopBarTitle'
}
}
}
Align the React view used as the title
topBar: {
title: {
component: {
name: 'example.CustomTopBarTitle',
alignment: 'center' | 'fill'
}
}
}
Initial props passed to the React component
topBar: {
background: {
component: {
name: 'example.CustomTopBarBackground',
passProps: {}
}
},
title: {
component: {
name: 'example.CustomTopBarTitle',
passProps: {}
}
}
}
TopBar button color
topBar: {
rightButtons: [
{
color: 'red'
}
],
leftButtons: [
{
color: 'red'
}
],
backButton: {
color: 'red'
}
}
TopBar visibility. When setting visible: false
, you probably want to set drawBehind: true
as well. Use animate: false
to toggle visibility without animation.
topBar: {
visible: false
}
Transparent TopBar. Set drawBehind: true
to draw the screen behind the transparent TopBar.
topBar: {
transparent: true
}
Draw the screen behind the TopBar, Useful when the TopBar is toggled or transparent
topBar: {
drawBehind: true
}
Draw the screen behind the BottomTabs, Useful when toggling BottomTabs or when the BottomTabs are translucent.
bottomTabs: {
drawBehind: true
}
BottomTabs visibility.
bottomTabs: {
visible: false
}
The BottomTab’s visibility can be toggled only on Android using mergeOptions
:
Navigation.mergeOptions(this.props.componentId, {
bottomTabs: {
visible: false
}
});
On iOS, BottomTab visibility can be changed only when pushing screens. This means that if you’d like to hide BottomTabs when pushing a screen, You’ll need to set the property to false
in the options passed to the push
command or via the static options(passProps) {}
api.
StatusBar visibility
statusBar: {
visible: false
}
Theme of text and icons displayed in the StatusBar
statusBar: {
style: 'light' | 'dark'
}
Subtitle color
topBar: {
subtitle: {
color: 'red'
}
}
Subtitle font
topBar: {
subtitle: {
fontFamily: 'Helvetica'
}
}
Subtitle font size
topBar: {
subtitle: {
fontSize: 14
}
}
Screen color, visible before the actual React view is rendered
layout: {
backgroundColor: 'red'
}
layout: {
orientation: ['portrait', 'landscape'] // An array of supported orientations
}
Button color when enabled: false
is used
topBar: {
rightButtons: [
{
disabledColor: 'grey'
}
]
}
Button font size
topBar: {
rightButtons: [
{
fontSize: 13
}
],
leftButtons: [
{
fontSize: 13
}
]
}
Left button font size
{
topBar: {
leftButtons: [
{
fontSize: 13
}
]
}
}
Left button color
{
topBar: {
leftButtons: [
{
color: 'red'
}
]
}
}
Left button font weight
{
topBar: {
leftButtons: [
{
weight: '300'
}
]
}
}
Right button font size
topBar: {
leftButtons: [
{
fontSize: 13
}
]
}
Right button color
topBar: {
rightButtons: [
{
color: 'red'
}
]
}
Right button font weight
topBar: {
rightButtons: [
{
weight: '400'
}
]
}
Controls he behavior of screens displayed modally.
formSheet
- Content is centered in the screenpageSheet
-Content partially covers the underlying contentoverFullScreen
- Content covers the screen, without detaching previous content.fullScreen
- Content covers the screen, previous content is detached.overCurrentContext
- Content is displayed over the previous screen. Useful for transparent modalsnone
- Previous content is detached when the Modal’s show animation ends{
modalPresentationStyle: 'overCurrentContext'
}
Button font family
topBar: {
rightButtons: [
{
fontFamily: 'Helvetica'
}
]
}
Hide TopBar when list is scrolled
topBar: {
hideOnScroll: true
}
Translucent TopBar, Setting drawBehind: true
is required for this property to work as expected.
topBar: {
translucent: true
}
Remove TopBar border (hair line)
topBar: {
noBorder: true
}
Blue the area behind the TopBar, Setting drawBehind: true
is required for this property to work as expected.
topBar: {
blur: true
}
{
rootBackgroundImage: require('rootBackground.png')
}
name of image in Images.xcassets
{
backgroundImage: require('background.png')
}
Hide the StatusBar if the TopBar is also hidden
statusBar: {
hideWithTopBar: true
}
Blur the area behind the StatusBar
statusBar: {
blur: true
}
Disable the back (swipe) gesture used to pop screens
{
popGesture: false
}
Use iOS 11 large title
topBar: {
largeTitle: {
visible: true,
fontSize: 30,
color: 'red',
fontFamily: 'Helvetica'
}
}
TopBar elevation in dp. Set this value to 0
to disable the TopBa’s shadow.
topBar: {
elevation: 0
}
Title alignment
topBar: {
alignment: 'center'|'fill'
}
StatusBar color
statusBar: {
backgroundColor: 'red'
}
Draw content behind the StatusBar
statusBar: {
drawBehind: true
}
TopBar height in dp
topBar: {
height: 70
}
Content top margin
layout: {
topMargin: 26
}
TopTabs height
topTabs: {
height: 70
}
TopBar border color
topBar: {
borderColor: 'red'
}
TopBar border height
topBar: {
borderHeight: 1.3
}