Canopy Checkbox — Best Practices

SkillDev tools

Best practices for the Canopy Checkbox and Checkbox Group components. Trigger when adding multi-selection checkboxes, agreement confirmation, or grouped checkbox controls in 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 Checkbox — 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-checkbox/SKILL.md and read by ahel’s review.

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

Apply this skill whenever you use LgToggleComponent (as lg-checkbox) or LgCheckboxGroupComponent.


Import

import { LgToggleComponent } from '@legal-and-general/canopy';

For grouped checkboxes:

import { LgCheckboxGroupComponent, LgToggleComponent } from '@legal-and-general/canopy';

Single Checkbox

<lg-checkbox formControlName="agreed" value="yes">
  I agree to the terms and conditions
</lg-checkbox>

Checkbox Group

Use lg-checkbox-group when presenting two or more related options.

<lg-checkbox-group formControlName="colours">
  Select your colours
  <lg-hint>Choose all that apply</lg-hint>
  <lg-toggle value="red">Red</lg-toggle>
  <lg-toggle value="blue">Blue</lg-toggle>
  <lg-toggle value="green">Green</lg-toggle>
</lg-checkbox-group>

LgToggleComponent Inputs

InputTypeDefaultRequiredDescription
idstringauto-generatedNoHTML id attribute.
namestringnullYesHTML name attribute.
valuestringnullYesHTML value attribute.
focusbooleannullNoSets focus on the checkbox.
size'sm' | 'lg''lg'NoSize of the checkbox.
ariaDescribedBystringnullNoID of element that describes the checkbox.

LgToggleComponent Outputs

OutputTypeDescription
blurEventEmitter<Event>Emitted on blur.

LgCheckboxGroupComponent Inputs

InputTypeDefaultDescription
idstringauto-generatedHTML id attribute.
namestringauto-generatedSets name on all checkboxes in the group.
valueArray<string>nullSets the default checked checkboxes; must match the value of the toggle buttons.
focusbooleannullSets focus on the fieldset.
disabledbooleanfalseDisables all inner checkboxes.
inlinebooleanfalseDisplays checkboxes inline.
ariaDescribedBystringnullID of element that describes the checkboxes.

Accessibility

  • Always group related checkboxes using lg-checkbox-group with a clear label.
  • Use lg-hint to provide extra context where needed.
  • Ensure all checkboxes have clear, descriptive labels.
  • Set ariaDescribedBy to link checkboxes to hint or validation messages.
  • Keyboard users must be able to tab through all checkboxes and toggle them with Space.

Dos and Don'ts

Do

  1. Do always provide a clear, descriptive label for every checkbox.
  2. Do use to allow the user to choose from multiple options.
  3. Do use a single checkbox to capture acknowledgement or consent (e.g. "I agree to the terms and conditions").
  4. Do use a checkbox to confirm an action has been completed (e.g. in a checklist).

Don't

  1. Don't rely on placeholder text or tooltips as a substitute for a label.
  2. Don't use negative labels.
  3. Don't use as part of a dark pattern.
  4. Don't use when a single exclusive response is required — use radio buttons instead.

Signals

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