Design System
Layout

Footer

The portal footer — brand block, link columns and a legal bar on the deep brand gradient.

Purpose

The footer closes portal and marketing pages: a brand block with an optional tagline, up to three columns of links, and a legal bar with the copyright line, legal links and a metadata slot. It renders on the same --gradient-deep surface as the App sidebar (over the --sidebar fallback fill), so the two chrome surfaces read as one family in both themes.

It is not part of App layout — admin screens are framed by the sidebar and Topbar and end where the content ends. Reach for Footer on the pages outside that shell.

Example

Everything is driven by props: groups for the columns, legalLinks for the bottom bar, meta for the bottom-right slot. The copyright year is rendered automatically.

Portal footer
import { Footer } from "@healthmetrics/ui/footer";

<Footer
  tagline="Employee benefits, simplified."
  groups={[
    {
      title: "Product",
      links: [
        { label: "Claims", href: "/claims" },
        { label: "Reports", href: "/reports" },
      ],
    },
    {
      title: "Company",
      links: [{ label: "About HealthMetrics", href: "https://healthmetrics.com", external: true }],
    },
  ]}
  legalLinks={[
    { label: "Privacy policy", href: "/privacy" },
    { label: "Terms of service", href: "/terms" },
  ]}
  meta={<span>v2.14 · MY</span>}
/>;

Minimal

Every part except the logo is optional — with no groups the brand block stands alone, and a legal bar with two links is a perfectly good app footer.

Structure

PropertyValue
Surface--gradient-deep over a --sidebar fallback fill, --sidebar-foreground text — identical in both themes
Contentcentred at max-w-7xl, 40px vertical padding
Brand blockreversed logo at 24px, 14px tagline at 70% opacity
Columns1 → 2 (sm) → 3 (lg) grid, 32px gaps
Group title12px / Inter 600, uppercase, 70% opacity
Links14px, hover shifts to --sidebar-primary
Legal bar1px --sidebar-border top rule, 12px text at full --sidebar-foreground — it sits on the gradient's lightest end, where a 70% tint fails AA
Copyright© + current year rendered automatically before owner

Best practices

Do

  • Keep privacy, terms and cookies in legalLinks — the legal bar is where users look for them.
  • Mark off-portal destinations external — they open in a new tab with rel="noreferrer".
  • Use meta for quiet operational facts: version, region, environment.
  • Keep the tagline to one line; it is a strapline, not a paragraph.

Don't

  • Rebuild the copyright line in meta — the year and owner are already rendered.
  • Use the footer as primary navigation — that is the App sidebar's job.
  • Exceed three groups — the grid caps at three columns, so a fourth wraps to a lonely second row.
  • Render it inside App layout's scroll region as app chrome — the admin shell deliberately has no footer.

Accessibility & keyboard

  • Renders a <footer> landmark (contentinfo), so screen-reader users can jump straight to it.
  • Each link column is its own <nav> named by its group title via aria-label — "Product navigation", "Support navigation".
  • External links open a new tab with rel="noreferrer"; nothing visual marks them, so write the label to say where it goes ("System status" rather than "Click here").
  • Focus is a 2px --sidebar-ring outline; all text meets WCAG 2.2 AA along the whole gradient in both themes.
  • Keyboard: Tab moves through the column links, then the legal links, in DOM order; Enter follows one.

Props

PropTypeDefaultDescription
groupsFooterLinkGroup[] | undefined—Link columns rendered beside the brand block.
taglinestring | undefined—Short line under the logo, e.g. the product strapline.
legalLinks{ label: string; href: string; }[] | undefined—Legal links shown in the bottom bar (privacy, terms, cookies…).
ownerstring | undefined"HealthMetrics Sdn Bhd"Copyright owner; the current year is rendered automatically.
metaReact.ReactNode—Extra content in the bottom bar's right slot (e.g. version, region).

FooterLinkGroup

PropTypeDefaultDescription
titlerequiredstring——
linksrequired{ label: string; href: string; external?: boolean; }[]——

The footer with live controls in Storybook

On this page