ortaui

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-input

Examples#

Default#

⌘K

Controlled, with clear#

Query: "quiet"

Disabled and invalid#

On a surface#

⌘K

API reference#

PropTypeDefaultDescription
surface"default" | "raised"autoLook 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 / onValueChangestring / string / (value) => void-Controlled or uncontrolled value.
clearablebooleantrueShow the clear button while there is text.
onClear() => void-Called after the clear button empties the field.
shortcutstring-Hint shown while empty, e.g. ⌘K. Display only.
wrapperClassNamestring-Classes for the pill; className goes to the input.