Select

React component for an input that provides a selection of options.

GitHub icon Module source

Unpkg icon Unpkg CDN

CSS

This component module has a css export that’s a Set instance containing the URL strings of the CSS files that must be loaded for this component to display correctly (excluding theme and global CSS).

Props

The React component props are documented via TypeScript JSDoc comments in the module source.

Examples

A basic selection.

Code

A required selection, with a placeholder option.

Code

A selection with a default value.

Code

A selection allowing multiple options to be selected. Note: Due to cross browser rendering and usability issues it’s recommended to use a Toggle group instead.

Code

A selection with a size matching the count of options + groups.

Code