Drop-down list
The select element is a drop-down list with selectable values.
View an interactive example
Replace value_variable with the name of the variable where you want to store the selected value.
The set of selectable values offered to the user is defined by the options array:
"options": [
{
"text": "shown text",
"value": "saved value"
},
{
"text": "shown text 1",
"value": "saved value 1"
}
]
text: Displayed option name.value: Value to store in the variable.
You can customize the text appearance using the input and text elements like any other text. In addition, you can set up a hint to display before the user selects a value:
hint_text: Hint text.hint_color: Hint text color.
Learn more
Follow DivKit news in the Telegram channel: http://t.me/divkit_news
You can also discuss topics of interest in the DivKit user community in Telegram: https://t.me/divkit_community_ru