v0.0.14
components

Select

A wrapper component around native HTML select.

API Reference

SelectProps

Extends all the standard HTML attributes of the `<select>` element.

PropertyTypeDefaultDescription
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
falseWhether multiple values can be selected.
size
union
"2"Select size
color
union
Select color
radius
union
Select radius
fullWidth
boolean
falseSelect 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.

PropertyTypeDefaultDescription
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.

PropertyTypeDefaultDescription
ref
HTMLOptionElement
Reference to the rendered DOM element.
value required
union
The value of option
children
Snippet
Option content to render

Examples

Colors

Sizes

States

Fullwidth

Group

Custom options