Search Bar
Input optimized for query entry, clearing, and optional suggestions.
Import/Installation
import { SearchBar } from "@lottiefiles/creator-plugins-ui";Preview
Usage
<SearchBar onSearch={setQuery} showSuggestions suggestions={["Fade In", "Slide"]} />Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| onSearch | (query: string) => void | — | No | Fired when a search should be executed. |
| onClear | () => void | — | No | Fired when the clear action is triggered. |
| debounceMs | number | 300 | No | Debounce delay for `onSearch` in milliseconds. Set to `0` for immediate search. |
| clearable | boolean | true | No | Whether the clear button is shown when input has value. |
| suggestions | string[] | — | No | Candidate suggestion values. |
| onSuggestionSelect | (suggestion: string) => void | — | No | Fired when a suggestion is selected. |
| showSuggestions | boolean | false | No | Enables the suggestions popover. |
| variant | "default" | "error" | "default" | No | Visual style of the input. |
| size | "sm" | "default" | "default" | No | Compact size scale. |
Last updated: August 5, 2026 at 11:47 AMEdit this page