You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b995543
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -258,11 +268,17 @@ Generic title that can be used as a fallback for `headerTitle` and `tabBarLabel`
258
268
259
269
#### `tabBarLabel`
260
270
261
-
Title string of a tab displayed in the tab bar or a function that given `{ focused: boolean, color: string }` returns a React.Node, to display in tab bar. When undefined, scene `title` is used. To hide, see `tabBarShowLabel`.
271
+
Title string of a tab displayed in the tab bar or a function that given `{ focused: boolean, color: string }` returns a React.Node, to display in tab bar. When undefined, scene `title` is used. To hide, see [`tabBarLabelVisibilityMode`](#tabbarlabelvisibilitymode).
272
+
273
+
#### `tabBarLabelVisibilityMode`
274
+
275
+
The label visibility mode for the tab bar items. Supported values are:
262
276
263
-
#### `tabBarShowLabel`
277
+
- `auto` - labels are shown automatically
278
+
- `labeled` - labels are always shown
279
+
- `unlabeled` - labels are never shown
264
280
265
-
Whether the tab label should be visible. Defaults to `true`.
281
+
Defaults to `auto`.
266
282
267
283
#### `tabBarLabelPosition`
268
284
@@ -559,6 +575,26 @@ Boolean indicating whether any nested stack should be popped to the top of the s
559
575
560
576
It only works when there is a stack navigator (e.g. [stack navigator](stack-navigator.md) or [native stack navigator](native-stack-navigator.md)) nested under the tab navigator.
561
577
578
+
#### `tabBarRepeatedPressBehavior`
579
+
580
+
Behavior when the focused tab is pressed again. Available properties are:
581
+
582
+
- `scrollToTop` - whether to scroll the first scroll view in the screen to the top
583
+
- `popToTop` - whether to pop a nested stack to its first screen
584
+
585
+
Both properties default to `true`.
586
+
587
+
Example:
588
+
589
+
```js
590
+
tabBarRepeatedPressBehavior: {
591
+
scrollToTop:false,
592
+
popToTop:false
593
+
},
594
+
```
595
+
596
+
For scroll to top behavior to work, make sure to use [`useScrollToTop`](use-scroll-to-top.md) in your screen.
597
+
562
598
#### `sceneStyle`
563
599
564
600
Style object for the component wrapping the screen content.
@@ -624,8 +660,17 @@ This event is fired when the user presses the tab button for the current screen
624
660
625
661
- If the tab is not focused, tab press will focus that tab
626
662
- If the tab is already focused:
627
-
- If the screen for the tab renders a scroll view, you can use [`useScrollToTop`](use-scroll-to-top.md) to scroll it to top
628
-
- If the screen for the tab renders a stack navigator, a `popToTop` action is performed on the stack
663
+
- If the screen for the tab renders a scroll view, it can be scrolled to the top
664
+
- If the screen for the tab renders a stack navigator, it can be popped to the top
665
+
666
+
See [`tabBarRepeatedPressBehavior`](#tabbarrepeatedpressbehavior) for more details.
667
+
668
+
For the built-in tab bar, the `behavior` object in `e.data` has the following properties:
669
+
670
+
- `scrollToTop` - whether the screen should scroll to the top
671
+
- `popToTop` - whether a nested stack should pop to its first screen
672
+
673
+
Consumers of this event can use these properties to determine if they should perform these actions.
629
674
630
675
To prevent the default behavior, you can call `event.preventDefault`:
Style for the overlay on top of the content view when drawer gets open. You can use this to customize the overlay color, opacity, and other properties:
572
578
573
-
Color overlay to be displayed on top of the content view when drawer gets open. The opacity is animated from `0` to `1` when the drawer opens.
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/native-bottom-tab-navigator.md
+29-2Lines changed: 29 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -522,6 +522,24 @@ Setting this to `false` doesn't remove the tab press animation, as the tab can s
522
522
523
523
:::
524
524
525
+
#### `tabBarRepeatedPressBehavior`
526
+
527
+
Behavior when the focused tab is pressed again. Available properties are:
528
+
529
+
-`scrollToTop` - whether to scroll the first scroll view in the screen to the top
530
+
-`popToTop` - whether to pop a nested stack to its first screen
531
+
532
+
Both properties default to `true`.
533
+
534
+
Example:
535
+
536
+
```js
537
+
tabBarRepeatedPressBehavior: {
538
+
scrollToTop:false,
539
+
popToTop:false
540
+
},
541
+
```
542
+
525
543
#### `bottomAccessory`
526
544
527
545
Function that returns a React element to display as an accessory view. The function receives an options object with a `placement` parameter that can be one of the following values:
@@ -584,8 +602,17 @@ This event is fired when the user presses the tab button for the current screen
584
602
585
603
- If the tab is not focused, tab press will focus that tab
586
604
- If the tab is already focused:
587
-
- If the screen for the tab renders a scroll view, you can use [`useScrollToTop`](use-scroll-to-top.md) to scroll it to top
588
-
- If the screen for the tab renders a stack navigator, a `popToTop` action is performed on the stack
605
+
- If the screen for the tab renders a scroll view, it can be scrolled to the top
606
+
- If the screen for the tab renders a stack navigator, it can be popped to the top
607
+
608
+
See [`tabBarRepeatedPressBehavior`](#tabbarrepeatedpressbehavior) for more details.
609
+
610
+
The `data` object in the event contains the following properties:
611
+
612
+
-`origin` - the origin of the event, always `native`
613
+
-`behavior` - An object containing:
614
+
-`scrollToTop` - whether the screen should scroll to the top
615
+
-`popToTop` - whether a nested stack should pop to its first screen
@@ -1099,6 +1117,26 @@ Setting this to `false` doesn't remove the tab press animation, as the tab can s
1099
1117
1100
1118
:::
1101
1119
1120
+
#### `tabBarRepeatedPressBehavior`
1121
+
1122
+
Behavior when the focused tab is pressed again. Available properties are:
1123
+
1124
+
- `scrollToTop` - whether to scroll the first scroll view in the screen to the top
1125
+
- `popToTop` - whether to pop a nested stack to its first screen
1126
+
1127
+
Both properties default to `true`.
1128
+
1129
+
Example:
1130
+
1131
+
```js
1132
+
tabBarRepeatedPressBehavior: {
1133
+
scrollToTop:false,
1134
+
popToTop:false
1135
+
},
1136
+
```
1137
+
1138
+
When using the [`custom` implementation](#implementation), or a [custom tab bar](#tabbar), make sure to use [`useScrollToTop`](use-scroll-to-top.md) in your screen for the scroll-to-top behavior to work.
1139
+
1102
1140
#### `bottomAccessory`
1103
1141
1104
1142
Function that returns a React element to display as an accessory view. The function receives an options object with a `placement` parameter that can be one of the following values:
@@ -1133,23 +1171,6 @@ The content is rendered twice for both placements, but only one is visible at a
1133
1171
1134
1172
:::
1135
1173
1136
-
#### `scrollEdgeEffects`
1137
-
1138
-
Configures the scroll edge effect for the _content ScrollView_ (the ScrollView that is present in first descendants chain of the Screen).
1139
-
Depending on values set, it will blur the scrolling content below certain UI elements (e.g. header items, search bar) for the specified edge of the ScrollView.
1140
-
When set in nested containers, i.e. Native Stack inside Native Bottom Tabs, or the other way around, the ScrollView will use only the innermost one's config.
1141
-
1142
-
Edge effects can be configured for each edge separately. The following values are currently supported:
1143
-
1144
-
-`automatic` - the automatic scroll edge effect style,
1145
-
-`hard` - a scroll edge effect with a hard cutoff and dividing line,
1146
-
-`soft` - a soft-edged scroll edge effect,
1147
-
-`hidden` - no scroll edge effect.
1148
-
1149
-
Defaults to `automatic` for each edge.
1150
-
1151
-
Only supported with `native` implementation on iOS 26 and above.
1152
-
1153
1174
#### `popToTopOnBlur`
1154
1175
1155
1176
Boolean indicating whether any nested stack should be popped to the top of the stack when navigating away from this tab. Defaults to `false`.
@@ -1222,8 +1243,17 @@ This event is fired when the user presses the tab button for the current screen
1222
1243
1223
1244
- If the tab is not focused, tab press will focus that tab
1224
1245
- If the tab is already focused:
1225
-
- If the screen for the tab renders a scroll view, you can use [`useScrollToTop`](use-scroll-to-top.md) to scroll it to top
1226
-
- If the screen for the tab renders a stack navigator, a `popToTop` action is performed on the stack
1246
+
- If the screen for the tab renders a scroll view, it can be scrolled to the top
1247
+
- If the screen for the tab renders a stack navigator, it can be popped to the top
1248
+
1249
+
See [`tabBarRepeatedPressBehavior`](#tabbarrepeatedpressbehavior) for more details.
1250
+
1251
+
The `data` object in the event contains the following properties:
1252
+
1253
+
- `origin` - the origin of the event, `native` for a press from the native tab bar, and omitted for [`custom` implementation](#implementation) or a [custom tab bar](#tabbar).
1254
+
- `behavior` - An object containing:
1255
+
- `scrollToTop` - whether the screen should scroll to the top
1256
+
- `popToTop` - whether a nested stack should pop to its first screen
0 commit comments