Component Checkbox Group
Checkbox groups are used to group multiple checkboxes in a single form field that takes care of the label, help message, and error state. This component is used in conjunction with checkbox component.
Example
Props
Attr | Type | Default | Docs |
---|---|---|---|
error | string | null | This property can be used to set an error. If a non-empty string is given, it will be used as the error message. |
help | string | '' | This property can be used to set a help text. |
hide-label | boolean | false | This property will visually hide the label. A label is still required to be provided for screenreader support. |
indeterminate | boolean | false | This property controls whether the checkbox is in an indeterminate state. |
inline | boolean | false | This boolean sets whether the form field group should display the checkboxes inline or not. |
label | string | '' | This property can be used to set the inline label. |
label-class | string | '' | This property is a list of CSS classes that can be used to style the label. |
required | boolean | false | This boolean sets whether the form field group is required or not. |
required-ind | "none" | "optional" | "required" | This property is used to override the required indicator. By default, forms elements will show an | |
tooltip | string | null | This property is used to set the tooltip text. |
Slots
Name | Docs |
---|---|
label | Label for the checkbox group. Alternatively, you can use the label attribute. |
Anatomy

- Group label: Communicates what needs to be selected below.
- Checkbox: A single available selection.
- Checkbox input: Where the checkbox’s status is displayed.
- Checkbox label: The label of the individual checkbox selection.
- Helper text: Provides additional context if needed.
- Checkbox group: A group of related selectable options.
Labels
Each field needs a label, which should be clear and concise. Don't include punctuation after checkbox labels.


Custom labels
A label can be left out if a selection is obvious without it, such as a selectable row in a data table or if the checkbox is in a selectable card.

The content of the data table row clarifies what the checkbox will select.
Helper text
- Optional helper text contains pertinent information that assists the user in correctly completing a field. It is often used to explain the correct data format.
- Use sentence-style capitalization, and in most cases, write the text as full sentences with punctuation to ensure the helper text is clear and easy to understand.
- When using punctuation in one area, be sure to use it consistently in similar contexts.
- When used, helper text appears below the field, except when an error or warning message replaces it.

The leftmost checkbox group has helper text that helps the user complete the field. The rightmost checkbox group has error text to help correct an error.
Required and optional
Not every checkbox group requires a selection. There are ways to indicate that they’re optional.
- When possible, don’t ask for unnecessary information. This prevents users from getting overwhelmed.
- If most of the form’s fields are required, mark only the optional fields.
- If most of the form’s fields are optional, mark only the required fields.
By default, fields not marked as required will show “(optional)” indicators. It's possible to manually override this behavior to display indicators for required fields instead. Visit the code section to learn more.

Fields should be marked either optional or required if they are the outlier.
Tooltips
You can add a tooltip to an individual checkbox or a checkbox group by setting its tooltip
attribute to the desired text. Use tooltips sparingly, and keep text brief and supplementary. Do not include interactive elements. The tooltip appears on hover or keyboard focus.
How to use
Use a checkbox if:
- A user needs to toggle between Boolean states.
- A user needs to acknowledge or affirm something, such as agreeing to terms and conditions.
Use a checkbox group if:
- A user can make any number of selections — zero, one, or many — from a list of options.
- There is sufficient room to display all options at once.

Checkbox or radio button?
Although checkboxes and radio buttons look similar, their use cases are different. If users can only pick one option from a list, use a radio button group instead.


Checkbox or toggle?
Checkboxes and toggles are often functionally interchangeable, but using the right one can have an impact on your users’ experience. Use a toggle instead if:
- Users are activating, deactivating, or turning something on and off.
- The use case is analogous to flipping a switch.
- There's no wrong answer, and no possible way to make an error with a choice, or lack thereof.


Behavior
States
There are multiple states for checkboxes. Users can select or unselect a checkbox in any state, save for the disabled state.

The selection states of a checkbox.

The checkbox changes states based on user interactions.
- Default: The standard state of a checkbox.
- Hover: When a user’s cursor moves over a checkbox without clicking it.
- Active: When users press a checkbox without releasing.
- Focus: When a user highlights a checkbox with a keyboard.
- Disabled: An unavailable selection. Be sure that users aren’t confused as to why a checkbox is disabled. If the user is likely to be confused, keep it enabled and trigger a detailed error when it’s clicked or when the form is submitted.
Errors
Errors for checkboxes let users know that a required selection was left empty. Individual errors and checkbox group errors are two different error states.
- An individual checkbox error occurs when a user fails to make a mandatory selection.
- A group error occurs when users make an invalid selection, or no selection in a required field.
- Make sure error text is helpful and concise.

When an error occurs in a selection or a selection is required, the checkbox turns red and red helper text appears below.
Text wrapping
When the checkbox label is too long for space available, it wraps to form another line. The checkbox button remains vertically aligned to the top line of the label.

When text length is longer than its space, it overflows. Note how it makes the checkbox label look disorganized.
Interactions
Mouse
- Users can select or deselect an option by clicking on the checkbox or its label.
- When the cursor moves over a selectable checkbox or its label, the cursor icon changes from an arrow to a pointer hand.
- When hovering over a disabled checkbox, the cursor indicates the item is not selectable by transforming into the error icon.

The cursor’s icon will change depending on the state of the checkbox being hovered.
Keyboard focus
Users can select a checkbox with the Tab and Space keys. The Tab key cycles through each available checkbox, and the Space key checks or unchecks the highlighted option.

A checkbox can be focused on with the Tab key and checked or unchecked with the Space key.
Layout
Position the checkbox options vertically, with one choice per line. When using a horizontal layout that has more than one checkbox in every line, place the buttons and labels so users can tell which checkbox matches each label. Laying them out horizontally can make it hard for users to connect each checkbox with its proper label.

Checkbox groups should be aligned vertically when possible.
Do you have an idea, or want to help us improve this page? Reach out to us via email.
DTMB-DG-Support@michigan.govNeed help? Visit our Support page to learn how to get assistance, troubleshoot issues, and connect with the team.