Components
Code examples
<NativeSelect label="Choose language"> <option>Norwegian (Bokmål)</option> <option>Norwegian (Nynorsk)</option> <option>Sami</option> <option>Swedish</option> <option>Danish</option> <option>Finnish</option> <option>English</option> </NativeSelect>
Guidelines
NativeSelect is used when there are many options, and you want to maintain the original select appearance. It is preferred where advanced design is not needed. It is an alternative to InfoSelect.
Code
<NativeSelect />
import { NativeSelect } from "@vygruppen/spor-react";
A styled version of the native <select /> element
Props
Name | Type | Required? | Description |
|---|---|---|---|
label | string | ||
children | React.ReactNode | <option /> elements | |
disabled | boolean | ||
invalid | boolean | ||
variant | "base" | "floating" | Defaults to base. |