Checkbox Group
Overview
Checkboxes are used when there are multiple items to select in a list. Users can select zero, one, or any number of items.
When to use
- These can be used within forms on a full page, in modals or to toggle an individual item.
- They can also be used to change from one setting to another in a menu, page, or component.
- Finally they can be useful for table rows or lists to select a singular item.
When not to use
- If a user can select only one option from a list, radio buttons should be used instead of checkboxes.
- Checkboxes allow the user to select multiple items in a set whereas radio buttons allow the user to select only one option.
Interactive demo
The demo below allows you to preview the component. You can play with its props, variations, configuration options and dive into its events and even see them trigger in the event log tab.
MedKit Checkbox Group
Container Hidden
boolean
false
Error
string
string[]
Help Text
string
string[]
Label
string
Required
Label Hidden
boolean
false
Name
string
Required
Options
Array<CheckboxOption>
Required
Required
boolean
false
Vertical
boolean
false
Default
vue
<template>
<DocExample>
<MedKitCheckboxGroup
label="Label"
helpText="Help text"
labelPosition="end"
name="exampleDefault"
:options="[
{ label: 'One', value: 1 },
{ label: 'Two', value: 2 },
{ label: 'Three', value: 3 }
]"
/>
</DocExample>
</template>Help Text
Error State
Error message will display if it's present.
Without Container
vue
<template>
<DocExample>
<MedKitCheckboxGroup
label="Label"
helpText="Help text"
labelPosition="end"
name="exampleWithoutContainer"
:options="[
{ label: 'One', value: 1 },
{ label: 'Two', value: 2 },
{ label: 'Three', value: 3 }
]"
container-hidden
/>
</DocExample>
</template>Vertical
vue
<template>
<DocExample>
<MedKitCheckboxGroup
label="Label"
helpText="Help text"
labelPosition="end"
name="exampleVertical"
:options="[
{ label: 'One', value: 1 },
{ label: 'Two', value: 2 },
{ label: 'Three', value: 3 }
]"
vertical
container-hidden
/>
</DocExample>
</template>Figma Library
You can find the component in our MedKit Figma library.