Select

Use the select component to enable selection of one option from a list.
  • Experimental
  • Not reviewed for accessibility
import {Select} from '@primer/react-brand'

Examples

Default

Placeholder

Option groups

Use with FormControl

Use Select alongside FormControl to ensure the control has a corresponding form label.

See FormControl for additional usage examples.

Validation

Full width

Sizes

FormControl can appear in medium and large dimensions using the size prop.

Required

Pass the required prop to ensure that the input field must be filled out before submitting the form.

Using refs

Select inputs can be used in uncontrolled mode by forwarding a ref to the underlying element.