Skip to content
Browse blocks

A footer set in a city at night, drawn on a 6px grid: the towers build up as it comes into view, windows come and go, and a click in the sky sends a plane across.

Used forCloud and developer platformsCompanies with a home cityLogistics and portsResearch labs and campuses

Install with the shadcn CLI

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

Registered the namespace? Then it’s shadcn add @hairline/skyline-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

  • Cloud and developer platforms

    A night city under the links, lit in your colour.

  • Companies with a home city

    Your skyline, with the local time beside the copyright.

  • Logistics and ports

    The harbour preset: cranes and low sheds by the water.

  • Research labs and campuses

    The campus preset: lower buildings and one tall tower.

What it handles for you

A skyline footer is usually a looping video that never matches your colours. This is drawn in code on a pixel grid, in your theme, and it answers the pointer and the links.

Instead of wiring upa footer video loopa skyline illustrationa time zone clock widgeta link grid
  1. Builds as it arrives

    Towers rise row by row at staggered times when the footer comes into view, then the lights come on.

  2. A city that lives

    Windows switch on and off on their own, beacons blink on the tallest spires, and a plane crosses every few seconds.

  3. Answers you

    Reading a column lights the district under it, the pointer wakes windows near it, and a click in the sky sends a plane.

  4. Your own city

    The skyline is seeded from the brand name; three presets set its shape: metropolis, harbour, campus.

  5. Local time

    Pass `city` and the small print says the time there, written once a minute after mount so the server never guesses it.

  6. Sleeps when hidden

    Canvas 2D on a whole-pixel grid, drawn only while on screen; one still frame under reduced motion.

Overview

A skyline in a footer is usually a static illustration or a video. This one is built in code on a 6px grid and seeded from your brand name, so every brand gets its own city. Your links sit in the sky on the same plate; the towers build up from the foot when the footer comes into view, then the city lives on its own: office windows switch on and off, beacons blink on the spires, and now and then a plane crosses. Reading a link column lights the district under it, the pointer wakes the windows near it, and a click in the sky sends a plane across. An optional clock shows the local time of your city in the small print.

States

build
When the footer comes into view the towers rise row by row over about 0.4s each, at staggered times, with bright tiles on their rising tops.
lights
As the towers settle, light sweeps through the low buildings in front and the windows come on.
alive
Windows switch on and off over 3 to 12 seconds, beacons blink on the spires, stars twinkle (clouds by day) and a plane crosses every 8 to 13 seconds.
column
Hovering or tabbing into a link column lights the district under it and wakes its windows.
pointer
Moving over the city wakes the windows near the pointer; a click in the sky sends a plane across from the nearer side.
reduced motion
The finished city in one frame: no build, no planes.

Usage

usage.tsx
import { SkylineFooter } from "@/components/skyline-footer";<SkylineFooter  brand="Veridian"  tagline="Managed Postgres with a read replica in every region."  action={{ label: "Start for free", href: "/signup" }}  columns={[{ title: "Product", links: [{ label: "Pricing", href: "/pricing" }] }]}  legal="© 2026 Veridian Inc."/>

At the end of your layout

Put it last in the layout. `tone="night"` keeps the night city on a light page; `city` adds the local time to the small print.

example.tsx
import { SkylineFooter } from "@/components/skyline-footer";export function SiteFooter() {  return (    <div className="mx-auto max-w-[1240px] p-4">      <SkylineFooter        brand="Veridian"        tone="night"        tagline="Managed Postgres with a read replica in every region your users are in."        action={{ label: "Start for free", href: "/signup" }}        columns={[          { title: "Product", links: [{ label: "Database", href: "/database" }, { label: "Branching", href: "/branching" }, { label: "Pricing", href: "/pricing" }] },          { title: "Developers", links: [{ label: "Docs", href: "/docs" }, { label: "CLI", href: "/cli" }, { label: "Changelog", href: "/changelog" }] },          { title: "Company", links: [{ label: "About", href: "/about" }, { label: "Careers", href: "/careers" }] },        ]}        city={{ label: "San Francisco", timeZone: "America/Los_Angeles" }}        legal="© 2026 Veridian Inc."        legalLinks={[{ label: "Privacy", href: "/privacy" }, { label: "Terms", href: "/terms" }]}      />    </div>  );}

Props

brand
string
Brand name in the lockup; it also seeds the skyline, so every brand gets its own city.
logo
ReactNode
Optional logo beside the name.
tagline
string
One short line about the product.
action
{ label: string; href: string }
The main action under the tagline.
columns= []
{ title: string; links: { label: string; href: string }[] }[]
Link columns; reading one lights the district under it.
city
{ label: string; timeZone: string }
Optional local clock in the small print, e.g. "9:41 pm in San Francisco".
preset= "metropolis"
"metropolis" | "harbor" | "campus"
The shape of the skyline.
tone= "auto"
"auto" | "night"
"auto" follows the theme (a pale city by day); "night" keeps the night plate on light pages too.
accent= "var(--chart-5)"
string
Window and beacon light: 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 skyline canvas is hidden from screen readers.
  • The city is drawn on an exact 6px grid (a 5px tile and a 1px gap) in one Canvas 2D pass, with no dependencies.
  • The clock is written into its text node after mount, so server rendering never shows the wrong time zone.
  • 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 { buildSkylinePalette, readSkylineRgb, SkylineEngine, type SkylinePreset } from "./skyline-matrix";import { useInteractionReducedMotion } from "./ui-interaction-motion";/* * A footer set in a city at night, drawn on a 6px grid. The text sits in the sky; the towers * build up from the foot when the footer comes into view, then live on their own: windows * switch on and off, beacons blink on the spires, a plane crosses now and then. Reading a * column lights the district under it, the pointer wakes windows near it, and a click in * the sky sends a plane across. */export type SkylineLink = FooterLink;export type SkylineColumn = FooterColumn;export interface SkylineCity {  /** The city's name, shown with its local time in the small print, e.g. "San Francisco". */  label: string;  /** IANA time zone, e.g. "America/Los_Angeles". */  timeZone: string;}export interface SkylineFooterProps {  /** Brand name: shown in the lockup, and it seeds the skyline so every brand gets its own city. */  brand: string;  /** Optional logo beside the name. */  logo?: React.ReactNode;  /** One short line about the product. */  tagline?: string;  /** The main action under the tagline. */  action?: SkylineLink;  /** Link columns. */  columns?: SkylineColumn[];  /** Optional local clock beside the copyright. */  city?: SkylineCity;  /** The shape of the skyline. */  preset?: SkylinePreset;  /** "auto" follows the theme (a pale dusk city in light); "night" keeps the night plate on any page. */  tone?: "auto" | "night";  /** Window and beacon light. Any CSS colour or token. Defaults to `var(--chart-5)`. */  accent?: string;  /** Copyright line. */  legal?: string;  /** Small links beside the copyright. */  legalLinks?: SkylineLink[];  className?: string;}const NO_COLUMNS: SkylineColumn[] = [];const NO_LINKS: SkylineLink[] = [];const DEFAULT_ACCENT = "var(--chart-5, var(--primary))";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, currentColor 7%, transparent)" stroke="color-mix(in oklab, currentColor 20%, transparent)" />      <rect x="6" y="13" width="3.5" height="7" rx="0.5" fill="currentColor" opacity="0.45" />      <rect x="11.25" y="6" width="3.5" height="14" rx="0.5" fill="var(--fp-accent)" />      <rect x="16.5" y="10" width="3.5" height="10" rx="0.5" fill="currentColor" opacity="0.7" />    </svg>  );}function formatClock(city: SkylineCity, now: Date): string {  try {    const t = new Intl.DateTimeFormat("en-US", { timeZone: city.timeZone, hour: "numeric", minute: "2-digit" }).format(now).toLowerCase();    return `${t} in ${city.label}`;  } catch {    return city.label;  }}export function SkylineFooter({  brand,  logo,  tagline,  action,  columns = NO_COLUMNS,  city,  preset = "metropolis",  tone = "auto",  accent = DEFAULT_ACCENT,  legal,  legalLinks = NO_LINKS,  className = "",}: SkylineFooterProps) {  const reduced = useInteractionReducedMotion();  const plateRef = React.useRef<HTMLDivElement>(null);  const stageRef = React.useRef<HTMLDivElement>(null);  const canvasRef = React.useRef<HTMLCanvasElement>(null);  const clockRef = React.useRef<HTMLSpanElement>(null);  const engineRef = React.useRef<SkylineEngine | null>(null);  const cityRef = React.useRef(city);  React.useLayoutEffect(() => {    cityRef.current = city;  });  // The clock is written straight into its node once a minute, after mount, so the server's time  // zone never shows and React never re-renders for it.  React.useEffect(() => {    if (!city) return;    let timer = 0;    const tick = () => {      const current = cityRef.current;      if (!current || !clockRef.current) return;      clockRef.current.textContent = formatClock(current, new Date());      timer = window.setTimeout(tick, 60000 - (Date.now() % 60000) + 20);    };    tick();    return () => window.clearTimeout(timer);  }, [city]);  React.useEffect(() => {    const plate = plateRef.current;    const stage = stageRef.current;    const canvas = canvasRef.current;    if (!plate || !stage || !canvas) return;    const ctx = canvas.getContext("2d", { alpha: false });    if (!ctx) return;    const readPalette = () => {      const css = getComputedStyle(plate);      const bg = readSkylineRgb(css.backgroundColor, [0.05, 0.05, 0.05]);      const fg = readSkylineRgb(css.color, [0.94, 0.92, 0.89]);      const accentRgb = readSkylineRgb(resolveColor(plate, "var(--fp-accent)"), [0.91, 0.66, 0.29]);      return buildSkylinePalette(bg, fg, accentRgb, tone === "night");    };    const engine = new SkylineEngine(readPalette(), brand, preset);    engineRef.current = engine;    let raf = 0;    let visible = false;    let hidden = document.hidden;    let disposed = false;    let lastTime = performance.now();    const measure = () => {      if (disposed) return;      const box = plate.getBoundingClientRect();      const city = stage.getBoundingClientRect();      const w = Math.max(1, Math.round(box.width));      const h = Math.max(1, Math.round(box.height));      const dpr = Math.min(window.devicePixelRatio || 1, 2);      canvas.width = Math.round(w * dpr);      canvas.height = Math.round(h * dpr);      engine.setPalette(readPalette());      engine.resize(w, h, dpr, (box.bottom - city.top) / h);      if (reduced) {        engine.setRevealedImmediate();        engine.draw(ctx);      }    };    const loop = (now: number) => {      raf = 0;      if (disposed || !visible || hidden || reduced) return;      const dt = (now - lastTime) / 1000;      lastTime = now;      engine.step(dt, now / 1000, false);      engine.draw(ctx);      raf = requestAnimationFrame(loop);    };    const kick = () => {      if (disposed || reduced) return;      if (visible && !hidden && !raf) {        lastTime = performance.now();        raf = requestAnimationFrame(loop);      }    };    measure();    plate.dataset.ready = "";    const ro = new ResizeObserver(() => measure());    ro.observe(plate);    const io = new IntersectionObserver(      ([entry]) => {        visible = entry.isIntersecting;        if (visible) {          engine.startReveal(performance.now() / 1000);          if (reduced) {            engine.setRevealedImmediate();            engine.draw(ctx);          } else {            kick();          }        }      },      { threshold: 0.15 },    );    io.observe(plate);    const onVis = () => {      hidden = document.hidden;      if (!hidden) kick();    };    document.addEventListener("visibilitychange", onVis);    const mo = new MutationObserver(() => {      engine.setPalette(readPalette());      if (reduced) engine.draw(ctx);    });    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);      const ny = (e.clientY - r.top) / Math.max(1, r.height);      engine.setPointer(nx, ny, nx >= 0 && nx <= 1 && ny >= 0 && ny <= 1);    };    const onLeave = () => engine.setPointer(0, 0, false);    // A click in the sky sends a plane across; clicks on links never do.    const onDown = (e: PointerEvent) => {      if (reduced || (e.target as Element | null)?.closest("a, button")) return;      const r = plate.getBoundingClientRect();      const nx = (e.clientX - r.left) / Math.max(1, r.width);      const ny = (e.clientY - r.top) / Math.max(1, r.height);      if (nx >= 0 && nx <= 1) engine.dispatchAircraft(nx, ny);    };    plate.addEventListener("pointermove", onMove);    plate.addEventListener("pointerleave", onLeave);    plate.addEventListener("pointerdown", onDown);    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);      plate.removeEventListener("pointerdown", onDown);      engineRef.current = null;      delete plate.dataset.ready;    };  }, [brand, preset, tone, accent, reduced]);  const focusDistrict = (el: HTMLElement | null) => {    const plate = plateRef.current;    const engine = engineRef.current;    if (!plate || !engine || reduced) return;    if (!el) {      engine.setDistrict(null);      return;    }    const pr = plate.getBoundingClientRect();    const er = el.getBoundingClientRect();    engine.setDistrict((er.left + er.width * 0.5 - pr.left) / Math.max(1, pr.width));  };  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-500 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={brand} tagline={tagline} action={action} />            <FooterNav columns={columns} onAim={(el) => focusDistrict(el)} />          </div>          {/* The city rises in this space; the canvas behind the whole plate draws it. */}          <div ref={stageRef} aria-hidden="true" className="mt-[clamp(8px,2cqi,24px)] h-[clamp(200px,30cqi,360px)] w-full" />          <FooterCaption            legal={legal}            links={legalLinks}            note={city ? <span ref={clockRef} className="tabular-nums opacity-80" /> : undefined}            className="relative px-[max(20px,5cqi)] pb-[clamp(18px,2.4cqi,26px)] pt-3"          />        </div>      </div>    </footer>  );}

Registry item: /r/skyline-footer.json