Skip to content

Commit b0a2120

Browse files
committed
feat: add docs
1 parent 3b17061 commit b0a2120

File tree

7 files changed

+52
-0
lines changed

7 files changed

+52
-0
lines changed

.changeset/ready-paths-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-native-bottom-tabs': patch
3+
---
4+
5+
feat: implement iOS 26 minimizeBehavior feature

docs/docs/docs/guides/standalone-usage.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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:
143144
Appearance 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

148165
Color for the active tab.

docs/docs/docs/guides/usage-with-react-navigation.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,23 @@ Tab views using the sidebar adaptable style have an appearance
158158

159159
Whether 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

163180
Object containing styles for the tab label.

packages/react-native-bottom-tabs/android/src/newarch/RCTTabViewManager.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

packages/react-native-bottom-tabs/android/src/oldarch/RCTTabViewManager.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

packages/react-native-bottom-tabs/ios/TabViewImpl.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

packages/react-native-bottom-tabs/ios/TabViewProps.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)