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
|`children`| Optional |`Element`|`<SearchResultsPanel>`| A component that will display the results. |
167
+
|`color`| Optional |`string`|`light`| The color mode for the input, applying light or dark backgrounds. Accept either `light` or `dark`. |
168
+
|`historySize`| Optional |`number`| 5 | The number of past queries to keep in history. |
169
+
|`options`| Optional |`Object`| - | An object containing options to apply to the search. |
170
+
|`wait`| Optional |`number`| 500 | The delay of debounce for the search to launch after typing in ms. |
169
171
170
-
The `options` object can contain the following keys:
172
+
## `children`
171
173
172
-
-`targets`: `string[]` An array of the indices on which to perform the search. Defaults to an empty array.
173
-
-`historySize`: `number` The max number of search texts kept in the history. Default is 5.
174
-
-`{any}`: `{any}` Any custom option to pass to the search engine.
174
+
The `<Search>` children allow you to customize the way results are displayed. The child component can grab the search result using the `useSearchResult` hook.
If you need it, you can choose to render the `light` or the `dark` version of search input.
213
+
214
+
```tsx
215
+
<Searchcolor="dark" />
216
+
```
217
+
218
+
## `historySize`
219
+
220
+
The number of previous user searches to keep in the popover. For example, if a user performs 10 searches and `historySize` is set to 5, the popover will display the user's last 5 queries.
221
+
222
+
```tsx
223
+
<SearchhistorySize={5} />
224
+
```
225
+
226
+
## `options`
227
+
228
+
An object containing options to apply to the search:
229
+
230
+
-`targets`:`string[]`: an array of the indices on which to perform the search. Defaults to an empty array.
231
+
-`{any}`:`{any}`: any custom option to pass to the search engine.
232
+
233
+
## `wait`
234
+
235
+
The number of milliseconds to wait before processing the search request, immediately after the user enters their last character.
0 commit comments