Select
A wrapper component around native HTML select.
API Reference
SelectProps
Extends all the standard HTML attributes of the `<select>` element.
| Property | Type | Default | Description |
|---|---|---|---|
ref $bindable | HTMLSelectElement | Reference to the rendered DOM element. | |
value $bindable | union | Current selected value(s). If `multiple` is true, this will be an array of values. | |
onValueChange | function | Callback when value change | |
multiple | Multiple | false | Whether multiple values can be selected. |
size | union | "2" | Select size |
color | union | Select color | |
radius | union | Select radius | |
fullWidth | boolean | false | Select full size |
selectSize | union | The native `size` property of HTMLSelectElement. Used only if `multiple` is true. | |
children | Snippet | Select content to render |
SelectOptgroupProps
Extends all the standard HTML attributes of the `<optgroup>` element.
| Property | Type | Default | Description |
|---|---|---|---|
ref | HTMLOptGroupElement | Reference to the rendered DOM element. | |
label required | union | The label of optgroup | |
children | Snippet | Optgroup content to render |
SelectOptionProps
Extends all the standard HTML attributes of the `<option>` element.
| Property | Type | Default | Description |
|---|---|---|---|
ref | HTMLOptionElement | Reference to the rendered DOM element. | |
value required | union | The value of option | |
children | Snippet | Option content to render |