Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/SearchInput

SearchInput

Search with an icon, clear button and loading state; no built-in networking.

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add search-input

Dependencies

What add search-input installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

Examples

1 examples · 1 component
search-input

Search and clear

Icon, contextual clear and loading; your app controls the search.

API reference

Forwards props and ref to the container element; it only adds composition utilities.

PropTypeDefault
loading

Shows a spinner instead of the clear button.

booleanfalse
onClear

Called when the clear button is pressed.

() => void—
...InputProps

Accepts value, onValueChange and the rest of the Input props.

——

States

The states that apply to this component and their visual treatment.

StateTreatment
EmptyOnly the search icon; no clear button.
With textThe clear button (with aria-label) appears if onClear is set.
Loadingloading replaces the clear button with a Spinner without blocking typing.

Accessibility

The clear button has an aria-label; it appears only when there is text and onClear is set.

The loading state uses a Spinner with role="status"; it does not block typing.