DocumentationDownloads and examples

Searchbox

The Searchbox is a styled component that allows users to search and filter data.

Searchbox Props

NameUseTypeDefinition
id
optional
stringIndicates the ID for the search input field.
placeholder
optional
stringIndicates the placeholder text for the search input field.
name
optional
stringIndicades the name for the search input field.
onChange
required
(e: React.ChangeEvent<HTMLInputElement>) => voidFunction that is called when the value of the input element is changed. It receives an event of type React.ChangeEvent<HTMLInputElement>.
onRemove
optional
() => voidFunction that is called when the remove button is clicked. It doesn't receive any arguments.
value
optional
stringRepresents the value of the input element.
small
optional
booleanSpecifies if the input element should have a small size.
disabled
optional
booleanIndicates whether the input field is disabled or not.
others
optional
anyAccepts any other props that aren't defined by the ISearchboxProps interface.
className
optional
stringAdds a class to the searchbox.

Examples

Default searchbox
search
Small searchbox
Example of small searchbox by adding small prop.
search
Filled searchbox
Example of searchbox with value by adding value prop.
search