[Feature] Add role option to bottomTab for UITabBarSystemItem support#8286
Merged
markdevocht merged 5 commits intowix:masterfrom May 6, 2026
Merged
Conversation
role option to bottomTab for UITabBarSystemItem supportrole option to bottomTab for UITabBarSystemItem support
role option to bottomTab for UITabBarSystemItem supportrole option to bottomTab for UITabBarSystemItem support
Adds a new `role` property to `OptionsBottomTab` that maps to `UITabBarItem(tabBarSystemItem:)`. Supports all 12 system item types. Key behaviors: - `search` on iOS 26+ renders as a floating Liquid Glass button - `more` activates UIKit's built-in More navigation controller - Custom icons (`icon`, `selectedIcon`, `sfSymbol`, `sfSelectedSymbol`) override the system image after creation - `iconColor` and `selectedIconColor` tint the custom icon - Only one `search` role per bottomTabs layout (warns on duplicates) - standardAppearance/scrollEdgeAppearance copied from the subclass chain onto system items to preserve tab bar styling Includes playground demo and Detox e2e test. Co-authored-by: Cursor <cursoragent@cursor.com>
3a28716 to
5a9d9ed
Compare
Contributor
Author
Updated PR — Addressing Review FeedbackForce-pushed a clean single commit rebased on latest master. Key changes from the previous version: Removed
Fixed
Improved
Added
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds a new
roleproperty toOptionsBottomTabthat maps toUITabBarItem(tabBarSystemItem:tag:)on iOS. This enables using system-provided tab bar items with their native icons and titles.Supported roles:
search,bookmarks,contacts,downloads,favorites,featured,history,more,mostRecent,mostViewed,recents,topRated.iOS 26+ Liquid Glass
On iOS 26+,
role: 'search'renders as a floating magnifying-glass button separated from the tab bar using Apple's new Liquid Glass design language — no extra configuration needed.Usage
Key behaviors
searchper layout: If multiple tabs specifyrole: 'search', only the first is honored; subsequent ones fall back to a normal tab with anRCTLogWarn.icon,selectedIcon,sfSymbol, orsfSelectedSymbolto replace the system-provided image after creation.iconColorandselectedIconColorare applied as tints to custom icons on role tabs.'more'activates UIKit's built-in More navigation controller.standardAppearanceandscrollEdgeAppearanceare copied from the subclass chain onto system items.RNNTabBarItemCreator(not a static global), reset per layout.Changes
RNNBottomTabOptions.{h,mm}— parserolepropertyRNNTabBarItemCreator.{h,mm}—searchRoleUsedinstance property,createSystemItemForRole:mergeItem:with early returns, appearance chain copy, custom icon override with tintingBottomTabPresenter.{h,mm}— exposetabCreatoras readonly propertyRNNBottomTabsController.mm— resetsearchRoleUsedper layoutsrc/interfaces/Options.ts—roleunion type with JSDocTest plan
should render a search role tabe2e test