value
Description
Optional. Defines the initially checked checkboxesUsage
value?: (string | number)[];
Example
<script setup>
const options = [
{ id: 1, label: "Option 1" },
{ id: 2, label: "Option 2" },
{ id: 3, label: "Option 3" },
{ id: 4, label: "Option 4" },
{ id: 5, label: "Option 5" }
];
</script>
<template>
<CheckboxGroup :options="options" :value="[3,4]" />
</template>
Related article: Setting the checked checkboxes
Related sample: Checkbox Group