Founding price: $35, then $79.99 after 23:59 UTC on 4 November, then $79.99
Get ProA search input with a leading icon, a clear button and an Enter-to-search callback.
Derived from this item’s props table, because it declares no controls of its own. Changes drive the preview live.
import { SearchField } from "@/components/ui/search-field"<SearchField
label="Search docs"
placeholder="Search docs"
onSearch={(query) => console.log(query)}
/>| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Controlled query. |
defaultValue | string | "" | Initial query when uncontrolled. |
onValueChange | (value: string) => void | - | Called when the query changes or is cleared. |
onSearch | (value: string) => void | - | Called when Enter is pressed. |
label | string | "Search" | Accessible name of the input. |
Other <input> props are passed to the input.
event.preventDefault() in your own onKeyDown skips onSearch.