Skip to content

Commit

Permalink
Document tabBarPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Mar 26, 2024
1 parent db761ed commit 556ef6e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,28 @@
}

article video {
max-width: 100%;
width: 300px;
height: auto;
max-width: 100%;
vertical-align: top;
margin: var(--ifm-leading) 0;
border-radius: var(--ifm-pre-border-radius);
box-shadow: var(--ifm-global-shadow-lw);
}

article video[data-landscape] {
width: auto;
height: 373px;
}

@media (max-width: 320px) {
article video,
article video[data-landscape] {
width: 100%;
height: auto;
}
}

article video:has(+ video) {
margin-right: var(--ifm-leading);
}
Expand Down
Binary file added static/assets/7.x/bottom-tabs-side.mp4
Binary file not shown.
23 changes: 23 additions & 0 deletions versioned_docs/version-7.x/bottom-tab-navigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,29 @@ import { BlurView } from 'expo-blur';

When using `BlurView`, make sure to set `position: 'absolute'` in `tabBarStyle` as well. You'd also need to use `useBottomTabBarHeight()` to add a bottom padding to your content.

#### `tabBarPosition`

Position of the tab bar. Available values are:

- `bottom` (Default)
- `top`
- `left`
- `right`

When the tab bar is positioned on the `left` or `right`, it is styled as a sidebar. This can be useful when you want to show a sidebar on larger screens and a bottom tab bar on smaller screens:

```js
<Tab.Navigator
screenOptions={{
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
}}
>
```

<video playsInline autoPlay muted loop data-landscape>
<source src="/assets/7.x/bottom-tabs-side.mp4" />
</video>

#### `lazy`

Whether this screens should render the first time it's accessed. Defaults to `true`. Set it to `false` if you want to render the screen on initial render.
Expand Down
2 changes: 2 additions & 0 deletions versioned_docs/version-7.x/upgrading-from-6.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,8 @@ You can use the `tabBarPosition` option to customize the position of the tabs:
</Tab.Navigator>
```

See [Bottom Tab Navigator options](bottom-tab-navigator.md#tabbarposition) for usage.

#### Bottom Tab Navigator now supports animations

The `@react-navigation/bottom-tabs` package now supports animations. This was one of the most requested features on our Canny board: [TabNavigator Custom Transition](https://react-navigation.canny.io/feature-requests/p/tabnavigator-custom-transition).
Expand Down

0 comments on commit 556ef6e

Please sign in to comment.