+ {{ $t("form.label.multiCheckbox") }}
+
+
+
+
+ <template>
+ <CheckboxInput
+ v-model="input"
+ :options="vehicleOptions"
+ label="Vehicle"
+ name="checkbox"
+ />
+ </template>
+
+ <script setup lang="ts">
+ import { CheckboxInput } from "@dzangolab/vue3-form";
+ import { ref } from "vue";
+
+ const input = ref();
+ const vehicleOptions = [
+ {
+ label: "Bike",
+ value: "bike",
+ },
+ {
+ label: "Car",
+ value: "car",
+ },
+ {
+ label: "Truck",
+ value: "truck",
+ },
+ ];
+ </script>
+
+
+
+
+
+
+
+
+ {{ $t("form.label.disabled") }}
+
+
+
+
+ <template>
+ <CheckboxInput
+ v-model="input"
+ :options="vehicleOptions"
+ direction="horizontal"
+ disabled
+ label="Vehicle"
+ name="checkbox"
+ />
+ </template>
+
+ <script setup lang="ts">
+ import { CheckboxInput } from "@dzangolab/vue3-form";
+ import { ref } from "vue";
+
+ const input = ref(["car"]);
+ const vehicleOptions = [
+ {
+ label: "Bike",
+ value: "bike",
+ },
+ {
+ label: "Car",
+ value: "car",
+ },
+ {
+ label: "Truck",
+ value: "truck",
+ },
+ ];
+ </script>
+
+
+
+
+
+
+
+
+ {{ $t("form.label.inputWithValidation") }}
+
+
+
+
+ <template>
+ <Form>
+ <CheckboxInput
+ v-model="input"
+ :label="t('form.label.dailySynchro')"
+ :options="dailySynchroOptions"
+ :schema="inputSchema"
+ name="checkbox"
+ />
+ </Form>
+ </template>
+
+ <script setup lang="ts">
+ import { Form, CheckboxInput } from "@dzangolab/vue3-form";
+ import { useI18n } from "@dzangolab/vue3-i18n";
+ import { ref } from "vue";
+
+ const { t } = useI18n();
+
+ const inputSchema = z
+ .string()
+ .array()
+ .min(6, { message: t("form.errors.checkbox.min", { min: 6 }) });
+
+ const input = ref();
+ const dailySynchroOptions = [
+ {
+ label: t("form.label.title"),
+ value: 1,
+ },
+ {
+ label: t("form.label.solutions"),
+ value: 2,
+ },
+ {
+ label: t("form.label.deliverableList"),
+ value: 3,
+ },
+ {
+ label: t("form.label.workInProgress"),
+ value: 4,
+ },
+ {
+ label: t("form.label.summary"),
+ value: 5,
+ },
+ {
+ label: t("form.label.next"),
+ value: 6,
+ },
+ {
+ label: t("form.label.assumptions"),
+ value: 7,
+ },
+ {
+ label: t("form.label.generalQuestions"),
+ value: 8,
+ },
+ {
+ label: t("form.label.consequences"),
+ value: 9,
+ },
+ {
+ label: t("form.label.other"),
+ value: 10,
+ },
+ ];
+ </script>
+
+
+
+
+
+
+