Components
Code examples
<SearchInput label="Search" />
Guidelines
A SearchInput is used for searching for content.
You may use functions like "reset" and others.
Code
<SearchInput />
import { SearchInput } from "@vygruppen/spor-react";
Input for searching or filtering content
Props
Name | Type | Required? | Description |
|---|---|---|---|
value | string | The value, if controlled | |
onChange | function | Callback for when the value changes | |
onReset | function | Callback for when the input is reset. When this is specified, a reset button appears to the right of the input field | |
label | string | The label of the input field. Default "Search" (localized) | |
variant | "core" | "floating" | Defaults to core. |