Skip to content

Commit 4214c6d

Browse files
authored
Update docs about headerBackButtonDisplayMode and headerBackTitle (#1418)
1 parent ee79889 commit 4214c6d

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Diff for: versioned_docs/version-7.x/native-stack-navigator.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ This will have no effect on the first screen in the stack.
174174

175175
#### `headerBackTitle`
176176

177-
Title string used by the back button on iOS. Defaults to the previous scene's title, or "Back" if there's not enough space. Use `headerBackButtonDisplayMode` to customize the behavior.
177+
Title string used by the back button on iOS. Defaults to the previous scene's title.
178+
179+
Use `headerBackButtonDisplayMode: "minimal"` to hide it.
178180

179181
Only supported on iOS.
180182

@@ -186,9 +188,18 @@ How the back button displays icon and title.
186188

187189
Supported values:
188190

189-
- `default`: Displays one of the following depending on the available space: previous screen's title, generic title (e.g. 'Back') or no title (only icon).
190-
- `generic`: Displays one of the following depending on the available space: generic title (e.g. 'Back') or no title (only icon). iOS >= 14 only, falls back to "default" on older iOS versions.
191-
- `minimal`: Always displays only the icon without a title.
191+
- "default" - Displays one of the following depending on the available space: previous screen's title, generic title (e.g. 'Back') or no title (only icon).
192+
- "generic" – Displays one of the following depending on the available space: generic title (e.g. 'Back') or no title (only icon).
193+
- "minimal" – Always displays only the icon without a title.
194+
195+
The space-aware behavior is disabled when:
196+
197+
- The iOS version is 13 or lower
198+
- Custom back title is set (e.g. with `headerBackTitle`)
199+
- Custom font family or size is set (e.g. with `headerBackTitleStyle`)
200+
- Back button menu is disabled (e.g. with `headerBackButtonMenuEnabled`)
201+
202+
In such cases, a static title and icon are always displayed.
192203

193204
Only supported on iOS.
194205

0 commit comments

Comments
 (0)