> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pharen.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Combobox

> Import and use the Combobox components from @pharen/ui.

export const PharenUiPreview = ({name, title = 'Pharen UI component preview'}) => <div className="not-prose my-6 overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm dark:border-white/10 dark:bg-zinc-950">
    <div className="pharen-ui-preview-root" data-pharen-ui-preview data-example={name} role="region" aria-label={title} />
  </div>;

Use **Combobox** to collect and edit a value. This page covers every Vue component exported by the public module.

<PharenUiPreview name="combobox" title="Combobox preview" />

<Accordion title="View code">
  ```vue theme={null}
  <script setup lang="ts">
  import { Combobox, ComboboxItem } from '@pharen/ui';
  </script>

  <template>
    <Combobox>
      <ComboboxItem>First item</ComboboxItem>
    </Combobox>
  </template>
  ```
</Accordion>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @pharen/ui
  ```

  ```bash pnpm theme={null}
  pnpm add @pharen/ui
  ```

  ```bash yarn theme={null}
  yarn add @pharen/ui
  ```

  ```bash bun theme={null}
  bun add @pharen/ui
  ```
</CodeGroup>

<Note>
  Import `@pharen/ui/styles.css` exactly once in your application entrypoint.
</Note>

## Usage

```ts theme={null}
import { Combobox, ComboboxAnchor, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList, ComboboxSeparator, ComboboxViewport, ComboboxCancel, ComboboxTrigger } from '@pharen/ui';
```

## Exports

| Export                  | Purpose                                  |
| ----------------------- | ---------------------------------------- |
| `Combobox`              | Exported Vue component from this module. |
| `ComboboxAnchor`        | Exported Vue component from this module. |
| `ComboboxEmpty`         | Exported Vue component from this module. |
| `ComboboxGroup`         | Groups related items.                    |
| `ComboboxInput`         | Exported Vue component from this module. |
| `ComboboxItem`          | Represents one item.                     |
| `ComboboxItemIndicator` | Exported Vue component from this module. |
| `ComboboxList`          | Exported Vue component from this module. |
| `ComboboxSeparator`     | Separates adjacent regions.              |
| `ComboboxViewport`      | Exported Vue component from this module. |
| `ComboboxCancel`        | Exported Vue component from this module. |
| `ComboboxTrigger`       | Opens or activates the component.        |

## Source

[Open the source on GitHub](https://github.com/PharenIT/ELEV8-Labs/tree/main/src/packages/ui/src/components/combobox)
