Canopy Checkbox — Best Practices
SkillDev toolsBest 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.
No other account needed.
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
| Input | Type | Default | Required | Description |
|---|---|---|---|---|
id | string | auto-generated | No | HTML id attribute. |
name | string | null | Yes | HTML name attribute. |
value | string | null | Yes | HTML value attribute. |
focus | boolean | null | No | Sets focus on the checkbox. |
size | 'sm' | 'lg' | 'lg' | No | Size of the checkbox. |
ariaDescribedBy | string | null | No | ID of element that describes the checkbox. |
LgToggleComponent Outputs
| Output | Type | Description |
|---|---|---|
blur | EventEmitter<Event> | Emitted on blur. |
LgCheckboxGroupComponent Inputs
| Input | Type | Default | Description |
|---|---|---|---|
id | string | auto-generated | HTML id attribute. |
name | string | auto-generated | Sets name on all checkboxes in the group. |
value | Array<string> | null | Sets the default checked checkboxes; must match the value of the toggle buttons. |
focus | boolean | null | Sets focus on the fieldset. |
disabled | boolean | false | Disables all inner checkboxes. |
inline | boolean | false | Displays checkboxes inline. |
ariaDescribedBy | string | null | ID of element that describes the checkboxes. |
Accessibility
- Always group related checkboxes using
lg-checkbox-groupwith a clear label. - Use
lg-hintto provide extra context where needed. - Ensure all checkboxes have clear, descriptive labels.
- Set
ariaDescribedByto 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
- Do always provide a clear, descriptive label for every checkbox.
- Do use to allow the user to choose from multiple options.
- Do use a single checkbox to capture acknowledgement or consent (e.g. "I agree to the terms and conditions").
- Do use a checkbox to confirm an action has been completed (e.g. in a checklist).
Don't
- Don't rely on placeholder text or tooltips as a substitute for a label.
- Don't use negative labels.
- Don't use as part of a dark pattern.
- 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