File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ SwiftUI's TabView offer built-in smooth animations between tabs.
49
49
50
50
Using one prop you can add haptic feedback support to your tab bar on both Android and iOS. This can significantly enhance users experience.
51
51
52
+ ### Picture In Picture avoidance
53
+
54
+ When picture in picture popup is shown system will automatically avoid tabs from being covered by it.
55
+
56
+ <video controls width = " 100%" src = ' https://github.com/user-attachments/assets/061ed6bc-39ea-4ee0-820f-981a9af9a203' />
57
+
52
58
## When to use JS Bottom Tabs
53
59
54
60
Using native components enforce certain constraints that we need to adapt to.
Original file line number Diff line number Diff line change @@ -172,6 +172,38 @@ Supported properties:
172
172
- ` fontSize `
173
173
- ` fontWeight `
174
174
175
+ #### ` tabBar `
176
+
177
+ Function that returns a React element to display as the tab bar.
178
+
179
+ The function receives an object containing the following properties as the argument:
180
+
181
+ - ` state ` - The state object for the tab navigator.
182
+ - ` descriptors ` - The descriptors object containing options for the tab navigator.
183
+ - ` navigation ` - The navigation object for the tab navigator.
184
+
185
+ The state.routes array contains all the routes defined in the navigator. Each route's options can be accessed using ` descriptors[route.key].options ` .
186
+
187
+ Example:
188
+
189
+ ``` tsx
190
+ function MyTabBar({ state , descriptors , navigation }) {
191
+ // Render your tab bar here
192
+ }
193
+
194
+ function MyTabs() {
195
+ return (
196
+ <Tab.Navigator
197
+ tabBar = { (props ) => <MyTabBar { ... props } />}
198
+ >
199
+ <Tab.Screen name = " Home" component = { HomeScreen } />
200
+ <Tab.Screen name = " Profile" component = { ProfileScreen } />
201
+ </Tab.Navigator >
202
+ );
203
+ }
204
+ ```
205
+
206
+
175
207
### Options
176
208
177
209
The following options can be used to configure the screens in the navigator. These can be specified under ` screenOptions ` prop of ` Tab.navigator ` or ` options ` prop of ` Tab.Screen ` .
You can’t perform that action at this time.
0 commit comments