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.
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
| Property | Value |
|---|---|
| Surface | --gradient-deep over a --sidebar fallback fill, --sidebar-foreground text — identical in both themes |
| Content | centred at max-w-7xl, 40px vertical padding |
| Brand block | reversed logo at 24px, 14px tagline at 70% opacity |
| Columns | 1 → 2 (sm) → 3 (lg) grid, 32px gaps |
| Group title | 12px / Inter 600, uppercase, 70% opacity |
| Links | 14px, hover shifts to --sidebar-primary |
| Legal bar | 1px --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 withrel="noreferrer". - Use
metafor 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 viaaria-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-ringoutline; 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
| Prop | Type | Default | Description |
|---|---|---|---|
groups | FooterLinkGroup[] | undefined | — | Link columns rendered beside the brand block. |
tagline | string | 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…). |
owner | string | undefined | "HealthMetrics Sdn Bhd" | Copyright owner; the current year is rendered automatically. |
meta | React.ReactNode | — | Extra content in the bottom bar's right slot (e.g. version, region). |
FooterLinkGroup
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | string | — | — |
linksrequired | { label: string; href: string; external?: boolean; }[] | — | — |
The footer with live controls in Storybook