Skip to content

CheckListField

An accordion-style checklist component for schema-driven forms. Renders a collapsible group of checkbox/radio fields driven by a FormSchemaField configuration object.

Usage

vue
<script setup>
import { ref } from 'vue'
import { CheckListField } from 'praxis-vue-ui'

const field = {
  label: 'Medical Conditions',
  fields: {
    list_children: [
      { components: [{ type: 'checkbox', name: 'diabetes', value: false }] },
      { components: [{ type: 'checkbox', name: 'hypertension', value: false }] },
    ]
  }
}

const data = ref({})
</script>

<template>
  <CheckListField :field="field" v-model="data" :default-open="true" />
</template>

Props

PropTypeDefaultDescription
fieldrequiredFormSchemaFieldSchema definition for the checklist group including fields, labels, and types.
modelValueRecord<string, any>{}Current values for the checklist. Use with v-model.
defaultOpenbooleantrueWhether the accordion is expanded by default.

Emits

EventPayloadDescription
update:modelValueRecord<string, any>Emitted whenever a checkbox or radio value changes.

NOTE

This component is designed for schema-driven dynamic forms. For simple checklist needs without a schema, consider using PraxisCheckbox or CheckListInputField directly.

Built with VitePress