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() {
4747 renderScene = { renderScene }
4848 onIndexChange = { setIndex }
4949 labeled
50+ minimizeBehavior = " onScrollDown" // iOS 26+: Hide tab bar when scrolling down
5051 />
5152 );
5253}
@@ -143,6 +144,22 @@ Supported properties:
143144Appearance attributes for the tab bar when a scroll view is at the bottom.
144145- Type: ` 'default' | 'opaque' | 'transparent' `
145146
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+
146163#### ` tabBarActiveTintColor `
147164
148165Color 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
158158
159159Whether to enable haptic feedback on tab press. Defaults to false.
160160
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+
161178#### ` tabLabelStyle `
162179
163180Object containing styles for the tab label.
Original file line number Diff line number Diff line change @@ -163,4 +163,7 @@ class RCTTabViewManager(context: ReactApplicationContext) :
163163
164164 override fun setScrollEdgeAppearance (view : ReactBottomNavigationView ? , value : String? ) {
165165 }
166+
167+ override fun setMinimizeBehavior (view : ReactBottomNavigationView ? , value : String? ) {
168+ }
166169}
Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ class RCTTabViewManager(context: ReactApplicationContext) : ViewGroupManager<Rea
137137 fun setSidebarAdaptable (view : ReactBottomNavigationView , flag : Boolean ) {
138138 }
139139
140+ @ReactProp(name = " minimizeBehavior" )
141+ fun setMinimizeBehavior (view : ReactBottomNavigationView , flag : Boolean ) {
142+ }
143+
140144 @ReactProp(name = " hapticFeedbackEnabled" )
141145 fun setHapticFeedbackEnabled (view : ReactBottomNavigationView , value : Boolean ) {
142146 tabViewImpl.setHapticFeedbackEnabled(view, value)
Original file line number Diff line number Diff line change @@ -336,6 +336,7 @@ extension View {
336336
337337 @ViewBuilder
338338 func tabBarMinimizeBehavior( _ behavior: MinimizeBehavior ? ) -> some View {
339+ #if compiler(>=6.2)
339340 if #available( iOS 26 . 0 , * ) {
340341 if let behavior {
341342 self . tabBarMinimizeBehavior ( behavior. convert ( ) )
@@ -345,6 +346,9 @@ extension View {
345346 } else {
346347 self
347348 }
349+ #else
350+ self
351+ #endif
348352 }
349353
350354 @ViewBuilder
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ internal enum MinimizeBehavior: String {
66 case onScrollUp
77 case onScrollDown
88
9+ #if compiler(>=6.2)
910 @available ( iOS 26 . 0 , * )
1011 func convert( ) -> TabBarMinimizeBehavior {
1112 switch self {
@@ -19,6 +20,7 @@ internal enum MinimizeBehavior: String {
1920 return . onScrollDown
2021 }
2122 }
23+ #endif
2224}
2325
2426/**
You can’t perform that action at this time.
0 commit comments