Canopy Radio — Best Practices

SkillDev tools

Best practices for the Canopy Radio component. Trigger when adding single-choice radio button groups to a form in an Angular project using Canopy.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Canopy Radio — Best Practices skill

What this skill tells your AI

The instructions your AI receives, as published by legal-and-general/canopy in skills/best-practice/forms-radio/SKILL.md and read by ahel’s review.

This skill provides usage guidance, dos and don'ts, and input reference for the Canopy radio components from @legal-and-general/canopy.

Apply this skill whenever you use LgRadioGroupComponent or LgRadioButtonComponent.


Import

import {
  LgRadioGroupComponent,
  LgRadioButtonComponent,
} from '@legal-and-general/canopy';

Basic Usage

<lg-radio-group formControlName="colour">
  Preferred colour
  <lg-hint>Choose one option</lg-hint>
  <lg-radio-button value="red">Red</lg-radio-button>
  <lg-radio-button value="blue">Blue</lg-radio-button>
  <lg-radio-button value="green">Green</lg-radio-button>
</lg-radio-group>

LgRadioGroupComponent Inputs

InputTypeDefaultDescription
idstringauto-generatedHTML id attribute.
namestringauto-generatedSets name on all buttons in the group.
valueboolean | stringnullDefault selected value. Must match a button's value.
focusbooleannullSets focus on the fieldset.
inlinebooleanfalseDisplays buttons inline rather than stacked.

LgRadioButtonComponent Inputs

InputTypeDefaultRequiredDescription
idstringauto-generatedNoHTML id attribute.
namestringnullYesHTML name attribute.
valuestringnullYesHTML value attribute.
sizeRadioSize'lg'NoSize of the radio button.
ariaDescribedBystringnullNoID of the element that describes this radio button.

LgRadioButtonComponent Outputs

OutputTypeDescription
blurEventEmitter<Event>Emitted on blur.

Accessibility

  • Always use lg-radio-group to group related radio buttons with a clear label.
  • Use lg-hint to provide extra context where needed.
  • Ensure all radio buttons have clear, descriptive labels.
  • Set ariaDescribedBy to link radio buttons to hint or validation messages.
  • Keyboard users use Tab to move into/out of the radio group, and arrow keys to navigate between options and select them.
  • Only one radio button can be selected at a time within a group.

Dos and Don'ts

Do

  1. Do use when only one item can be selected from a list.
  2. Do use stacked radio buttons by default — they are easier to scan and work better with long labels.
  3. Do keep radio groups to 2–5 options where possible. Avoid more than 7 unless you have strong evidence it's the best pattern.
  4. Do write clear, descriptive labels. Use hint text when users need extra context to choose confidently.
  5. Do use inline radio buttons sparingly — only for up to 3 short, closely related options.

Don't

  1. Don't use when multiple items can be selected — use checkboxes instead.
  2. Don't use when the list has more than 5 options and space is limited — use the select component instead.
  3. Don't use inline radio buttons for more than 3 options, or when labels wrap onto multiple lines — switch to stacked.

When to Use vs Alternatives

  • Use Radio for standard forms with deliberate single-choice selection.
  • Use Segment for question-and-answer journeys where the user must make a conscious choice.
  • Use Select when the list exceeds 5 options and space is limited.

Signals

GitHub stars
23
Forks
46
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
canopy-forms-radio
Source
github.com/legal-and-general/canopy