Search Field
Collects a search query with native form behavior, clear controls, loading feedback, and controlled or uncontrolled state.
@rivetui/search-fieldPreview
Explore each composition interactively, then open its code in the same context.
Default
Collect a query with native search behavior and a built-in clear control.
Controlled results
Use one value callback for typing, the clear button, and the Escape key.
04 components found
Loading
Loading feedback remains non-blocking, so the query stays editable and clearable.
Searching
Registry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/search-fieldPublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
| Prop | Type | Default |
|---|---|---|
value | string | — |
defaultValue | string | "" |
onValueChange | (value: string) => void | — |
clearable | boolean | true |
clearLabel | string | "Clear search" |
loading | boolean | false |
loadingLabel | string | "Searching" |
onClear | () => void | — |
inputClassName | string | — |
className | string | — |