Skip to content

Commit 556ef6e

Browse files
committed
Document tabBarPosition
1 parent db761ed commit 556ef6e

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

src/css/custom.css

+14-1
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,28 @@
186186
}
187187

188188
article video {
189-
max-width: 100%;
190189
width: 300px;
191190
height: auto;
191+
max-width: 100%;
192192
vertical-align: top;
193193
margin: var(--ifm-leading) 0;
194194
border-radius: var(--ifm-pre-border-radius);
195195
box-shadow: var(--ifm-global-shadow-lw);
196196
}
197197

198+
article video[data-landscape] {
199+
width: auto;
200+
height: 373px;
201+
}
202+
203+
@media (max-width: 320px) {
204+
article video,
205+
article video[data-landscape] {
206+
width: 100%;
207+
height: auto;
208+
}
209+
}
210+
198211
article video:has(+ video) {
199212
margin-right: var(--ifm-leading);
200213
}
178 KB
Binary file not shown.

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

+23
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,29 @@ import { BlurView } from 'expo-blur';
422422

423423
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.
424424

425+
#### `tabBarPosition`
426+
427+
Position of the tab bar. Available values are:
428+
429+
- `bottom` (Default)
430+
- `top`
431+
- `left`
432+
- `right`
433+
434+
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:
435+
436+
```js
437+
<Tab.Navigator
438+
screenOptions={{
439+
tabBarPosition: dimensions.width < 600 ? 'bottom' : 'left',
440+
}}
441+
>
442+
```
443+
444+
<video playsInline autoPlay muted loop data-landscape>
445+
<source src="/assets/7.x/bottom-tabs-side.mp4" />
446+
</video>
447+
425448
#### `lazy`
426449

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

versioned_docs/version-7.x/upgrading-from-6.x.md

+2
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ You can use the `tabBarPosition` option to customize the position of the tabs:
662662
</Tab.Navigator>
663663
```
664664

665+
See [Bottom Tab Navigator options](bottom-tab-navigator.md#tabbarposition) for usage.
666+
665667
#### Bottom Tab Navigator now supports animations
666668

667669
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).

0 commit comments

Comments
 (0)