Progress indicator

From Legal-and-General/canopy · View interactive version

Progress indicator is an AI agent skill from the GitHub repository Legal-and-General/canopy. Use the Canopy Progress Indicator for journey progress, standalone progress bars, step counters and percentage displays; apply when using lg-progress-indicator, lg-progress-bar or lg-progress-header in Angular.

How to use this skill

Skill file

Canopy Progress Indicator — Best Practices

Use the progress indicator components from @legal-and-general/canopy to show the

progress of a journey, from a simple progress bar to a multi-part form journey.

Apply this skill whenever you use lg-progress-indicator, lg-progress-bar or

lg-progress-header, or import their corresponding components.

Import

import {
  LgProgressBarComponent,
  LgProgressHeaderComponent,
  LgProgressIndicatorComponent,
} from '@legal-and-general/canopy';

Add the components you use to your module imports or standalone component's imports

array.

Basic Usage

Single progress bar

Use the guide's standalone progress bar example, with max and value supplied by

your host component:

<lg-progress-bar [max]="max" [value]="value"></lg-progress-bar>

Form journey

Use the guide's form journey example, with max, value, displayAs and

showProgressBar supplied by your host component:

<lg-progress-indicator
  [max]="max"
  [value]="value"
  [displayAs]="displayAs"
  [showProgressBar]="showProgressBar"
>
  Journey title
  <lg-progress-header> Step Heading </lg-progress-header>
</lg-progress-indicator>

Keep the journey title and lg-progress-header directly inside lg-progress-indicator,

as shown in both the guide and ProgressJourney story.

Display Modes

Inputs

LgProgressBarComponent

| Name | Description | Type | Default | Required |

|---|---|---|---|---|

| max | The number of the maximum steps | number | 0 | Yes |

| value | The current step in the process | number | 0 | Yes |

LgProgressIndicatorComponent

| Name | Description | Type | Default | Required |

|---|---|---|---|---|

| max | The number of the maximum steps | number | 0 | Yes |

| value | The current step in the process | number | 0 | Yes |

| displayAs | Display as a step counter or percentage. The percentage is calculated based on the max and min values. | 'percentage' \| 'step' | step | No |

| showProgressBar | Toggle display the progress bar | boolean | true | No |

| stepsPrefix | For a step counter, this changes the text content which describes the steps (e.g. Step 1 of 3). | string | Step | No |

Source conflicts: The guide's displayAs description references min, but no min

input is documented or exposed. Do not bind a min input. The story argTypes list

max/value defaults as 4/1, while both guide tables and component declarations

specify 0/0; the tables above preserve the guide.

The guide describes three child components, including lg-progress-journey, but its

consumer example and story project only the title and lg-progress-header. Follow

the documented nesting above; the guide does not explain this composition distinction.

Usage Rules

by both documented APIs.

multi-part form journey pattern.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.