Skip to content

vue
<fv-DropDown v-model="value" :options="options" placeholder="Select an option"></fv-DropDown>

  1. Set Disabled
vue
<fv-DropDown v-model="value" :options="options" placeholder="Select an option" disabled></fv-DropDown>
  1. DropDown without options
vue
<fv-DropDown placeholder="Select an option"></fv-DropDown>

vue
<fv-DropDown v-model="value" :options="options" placeholder="Select options" :multiple="true"></fv-DropDown>

  1. Custom List Item
vue
<fv-DropDown :options="options" placeholder="Select an option">
    <template v-slot:options="item">
        <p>{{item.index}}</p>
    </template>
</fv-DropDown>
  1. Custom Style
vue
<fv-DropDown :options="options" placeholder="Select options" :multiple="true" :borderWidth="1" borderRadius="5" inputBackground="rgba(0,204,153,0.9)" checkBoxBackground="rgba(0, 204, 153, 0.9)" inputForeground="whitesmoke" dropDownIcon="AddTo" dropDownIconForeground="whitesmoke" dropDownListForeground="rgba(0,204,153,1)" dropDownListBackground="rgba(239,239,239,0.6)"></fv-DropDown>
  1. Custom Drop Down Input
vue
<fv-DropDown :options="options" placeholder="Select options" :multiple="true">
    <template v-slot:input="x">
        <i class="ms-Icon ms-Icon--Dynamics365Logo left-icon"></i>
        <input class="input" :placeholder="x.placeholder" :value="x.value" style="padding-left: 36px; border: none;"/>
        <i class="ms-Icon ms-Icon--DelveAnalyticsLogo right-icon"></i>
    </template>
</fv-DropDown>
  1. Custom Drop Down Carrier
vue
<fv-DropDown :options="options" placeholder="Select options" :multiple="true">
    <template v-slot:drop-carrier="x">
        <fv-button :theme="x.theme" :isBoxShadow="true" style="width: 150px;">
            <p>DropDown</p>
            <i class="ms-Icon ms-Icon--ChevronDown" style="margin-left: 8px;"></i>
        </fv-button>
    </template>
</fv-DropDown>

vue
<fv-DropDown :options="options" placeholder="Select an option" :showError="true"></fv-DropDown>

  1. Single Selection
vue
<fv-DropDown :options="options" placeholder="Select an option" theme="dark"></fv-DropDown>
  1. Multiple Selections
vue
<fv-DropDown :options="options" placeholder="Select an option" theme="dark" :multiple="true"></fv-DropDown>

Properties


PropertyTypeRequiredDefaultDescription
modelValuearrayNo[]Choosen Value
optionsarrayNo[]Dropdown options array
multiplebooleanNofalseIs enable multiple select
borderWidthnumberNo1Dropdown border width
borderRadiusstringNo'6'Dropdown border radius
placeholderstringNo'Dropdown'Dropdown placeholder
maxHeightstringNo''Dropdown list max height
checkBoxBackgroundstringNo''CheckBox Background when Multiple
inputForegroundstringNo''
inputBorderColorstringNo''
inputHeightstringNo''
inputFontSizestringNo''
dropDownListForegroundstringNo''
inputBackgroundstringNo''
dropDownListBackgroundstringNo''
dropDownIconstringNo'ChevronDown'Icon with Fabric-Icon
dropDownIconForegroundstringNo''
isBoxShadowbooleanNofalseWhether to apply the DropDown input shadow style
showErrorbooleanNofalse
errorMessagestringNo'This dropdown has an error'
disabledbooleanNofalse
setFocusbooleanNofalseWhether Dropdown list show
themestringNo'global'Theme style. Supports global, light, dark, system, and custom.
langstringNo"global"See the DropDown lang option.

Events


EventArgumentsDescription
changevalueDropdown choose item
visible-changevisibleDropdown list show or hidden

Slots


  1. Input
  • placeholder: Current placeholder text.
  • value: Current selected text.
javascript
<template v-slot:input="x">
    <i class="ms-Icon ms-Icon--Dynamics365Logo left-icon"></i>
    <input :placeholder="x.placeholder" :value="x.value" style="padding-left: 36px;"/>
    <i class="ms-Icon ms-Icon--DelveAnalyticsLogo right-icon"></i>
</template>
  1. Options
  • option: Current option item.
  • index: Current option index.
  • valueTrigger: Helper for resolving function-based field values.
javascript
<template v-slot:options="x">
    <p>{{ x.index }}</p>
</template>
  1. Option Content
  • option: Current option item.
  • index: Current option index.
  • valueTrigger: Helper for resolving function-based field values.
javascript
<template v-slot:option-content="x">
    <p>{{ x.valueTrigger(x.option.text) }}</p>
</template>
  1. Drop Carrier
  • value: Current selected value array.
  • placeholoder: Current placeholder text.
  • theme: Current resolved theme.
javascript
<template v-slot:drop-carrier="x">
    <button>DropDown</button>
</template>

Data


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

//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