Search

A search bar input with magnifying glass icon and clearable filled state.

Installation

npx chilli@latest add search-bar

Default

States

Placeholder

Filled

API Reference

SearchBar

PropTypeDefaultDescription
placeholderstring—Placeholder text.
valuestring—Controlled input value.
onChange(e: ChangeEvent) => void—Change event handler.
onClear() => void—Callback when the clear button is clicked. Shows clear icon when value is non-empty.