File tree Expand file tree Collapse file tree 7 files changed +52
-0
lines changed
packages/react-native-bottom-tabs Expand file tree Collapse file tree 7 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' react-native-bottom-tabs ' : patch
3
+ ---
4
+
5
+ feat: implement iOS 26 minimizeBehavior feature
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export default function TabViewExample() {
47
47
renderScene = { renderScene }
48
48
onIndexChange = { setIndex }
49
49
labeled
50
+ minimizeBehavior = " onScrollDown" // iOS 26+: Hide tab bar when scrolling down
50
51
/>
51
52
);
52
53
}
@@ -143,6 +144,22 @@ Supported properties:
143
144
Appearance attributes for the tab bar when a scroll view is at the bottom.
144
145
- Type: ` 'default' | 'opaque' | 'transparent' `
145
146
147
+ #### ` minimizeBehavior ` <Badge text =" iOS 26+ " type =" info " />
148
+
149
+ Controls how the tab bar behaves when content is scrolled.
150
+ - Type: ` 'automatic' | 'onScrollDown' | 'onScrollUp' | 'never' `
151
+ - Default: ` undefined ` (uses system default)
152
+
153
+ Options:
154
+ - ` automatic ` : Platform determines the behavior
155
+ - ` onScrollDown ` : Tab bar minimizes when scrolling down
156
+ - ` onScrollUp ` : Tab bar minimizes when scrolling up
157
+ - ` never ` : Tab bar never minimizes
158
+
159
+ ::: note
160
+ This feature requires iOS 26.0 or later and is only available on iOS. On older versions, this prop is ignored.
161
+ :::
162
+
146
163
#### ` tabBarActiveTintColor `
147
164
148
165
Color for the active tab.
Original file line number Diff line number Diff line change @@ -158,6 +158,23 @@ Tab views using the sidebar adaptable style have an appearance
158
158
159
159
Whether to enable haptic feedback on tab press. Defaults to false.
160
160
161
+ #### ` minimizeBehavior ` <Badge text = " iOS 26+" type = " info" />
162
+
163
+ Controls how the tab bar behaves when content is scrolled.
164
+
165
+ - Type: ` 'automatic' | 'onScrollDown' | 'onScrollUp' | 'never' `
166
+ - Default: ` undefined ` (uses system default)
167
+
168
+ Options:
169
+ - ` automatic ` : Platform determines the behavior
170
+ - ` onScrollDown ` : Tab bar minimizes when scrolling down
171
+ - ` onScrollUp ` : Tab bar minimizes when scrolling up
172
+ - ` never ` : Tab bar never minimizes
173
+
174
+ :::note
175
+ This feature requires iOS 26.0 or later and is only available on iOS. On older versions, this prop is ignored.
176
+ :::
177
+
161
178
#### ` tabLabelStyle `
162
179
163
180
Object containing styles for the tab label.
Original file line number Diff line number Diff line change @@ -163,4 +163,7 @@ class RCTTabViewManager(context: ReactApplicationContext) :
163
163
164
164
override fun setScrollEdgeAppearance (view : ReactBottomNavigationView ? , value : String? ) {
165
165
}
166
+
167
+ override fun setMinimizeBehavior (view : ReactBottomNavigationView ? , value : String? ) {
168
+ }
166
169
}
Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ class RCTTabViewManager(context: ReactApplicationContext) : ViewGroupManager<Rea
137
137
fun setSidebarAdaptable (view : ReactBottomNavigationView , flag : Boolean ) {
138
138
}
139
139
140
+ @ReactProp(name = " minimizeBehavior" )
141
+ fun setMinimizeBehavior (view : ReactBottomNavigationView , flag : Boolean ) {
142
+ }
143
+
140
144
@ReactProp(name = " hapticFeedbackEnabled" )
141
145
fun setHapticFeedbackEnabled (view : ReactBottomNavigationView , value : Boolean ) {
142
146
tabViewImpl.setHapticFeedbackEnabled(view, value)
Original file line number Diff line number Diff line change @@ -336,6 +336,7 @@ extension View {
336
336
337
337
@ViewBuilder
338
338
func tabBarMinimizeBehavior( _ behavior: MinimizeBehavior ? ) -> some View {
339
+ #if compiler(>=6.2)
339
340
if #available( iOS 26 . 0 , * ) {
340
341
if let behavior {
341
342
self . tabBarMinimizeBehavior ( behavior. convert ( ) )
@@ -345,6 +346,9 @@ extension View {
345
346
} else {
346
347
self
347
348
}
349
+ #else
350
+ self
351
+ #endif
348
352
}
349
353
350
354
@ViewBuilder
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ internal enum MinimizeBehavior: String {
6
6
case onScrollUp
7
7
case onScrollDown
8
8
9
+ #if compiler(>=6.2)
9
10
@available ( iOS 26 . 0 , * )
10
11
func convert( ) -> TabBarMinimizeBehavior {
11
12
switch self {
@@ -19,6 +20,7 @@ internal enum MinimizeBehavior: String {
19
20
return . onScrollDown
20
21
}
21
22
}
23
+ #endif
22
24
}
23
25
24
26
/**
You can’t perform that action at this time.
0 commit comments