Skip to content

Commit cff54fa

Browse files
committed
Document bottom accessory
1 parent 2bc1608 commit cff54fa

File tree

5 files changed

+37
-3
lines changed

5 files changed

+37
-3
lines changed

src/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ article video {
582582

583583
article video[data-landscape] {
584584
width: auto;
585-
height: 373px;
585+
max-height: 373px;
586586
}
587587

588588
@media (max-width: 320px) {
832 KB
Binary file not shown.
-1.63 MB
Binary file not shown.
-408 KB
Binary file not shown.

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

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ headerSearchBarOptions: {
116116
},
117117
```
118118

119-
<video playsInline autoPlay muted loop>
119+
<video playsInline autoPlay muted loop data-landscape style={{ maxWidth: '402px' }}>
120+
120121
<source src="/assets/7.x/native-bottom-tabs-ios-search.mp4" />
121122
</video>
122123

@@ -351,10 +352,43 @@ The minimize behavior for the tab bar. Supported values:
351352

352353
Only supported on iOS 26 and above.
353354

354-
<video playsInline autoPlay muted loop>
355+
<video playsInline autoPlay muted loop data-landscape style={{ maxWidth: '402px' }}>
356+
355357
<source src="/assets/7.x/native-bottom-tabs-ios-minimize.mp4" />
356358
</video>
357359

360+
#### `bottomAccessory`
361+
362+
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:
363+
364+
- `regular` - at bottom of the screen, above the tab bar if tab bar is at the bottom
365+
- `inline` - inline with the collapsed bottom tab bar (e.g., when minimized based on [`tabBarMinimizeBehavior`](#tabbarminimizebehavior))
366+
367+
Example:
368+
369+
```js
370+
bottomAccessory: ({ placement }) => {
371+
return (
372+
<View style={{ padding: 16 }}>
373+
<Text>Placement: {placement}</Text>
374+
</View>
375+
);
376+
};
377+
```
378+
379+
Only supported on iOS 26 and above.
380+
381+
<video playsInline autoPlay muted loop data-landscape style={{ maxWidth: '402px' }}>
382+
383+
<source src="/assets/7.x/native-bottom-tabs-ios-bottom-accessory.mp4" />
384+
</video>
385+
386+
:::note
387+
388+
The content is rendered twice for both placements, but only one is visible at a time based on the tab bar state. Any shared state should be stored outside of the component to keep both versions in sync.
389+
390+
:::
391+
358392
#### `lazy`
359393

360394
Whether this screen should render only after the first time it's accessed. Defaults to `true`. Set it to `false` if you want to render the screen on the initial render of the navigator.

0 commit comments

Comments
 (0)