> For the complete documentation index, see [llms.txt](https://docs.usegravity.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usegravity.app/gravity-native/components/search.md).

# Search

A `<SearchBox/>` can be used anywhere to enable the user to perform a search. A common example is searching a table.

## Preview

<div align="left"><figure><img src="https://3357577683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LlnrBGdA8s50Vnplq1j%2Fuploads%2FFjz0TWzRGoAnm8lLXY5s%2Fsearch.png?alt=media&amp;token=a9a6546e-74f0-4fce-9b1e-0500036ed37d" alt="" width="375"><figcaption></figcaption></figure></div>

## Code

```javascript
<Search callback={ search }/>
```

## Props <a href="#props" id="props"></a>

| Prop        | Description                            | Required | Value                      |
| ----------- | -------------------------------------- | -------- | -------------------------- |
| callback    | function executed on change and submit | required | function                   |
| placeholder | placeholder text                       | optional | string *(default: Search)* |
| value       | initial value                          | optional | string                     |
