Svelte · Forms and controls
SearchInput
A search input with built-in functionality.Public export
typescript
import { SearchInput } from '@happyvertical/smrt-svelte/forms';- Import path
@happyvertical/smrt-svelte/forms- Props
- 12
- Props described
- 12 of 12
- Bindable state
- 0
- Callback events
- 3
- Verified release
- 0.62.10
Props
NameTypeRequiredDescription
valuestringNoCurrent search valueplaceholderstringNoPlaceholder textdebouncenumberNoDebounce delay in ms (0 for no debounce)loadingbooleanNoShow loading indicatordisabledbooleanNoWhether the input is disabledsize'sm' | 'md' | 'lg'NoSize variantidstringNoID for the input elementnamestringNoName attributeariaLabelstringNoARIA labelonsearch(value: string) => voidNoCallback when value changes (after debounce)oninput(value: string) => voidNoCallback for immediate value changesonsubmit(value: string) => voidNoCallback when Enter is pressedBindable state
This component has no bindable public state.
Callback events
onsearch(value: string) => voidoninput(value: string) => voidonsubmit(value: string) => void