Skeleton

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

Skeleton is an AI agent skill from the GitHub repository Legal-and-General/canopy. Best practices for the Canopy Skeleton Loading directive. Trigger when adding skeleton loading states, placeholder content while data loads, or shimmer effects in an Angular project using Canopy.

How to use this skill

Skill file

Canopy Skeleton Loading — Best Practices

This skill provides usage guidance and input reference for the Canopy lgSkeleton directive (LgSkeletonDirective) from @legal-and-general/canopy.

Apply this skill whenever you use LgSkeletonDirective or lgSkeleton.


Import

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

Basic Usage

Apply lgSkeleton to any element or component that outputs text or projected content. The directive shows a loading placeholder until data is available.

<lg-data-point>
  <lg-data-point-label [headingLevel]="4">
    <span lgSkeleton lgSkeletonWidth="10">{{ data?.label }}</span>
  </lg-data-point-label>
  <lg-data-point-value lgSkeleton lgSkeletonWidth="8">
    {{ data?.value }}
  </lg-data-point-value>
</lg-data-point>

Inputs

| Input | Type | Default | Description |

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

| lgSkeletonWidth | string | '100%' | Override the placeholder width in em units (e.g. "10" = 10em). |

| lgSkeletonHeight | string | 'auto' | Override the placeholder height in em units. |


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.