123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622 |
- # Common Options
-
- ## navBarTextColor
- Title text color
-
- ```js
- topBar: {
- title: {
- color: 'red'
- }
- }
- ```
-
- ## navBarTextFontSize
- Title font size
-
- ```js
- topBar: {
- title: {
- fontSize: 18
- }
- }
- ```
-
- ## navBarTextFontFamily
- Title font
-
- ```js
- topBar: {
- title: {
- fontFamily: 'Helvetica'
- }
- }
- ```
-
- ## navBarBackgroundColor
- TopBar background color
-
- ```js
- topBar: {
- background: {
- color: 'red'
- }
- }
- ```
-
- ## navBarCustomView
- Use a react view as the TopBar's background or use a React view instead of the textual title.
-
- ```js
- topBar: {
- background: {
- component: {
- name: 'example.CustomTopBarBackground'
- }
- },
- title: {
- component: {
- name: 'example.CustomTopBarTitle'
- }
- }
- }
- ```
-
- ## navBarClipToBounds
- Restrict the navbar background color to the navbar, and do not flow behind the status bar.
-
- ```js
- topBar: {
- background: {
- component: {
- name: 'example.CustomTopBarBackground',
- clipToBounds: true
- }
- },
- }
- ```
-
- ## navBarComponentAlignment
- Align the React view used as the title
-
- ```js
- topBar: {
- title: {
- component: {
- name: 'example.CustomTopBarTitle',
- alignment: 'center' | 'fill'
- }
- }
- }
- ```
-
- ## navBarCustomViewInitialProps
- Initial props passed to the React component
-
- ```js
- topBar: {
- background: {
- component: {
- name: 'example.CustomTopBarBackground',
- passProps: {}
- }
- },
- title: {
- component: {
- name: 'example.CustomTopBarTitle',
- passProps: {}
- }
- }
- }
- ```
-
- ## navBarButtonColor
- TopBar button color
-
- ```js
- topBar: {
- rightButtons: [
- {
- color: 'red'
- }
- ],
- leftButtons: [
- {
- color: 'red'
- }
- ],
- backButton: {
- color: 'red'
- }
- }
- ```
-
- ## navBarHidden
- TopBar visibility. When setting `visible: false`, you probably want to set `drawBehind: true` as well. Use `animate: false` to toggle visibility without animation.
-
- ```js
- topBar: {
- visible: false
- }
- ```
-
- ## navBarTransparent
- Transparent TopBar. Set `drawBehind: true` to draw the screen behind the transparent TopBar.
-
- ```js
- topBar: {
- background: {
- color: 'transparent'
- }
- }
- ```
-
- ## drawUnderNavBar
- Draw the screen behind the TopBar, Useful when the TopBar is toggled or transparent
-
- ```js
- topBar: {
- drawBehind: true
- }
- ```
-
- ## drawUnderTabBar
- Draw the screen behind the BottomTabs, Useful when toggling BottomTabs or when the BottomTabs are translucent.
-
- ```js
- bottomTabs: {
- drawBehind: true
- }
- ```
-
- ## tabBarHidden
- BottomTabs visibility.
- ```js
- bottomTabs: {
- visible: false
- }
- ```
-
- The BottomTab's visibility can be toggled only on **Android** using `mergeOptions`:
- ```js
- 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.
-
- ## statusBarHidden
- StatusBar visibility. For android, also set `drawBehind: true`.
-
- ```js
- statusBar: {
- visible: false
- }
- ```
-
- ## statusBarTextColorScheme
- Theme of text and icons displayed in the StatusBar
-
- ```js
- statusBar: {
- style: 'light' | 'dark'
- }
- ```
-
- ## navBarSubtitleColor
- Subtitle color
-
- ```js
- topBar: {
- subtitle: {
- color: 'red'
- }
- }
- ```
-
- ## navBarSubtitleFontFamily
- Subtitle font
-
- ```js
- topBar: {
- subtitle: {
- fontFamily: 'Helvetica'
- }
- }
- ```
-
- ## navBarSubtitleFontSize
- Subtitle font size
-
- ```js
- topBar: {
- subtitle: {
- fontSize: 14
- }
- }
- ```
-
- ## screenBackgroundColor
- Screen color, visible before the actual React view is rendered
-
- ```js
- layout: {
- backgroundColor: 'red'
- }
- ```
-
- ## orientation
-
- ```js
- layout: {
- orientation: ['portrait', 'landscape'] // An array of supported orientations
- }
- ```
-
- ## disabledButtonColor
- Button color when `enabled: false` is used
-
- ```js
- topBar: {
- rightButtons: [
- {
- disabledColor: 'grey'
- }
- ]
- }
- ```
-
- ## navBarButtonFontSize
- Button font size
-
- ```js
- topBar: {
- rightButtons: [
- {
- fontSize: 13
- }
- ],
- leftButtons: [
- {
- fontSize: 13
- }
- ]
- }
- ```
-
- ## navBarLeftButtonFontSize
- Left button font size
-
- ```js
- {
- topBar: {
- leftButtons: [
- {
- fontSize: 13
- }
- ]
- }
- }
- ```
-
- ## navBarLeftButtonColor
- Left button color
-
- ```js
- {
- topBar: {
- leftButtons: [
- {
- color: 'red'
- }
- ]
- }
- }
- ```
-
- ## navBarLeftButtonFontWeight
- Left button font weight
-
- ```js
- {
- topBar: {
- leftButtons: [
- {
- weight: '300'
- }
- ]
- }
- }
- ```
-
- ## navBarRightButtonFontSize
- Right button font size
-
- ```js
- topBar: {
- leftButtons: [
- {
- fontSize: 13
- }
- ]
- }
- ```
-
- ## navBarRightButtonColor
- Right button color
-
- ```js
- topBar: {
- rightButtons: [
- {
- color: 'red'
- }
- ]
- }
- ```
-
- ## navBarRightButtonFontWeight
- Right button font weight
-
- ```js
- topBar: {
- rightButtons: [
- {
- weight: '400'
- }
- ]
- }
- ```
-
- ## modalPresentationStyle
- Controls the behavior of screens displayed modally.
-
- ### Options supported on iOS
- * `overCurrentContext` - Content is displayed over the previous screen. Useful for **transparent modals**
- * `formSheet` - Content is centered in the screen
- * `pageSheet` -Content partially covers the underlying content
- * `overFullScreen` - Content covers the screen, without detaching previous content.
- * `fullScreen` - Content covers the screen, previous content is detached.
- * `popover` - Content is displayed in a popover view.
-
- More information on the different styles for iOS can be found on https://developer.apple.com/documentation/uikit/uimodalpresentationstyle
-
- ### Options supported on Android
- * `overCurrentContext` - Content is displayed over the previous screen. Useful for **transparent modals**
- * `none` - Previous content is detached when the Modal's show animation ends
-
- ```js
- {
- modalPresentationStyle: 'overCurrentContext'
- }
- ```
-
- ## navBarButtonFontFamily
- Button font family
-
- ```js
- topBar: {
- rightButtons: [
- {
- fontFamily: 'Helvetica'
- }
- ]
- }
- ```
-
- # iOS only
-
- ## navBarHideOnScroll
- Hide TopBar when list is scrolled
-
- ```js
- topBar: {
- hideOnScroll: true
- }
- ```
-
- ## navBarTranslucent
- Translucent TopBar, Setting `drawBehind: true` is required for this property to work as expected.
-
- ```js
- topBar: {
- drawBehind: true,
- background: {
- translucent: true
- }
- }
- ```
-
- ## navBarNoBorder
- Remove TopBar border (hair line)
-
- ```js
- topBar: {
- noBorder: true
- }
- ```
-
- ## navBarBlur
- Blur the area behind the TopBar, Setting `drawBehind: true` and topBar background `transparent: true` is required for this property to work as expected.
-
- ```js
- topBar: {
- drawBehind: true,
- background: {
- blur: true,
- transparent: true
- }
- }
- ```
-
- ## rootBackgroundImageName
-
- * iOS: name of image in Images.xcassets
- * Android: name of drawable
-
- ```js
- {
- rootBackgroundImage: require('rootBackground.png')
- }
- ```
-
- ## screenBackgroundImageName
- name of image in Images.xcassets
-
- ```js
- {
- backgroundImage: require('background.png')
- }
- ```
-
- ## statusBarHideWithNavBar
- Hide the StatusBar if the TopBar is also hidden
-
- ```js
- statusBar: {
- hideWithTopBar: true
- }
- ```
-
- ## statusBarBlur
- Blur the area behind the StatusBar
-
- ```js
- statusBar: {
- blur: true
- }
- ```
-
- ## disabledBackGesture
- Disable the back (swipe) gesture used to pop screens
-
- ```js
- {
- popGesture: false
- }
- ```
-
- ## largeTitle
- Use iOS 11 large title
-
- ```js
- topBar: {
- largeTitle: {
- visible: true,
- fontSize: 30,
- color: 'red',
- fontFamily: 'Helvetica'
- }
- }
- ```
-
- # Android Options
-
- ## topBarElevationShadowEnabled
- TopBar elevation in dp. Set this value to `0` to disable the TopBar's shadow.
-
- ```js
- topBar: {
- elevation: 0
- }
- ```
-
- ## navBarTitleTextCentered
- Title alignment
-
- ```js
- topBar: {
- title: {
- alignment: 'center'|'fill'
- }
- }
- ```
-
- ## statusBarColor
- StatusBar color
-
- ```js
- statusBar: {
- backgroundColor: 'red'
- }
- ```
-
- ## navigationBarColor
- NavigationBar color
-
- ```js
- navigationBar: {
- backgroundColor: 'red'
- }
- ```
-
- ## drawUnderStatusBar
- Draw content behind the StatusBar
-
- ```js
- statusBar: {
- drawBehind: true
- }
- ```
-
- ## navBarHeight
- TopBar height in dp
-
- ```js
- topBar: {
- height: 70
- }
- ```
-
- ## navBarTopPadding
- Content top margin
-
- ```js
- layout: {
- topMargin: 26
- }
- ```
-
- ## topTabsHeight
- TopTabs height
-
- ```js
- topTabs: {
- height: 70
- }
- ```
-
- ## topBarBorderColor
- TopBar border color
-
- ```js
- topBar: {
- borderColor: 'red'
- }
- ```
-
- ## topBarBorderWidth
- TopBar border height
-
- ```js
- topBar: {
- borderHeight: 1.3
- }
- ```
-
- # Unsupported options
- * disabledSimultaneousGesture
- * statusBarTextColorSchemeSingleScreen
- * navBarButtonFontWeight
- * topBarShadowColor
- * topBarShadowOpacity
- * topBarShadowOffset
- * topBarShadowRadius
- * preferredContentSize
- * navBarSubTitleTextCentered
- * collapsingToolBarImage
- * collapsingToolBarCollapsedColor
- * navBarTextFontBold
|