Skip to content
Browse blocks

A footer that ends in a range of mountains printed in dots, with your name standing among the peaks. The ridges part as the pointer moves.

Used forOutdoor and travel appsEnergy and climate companiesStudios and publicationsProduct launch sites

Install with the shadcn CLI

$ npx shadcn@latest add https://hairlineui.com/r/ridge-footer.json

Registered the namespace? Then it’s shadcn add @hairline/ridge-footer. Set it up

Templates

Need the whole page?

63 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.

All 63 templates

Where it’s used

  • Outdoor and travel apps

    The mountains are the product; the footer shows them.

  • Energy and climate companies

    A calm landscape in the brand colour instead of stock photos.

  • Studios and publications

    A printed, dotted finish that reads like a poster.

  • Product launch sites

    A last screen with depth that answers the pointer.

What it handles for you

A landscape footer is usually a fixed image that ignores the theme. This one is drawn in your colour at any size, and it moves with the pointer.

Instead of wiring upa landscape illustrationa parallax image stacka footer videoa link grid
  1. Depth from three ridges

    Far, middle and near ridges move at different speeds with the pointer, so the range has real depth.

  2. Your name in the range

    Set in your own font between the far and middle ridges, a clear step away from the sun in both themes.

  3. One colour

    `accent` (any token) drives the sky, sun, ridges and dots; light and dark both read.

  4. Columns pan the view

    Hovering or tabbing into a link column turns the range toward it.

  5. A printed finish

    An ordered dither on a 2px grid, crisp at any pixel density, with mist drifting through the valley.

  6. Sleeps when hidden

    Draws only while on screen and in a visible tab; one still frame under reduced motion.

Overview

Footers with a landscape usually sit a photo or an illustration under a link grid. This one draws the range itself, in one shader: a sky that glows toward a low sun, three ridges at different depths in an ordered dither, mist moving through the valley, and your name standing between the far and middle ridges. The text sits in the sky above, on the same plate. Move the pointer and the ridges drift apart, nearer ones more than far ones; read a link column and the view pans toward it. The mountains, sun and dots all take one `accent` colour, so the range fits any brand in light and dark.

States

arrival
When the footer comes into view the sun rises, the ridges grow to their height and the name lifts into place over about 1.3s.
drift
Left alone, mist moves slowly through the valley; at night a few stars blink.
pointer
The ridges drift apart with the pointer: the nearest moves most, the farthest least.
column
Hovering or tabbing into a link column pans the range toward that column.
no WebGL
The name shows as faint type in the range area, and the links work as normal.
reduced motion
One finished frame; nothing moves.

Usage

usage.tsx
import { RidgeFooter } from "@/components/ridge-footer";<RidgeFooter  wordmark="Cairn"  tagline="Trail maps that work with no signal."  contact={{ label: "hello@cairn.app", href: "mailto:hello@cairn.app" }}  columns={[{ title: "App", links: [{ label: "Offline maps", href: "/maps" }] }]}  legal="© 2026 Cairn Maps"/>

At the end of your layout

Put it last in the layout. Pass `tone="night"` for the dusk plate on a light page, and `accent` to print the range in another of your colours.

example.tsx
import { RidgeFooter } from "@/components/ridge-footer";export function SiteFooter() {  return (    <div className="mx-auto max-w-[1240px] p-4">      <RidgeFooter        wordmark="Sierra"        tone="night"        tagline="Solar and wind forecasts for grid operators, from the next hour to the next week."        contact={{ label: "hello@sierra.energy", href: "mailto:hello@sierra.energy" }}        columns={[          { title: "Product", links: [{ label: "Forecasts", href: "/forecasts" }, { label: "API", href: "/api" }, { label: "Pricing", href: "/pricing" }] },          { title: "Company", links: [{ label: "About", href: "/about" }, { label: "Careers", href: "/careers" }] },          { title: "Help", links: [{ label: "Docs", href: "/docs" }, { label: "Status", href: "/status" }] },        ]}        legal="© 2026 Sierra Energy"        legalLinks={[{ label: "Privacy", href: "/privacy" }, { label: "Terms", href: "/terms" }]}      />    </div>  );}

Props

wordmark
string
Brand name: shown in the lockup and set among the mountains.
logo
ReactNode
Optional logo beside the name.
tagline
string
One short line about the product.
contact
{ label: string; href: string }
A contact link under the tagline, e.g. an email address.
columns= []
{ title: string; links: { label: string; href: string }[] }[]
Link columns; reading one pans the range toward it.
tone= "auto"
"auto" | "night"
"auto" follows the theme; "night" keeps the dusk plate on light pages too.
accent= "var(--chart-1)"
string
The ink of the mountains and the sun: any CSS colour or token.
legal
string
Copyright line.
legalLinks= []
{ label: string; href: string }[]
Small links beside the copyright.

Accessibility and motion

  • The links are a labelled nav of plain anchors with focus rings; the range canvas is hidden from screen readers.
  • One WebGL 1 shader with a 4×4 ordered dither; the name is a texture drawn from your own font.
  • Without WebGL the name shows as faint type and everything else works.
  • Pauses off screen and in hidden tabs; one still frame under prefers-reduced-motion.

Requirements

React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.

Source

"use client";import * as React from "react";import { FooterCaption, FooterLockup, FooterNav, plateColors, resolveColor, type FooterColumn, type FooterLink } from "./footer-parts";import { createRidgeRenderer, readRidgeRgb, type Rgb, type RidgeRenderer } from "./ridge-gl";import { useInteractionReducedMotion } from "./ui-interaction-motion";/* * A footer that ends in a range of mountains, printed in dots: five ridges in an ordered * dither, a low sun, and the brand's name standing among the peaks. The text sits in the * sky above. The ridges drift apart a little as the pointer moves (nearer ones move more), * and reading a column pans the view toward it. */export type RidgeLink = FooterLink;export type RidgeColumn = FooterColumn;export interface RidgeFooterProps {  /** Brand name: shown in the lockup and set among the mountains. */  wordmark: string;  /** Optional logo beside the name. */  logo?: React.ReactNode;  /** One short line about the product. */  tagline?: string;  /** A contact link under the tagline, e.g. an email address. */  contact?: RidgeLink;  /** Link columns. */  columns?: RidgeColumn[];  /** "auto" follows the theme; "night" keeps the dusk plate on light pages too. */  tone?: "auto" | "night";  /** The ink of the mountains and the sun. Any CSS colour or token. Defaults to `var(--chart-1)`. */  accent?: string;  /** Copyright line. */  legal?: string;  /** Small links beside the copyright. */  legalLinks?: RidgeLink[];  className?: string;}const NO_COLUMNS: RidgeColumn[] = [];const NO_LINKS: RidgeLink[] = [];const DEFAULT_ACCENT = "var(--chart-1, var(--primary))";function seedFromString(s: string): number {  let h = 13;  for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) % 997;  return (h % 47) * 0.37;}function DefaultMark() {  return (    <svg viewBox="0 0 26 26" className="size-[26px] shrink-0" aria-hidden="true">      <rect x="0.5" y="0.5" width="25" height="25" rx="6.5" fill="color-mix(in oklab, var(--fp-accent) 14%, transparent)" stroke="color-mix(in oklab, var(--fp-accent) 36%, transparent)" />      <circle cx="17" cy="8.5" r="2.5" fill="var(--fp-accent)" />      <path d="M5 19.5 10.5 11.5l3.3 4.6 2.2-2.7 4.5 6.1Z" fill="currentColor" opacity="0.88" />    </svg>  );}function drawRidgeWordMask(ctx: CanvasRenderingContext2D, word: string, w: number, h: number, sceneTop: number, sceneH: number, family: string) {  ctx.globalCompositeOperation = "source-over";  ctx.fillStyle = "#000";  ctx.fillRect(0, 0, w, h);  const label = word.trim() || "Ridge";  const setFont = (size: number) => {    ctx.font = `700 ${size}px ${family}`;    if ("letterSpacing" in ctx) {      (ctx as CanvasRenderingContext2D & { letterSpacing: string }).letterSpacing = `${(-0.045 * size).toFixed(2)}px`;    }  };  setFont(100);  const m = ctx.measureText(label);  const hRatio = (m.actualBoundingBoxAscent + m.actualBoundingBoxDescent) / 100 || 0.72;  const size = Math.max(24, Math.min((w * 0.88) / Math.max(0.5, m.width / 100), (sceneH * 0.56) / hRatio));  setFont(size);  ctx.textAlign = "center";  ctx.textBaseline = "middle";  ctx.fillStyle = "rgb(255, 0, 0)";  ctx.fillText(label, w * 0.5, sceneTop + sceneH * 0.55);}export function RidgeFooter({  wordmark,  logo,  tagline,  contact,  columns = NO_COLUMNS,  tone = "auto",  accent = DEFAULT_ACCENT,  legal,  legalLinks = NO_LINKS,  className = "",}: RidgeFooterProps) {  const reduced = useInteractionReducedMotion();  const plateRef = React.useRef<HTMLDivElement>(null);  const canvasRef = React.useRef<HTMLCanvasElement>(null);  const sceneRef = React.useRef<HTMLDivElement>(null);  const parallaxTargetRef = React.useRef({ x: 0, y: 0 });  React.useEffect(() => {    const plate = plateRef.current;    const canvas = canvasRef.current;    const sceneBand = sceneRef.current;    if (!plate || !canvas || !sceneBand) return;    let renderer: RidgeRenderer | null = null;    try {      renderer = createRidgeRenderer(canvas);    } catch {      renderer = null;    }    if (!renderer) return;    const gl = renderer;    let raf = 0;    let visible = false;    let hidden = document.hidden;    let disposed = false;    let revealStart = -1;    let born = performance.now();    let px = 0;    let py = 0;    const readColors = (): [Rgb, Rgb, Rgb, boolean] => {      const css = getComputedStyle(plate);      const paper = readRidgeRgb(css.backgroundColor, [0.06, 0.07, 0.1]);      const fg = readRidgeRgb(css.color, [0.92, 0.94, 0.98]);      const primary = readRidgeRgb(resolveColor(plate, "var(--fp-accent)"), [0.19, 0.36, 0.87]);      const lum = 0.2126 * paper[0] + 0.7152 * paper[1] + 0.0722 * paper[2];      const isDark = tone === "night" || lum < 0.42;      return [paper, fg, primary, isDark];    };    const seed = seedFromString(wordmark);    const measure = () => {      if (disposed) return;      const box = plate.getBoundingClientRect();      const band = sceneBand.getBoundingClientRect();      const w = Math.max(1, box.width);      const h = Math.max(1, box.height);      const dpr = Math.min(window.devicePixelRatio || 1, 2);      const W = Math.round(w * dpr);      const H = Math.round(h * dpr);      const topFrac = Math.max(0.05, Math.min(0.9, (band.top - box.top) / h));      gl.layout(W, H, dpr, topFrac, seed);      const mask = document.createElement("canvas");      mask.width = W;      mask.height = H;      const mctx = mask.getContext("2d");      if (mctx) {        const family = getComputedStyle(plate).fontFamily || "system-ui, sans-serif";        drawRidgeWordMask(mctx, wordmark, W, H, (band.top - box.top) * dpr, band.height * dpr, family);        gl.mask(mask);      }      gl.colors(...readColors());      if (reduced) gl.draw(0, 1, 0, 0);    };    const frame = (now: number) => {      raf = 0;      if (disposed || !visible || hidden || reduced) return;      if (revealStart < 0) revealStart = now;      const reveal = 1 - Math.pow(1 - Math.min(1, (now - revealStart) / 1300), 3);      const t = (now - born) / 1000;      const tgt = parallaxTargetRef.current;      px += (tgt.x - px) * 0.07;      py += (tgt.y - py) * 0.07;      gl.draw(t, reveal, px, py);      raf = requestAnimationFrame(frame);    };    const kick = () => {      if (!raf && visible && !hidden && !reduced && !disposed) raf = requestAnimationFrame(frame);    };    const start = () => {      if (disposed) return;      born = performance.now();      measure();      plate.dataset.ready = "";      kick();    };    if (document.fonts?.status === "loaded") start();    else document.fonts.ready.then(start, start);    const ro = new ResizeObserver(() => !disposed && plate.dataset.ready !== undefined && measure());    ro.observe(plate);    const io = new IntersectionObserver(      ([entry]) => {        visible = entry.isIntersecting;        if (visible && reduced) gl.draw(0, 1, 0, 0);        else kick();      },      { threshold: 0.12 },    );    io.observe(plate);    const onVis = () => {      hidden = document.hidden;      if (!hidden) kick();    };    document.addEventListener("visibilitychange", onVis);    const mo = new MutationObserver(() => {      gl.colors(...readColors());      if (reduced) gl.draw(0, 1, 0, 0);    });    mo.observe(document.documentElement, { attributes: true, attributeFilter: ["class", "style", "data-theme"] });    const onMove = (e: PointerEvent) => {      if (reduced || e.pointerType === "touch") return;      const r = plate.getBoundingClientRect();      const nx = ((e.clientX - r.left) / Math.max(1, r.width)) * 2 - 1;      const ny = ((e.clientY - r.top) / Math.max(1, r.height)) * 2 - 1;      parallaxTargetRef.current = { x: Math.max(-1, Math.min(1, nx)), y: Math.max(-1, Math.min(1, ny)) };    };    const onLeave = () => {      parallaxTargetRef.current = { x: 0, y: 0 };    };    plate.addEventListener("pointermove", onMove);    plate.addEventListener("pointerleave", onLeave);    return () => {      disposed = true;      cancelAnimationFrame(raf);      raf = 0;      ro.disconnect();      io.disconnect();      mo.disconnect();      document.removeEventListener("visibilitychange", onVis);      plate.removeEventListener("pointermove", onMove);      plate.removeEventListener("pointerleave", onLeave);      gl.dispose();      delete plate.dataset.ready;    };  }, [wordmark, tone, accent, reduced]);  const panToColumn = (index: number, total: number) => {    if (reduced) return;    const norm = total <= 1 ? 0 : (index / (total - 1)) * 2 - 1;    parallaxTargetRef.current = { x: norm * 0.72, y: -0.15 };  };  return (    <footer className={`w-full max-w-[1200px] ${className}`}>      <div aria-hidden="true" data-natural-width className="grid h-0" style={{ gridTemplateColumns: "minmax(0, 1200px)" }} />      <div className="@container w-full">        <div ref={plateRef} className="group/plate relative isolate touch-pan-y overflow-clip rounded-[28px]" style={plateColors(tone === "night", accent)}>          <canvas            ref={canvasRef}            aria-hidden="true"            className="pointer-events-none absolute inset-0 -z-10 size-full opacity-0 transition-opacity duration-700 group-data-[ready]/plate:opacity-100"          />          <div className="grid grid-cols-1 gap-x-10 gap-y-9 px-[max(20px,5cqi)] pt-[clamp(28px,4.5cqi,56px)] @[700px]:grid-cols-[minmax(0,1fr)_auto]">            <FooterLockup logo={logo ?? <DefaultMark />} name={wordmark} tagline={tagline} contact={contact} />            <FooterNav              columns={columns}              onAim={(el, index) => {                if (el) panToColumn(index, columns.length);                else parallaxTargetRef.current = { x: 0, y: 0 };              }}            />          </div>          {/* The range. Until WebGL is ready, and without it, the name shows as faint type. */}          <div ref={sceneRef} aria-hidden="true" className="relative mt-[clamp(8px,2cqi,24px)] h-[clamp(210px,30cqi,360px)] w-full select-none">            <p className="absolute inset-0 flex items-center justify-center text-[15cqi] font-bold tracking-[-0.045em] opacity-20 transition-opacity duration-700 group-data-[ready]/plate:opacity-0">              {wordmark}            </p>          </div>          {/* The nearest ridge is dark in both themes, so the small print is always light. */}          <div style={{ color: "color-mix(in oklab, white 88%, var(--fp-accent))" }}>            <FooterCaption legal={legal} links={legalLinks} className="relative px-[max(20px,5cqi)] pb-[clamp(18px,2.4cqi,26px)] pt-2" />          </div>        </div>      </div>    </footer>  );}

Registry item: /r/ridge-footer.json