Select
Select(
props):Element
One choice from a list that opens, the browser’s own, so a phone opens its wheel for it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props |
{ className?: string; disabled?: boolean; label: string; onChange: (value) => void; options: readonly SelectOption[]; placeholder?: string; value: string; } |
- |
props.className? |
string |
An override that shows in the diff. |
props.disabled? |
boolean |
Off: dimmed, and it takes no pick. |
props.label |
string |
The accessible name. The select draws no label of its own: the layout around it does. |
props.onChange |
(value) => void |
Called with the value of the option the player picks. |
props.options |
readonly SelectOption[] |
- |
props.placeholder? |
string |
What the select shows while value is empty, and what a player cannot pick. |
props.value |
string |
The chosen option’s value. |
Returns
Section titled “Returns”Element