Appearance
io.select.single
Represents a select.single component.
Usage
ts
const { value } = await io.select.single("T-Shirt Size", {
options: [
{
label: "Small",
value: "sm",
},
{
label: "Medium",
value: "md",
},
{
label: "Large",
value: "lg",
},
{
label: "XLarge",
value: "xl",
},
],
defaultValue: "Size",
helpText: "Currently only S-XL is in stock",
})
python
value = await io.select.single(
"T-Shirt Size",
options=[
{
"label": "Small",
"value": "sm",
},
{
"label": "Medium",
"value": "md",
},
{
"label": "Large",
"value": "lg",
},
{
"label": "XLarge",
"value": "xl",
},
],
default_value="Size",
help_text="Currently only S-XL is in stock"
)