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 48ae1a4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/bottom-tab-navigator.md
+9-31Lines changed: 9 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -391,37 +391,15 @@ Style object for the tab item container.
391
391
392
392
Style object for the tab bar. You can configure styles such as background color here.
393
393
394
-
To show your screen under the tab bar, you can set the `position` style to absolute:
394
+
To show your screen under the tab bar, use [`tabBarTransparent`](#tabbartransparent) instead of setting the `position` style to absolute.
395
395
396
-
<ConfigTabs>
397
-
<TabItem value="static">
396
+
#### `tabBarTransparent`
398
397
399
-
```js
400
-
createBottomTabNavigator({
401
-
screenOptions: {
402
-
tabBarStyle: { position:'absolute' },
403
-
},
404
-
screens: {
405
-
// ...
406
-
},
407
-
});
408
-
```
398
+
Whether the tab bar is transparent. Defaults to `false`.
409
399
410
-
</TabItem>
411
-
<TabItem value="dynamic">
412
-
413
-
```js
414
-
<Tab.Navigator
415
-
screenOptions={{
416
-
tabBarStyle: { position:'absolute' },
417
-
}}
418
-
>
419
-
```
420
-
421
-
</TabItem>
422
-
</ConfigTabs>
400
+
When set to `true`, the tab bar is positioned absolutely over the screen content and has a transparent background.
423
401
424
-
You also might need to add a bottom margin to your content if you have an absolutely positioned tab bar. React Navigation won't do it automatically. See [`useBottomTabBarHeight`](#usebottomtabbarheight) for more details.
402
+
You will also need to add a bottom padding to your content. React Navigation won't do it automatically. See [`useBottomTabBarHeight`](#usebottomtabbarheight) for more details.
425
403
426
404
#### `tabBarBackground`
427
405
@@ -439,7 +417,7 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
@@ -472,7 +450,7 @@ import { StyleSheet } from 'react-native';
472
450
</TabItem>
473
451
</ConfigTabs>
474
452
475
-
When using `BlurView`, make sure to set `position:'absolute'` in `tabBarStyle` as well. You'd also need to use [`useBottomTabBarHeight`](#usebottomtabbarheight) to add bottom padding to your content.
453
+
When using `BlurView`, make sure to set [`tabBarTransparent`](#tabbartransparent) as well. You'd also need to use [`useBottomTabBarHeight`](#usebottomtabbarheight) to add bottom padding to your content.
476
454
477
455

478
456
@@ -834,7 +812,7 @@ The bottom tab navigator exports the following hooks:
834
812
835
813
#### `useBottomTabBarHeight`
836
814
837
-
This hook returns the height of the bottom tab bar. By default, the screen content doesn't go under the tab bar. However, if you want to make the tab bar absolutely positioned and have the content go under it (e.g. to show a blur effect), it's necessary to adjust the content to take the tab bar height into account.
815
+
This hook returns the height of the bottom tab bar. By default, the screen content doesn't go under the tab bar. However, if you use [`tabBarTransparent`](#tabbartransparent) and have the content go under it (e.g. to show a blur effect), it's necessary to adjust the content to take the tab bar height into account.
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/stack-navigator.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,9 @@ Use this prop to have visible shadows during transitions. Defaults to `true`.
168
168
169
169
#### `cardOverlayEnabled`
170
170
171
-
Use this prop to have a semi-transparent dark overlay visible under the card during transitions. Defaults to `true` on Android and `false` on iOS.
171
+
Use this prop to have a semi-transparent dark overlay visible under the card during transitions.
172
+
173
+
Defaults to `false` for [`presentation: 'transparentModal'`](#presentation). For other presentations, defaults to `true` on Android and depends on the transition style on iOS.
172
174
173
175
#### `cardOverlay`
174
176
@@ -255,7 +257,7 @@ Interpolated styles for various parts of the header. Refer the [Animations secti
255
257
256
258
#### `keyboardHandlingEnabled`
257
259
258
-
If `false`, the keyboard will NOT automatically dismiss when navigating to a new screen from this screen. Defaults to `true`.
260
+
Whether to manage text input focus and dismiss the keyboard when navigating away from the screen. Defaults to `true`.
0 commit comments