Radio button
Radio buttons let me choose one out of many options in a list.
The Radio button component allows users to choose one option from a group inside a fieldset. The full list of options is present on the page.
Details
- Extends: USWDS Radio button
- Honeycrisp: Form element atom
- Customization: Design tokens and Styles
- Modifier:
.cfa-legend
,.cfa-hint
,.cfa-checkbox
,.cfa-radio
The Radio button extends the USWDS Radio button. The visual appearance is modified using design tokens applied to the USWDS Radio button settings from the Honeycrisp Form element atom. Further customization is applied using the CSS modifier(s) .cfa-legend
, .cfa-hint
, .cfa-checkbox
, .cfa-radio
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 radio button 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