# Search Field (Andromeda Legacy)

Search Field is a component of the free, MIT-licensed Andromeda Legacy design system from AI Canvas (https://aicanvas.me). Index of every system, component and install setup: https://aicanvas.me/llms.txt

Command-bar-style search input with optional ⌘-K shortcut chip. Five states: idle, hover, focus, text-inactive (placeholder), text-active (typed). Controlled or uncontrolled.

- Design system: [Andromeda Legacy](https://aicanvas.me/design-systems/andromeda.md)
- License: MIT
- Install slug: `andromeda-search-field`
- Page: https://aicanvas.me/design-systems/andromeda/search-field

## Install

```bash
npx shadcn@latest add @aicanvas/andromeda-search-field
```

Needs a free AI Canvas account; signed out, the command writes a placeholder (an `AccountRequired` notice) instead.

Every Andromeda Legacy component at once: `npx shadcn@latest add @aicanvas/andromeda`.

Token setup: the Install section of https://aicanvas.me/llms.txt.

## Use it

It installs to `components/aicanvas/andromeda/components/SearchField.tsx` (under `src/` if your project has one). With the usual `@/` alias:

```tsx
import SearchField from '@/components/aicanvas/andromeda/components/SearchField'

<SearchField />
```

## Example

```tsx
import SearchField from '@/components/aicanvas/andromeda/components/SearchField'

<SearchField placeholder="Search invoices" shortcut="⌘ K" />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `placeholder?` | `string` | `'Search anything'` | Text shown when empty. Defaults to "Search anything". |
| `shortcut?` | `string\|null` | `'⌘ K'` | Keyboard shortcut chip. Pass null to hide. Defaults to "⌘ K". |
| `icon?` | `React.ComponentType<IconProps>` | `Search` | Leading icon. Defaults to Search. Pass null to hide. |
| `value?` | `string` |  | Controlled value. |
| `defaultValue?` | `string` |  | Uncontrolled initial value. |
| `onValueChange?` | `(next: string) => void` |  | Called when typed value changes. |
| `ariaLabel?` | `string` |  | Accessible label for the input. Defaults to placeholder. |
| `className?` | `string` |  | Class name forwarded to the outer wrapper. |
| `style?` | `React.CSSProperties` |  | Style merged into the outer wrapper (lets the parent set width). |
| `disabled?` | `boolean` |  | Disables the field: dims it to the disabled opacity, shows a not-allowed cursor, and disables the underlying input. |

## More Andromeda Legacy components

- [Segmented Control](https://aicanvas.me/design-systems/andromeda/segmented-control.md)
- [Slider](https://aicanvas.me/design-systems/andromeda/slider.md)
- [Spinner](https://aicanvas.me/design-systems/andromeda/spinner.md)
- [Stat Tile](https://aicanvas.me/design-systems/andromeda/stat-tile.md)
- [Tag](https://aicanvas.me/design-systems/andromeda/tag.md)
