Skip to content

Combobox-DEMO ​


Properties ​


PropertyTypeRequiredDefaultDescription
modelValueobjectNo{}See the Combobox modelValue option.
optionsarrayNo[]See the Combobox options option.
borderWidthnumberNo1
placeholderstringNo'Combobox'
borderColorstringNo''
borderRadiusnumber/stringNo6Numbers use px; other strings are used as CSS values
backgroundstringNo''
choosenBackgroundstringNo''
choosenSliderBackgroundstringNo''
inputFontSizenumber/stringNo''Input font size; numbers use px, strings can use CSS units
inputFontWeightnumber/stringNo''Input font weight
dropDownFontSizenumber/stringNo''Option and header font size; numbers use px, strings can use CSS units
dropDownFontWeightnumber/stringNo''Option and header font weight
inputForegroundstringNo''
inputBackgroundstringNo''
titleForegroundstringNo''
itemHeightnumberNo40See the Combobox itemHeight option.
dropDownIconstringNo'ChevronDown'
dropDownIconForegroundstringNo''
revealBorderColorbooleanNofalse
revealBackgroundColorbooleanNofalse
isBoxShadowbooleanNofalseWhether to apply the Combobox input shadow style
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