Footnote

A footnote provides supplementary information, citations, or clarifications that support the main content without cluttering it. Footnotes are commonly used in articles, academic writing, legal documents, and documentation to reference sources, define terms, or add context.

Status: stable — exercised in composed page flows under e2e and axe, beyond the per-component checks.

This component renders a <span role="note">, telling screen readers the content is supplementary without making each footnote a landmark, as an <aside> would. Each footnote is identified by a unique id, allowing in-page links from superscript reference markers in the main text to jump directly to the footnote.

Example

The average adult walks around 5,000 steps a day.1

1. Office for National Statistics, 2023 activity survey.

Show demo markup
<p>The average adult walks around 5,000 steps a day.<a href="#demo-fn-1"><sup>1</sup></a></p><p><span class="footnote" id="demo-fn-1" role="note">1. Office for National Statistics, 2023 activity survey.</span></p>
Usage example
<script lang="ts">
  import Footnote from "./Footnote.svelte";
</script>

<p>This claim is supported by research.<a href="#fn1"><sup>1</sup></a></p>
<Footnote id="fn1">Source: Example et al., 2024</Footnote>
Show Svelte source
// In your Svelte component:
import Footnote from "lily-design-system-svelte-headless/components/Footnote/Footnote.svelte";

<Footnote>
  <!-- content -->
</Footnote>

Usage

Simple footnote with a source reference:

<Footnote id="fn1">Source: Example et al., 2024</Footnote>

Footnote linked from main content via superscript:

<!-- In-page link from main content to footnote -->
<p>
  This claim is supported by research.<a href="#fn1"><sup>1</sup></a>
</p>

<!-- Footnote at the bottom of the page or section -->
<Footnote id="fn1">
  <a href="#ref1">1.</a> Example, A. (2024). <em>Research Title</em>. Journal Name.
</Footnote>

Multiple footnotes in a clinical guideline:

<p>
  Blood pressure should be measured at every visit.<a href="#fn1"><sup>1</sup></a> Patients with
  readings above 140/90 mmHg require follow-up.<a href="#fn2"><sup>2</sup></a>
</p>

<Separator label="Footnotes" />

<Footnote id="fn1">
  <a href="#ref1">1.</a> NICE Guideline NG136: Hypertension in adults, 2019.
</Footnote>
<Footnote id="fn2">
  <a href="#ref2">2.</a> WHO Technical Report on Cardiovascular Disease Prevention, 2023.
</Footnote>

Props

  • id: string (required) -- unique footnote identifier, used for the element id
  • children: slot (required) -- footnote content to render inside the span

Keyboard Interactions

None -- this component is a passive container. Keyboard navigation is handled by any interactive elements placed inside the footnote by the consumer (such as links).

ARIA

  • role="note" -- indicates supplementary content that is related to the main content

When to Use

  • Use for citations, source references, or supplementary clarifications in articles, academic content, or legal documents.
  • Use when the additional information should not interrupt the main content flow.
  • Use in clinical guidelines, research papers, or policy documents to reference supporting evidence.
  • Use for legal disclaimers or terms that need to be associated with specific claims in the text.

When Not to Use

  • Do not use for inline citations or bibliographic references -- use Citation instead.
  • Do not use for general informational callouts -- use InsetText or InformationCallout instead.
  • Do not use for critical information the user must read -- use Alert instead.

Headless

This headless component provides a <span role="note"> with an id for in-page linking from superscript reference markers. The consumer provides all visual styling including indentation, font size, numbering, and separator lines.

Styles

The consumer provides all CSS styling. The component renders with a .footnote class for targeting. No default styles are included — this is a fully headless component.

Testing

  • Verify the component renders a <span> element with class footnote
  • Verify role="note"` -- indicates supplementary content that is related to the main content
  • Verify the root has no aria-label
  • Verify pass-through attributes are applied

Advice

  • Designers: Position footnotes at the bottom of the page or section with a clear visual separator. Use smaller text to distinguish footnotes from body content.
  • Developers: Ensure the id prop matches the href fragment on the in-page link (e.g., <a href="#fn1">) for proper jump-to-footnote navigation.

Implementation Notes

  • Renders a <span role="note">, not an <aside>, so each footnote is not its own landmark
  • The id prop identifies the element for in-page linking (the reference links to #id); it is not used as a name, since an identifier such as fn-1 is not one
  • Accepts a children slot for flexible footnote content (text, links, citations)
  • Spreads restProps onto the <span> element for consumer customization

Related components

  • citation — a citation acknowledges the relevance of a work of another to the topic of discussion

Known limitations

None known.

References


Lily™ and Lily Design System™ are trademarks.

Canonical contract

Generated from this component's canonical metadata — the machine-checked source the implementations are held to.

Metadata

  • Component: footnote
  • PascalCase: Footnote
  • Description: a footnote reference and content element
  • Purpose: Adds a side note or source for a point in the main text without interrupting it.
  • Status: stable — exercised in composed page flows under e2e and axe, beyond the per-component checks
  • HTML tag: <span>
  • CSS class: .footnote
  • Interactive: no

ARIA

  • role="note" -- indicates supplementary content that is related to the main content

Keyboard

  • No keyboard interactions — this is a passive element

Props

  • id: string (required) -- unique footnote identifier, used for the element id
  • children: slot (required) -- footnote content to render inside the span

Markdown

This page as Markdown, for people and AI tools: footnote.md