Skip to content

Commit 48ae1a4

Browse files
committed
Update docs with latest changes
1 parent 69ecbcd commit 48ae1a4

2 files changed

Lines changed: 13 additions & 33 deletions

File tree

‎versioned_docs/version-7.x/bottom-tab-navigator.md‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -391,37 +391,15 @@ Style object for the tab item container.
391391
392392
Style object for the tab bar. You can configure styles such as background color here.
393393
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.
395395
396-
<ConfigTabs>
397-
<TabItem value="static">
396+
#### `tabBarTransparent`
398397
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`.
409399
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.
423401
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.
425403
426404
#### `tabBarBackground`
427405
@@ -439,7 +417,7 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
439417

440418
createBottomTabNavigator({
441419
screenOptions: {
442-
tabBarStyle: { position: 'absolute' },
420+
tabBarTransparent: true,
443421
tabBarBackground: () => (
444422
<BlurView tint="light" intensity={100} style={StyleSheet.absoluteFill} />
445423
),
@@ -461,7 +439,7 @@ import { StyleSheet } from 'react-native';
461439

462440
<Tab.Navigator
463441
screenOptions={{
464-
tabBarStyle: { position: 'absolute' },
442+
tabBarTransparent: true,
465443
tabBarBackground: () => (
466444
<BlurView tint="light" intensity={100} style={StyleSheet.absoluteFill} />
467445
),
@@ -472,7 +450,7 @@ import { StyleSheet } from 'react-native';
472450
</TabItem>
473451
</ConfigTabs>
474452
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.
476454
477455
![Tab bar background](/assets/navigators/bottom-tabs/tab-bar-background.png)
478456
@@ -834,7 +812,7 @@ The bottom tab navigator exports the following hooks:
834812
835813
#### `useBottomTabBarHeight`
836814
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.
838816
839817
Example:
840818

‎versioned_docs/version-7.x/stack-navigator.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ Use this prop to have visible shadows during transitions. Defaults to `true`.
168168

169169
#### `cardOverlayEnabled`
170170

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.
172174

173175
#### `cardOverlay`
174176

@@ -255,7 +257,7 @@ Interpolated styles for various parts of the header. Refer the [Animations secti
255257

256258
#### `keyboardHandlingEnabled`
257259

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`.
259261

260262
#### `detachPreviousScreen`
261263

0 commit comments

Comments
 (0)