Select

Dropdown selection component.

Usage

<Select
label="Country"
name="country"
options={[
{ value: "us", label: "United States" },
{ value: "ca", label: "Canada" },
{ value: "mx", label: "Mexico" },
]}
/>

Props

PropTypeDescription
labelstringSelect label text
namestringSelect name attribute
optionsarrayArray of { value, label } objects
requiredbooleanWhether selection is required
valuestringDefault selected value