Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/respect-user-tab-bar-hidden.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-native-bottom-tabs': patch
---

Respect user-supplied `tabBarHidden` on `TabView`. The prop was wired natively but the JS wrapper hardcoded `tabBarHidden={!!renderCustomTabBar}` after the `{...props}` spread, so any user value was silently overwritten. The prop is now declared on the public `TabView` API and only falls back to the custom-tab-bar default when the caller omits it, which lets iOS 26+ users hide the SwiftUI-backed tab bar from JS again.
Comment thread
thiagobrez marked this conversation as resolved.
Outdated
11 changes: 10 additions & 1 deletion packages/react-native-bottom-tabs/src/TabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ interface Props<Route extends BaseRoute> {
* @default 'locale'
*/
layoutDirection?: LayoutDirection;
/**
* Whether to hide the native tab bar. Defaults to `true` when a custom
* `tabBar` is provided (so the native bar does not stack on top of the
* custom one), otherwise `false`. Set explicitly to override the default,
* which is required on iOS 26+ where `UITabBar.isHidden` workarounds from
* outside React Native no longer reach the SwiftUI-backed tab bar.
*/
Comment thread
thiagobrez marked this conversation as resolved.
tabBarHidden?: boolean;
}

const ANDROID_MAX_TABS = 100;
Expand Down Expand Up @@ -247,6 +255,7 @@ const TabView = <Route extends BaseRoute>({
labeled = Platform.OS !== 'android' ? true : undefined,
getFreezeOnBlur = ({ route }: { route: Route }) => route.freezeOnBlur,
tabBar: renderCustomTabBar,
tabBarHidden,
Comment thread
thiagobrez marked this conversation as resolved.
tabBarStyle,
tabLabelStyle,
renderBottomAccessoryView,
Expand Down Expand Up @@ -404,7 +413,7 @@ const TabView = <Route extends BaseRoute>({
// When rendering a custom tab bar, icons can be React elements, which will not be properly resolved.
icons={renderCustomTabBar ? undefined : resolvedIconAssets}
selectedPage={focusedKey}
tabBarHidden={!!renderCustomTabBar}
tabBarHidden={tabBarHidden ?? !!renderCustomTabBar}
onTabLongPress={handleTabLongPress}
onPageSelected={handlePageSelected}
onTabBarMeasured={handleTabBarMeasured}
Expand Down