# Hooks (/themes/sdk/reference/search/hooks)

```ts
import { … } from '@poltura/theme-sdk/search';
```

## `useSearch` [#usesearch]

The shopper's search: what they typed, debounced product results, suggestions and featured products.

```ts
useSearch(options?: SearchOptions): SearchState
```

Submitting records the search event and opens the product listing for the query.

**Parameters**

- `options?: SearchOptions`: The result limit, the popular searches and the featured collection.

**Returns:** The search state and the actions that change it.

**Example**

```tsx
import { useSearch } from '@poltura/theme-sdk/search';

export function SearchBox() {
  const search = useSearch({ limit: 5 });
  return (
    <form onSubmit={(event) => { event.preventDefault(); search.submit(); }}>
      <input value={search.query} onChange={(event) => search.setQuery(event.target.value)} />
      <ul>{search.results.map((product) => <li key={product.id}>{product.title}</li>)}</ul>
    </form>
  );
}
```
