Skip to components
DEVELOPER REFERENCE · v4.0.0

SearchInput API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

SearchInput13 props2 callbacks0 methods

Props13

SearchInput props
NameTypeDescription
valueOptionalstring | undefinedValue to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted.
inputRefOptional
SearchInputRef<HTMLInputElement> | undefinedInspect type
Reference or callback receiving the underlying input element.
rootClassNameOptionalstring | undefinedAdditional CSS classes for the root part of the component.
inputClassNameOptionalstring | undefinedAdditional CSS classes for the input part of the component.
iconClassNameOptionalstring | undefinedAdditional CSS classes for the icon part of the component.
shortcutClassNameOptionalstring | undefinedAdditional CSS classes for the shortcut part of the component.
shortcutOptionalanyKeyboard shortcut hint displayed beside the search field.
iconOptionalanyIcon content for the component. When the type is string, supply trusted SVG markup.
leadingOptionalanyContent rendered before the search input.
hideIconOptionalboolean | undefinedHides the default search icon.
trailingOptionalanyContent rendered after the search input.
testIdOptionalstring | undefinedStable data attribute for locating the control in automated tests.
typeOptional"text" | "search" | undefinedNative input behavior: search or plain text.

Events and callbacks2

SearchInput events and callbacks
NameTypeDescription
onValueChangeOptional
((value: string, event: SearchInputEvent<HTMLInputElement>) => void) | undefinedInspect type
Receives the updated input value. Store it in application state and pass it back through value.
onInputOptional
((event: SearchInputEvent<HTMLInputElement>) => void) | undefinedInspect type
Handles native input events as the user edits the field.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.