Repository navigation
Expose UINavigationItem.style in Stack v5 iOS header options #4688
juliusmarminge
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I would like to expose UIKit's
UINavigationItem.styleon Stack v5 headers, following the existing platform options shape:The proposed type is
StackHeaderNavigationItemStyleIOS = 'navigator' | 'browser' | 'editor', exported with the other Stack header types.navigationItemStylebelongs toStackHeaderConfigPropsIOS, since it is a navigation-item layout policy rather than an appearance attribute or a shared cross-platform option.These are the three UIKit cases, available from iOS 16:
navigatoruses the traditional navigation layout and is UIKit's default.browseraligns the title to the leading side and supports center item groups.editoruses the leading title layout and a chevron-only back button.References: UINavigationItem.ItemStyle, style.
The option would map directly to the native enum. Omitting the option, removing it during an update, or removing the header config must restore
navigator. On systems before iOS 16 and on tvOS it would be ignored; Android would drop theiosoption through its existing wrapper. It would not add center items, toolbar placement, search behavior, or back-button customization.A minimal FabricExample scenario would switch between all three cases on a pushed screen, reset by removing the option, remove/remount the header config, and navigate between screens with different styles. Native verification would use matching base/head captures plus live updates on iPhone and iPad, since UIKit controls the layout by idiom and available space.
This proposal generalizes a boolean editor-style implementation from T3 Code's local v5 patch into the full UIKit enum. It is independent of the missing native implementation of the existing
backButtonHiddenprop. The legacy back-button title/menu work in #3303 does not expose navigation-item style.For React Navigation, main does not yet have a Stack v5 adapter. I plan a companion patch against the v5 adoption draft #13115, and will keep that integration gate explicit on the Screens PR.
Does
ios.navigationItemStylewith the complete UIKit enum fit the direction for Stack v5 headers?All reactions