Skip to content

Commit df85834

Browse files
committed
update search bar docs
1 parent 0078b01 commit df85834

File tree

1 file changed

+38
-5
lines changed

1 file changed

+38
-5
lines changed

versioned_docs/version-7.x/native-stack-navigator.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ Example:
11751175

11761176
#### `headerSearchBarOptions`
11771177

1178-
Options to render a native search bar on iOS. Search bars are rarely static so normally it is controlled by passing an object to `headerSearchBarOptions` navigation option in the component's body.
1178+
Options to render a native search bar. Search bars are rarely static so normally it is controlled by passing an object to `headerSearchBarOptions` navigation option in the component's body.
11791179

11801180
You also need to specify `contentInsetAdjustmentBehavior="automatic"` in your `ScrollView`, `FlatList` etc. If you don't have a `ScrollView`, specify `headerTransparent: false`.
11811181

@@ -1202,18 +1202,20 @@ Ref to manipulate the search input imperatively. It contains the following metho
12021202
- `setText` - sets the search bar's content to given value
12031203
- `clearText` - removes any text present in the search bar input field
12041204
- `cancelSearch` - cancel the search and close the search bar
1205+
- `toggleCancelButton` - depending on passed boolean value, hides or shows cancel button (only supported on iOS)
12051206

12061207
##### `autoCapitalize`
12071208

12081209
Controls whether the text is automatically auto-capitalized as it is entered by the user.
12091210
Possible values:
12101211

1212+
- `systemDefault`
12111213
- `none`
12121214
- `words`
12131215
- `sentences`
12141216
- `characters`
12151217

1216-
Defaults to `sentences`.
1218+
Defaults to `systemDefault` which is the same as `sentences` on iOS and `none` on Android.
12171219

12181220
##### `autoFocus`
12191221

@@ -1241,7 +1243,7 @@ Only supported on iOS.
12411243

12421244
The text to be used instead of default `Cancel` button text.
12431245

1244-
Only supported on iOS.
1246+
Only supported on iOS. **Deprecated** starting from iOS 26.
12451247

12461248
##### `disableBackButtonOverride`
12471249

@@ -1251,7 +1253,9 @@ Only supported on Android.
12511253

12521254
##### `hideNavigationBar`
12531255

1254-
Boolean indicating whether to hide the navigation bar during searching. Defaults to `true`.
1256+
Boolean indicating whether to hide the navigation bar during searching.
1257+
1258+
If left unset, system default is used.
12551259

12561260
Only supported on iOS.
12571261

@@ -1276,7 +1280,36 @@ Only supported on Android.
12761280

12771281
##### `obscureBackground`
12781282

1279-
Boolean indicating whether to obscure the underlying content with semi-transparent overlay. Defaults to `true`.
1283+
Boolean indicating whether to obscure the underlying content with semi-transparent overlay.
1284+
1285+
If left unset, system default is used.
1286+
1287+
Only supported on iOS.
1288+
1289+
##### `placement`
1290+
1291+
Controls preferred placement of the search bar. Defaults to `automatic`.
1292+
1293+
Supported values:
1294+
1295+
- `automatic`
1296+
- `stacked`
1297+
- `inline` (**deprecated** starting from iOS 26, it is mapped to `integrated`)
1298+
- `integrated` (available starting from iOS 26, on prior versions it is mapped to `inline`)
1299+
- `integratedButton` (available starting from iOS 26, on prior versions it is mapped to `inline`)
1300+
- `integratedCentered` (available starting from iOS 26, on prior versions it is mapped to `inline`)
1301+
1302+
Only supported on iOS.
1303+
1304+
##### `allowToolbarIntegration`
1305+
1306+
Boolean indicating whether the system can place the search bar among other toolbar items on iPhone.
1307+
1308+
Set this prop to `false` to prevent the search bar from appearing in the toolbar when `placement` is `automatic`, `integrated`, `integratedButton` or `integratedCentered`.
1309+
1310+
Defaults to `true`. If `placement` is set to `stacked`, the value of this prop will be overridden with `false`.
1311+
1312+
Only supported on iOS, starting from iOS 26.
12801313

12811314
##### `placeholder`
12821315

0 commit comments

Comments
 (0)