Checkbox
Checkboxes let me choose one or more options from a list.
The Checkbox component allows users to choose one or more options from a list on the page in a fieldset. They enable users full control to select and deselect an individual option if they change their mind.
Details
- Extends: USWDS Checkbox component
- Honeycrisp: Form element atom
- Customization: Design tokens and Styles
- Modifier:
.cfa-checkbox
The Checkbox extends the USWDS Checkbox component. The visual appearance is modified using design tokens applied to the USWDS Checkbox component settings from the Honeycrisp Form element atom. Further customization is applied using the CSS modifier(s) .cfa-checkbox
to add styles defined in a custom stylesheet.
Design tokens. Tokens define the name of basic system elements such as color, typography, or spacing. The values of tokens are relative to how the system defines them. This enables teams to alter the visual appearance of components yet remain within the system boundaries. Learn more about tokens on the Bixal's Design Tokens Guide.
Modifier. A modifier is a class name that applies a variant, type, or extended style customization to modify the component's visual appearance.
Examples
Guidance
Fieldsets. Form questions with checkbox components always use the fieldset component to group available options with a visible legend
element.
Refer to additional guidance on the USWDS documentation site.
USWDS documentation siteAdditional references
Accessibility
Refer to additional accessibility guidance on the USWDS documentation site.
Checklist Key
Design library component
Source and usage
- Sass stylesheet:
./_cfa-input-select.scss
- Thymeleaf template fragment:
./cfa-input-select.th.html
- Embedded Ruby (ERB) partial template:
./_cfa-input-select.html.erb