Select Field
type: "select"
A select of predefined options. For a small number of options, consider a radio field instead.
Additional Properties
| Property | Type | Restrictions | Description |
|---|---|---|---|
| options | ValueOptions | Required | The options users can select from. |
| defaultValue | string | - | The value of the option selected by default. |
Example
mobro-widget-config.json
{
"config": [
{
"name": "time_format",
"label": "Time format",
"type": "select",
"defaultValue": "24h",
"options": [
{"label": "12h", "value": "12h"},
{"label": "24h", "value": "24h"}
]
}
]
}
Usage
To read the value of this field in a widget, use
useSelectField.