Footer

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

Footer is an AI agent skill from the GitHub repository Legal-and-General/canopy. Best practices for the Canopy Footer component. Trigger when adding a site footer, footer navigation, or footer logos in an Angular project using Canopy.

How to use this skill

Skill file

Canopy Footer — Best Practices

This skill provides usage guidance and input reference for the Canopy footer components from @legal-and-general/canopy.

Apply this skill whenever you use the lg-footer attribute selector or LgFooterComponent.


Import

import {
  LgFooterComponent,
  LgFooterNavComponent,
  LgFooterNavItemComponent,
  LgFooterLogoComponent,
  LgFooterCopyrightComponent,
  LgFooterSocialComponent,
  LgFooterStickersComponent,
  LgFooterFootnoteComponent,
} from '@legal-and-general/canopy';

Basic Usage

The footer uses an attribute selector — apply lg-footer to a native <footer> element.

<footer lg-footer>
  <lg-footer-footnote>
    Important disclaimer text
  </lg-footer-footnote>

  <lg-footer-social>
    <a href="https://facebook.com/company" aria-label="Facebook">
      <lg-icon name="facebook" size="sm"></lg-icon>
    </a>
  </lg-footer-social>

  <lg-footer-nav>
    <lg-footer-nav-item>
      <a href="/account">My account</a>
    </lg-footer-nav-item>
    <lg-footer-nav-item>
      <a href="/privacy">Privacy</a>
    </lg-footer-nav-item>
  </lg-footer-nav>

  <lg-footer-logo src="/assets/logo.svg" alt="Company name"></lg-footer-logo>
  <lg-footer-copyright>© Company 2024</lg-footer-copyright>
</footer>

Migration from Previous Versions

The footer component has been updated to simplify its structure and add new features.

Changes

  1. Primary and secondary links merged: The variant input has been removed from lg-footer-nav. All links now go in a single lg-footer-nav component.
  1. New components added:

Before (deprecated)

<footer lg-footer>
  <lg-footer-nav variant="primary">
    <lg-footer-nav-item>
      <a href="/account">My account</a>
    </lg-footer-nav-item>
  </lg-footer-nav>

  <lg-footer-nav variant="secondary">
    <lg-footer-nav-item>
      <a href="/privacy">Privacy</a>
    </lg-footer-nav-item>
  </lg-footer-nav>

  <lg-footer-logo src="logo.svg" alt="Company"></lg-footer-logo>
  <lg-footer-copyright>© Company 2024</lg-footer-copyright>
</footer>

After (new structure)

<footer lg-footer>
  <lg-footer-footnote>
    Important disclaimer text
  </lg-footer-footnote>

  <lg-footer-social>
    <a href="https://facebook.com/company" aria-label="Facebook">
      <lg-icon name="facebook" size="sm"></lg-icon>
    </a>
  </lg-footer-social>

  <lg-footer-nav>
    <lg-footer-nav-item>
      <a href="/account">My account</a>
    </lg-footer-nav-item>
    <lg-footer-nav-item>
      <a href="/privacy">Privacy</a>
    </lg-footer-nav-item>
  </lg-footer-nav>

  <lg-footer-logo src="logo.svg" alt="Company"></lg-footer-logo>
  <lg-footer-copyright>© Company 2024</lg-footer-copyright>
</footer>

Component Details

LgFooterComponent

This component uses an attribute selector which allows the use of the HTML <footer> element as the host.

LgFooterNavComponent

Container for navigation items. The component now accepts a single merged list of all footer links (previously separated into primary and secondary variants).

LgFooterNavItemComponent

Container for individual navigation items. Supports both <a> and <button> elements.

LgFooterSocialComponent

Container for social media icon links. Maximum of 8 icons recommended for optimal display. A console warning will be logged if more than 8 links are detected.

Icons should be wrapped in anchor or button elements with appropriate aria-label attributes for accessibility.

<lg-footer-social>
  <a href="https://facebook.com/company" aria-label="Facebook">
    <lg-icon name="facebook" size="sm"></lg-icon>
  </a>
  <a href="https://linkedin.com/company" aria-label="LinkedIn">
    <lg-icon name="linkedin" size="sm"></lg-icon>
  </a>
</lg-footer-social>

LgFooterStickersComponent

Container for award badges, certifications, or co-branding partner logos. These appear below the main footer logo on mobile and to the left of the logo on desktop.

<lg-footer-stickers>
  <img src="award-badge.svg" alt="Best Company Award 2024" />
  <img src="certification.svg" alt="ISO Certified" />
</lg-footer-stickers>

LgFooterFootnoteComponent

Container for disclaimer text or additional information. Displays at the top of the footer structure with a separator line.

<lg-footer-footnote>
  Important disclaimer text
</lg-footer-footnote>

LgFooterCopyrightComponent

Container for copyright text. On desktop, appears on the left side of the footer. On mobile, appears below the logo and stickers.

<lg-footer-copyright>© Company 2024</lg-footer-copyright>

LgFooterLogoComponent

Displays the main footer logo. For co-branding, use two lg-footer-logo components — they will display side by side with the L&G logo (primary) on the left and the partner logo (secondary) on the right.


LgFooterLogoComponent Inputs

| Input | Type | Default | Required | Description |

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

| src | string | undefined | Yes | Logo image URL. |

| alt | string | '' | Yes | Alt text for the logo. |


Responsive Behaviour

Desktop Layout

Mobile Layout


Design Constraints

--footer-logo-size: 120px;
--footer-second-logo-width: 80px;
--footer-second-logo-width-lg: 100px;
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.