Heading

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

Heading is an AI agent skill from the GitHub repository Legal-and-General/canopy. Best practices for the Canopy Heading component. Trigger when setting a dynamic heading level inside a custom component in an Angular project using Canopy.

How to use this skill

Skill file

Canopy Heading — Best Practices

This skill provides usage guidance for the Canopy LgHeadingComponent from @legal-and-general/canopy.

Apply this skill whenever you need to render a heading at a programmatically-determined level.


Import

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

Basic Usage

LgHeadingComponent should only be used inside other components — for example, inside an accordion panel heading or a card title — where the heading level must be configurable by the consumer. Do not use it directly in application templates for static headings.

<!-- Inside a wrapper component that accepts a headingLevel input -->
<lg-heading [level]="headingLevel">{{ title }}</lg-heading>

Inputs

| Input | Type | Default | Required | Description |

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

| level | number | undefined | Yes | The semantic heading level (1–6). |


Design Constraints

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.