InterfaceSearchBarProps
Interface: InterfaceSearchBarProps
Defined in: src/types/SearchBar/interface.ts:33
Strongly typed props for the shared SearchBar component.
Extends
Omit<React.InputHTMLAttributes<HTMLInputElement>,"onChange"|"size">
Properties
buttonAriaLabel?
optionalbuttonAriaLabel:string
Defined in: src/types/SearchBar/interface.ts:76
Accessible label for the search button.
buttonClassName?
optionalbuttonClassName:string
Defined in: src/types/SearchBar/interface.ts:54
Additional class applied to the search button.
buttonLabel?
optionalbuttonLabel:string
Defined in: src/types/SearchBar/interface.ts:74
Optional label shown inside the search button.
buttonTestId?
optionalbuttonTestId:string
Defined in: src/types/SearchBar/interface.ts:58
Button test id override.
className?
optionalclassName:string
Defined in: src/types/SearchBar/interface.ts:50
Additional class applied to the container.
Overrides
Omit.className
clearButtonAriaLabel?
optionalclearButtonAriaLabel:string
Defined in: src/types/SearchBar/interface.ts:78
Accessible label for the clear button.
clearButtonTestId?
optionalclearButtonTestId:string
Defined in: src/types/SearchBar/interface.ts:60
Clear button test id override.
defaultValue?
optionaldefaultValue:string
Defined in: src/types/SearchBar/interface.ts:42
Initial value when used in uncontrolled mode.
Overrides
Omit.defaultValue
icon?
optionalicon:ReactNode
Defined in: src/types/SearchBar/interface.ts:82
Optional custom icon rendered inside the input field.
inputClassName?
optionalinputClassName:string
Defined in: src/types/SearchBar/interface.ts:52
Additional class applied to the input element.
inputTestId?
optionalinputTestId:string
Defined in: src/types/SearchBar/interface.ts:56
Input test id override.
isLoading?
optionalisLoading:boolean
Defined in: src/types/SearchBar/interface.ts:80
Renders a loading spinner inside the button when true.
onChange()?
optionalonChange: (value,event?) =>void
Defined in: src/types/SearchBar/interface.ts:46
Callback fired whenever the input value changes.
Parameters
value
string
event?
ChangeEvent<HTMLInputElement>
Returns
void
onClear()?
optionalonClear: () =>void
Defined in: src/types/SearchBar/interface.ts:48
Callback fired after the clear button is pressed.
Returns
void
onSearch()?
optionalonSearch: (value,metadata?) =>void
Defined in: src/types/SearchBar/interface.ts:44
Callback invoked when the user submits a search via button, Enter, or clear.
Parameters
value
string
metadata?
Returns
void
placeholder?
optionalplaceholder:string
Defined in: src/types/SearchBar/interface.ts:38
Placeholder text for the search input.
Overrides
Omit.placeholder
showClearButton?
optionalshowClearButton:boolean
Defined in: src/types/SearchBar/interface.ts:68
Toggle visibility of the inline clear button. Defaults to true.
showLeadingIcon?
optionalshowLeadingIcon:boolean
Defined in: src/types/SearchBar/interface.ts:70
Toggle the leading search icon visibility. Defaults to false.
showSearchButton?
optionalshowSearchButton:boolean
Defined in: src/types/SearchBar/interface.ts:66
Toggle visibility of the trailing search button. Defaults to true.
showTrailingIcon?
optionalshowTrailingIcon:boolean
Defined in: src/types/SearchBar/interface.ts:72
Toggle the trailing search icon visibility. Defaults to false.
size?
optionalsize:SearchBarSize
Defined in: src/types/SearchBar/interface.ts:62
Visual size of the component.
value?
optionalvalue:string
Defined in: src/types/SearchBar/interface.ts:40
Controlled input value.
Overrides
Omit.value
variant?
optionalvariant:SearchBarVariant
Defined in: src/types/SearchBar/interface.ts:64
Visual variant of the component.