Checkbox list

A multiple selection input.

Props

name
string
The name for the checkbox list group. Used as group identifier in change events.
disabled
boolean
Disables all checkboxes in the list.
error
boolean
Shows an error state on all checkboxes in the list.
maxWidth
string
Sets the maximum width of the checkbox list container.
size
"default" | "compact"
Sets the size of the checkbox list. 'compact' reduces spacing between items.
Defaults to default.
testId
string
Sets a data-testid attribute for automated testing.
value
string[]
Array of currently selected checkbox values.
mt, mr, mb, ml
Spacing
Apply margin to the top, right, bottom, and/or left of the component.
disabled
boolean
Sets the disabled state for the control.
error
boolean
Sets the error state for the control.
id
string
Sets the id attribute of the underlying web component.
maxWidth
string
Sets the maximum width of the checkbox list container.
name
string
The name for the checkbox list group. Used as group identifier in change events.
size
GoabCheckboxSize
Sets the size of the checkbox list. 'compact' reduces spacing between items.
Defaults to default.
testId
string
Sets the data-testid attribute for automated testing.
value
string[]
Array of currently selected checkbox values.
mt, mr, mb, ml
Spacing
Apply margin to the top, right, bottom, and/or left of the component.
name
string
The name for the checkbox list group. Used as group identifier in change events.
disabled
boolean true | false
Disables all checkboxes in the list.
Defaults to false.
error
boolean true | false
Shows an error state on all checkboxes in the list.
Defaults to false.
maxwidth
string
Sets the maximum width of the checkbox list container.
Defaults to none.
size
"default" | "compact"
Sets the size of the checkbox list. 'compact' reduces spacing between items.
Defaults to default.
testid
string
Sets a data-testid attribute for automated testing.
value
string[]
Array of currently selected checkbox values.
Defaults to [].
version
"1" | "2"
Design system version for styling.
Defaults to 1.
mt, mr, mb, ml
Spacing
Apply margin to the top, right, bottom, and/or left of the component.

Events

onBlur
(detail: GoabCheckboxListOnBlurDetail) => void
Callback fired when focus leaves all checkboxes in the list.
onChange
(detail: GoabCheckboxListOnChangeDetail) => void
Callback fired when the selected values change.
onFocus
(detail: GoabCheckboxListOnFocusDetail) => void
Callback fired when focus enters any checkbox in the list.
onBlur
(event: GoabCheckboxListOnBlurDetail) => void
Emits when focus leaves all checkboxes in the list.
onChange
(event: GoabCheckboxListOnChangeDetail) => void
Emits when a checkbox selection changes. Emits the change detail including name, value array, and event.
onFocus
(event: GoabCheckboxListOnFocusDetail) => void
Emits when focus enters any checkbox in the list.
_blur
CustomEvent<{ name: string }>
_change
CustomEvent<{ name: string; value: string[]; labels: string[] }>
_focus
CustomEvent<{ name: string }>
Examples

Add and edit lots of filters

Filter a list using a push drawer

Content

Use the description prop to add context on complex options where the label alone isn't enough.

Other

The form item automatically associates the label with the input for screen readers, ensuring your form is accessible.

Use a form item wrapper on all inputs to add a label, helper text, error message, and more.
All GoA Design System components are built to meet WCAG 2.2 AA standards. The following guidelines provide additional context for accessible implementation.

No accessibility-specific guidelines have been documented for this component yet.

View old component docs