ReactSelect
The ReactSelect component adapts react-select to Payload's styles and interaction patterns. It is also exported as Select.
Import
Basic usage
Store the selected option object rather than only its value. Use isMulti when users can select more than one option.
Common props
These are the props most commonly used with this component. See its exported types in @payloadcms/ui for the complete list.
Prop | Type | Default | Description |
|---|---|---|---|
| | — | Options displayed in the menu. |
| | — | Selected option or options. |
| | — | Runs when the selection changes. |
| | Localized | Sets the empty-state label. |
| | | Allows multiple selected values. |
| | | Displays a control for clearing the value. |
| | | Allows options to be filtered by typing. |
| | | Allows users to create values not in |
| | | Prevents interaction. |
| | | Displays the loading state. |
| | | Applies the validation error style. |
* An asterisk denotes that a prop is required.
Was this page helpful?