Skip to content
Agentmart
Submit a tool

canopy-accordion

Best practices for the Canopy Accordion component.

Skill by Legal-and-General

IndexedMIT★ 24
Write a review

Chalk Labs

Need help deploying canopy-accordion?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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-accordion

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.

We use your email only for this newsletter. Privacy

About

Best practices for the Canopy Accordion component. Trigger when adding expandable/collapsible content sections, progressive disclosure panels, or FAQ layouts in an Angular project using Canopy.

Use cases: frontend, writing

No 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-accordion

What's inside

Skill name
canopy-accordion
Description
Best practices for the Canopy Accordion component. Trigger when adding expandable/collapsible content sections, progressive disclosure panels, or FAQ layouts in an Angular project using Canopy.
License
MIT
Metadata
source: https://github.com/Legal-and-General/canopy/tree/master/projects/canopy/src/lib/accordion/docs/guide.mdx
Instructions
104 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: "canopy-accordion" does not match folder "accordion"

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Canopy Accordion — Best Practices

This skill provides usage guidance, dos and don'ts, and input reference for the Canopy `lg-accordion` component from `@legal-and-general/canopy`.

Apply this skill whenever you use `LgAccordionComponent`, `LgAccordionItemComponent`, or `LgAccordionPanelHeadingComponent`.

---

## Import

```ts
import {
  LgAccordionComponent,
  LgAccordionItemComponent,
  LgAccordionItemContentDirective,
  LgAccordionPanelHeadingComponent,
  LgButtonComponent,
  LgIconComponent,
} from '@legal-and-general/canopy';
```

Add these to your standalone component's `imports` array. Include
`LgAccordionItemContentDirective` for lazy content, `LgIconComponent` for icons and
`LgButtonComponent` for the styled header actions below; omit unused imports.

---

## Basic Usage

```html
<lg-accordion [headingLevel]="2">
  <lg-accordion-item [isActive]="true">
    <lg-accordion-panel-heading>Section one</lg-accordion-panel-heading>
    <p>Content for section one.</p>
  </lg-accordion-item>
  <lg-accordion-item>
    <lg-accordion-panel-heading>Section two</lg-accordion-panel-heading>
    <p>Content for section two.</p>
  </lg-accordion-item>
</lg-accordion>
```

Treat all panels as closed by default. Set `[isActive]="true"` explicitly on any
item you want initially open; the first item is not opened automatically.
Allow multiple open panels by default, or set `[multi]="false"` on the group to
keep only one panel open at a time.

Use HTML or Angular components for panel content, including links, forms, tables
and images. Keep essential information visible outside the accordion.

**Lazy-load panel content** (only initialises when first opened):

```html
<lg-accordion-item (opened)="loadContent()">
  <lg-accordion-panel-heading>Lazy section</lg-accordion-panel-heading>
  <ng-template lgAccordionItemContent>
    <app-lazy-component></app-lazy-component>
  </ng-template>
</lg-accordion-item>
```

Use `lgAccordionItemContent`, not `lgAccordionContent`. Expect initialised content
to be retained when the item closes and reopens; do not rely on closing the panel
to destroy its components or reset their state.

**Panel heading with icon:**

```html
<lg-accordion-panel-heading>
  <lg-icon name="news"></lg-icon>
  Section with icon
</lg-accordion-panel-heading>
```

Use a supported `lg-icon` name. When a decorative icon is present and no
`lgAccordionHeadingActions` container exists, let Canopy place the decorative icon
on the left, the label in the middle and the chevron on the right. Otherwise, the
chevron stays on the left, before the optional decorative icon and label. Allow
long labels to wrap; both icons align with the first line, so do not add manual
positioning or spacing overrides.

---

## Header Actions

Place secondary header links or buttons in a container marked with
`lgAccordionHeadingActions`. This is a content-projection marker, not a directive
you need to import. Keep actions outside the heading's toggle button; activating
an action does not expand or collapse the panel.

```html
<lg-accordion-panel-heading>
  <lg-icon name="notes" />
  Saved details
  <div lgAccordionHeadingActions>
    <a lg-button priority="link" [backIcon]="true" href="#favourite">
      <lg-icon name="star-outline" />
      Favourite
    </a>
    <a lg-button priority="link" [backIcon]="true" href="#delete">
      <lg-icon name="trash" />
      Delete
    </a>
  </div>
</lg-accordion-panel-heading>
```

Replace the placeholder destinations with your application's destinations or use
buttons with action handlers for non-navigation operations. Use `[backIcon]="true"`
with link-priority buttons to place the supplied icon before the text.

Let the actions occupy their own row on mobile. From the `md` breakpoint, actions
sit to the right when space permits and can wrap when space is limited.

---

## In a Content Area

Also import `LgContentAreaComponent`, `LgContentAreaHeaderComponent`,

From Legal-and-General/canopy, MIT.

Signals

Stars
24
Forks
46
Open issues
11
Last commit (this folder)
Apr 27, 2026 (6 months ago)
Last release
Oct 20, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get canopy-accordion running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying canopy-accordion?

CallGet help
Cite this page

canopy-accordion skill. Agent Mart. https://agentmart.dev/skills/legal-and-general-canopy-accordion (last updated 2026-10-24)