- Components
- Forms
Search Input
A pill search field built on Input Group: leading icon, a clear button while there is text, an optional shortcut hint. Surface-aware.
Installation#
npx shadcn add @ortaui/search-inputExamples#
Default#
Controlled, with clear#
Query: "quiet"
Disabled and invalid#
On a surface#
API reference#
| Prop | Type | Default | Description |
|---|---|---|---|
| surface | "default" | "raised" | auto | Look on a panel. Unset: raised (page fill + border) inside any [data-surface] container. "raised" forces it anywhere; "default" keeps the muted fill even inside a surface. |
| value / defaultValue / onValueChange | string / string / (value) => void | - | Controlled or uncontrolled value. |
| clearable | boolean | true | Show the clear button while there is text. |
| onClear | () => void | - | Called after the clear button empties the field. |
| shortcut | string | - | Hint shown while empty, e.g. ⌘K. Display only. |
| wrapperClassName | string | - | Classes for the pill; className goes to the input. |