Sajari UI

SearchInput

The SearchInput component is used to get user search input. It is usually used together with a FormControl to provide an accessible label, validation messages, etc.

Import

Usage

Here's a basic usage of the SearchInput component.

Editable Example

Props

You can also pass all React.InputHTMLAttributes.

NameTypeDefaultDescription
aria-labelstringAccessibility label to use, in scenarios where the input has no visible label. A11y: It's usefult for screen readers.
aria-describedbystringAccessibility label to use, in scenarios where the input has no visible label. A11y: It's usefult for screen readers.
loadingbooleanfalseIf true, the search icon is replaced by a spinner.
disabledbooleanfalseIf true, the input is disabled. This sets aria-disabled=true and you can style this state by passing _disabled prop.
invalidbooleanfalseIf true, the input indicates an error. This sets aria-invalid=true and you can style this state by passing _invalid prop.
requiredbooleanfalseIf true, the input element is required.
readOnlybooleanfalseIf true, prevents the value of the input from being edited.