# 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="/files/cqMTiwDQoP4C42mmloFG" 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                     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usegravity.app/gravity-native/components/search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
