PrimeVue is a UI framework that’s compatible with Vue 3.
In this article, we’ll look at how to get started with developing Vue 3 apps with PrimeVue.
We can add a button group with multiple selections.
For instance, we can write:
<template>
<div>
<SelectButton
v-model="selectedCity"
:options="cities"
optionLabel="name"
multiple
/>
</div>
</template>
<script>
export default {
name: "App",
data() {
return {
selectedCity: null,
cities: [
{ name: "London", code: "LND" },
{ name: "Paris", code: "PRS" },
{ name: "Rome", code: "RM" },
],
};
},
methods: {},
};
</script>
We add the multiple
prop to enable multiple selections.
#technology #javascript #software-development #web-development #programming