You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 31320c6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/elements.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,15 +355,18 @@ It can contain the following properties:
355
355
-`setText` - sets the search bar's content to given value
356
356
-`clearText` - removes any text present in the search bar input field
357
357
-`cancelSearch` - cancel the search and close the search bar
358
-
-`autoCapitalize`: The auto-capitalization behavior. Possible values: `none`, `words`, `sentences`, `characters`.
358
+
-`autoCapitalize`: The auto-capitalization behavior. Possible values: `systemDefault`, `none`, `words`, `sentences`, `characters`.
359
359
-`autoFocus`: Automatically focus search input on mount.
360
360
-`cancelButtonText`: Text to be used instead of default `Cancel` button text (iOS only).
361
361
-`cancelButtonAccessibilityLabel`: Accessibility label for the button that closes the search bar. Defaults to `cancelButtonText` on iOS and `Close` on other platforms.
362
362
-`clearButtonAccessibilityLabel`: Accessibility label for the button that clears the search input. Defaults to `Clear text`.
363
363
-`openButtonAccessibilityLabel`: Accessibility label for the header button that opens the search bar. Defaults to `Search`.
364
364
-`inputType`: Type of the input. Possible values: `text`, `phone`, `number`, `email`.
365
+
-`enterKeyHint`: Determines how the return key should look. Defaults to `search`.
365
366
-`onBlur`: Callback that gets called when search input has lost focus.
366
-
-`onChangeText`: Callback that gets called when the text changes.
367
+
-`onChangeText`: Callback that gets called when the text changes. It receives an event containing the current text.
368
+
-`onSubmitEditing`: Callback that gets called when the submit button is pressed. It receives an event containing the current text.
369
+
-`onOpen`: Callback that gets called when search input is opened.
367
370
-`onClose`: Callback that gets called when search input is closed.
368
371
-`onFocus`: Callback that gets called when search input has received focus.
369
372
-`placeholder`: Text displayed when search input is empty.
@@ -128,7 +128,7 @@ Uses iOS built-in tab bar items with standard iOS styling and localized titles.
128
128
129
129
The [`tabBarIcon`](#tabbaricon) and [`tabBarLabel`](#tabbarlabel) options override the icon and label from the system item. If you want to keep the system behavior on iOS, but need to provide icon and label for other platforms, use `Platform.OS` or `Platform.select` to conditionally set `undefined` for `tabBarIcon` and `tabBarLabel` on iOS.
130
130
131
-
When set to `search`, the tab may receive prominent visual treatment on iOS 26. See [`tabBarRole`](#tabbarrole) for the behavior on iOS 27 and above.
131
+
When set to `search`, the tab may receive prominent visual treatment on iOS 26 only. See [`tabBarRole`](#tabbarrole)instead for a setup that works on iOS 27 and above as well.
132
132
133
133
#### `tabBarRole`
134
134
@@ -137,19 +137,19 @@ The role of the tab within the system tab bar. Supported values:
137
137
-`prominent` - the tab gets prominent visual treatment when supported on iOS 27 and above
138
138
-`search` - the tab is used as the system search tab
139
139
140
-
With the `prominent` role, the tab may receive special styling to make it stand out, such as a separate button next to the tab bar. Only one tab can have the `prominent` role at a time.
140
+
With the `prominent` role, the tab may receive special styling to make it stand out, such as a separate button next to the tab bar. Tabs with prominent styling also stay visible when the tab bar [minimizes](#tabbarminimizebehavior). Only one tab can have the `prominent` role at a time.
On iOS 26.1, a tab with the `search` role gets prominent visual treatment. On iOS 27 and above, it gets prominent styling only if [`tabBarSearchAutoFocus`](#tabbarsearchautofocus) is enabled and no other tab has the `prominent` role. On iOS 27 and above, it also stays visible when the tab bar [minimizes](#tabbarminimizebehavior).
146
+
On iOS 26, a tab with the `search` role gets prominent visual treatment. On iOS 27 and above, it gets prominent styling only if [`tabBarSearchAutoFocus`](#tabbarsearchautofocus) is enabled and no other tab has the `prominent` role.
147
147
148
148
The tab uses the system search icon and label by default on iOS. You can override them with [`tabBarSystemItem`](#tabbarsystemitem), [`tabBarIcon`](#tabbaricon), or [`tabBarLabel`](#tabbarlabel).
149
149
150
150
On iOS 26.1 and above, at most one tab can have the `search` role. Adding or removing the `search` role after the tab is rendered is not supported.
151
151
152
-
Also see [Search tab on iOS 26+](#search-tab-on-ios-26).
152
+
Also see [Search tab on iOS](#search-tab-on-ios).
153
153
154
154
Only supported on iOS.
155
155
@@ -163,21 +163,17 @@ Defaults to `false`.
163
163
164
164
Only supported on iOS 26.1 and above.
165
165
166
-
##### Search tab on iOS 26+
166
+
##### Search tab on iOS
167
167
168
-
The[`tabBarRole`](#tabbarrole)option has special styling and behavior when set to `search`on iOS 26.1 and above.
168
+
When[`tabBarRole`](#tabbarrole)is set to `search`. The icon and label use the system search icon and label by default, and the tab may receive prominent visual treatment on iOS 26 and above.
169
169
170
-
Additionally, when the `search` tab is selected, the tab bar transforms into a search field if:
170
+
On iOS 27 and above, the [`tabBarSearchAutoFocus`](#tabbarsearchautofocus) option also needs to be enabled for the tab to receive prominent visual treatment.
171
171
172
-
-[`tabBarSearchAutoFocus`](#tabbarsearchautofocus) is enabled
173
-
- The screen has a nested [native stack navigator](native-stack-navigator.md)
174
-
- The focused screen in the nested native stack has [`headerSearchBarOptions`](native-stack-navigator.md#headersearchbaroptions)
175
-
176
-
This won't work if `headerSearchBarOptions` is set on the tab screen itself.
172
+
Additionally, the bottom tab bar transforms into a search field if it has a nested [native stack navigator](native-stack-navigator.md) with [`headerSearchBarOptions`](native-stack-navigator.md#headersearchbaroptions) on the stack's first screen.
177
173
178
174
Example:
179
175
180
-
```js name="Search Tab on iOS 26" snack static2dynamic
176
+
```js name="Search Tab on iOS" snack static2dynamic
@@ -424,7 +424,7 @@ Only supported on iOS with `native` implementation.
424
424
425
425
The [`tabBarIcon`](#tabbaricon) and [`tabBarLabel`](#tabbarlabel) options override the icon and label from the system item. If you want to keep the system behavior on iOS, but need to provide icon and label for other platforms, use `Platform.OS` or `Platform.select` to conditionally set `undefined` for `tabBarIcon` and `tabBarLabel` on iOS.
426
426
427
-
When set to `search`, the tab may receive prominent visual treatment on iOS 26. See [`tabBarRole`](#tabbarrole) for the behavior on iOS 27 and above.
427
+
When set to `search`, the tab may receive prominent visual treatment on iOS 26 only. See [`tabBarRole`](#tabbarrole) instead for a setup that works on iOS 27 and above as well.
428
428
429
429
#### `tabBarRole`
430
430
@@ -433,19 +433,19 @@ The role of the tab within the system tab bar. Supported values:
433
433
- `prominent` - the tab gets prominent visual treatment when supported on iOS 27 and above
434
434
- `search` - the tab is used as the system search tab
435
435
436
-
With the `prominent` role, the tab may receive special styling to make it stand out, such as a separate button next to the tab bar. Only one tab can have the `prominent` role at a time.
436
+
With the `prominent` role, the tab may receive special styling to make it stand out, such as a separate button next to the tab bar. Tabs with prominent styling also stay visible when the tab bar [minimizes](#tabbarminimizebehavior). Only one tab can have the `prominent` role at a time.
On iOS 26.1, a tab with the `search` role gets prominent visual treatment. On iOS 27 and above, it gets prominent styling only if [`tabBarSearchAutoFocus`](#tabbarsearchautofocus) is enabled and no other tab has the `prominent` role. On iOS 27 and above, it also stays visible when the tab bar [minimizes](#tabbarminimizebehavior).
442
+
On iOS 26, a tab with the `search` role gets prominent visual treatment. On iOS 27 and above, it gets prominent styling only if [`tabBarSearchAutoFocus`](#tabbarsearchautofocus) is enabled and no other tab has the `prominent` role.
443
443
444
444
The tab uses the system search icon and label by default on iOS. You can override them with [`tabBarSystemItem`](#tabbarsystemitem), [`tabBarIcon`](#tabbaricon), or [`tabBarLabel`](#tabbarlabel).
445
445
446
446
On iOS 26.1 and above, at most one tab can have the `search` role. Adding or removing the `search` role after the tab is rendered is not supported.
447
447
448
-
Also see [Search tab on iOS 26+](#search-tab-on-ios-26).
448
+
Also see [Search tab on iOS](#search-tab-on-ios).
449
449
450
450
Only supported on iOS with `native` implementation.
451
451
@@ -459,21 +459,17 @@ Defaults to `false`.
459
459
460
460
Only supported with `native` implementation on iOS 26.1 and above.
461
461
462
-
##### Search tab on iOS 26+
462
+
##### Search tab on iOS
463
463
464
-
The [`tabBarRole`](#tabbarrole) option has special styling and behavior when set to `search`on iOS 26.1 and above.
464
+
When [`tabBarRole`](#tabbarrole) is set to `search`. The icon and label use the system search icon and label by default, and the tab may receive prominent visual treatment on iOS 26 and above.
465
465
466
-
Additionally, when the `search` tab is selected, the tab bar transforms into a search field if:
466
+
On iOS 27 and above, the [`tabBarSearchAutoFocus`](#tabbarsearchautofocus) option also needs to be enabled for the tab to receive prominent visual treatment.
467
467
468
-
- [`tabBarSearchAutoFocus`](#tabbarsearchautofocus) is enabled
469
-
- The screen has a nested [native stack navigator](native-stack-navigator.md)
470
-
- The focused screen in the nested native stack has [`headerSearchBarOptions`](native-stack-navigator.md#headersearchbaroptions)
471
-
472
-
This won't work if `headerSearchBarOptions` is set on the tab screen itself.
468
+
Additionally, the bottom tab bar transforms into a search field if it has a nested [native stack navigator](native-stack-navigator.md) with [`headerSearchBarOptions`](native-stack-navigator.md#headersearchbaroptions) on the stack's first screen.
473
469
474
470
Example:
475
471
476
-
```js name="Search Tab on iOS 26" snack static2dynamic
472
+
```js name="Search Tab on iOS" snack static2dynamic
Copy file name to clipboardExpand all lines: versioned_docs/version-8.x/elements.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -300,15 +300,18 @@ It can contain the following properties:
300
300
-`setText` - sets the search bar's content to given value
301
301
-`clearText` - removes any text present in the search bar input field
302
302
-`cancelSearch` - cancel the search and close the search bar
303
-
-`autoCapitalize`: The auto-capitalization behavior. Possible values: `none`, `words`, `sentences`, `characters`.
303
+
-`autoCapitalize`: The auto-capitalization behavior. Possible values: `systemDefault`, `none`, `words`, `sentences`, `characters`.
304
304
-`autoFocus`: Automatically focus search input on mount.
305
305
-`cancelButtonText`: Text to be used instead of default `Cancel` button text (iOS only).
306
306
-`cancelButtonAccessibilityLabel`: Accessibility label for the button that closes the search bar. Defaults to `Close` on iOS 26+, `cancelButtonText` on other iOS versions, and `Back` on other platforms.
307
307
-`clearButtonAccessibilityLabel`: Accessibility label for the button that clears the search input. Defaults to `Clear text`.
308
308
-`openButtonAccessibilityLabel`: Accessibility label for the header button that opens the search bar. Defaults to `Search`.
309
309
-`inputType`: Type of the input. Possible values: `text`, `phone`, `number`, `email`.
310
+
-`enterKeyHint`: Determines how the return key should look. Defaults to `search`.
310
311
-`onBlur`: Callback that gets called when search input has lost focus.
311
-
-`onChange`: Callback that gets called when the text changes.
312
+
-`onChange`: Callback that gets called when the text changes. It receives an event containing the current text.
313
+
-`onSubmitEditing`: Callback that gets called when the submit button is pressed. It receives an event containing the current text.
314
+
-`onOpen`: Callback that gets called when search input is opened.
312
315
-`onClose`: Callback that gets called when search input is closed.
313
316
-`onFocus`: Callback that gets called when search input has received focus.
314
317
-`placeholder`: Text displayed when search input is empty.
Copy file name to clipboardExpand all lines: versioned_docs/version-8.x/upgrading-from-7.x.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -302,7 +302,7 @@ See the [Bottom Tab Navigator docs](bottom-tab-navigator.md) for all the availab
302
302
303
303
#### Bottom Tabs no longer shows header by default
304
304
305
-
Since Bottom Tabs now renders native tabs by default, the header is no longer shown by default to match native look and feel. You can nest a [Native Stack Navigator](native-stack-navigator.md) inside each tab to show a header that integrates well with native tabs, e.g. [search tab on iOS 26+](bottom-tab-navigator.md#search-tab-on-ios-26).
305
+
Since Bottom Tabs now renders native tabs by default, the header is no longer shown by default to match native look and feel. You can nest a [Native Stack Navigator](native-stack-navigator.md) inside each tab to show a header that integrates well with native tabs, e.g. [search tab on iOS](bottom-tab-navigator.md#search-tab-on-ios).
306
306
307
307
Alternatively, you can enable the built-in header by passing `headerShown: true` in `screenOptions` of the navigator:
0 commit comments