# Search

A search field and a command palette for finding anything and running commands.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/search
```

## Usage

```tsx
import { CommandPalette } from '@/components/fetaui/search'

export function Example() {
  return <CommandPalette groups={groups} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| SearchField value, defaultValue | string |  |
| SearchField onValueChange | (value) => void |  |
| SearchField loading | boolean | false |
| SearchField shortcut | boolean | true |
| MotionSearch shortcut | boolean | true |
| CommandPalette groups | PaletteGroup[] | required |
| CommandPalette empty | ReactNode | No results |
| animated | boolean | true |

## When to use

- The palette for jumping and running commands from anywhere.
- The field for a page level search.

## When not to use

- To pick a value in a form: use Combobox.

## Accessibility

- The palette input is a combobox controlling a listbox.
- The number of results is announced.

## Motion

- The active row glides between items.
- A running row spins in its tile, then turns success.
- Nested pages slide in from 12 px, and Backspace reverses them.
- Motion Search widens from 320 to 448 on a spring, and its card drops from y -4 and scale .98.
- With reduced motion, the row jumps and results swap.
