Skip to content

Combobox-DEMO


Properties


PropertyTypeRequiredDefaultDescription
modelValueobjectNo{}See the Combobox modelValue option.
optionsarrayNo[]See the Combobox options option.
borderWidthnumberNo1
placeholderstringNo'Combobox'
borderColorstringNo''
borderRadiusnumberNo6
backgroundstringNo''
choosenBackgroundstringNo''
choosenSliderBackgroundstringNo''
inputForegroundstringNo''
inputBackgroundstringNo''
titleForegroundstringNo''
itemHeightnumberNo40See the Combobox itemHeight option.
dropDownIconstringNo'ChevronDown'
dropDownIconForegroundstringNo''
revealBorderColorbooleanNofalse
revealBackgroundColorbooleanNofalse
disabledbooleanNofalse
themestringNo'global'Theme style. Supports global, light, dark, system, and custom.
langstringNo"global"See the Combobox lang option.

Events


EventArgumentsDescription
choose-itemvalue/objectCombobox choose item

Slots


  1. Default
vue
<slot :item="item">
    {{valueTrigger(item.type) !== 'divider' ? valueTrigger(item.text) : ''}}
</slot>
vue
<template v-slot:default="x">
  <i>{{x.item.text}}</i>
</template>

Data


  1. options
javascript
options = [{key: '', text: '', type: '', disabled: ''}]

//e.g.//

options: [
    { key: "fruitsHeader", text: "Fruits", type: "header" },
    { key: "apple", text: "Apple" },
    { key: "banana", text: "Banana" },
    { key: "orange", text: "Orange", disabled: true },
    { key: "grape", text: "Grape" },
    { key: "divider_1", text: "-", type: "divider" },
    { key: "vegetablesHeader", text: "Vegetables", type: "header" },
    { key: "broccoli", text: "Broccoli" },
    { key: "carrot", text: "Carrot" },
    { key: "lettuce", text: "Lettuce" }
]

MIT Licensed