Skip to main content

Select Field

type: "select"

A select of predefined options. For a small number of options, consider a radio field instead.

Additional Properties

PropertyTypeRestrictionsDescription
optionsValueOptionsRequiredThe options users can select from.
defaultValuestring-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.