Select

A native select, restyled to match Input, with a chevron and the same focus, disabled and error states. Options are passed as children.

Examples

Basic

Show code
<Select label="Country"><option value="us">United States</option><option value="ca">Canada</option></Select>

Error

Pick a country
Show code
<Select label="Country" error="Pick a country" />

Props

PropTypeDefaultDescription
labelstring—Visible label text. The select is wrapped in a label, so the association is automatic.
errorstring—When set, the field takes the danger tone, the select is marked aria-invalid, and the message shows below it.

Any other attribute — name, value, multiple, onchange — is spread onto the <select>.