Skip to content
Norn
Menu

norn-footer

Site footer: a row of columns, and a colophon below them. The default slot holds the columns: a lead <div> first (the name in a <p><strong>, a tagline, the license), then the links, then anything else, such as a credit. Put the links in one <nav aria-labelledby="…">, pointing at a hidden name: a <p><strong> heading and a <ul>, or for several groups a <div> each holding its heading and list. The groups sit side by side and wrap. When the footer is 60rem or wider, the lead column takes up to 25rem, or the width lead-width gives, and the others size to their content; narrower, the columns wrap.

<norn-footer> a landmark, from @allons-y/webc-patterns

Examples

Color scheme
Width

Open on its own

Source
<div style="padding-block-start: 4rem">
	<norn-footer>
		<div>
			<p><strong>Example project</strong></p>
			<p>A short tagline.</p>
			<p><small>Licensed under MPL-2.0</small></p>
		</div>
		<nav aria-label="Footer">
			<div>
				<p><strong>Project</strong></p>
				<ul>
					<li><a href="https://example.com/">GitHub</a></li>
					<li><a href="https://example.com/changelog">Changelog</a></li>
				</ul>
			</div>
			<div>
				<p><strong>Help</strong></p>
				<ul>
					<li><a href="https://example.com/issues">Report an issue</a></li>
					<li><a href="https://example.com/contributing">Contributing guide</a></li>
				</ul>
			</div>
		</nav>
		<p slot="colophon"><small>Built with Eleventy.</small></p>
	</norn-footer>
</div>
Color scheme
Width

Open on its own

Source
<div style="padding-block-start: 4rem">
	<norn-footer>
		<div>
			<p><strong>Example project</strong></p>
			<p>A short tagline.</p>
		</div>
		<nav aria-label="Footer">
			<div>
				<p><strong>Project</strong></p>
				<ul>
					<li><a href="https://example.com/"><norn-icon @name="external"></norn-icon> GitHub</a></li>
					<li><a href="https://example.com/changelog"><norn-icon @name="book"></norn-icon> Changelog</a></li>
				</ul>
			</div>
		</nav>
	</norn-footer>
</div>
Color scheme
Width

Open on its own

Source
<div style="padding-block-start: 4rem">
	<norn-footer>
		<div>
			<p><strong>Example project</strong></p>
			<p>A short tagline.</p>
		</div>
		<nav aria-label="Project links">
			<p><strong>Project</strong></p>
			<ul>
				<li><a href="https://example.com/source">Source</a></li>
				<li><a href="https://example.com/changelog">Changelog</a></li>
			</ul>
		</nav>
	</norn-footer>
</div>

Props

Write them with the @ prefix, and :@ for an expression.

NameTypeDescription
@width string The content width, as a CSS length. Falls back to --norn-layout-width.
@lead-width string The widest the lead column gets on a wide footer, as a CSS length. Falls back to 25rem.

Slots

NameDescription
default The columns.
colophon Full-width content below the columns, as one element.

Tokens

The global tokens from tokens.json the component reads. Set one in a project's tokens.css to change it everywhere.

Type a value to try it in every example above. Reset puts the default back.

Token Type Default Override
--norn-ui-accentThe brand color, shared by every component. <color> #2346d4
--norn-ui-border-colorHairline color. <color> light-dark(#d3d8e2, #2d323e)
--norn-text-baseText color. <color> light-dark(#16181d, #eceef3)
--norn-text-mutedSecondary text color. <color> light-dark(#4b5160, #a4abba)
--norn-text-accentThe accent for text and links: darkened in light mode, lightened in dark mode. The lightness caps keep any accent at 4.5:1 or better. <color> light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h))
--norn-font-size-sSmall text: captions, code, navigation, and notes. <length> 0.875rem
--norn-space-2xsSmallest spacing step. <length> 0.25rem
--norn-space-xsExtra small spacing step. <length> 0.5rem
--norn-space-sSmall spacing step. <length> 0.75rem
--norn-space-mMedium spacing step. <length> 1.25rem
--norn-space-lLarge spacing step. <length> 2rem
--norn-layout-widthWidth of page content. <length> 64rem