Canopy Spinner — Best Practices
SkillDev toolsBest practices for the Canopy Spinner component. Trigger when adding loading spinners, indeterminate loading states, or loading buttons 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 Spinner — 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/spinner/SKILL.md and read by ahel’s review.
This skill provides usage guidance, dos and don'ts, and input reference for the Canopy lg-spinner component (LgSpinnerComponent) from @legal-and-general/canopy.
Apply this skill whenever you use LgSpinnerComponent or lg-spinner.
Import
import { LgSpinnerComponent } from '@legal-and-general/canopy';
Basic Usage
Use a spinner when the duration of a process cannot be determined.
<lg-spinner text="Loading your details…"></lg-spinner>
Always pair a page- or card-level spinner with the lgSrAlertMessage directive so screen reader users are notified when loading completes:
@if (!loaded) {
<lg-spinner text="Loading your details…"></lg-spinner>
}
<p [lgSrAlertMessage]="loaded">Loading complete</p>
Variants
| Variant | When to use |
|---|---|
dark | Default. On light backgrounds. |
light | On dark backgrounds. |
color | Branded colour spinner. |
inherit | Inherits the font colour of its parent — used inside loading buttons. |
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
variant | 'dark' | 'light' | 'color' | 'inherit' | 'dark' | Visual variant. |
size | 'xs' | 'sm' | 'md' | 'md' | Size of the spinner. |
text | string | undefined | Supporting text shown below the spinner. |
Dos and Don'ts
Do
- Do use spinners to help manage user expectations against technical limitations.
- Do always accompany a page- or card-level spinner with a supporting message explaining the reason for the wait.
- Do pair the spinner with
lgSrAlertMessageso screen reader users are notified when loading finishes.
Don't
- Don't use a spinner if the duration of the process can be pre-determined — use a progress indicator instead.
- Don't use multiple spinners in a single view.
- Don't use a spinner inside a button or input without the
inheritvariant.
Accessibility
- A spinner used alone on a page or card must always be accompanied by supporting text (
textinput or adjacent copy) explaining the wait. - Always use
lgSrAlertMessageto notify screen reader users when loading has completed — the spinner's disappearance is not detectable by assistive technologies alone.
Signals
- GitHub stars
- 23
- Forks
- 46
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
canopy-spinner- Source
- github.com/legal-and-general/canopy