@mozaic-ds/vue
Version:
Mozaic-Vue is the Vue.js implementation of ADEO Design system
24 lines (17 loc) • 1.38 kB
Markdown
# MCheckbox
A checkbox is an interactive component used to select or deselect an option, typically within a list of choices. It allows users to make multiple selections independently and is often accompanied by a label for clarity. Checkboxes are commonly used in forms, filters, settings, and preference selections to provide a simple and intuitive way to enable or disable specific options.
## Props
| Name | Description | Type | Default |
| --- | --- | --- | --- |
| `id*` | A unique identifier for the checkbox, used to associate the label with the form element. | `string` | - |
| `name` | The name attribute for the checkbox element, typically used for form submission. | `string` | - |
| `label` | The text label displayed next to the checkbox. | `string` | - |
| `modelValue` | The checkbox's checked state, bound via v-model. | `boolean` | - |
| `indeterminate` | Sets the checkbox to an indeterminate state (partially selected). | `boolean` | - |
| `isInvalid` | If `true`, applies an invalid state to the checkbox. | `boolean` | - |
| `disabled` | If `true`, disables the checkbox, making it non-interactive. | `boolean` | - |
| `indented` | If `true`, indent the checkbox. | `boolean` | - |
## Events
| Name | Description | Type |
| --- | --- | --- |
| `update:modelValue` | Emits when the checkbox value changes, updating the modelValue prop. | [value: boolean] |