canopy-button
Best practices for the Canopy Button component.
Skill by Legal-and-General
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/legal-and-general-canopy-button
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/canopy-button
What's inside
- Skill name
canopy-button- Description
- Best practices for the Canopy Button component. Trigger when adding buttons, form submissions, navigation actions, icon buttons, loading states, button groups, or toggle buttons in an Angular project using Canopy.
- License
- MIT
- Metadata
- source: https://github.com/Legal-and-General/canopy/tree/master/projects/canopy/src/lib/button/docs/guide.mdx
- Instructions
- 173 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: "canopy-button" does not match folder "button"
Files (1)
- SKILL.md
SKILL.md (first lines)
# Canopy Button — Best Practices
This skill provides usage guidance, dos and don'ts, and input reference for the Canopy `lg-button` directive from `@legal-and-general/canopy`.
Apply this skill whenever you use `lg-button`, `LgButtonComponent`, `LgButtonGroupComponent`, or `LgButtonToggleDirective`.
---
## Import
```ts
import {
LgButtonComponent,
LgButtonGroupComponent,
LgButtonToggleDirective,
} from '@legal-and-general/canopy';
```
---
## Basic Usage
Always use a `<button>` element. Only use `<a lg-button>` when navigating to a new page or route.
```html
<button lg-button type="button" priority="primary">Save changes</button>
```
---
## Priorities
| Priority | When to use |
|----------|-------------|
| `primary` | The single main action on a page. Only one per view. |
| `secondary` | Secondary or supporting actions. Multiple allowed per page. |
| `link` | An action that visually appears as a link. |
| `add-on` | Used as an add-on to another input element. |
Button colours are inherited from the parent colour mode — never set button colours directly.
---
## Anatomy variants
**Label-only button** - the default text-only button. Labels should be concise, action-oriented, and specific about the outcome.
```html
<button lg-button type="button">Save changes</button>
```
**Back icon button** — navigation back; use `[backIcon]="true"`. For non-link priorities, the arrow-left icon is fixed and you cannot substitute a custom icon. For `priority="link"`, a projected `<lg-icon>` is displayed instead of the fixed arrow-left, allowing a custom icon on the left.
```html
<!-- Non-link: fixed arrow-left icon, no custom icon permitted -->
<button lg-button type="button" [backIcon]="true">Back</button>
<!-- Link priority: custom icon on the left via backIcon -->
<button lg-button priority="link" [backIcon]="true">
Back
<lg-icon name="chevron-left" />
</button>
```
**Right icon button** — action with icon to the right:
```html
<button lg-button type="button">
Next
<lg-icon name="chevron-right" />
</button>
```
**Icon-only button** — must include visually hidden label text for screen readers:
```html
<button lg-button type="button" [iconButton]="true">
Add item
<lg-icon name="add" />
</button>
```
**Loading state** — shows a spinner and disables the button:
```html
<button lg-button [loading]="true">Saving…</button>
```
**Button as link** — a button styled as a link (`priority="link"`). Supports a custom icon on either side:
```html
<!-- Icon on the right (default) -->
<button lg-button priority="link">
Label
<lg-icon name="chevron-right" />
</button>
<!-- Icon on the left using backIcon -->
<button lg-button priority="link" [backIcon]="true">
Label
<lg-icon name="chevron-left" />
</button>
```
---
## Button Group
Group two or more related buttons on a single line:
```html
<lg-button-group>
<button lg-button priority="primary">Submit</button>
<button lg-button priority="secondary">Cancel</button>
</lg-button-group>
```
---
## Button Toggle
Use `lgButtonToggle` to show/hide content (e.g. a filter panel). Use it only as part of a pattern, and only on a `<button>` element.
Using `lgButtonToggle` on non-button elements (for example `<a>` or `<div>`) is not supported.From Legal-and-General/canopy, MIT.
More from Legal-and-General/canopy
- 0.647score
review-pr-feedback
Legal-and-General
Fetches unresolved review comments from a GitHub PR using the GH CLI, groups and summarises them, automatically reads the referenced files locally to…
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-footer
Legal-and-General
Best practices for the Canopy Footer component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-accessibility
Legal-and-General
Accessibility guidance for Canopy applications.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-icon
Legal-and-General
Best practices for the Canopy UI Icon component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-forms-date
Legal-and-General
Best practices for the Canopy Date Input component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-page
Legal-and-General
Best practices for the Canopy Page component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-forms-radio
Legal-and-General
Best practices for the Canopy Radio component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-accordion
Legal-and-General
Best practices for the Canopy Accordion component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-alert
Legal-and-General
Best practices for the Canopy Inline Message (Alert) component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-banner
Legal-and-General
Best practices for the Canopy Banner Message component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-notice
Legal-and-General
Best practices for the Canopy Notice component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-breadcrumb
Legal-and-General
Best practices for the Canopy Breadcrumb component.
SkillAFreshness: A★ 24Claude Code +9
Signals
- Stars
- 24
- Forks
- 46
- Open issues
- 11
- Last commit (this folder)
- Jul 20, 2026 (3 months ago)
- Last release
- Oct 20, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Legal-and-General/canopy
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Legal-and-General
- 0.647score
review-pr-feedback
Legal-and-General
Fetches unresolved review comments from a GitHub PR using the GH CLI, groups and summarises them, automatically reads the referenced files locally to…
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-forms-date
Legal-and-General
Best practices for the Canopy Date Input component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-forms-radio
Legal-and-General
Best practices for the Canopy Radio component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-icon
Legal-and-General
Best practices for the Canopy UI Icon component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-notice
Legal-and-General
Best practices for the Canopy Notice component.
SkillAFreshness: A★ 24Claude Code +9 - 0.643score
canopy-footer
Legal-and-General
Best practices for the Canopy Footer component.
SkillAFreshness: A★ 24Claude Code +9
Cite this page
canopy-button skill. Agent Mart. https://agentmart.dev/skills/legal-and-general-canopy-button (last updated 2026-10-24)