---
title: Search
description: Search a searchbox text input with a menu. Handle the case where dataset filtering needs to occur outside the combobox component.

link:
  doc: https://kobalte.dev/docs/core/components/search
  api: https://kobalte.dev/docs/core/components/search#api-reference
---

<ComponentPreview name="search-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/search-demo.tsx

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

<StepItem>Copy and paste the following code into your project:</StepItem>

  <ComponentSourceTabs>

    ```tsx title="components/ui/search" file=<rootDir>/apps/docs/src/registry/ui/search.tsx

    ```

    ```tsx title="components/ui/search" file=<rootDir>/apps/unocss-playground/src/registry/ui/search.tsx

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import {
  Search,
  SearchContent,
  SearchControl,
  SearchPortal,
} from "@components/ui/search"
```

```tsx
<Search>
  <SearchControl />
  <SearchPortal>
    <SearchContent />
  </SearchPortal>
</Search>
```

## Examples

### Inline

<ComponentPreview name="search-inline-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/search-inline-demo.tsx

```

</ComponentPreview>
