Skip to main content

Select

A customizable dropdown select component.

Component Preview

Props

PropTypeDescription
optionsSelectOption[]Array of options to display.
defaultValuestringThe initial value of the select.
valuestringControlled value of the select.
onChange(value: string) => voidCallback function when value changes.
iconstringOptional default icon.
idstringOptional unique identifier.
hideSelectedLabelbooleanWhether to hide the label of the selected option. Default: false.
classNamestringOptional CSS class name.

SelectOption Interface

PropertyTypeDescription
valuestringIDs unique value of the option.
labelstringDisplay label (optional, defaults to value if not provided).
iconstringOptional Iconify icon name.
onClick() => voidOptional specific click handler for this option.

JSON Data Example

{
"type": "Select",
"data": {
"id": "select-basic",
"placeholder": "Choose an option",
"defaultValue": "option2",
"options": [
{
"value": "option1",
"label": "Option 1"
},
{
"value": "option2",
"label": "Option 2"
},
{
"value": "option3",
"label": "Option 3"
}
]
}
}