Skip to content

Multiselect

Multiselect

PMultiselect lets users select multiple items from a dropdown list.

Demo

Usage

<PMultiselect
v-model="selected"
:items="items"
:add-all-item="true"
>
Status
</PMultiselect>
data() {
return {
selected: [],
items: [
{ id: 1, label: 'Active' },
{ id: 2, label: 'Paused' },
],
};
}

Props

PropTypeDefaultNotes
valueArray[]v-model array of selected IDs.
itemsArray[]Items with { id, label } (optional fgColor, bgColor).
disabledBooleanfalseDisables interaction.
addAllItemBooleantrueAdds the Alla option.

Events

EventPayloadDescription
inputArrayEmits selected IDs.

Slots

SlotDescription
defaultInput label text.