feat(ios): add ignoresContentBackground prop for iOS 26 liquid glass control #502
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
iOS 26 introduced a new "liquid glass" material effect for tab bars that dynamically samples colors from the content behind it. While this creates beautiful translucent effects for static content, it can cause readability issues when the content is dynamic (like maps) or has varying colors.
This PR adds a new
ignoresContentBackgroundprop that, when set to true, disables the liquid glass content sampling on iOS 26+ and instead uses a solid background color (fromtabBarStyle.backgroundColor/barTintColor).Usage
With standalone TabView:
With @bottom-tabs/react-navigation:
Implementation
ignoresContentBackgroundprop toTabViewNativeComponent.ts(codegen)ignoresContentBackgroundtoTabViewProps.swiftRCTTabViewComponentView.mm.toolbarBackgroundVisibility(.visible)and.toolbarBackground()modifiers for iOS 26+ inTabViewImpl.swiftTabView.tsxPlatform Support
This prop only has an effect on iOS 26+. On earlier iOS versions and other platforms, it is ignored.
Motivation
When displaying dynamic content like maps behind the tab bar, the liquid glass effect samples various colors from the map, causing the tab bar to have inconsistent or hard-to-read colors. This prop provides a way to opt-out of the liquid glass sampling while maintaining the glass material appearance with a fixed tint color.
Test Plan
ignoresContentBackground={true}- tab bar should show solid backgroundignoresContentBackground={false}(default) - liquid glass should work normallytabBarStyle.backgroundColorvalues