Footers / Footers

Footnote Disclaimer Block

Hairline rule then two-column layout: small label left, right a numbered small-type list of disclaimers with underlined inline links, on dark canvas.

Rebuilt from mercury.com/releases in the Twilight Ledger style.

npx shadcn@latest add https://justyoink.it/r/twilight-ledger-0e1ecf/blocks/legal-footnotes.json

Looks exactly like mercury.com: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Props: label (left heading) and intro (ReactNode-like override for the opening paragraph). Renders standalone on a bg-canvas; links brighten on hover via the hover-wash motion tokens.

components/legal-footnotes.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Link = { text: string; href: string };

type Props = {
  label?: string;
  intro?: string;
  notes?: string[];
};

const A = ({ children, href = "#" }: { children: React.ReactNode; href?: string }) => (
  <a
    href={href}
    className="underline decoration-ink-subtle underline-offset-[3px] transition-colors duration-hover-wash ease-hover-wash hover:text-ink hover:decoration-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent"
  >
    {children}
  </a>
);

export default function FootnoteDisclaimerBlock({
  label = "Notes and disclosures",
  intro,
}: Props) {
  return (
    <footer className="bg-canvas text-ink-muted font-sans">
      <Reveal from="up" distance={24} className="mx-auto max-w-[1024px] px-6 pt-24 pb-28 md:px-0">
        <hr className="border-0 border-t border-hairline" />
        <div className="mt-10 grid gap-8 md:grid-cols-[341px_1fr]">
          <h2 className="text-label text-ink">{label}</h2>
          <div className="text-caption leading-[1.45] text-ink-muted md:pr-0">
            <p>
              {intro ?? (
                <>
                  Northwind Ledger is a software company, <A>not a licensed bank</A>. Accounts are offered through{" "}
                  <A>Harbor Trust Partners</A> and <A>Altura Bank</A>, members of the deposit program. Coverage applies to the failure of a partner bank.
                </>
              )}
            </p>
            <ol className="mt-6 list-decimal space-y-5 pl-6 marker:text-ink-muted">
              <li className="pl-0">
                Northwind cards are issued by Harbor Trust Partners and Altura Bank, pursuant to a licence from the card network.
              </li>
              <li className="pl-0">
                Northwind Ledger is a software company, not a licensed bank. Services are provided through <A>Harbor Trust Partners</A> and <A>Altura Bank</A>, members of the deposit program. Coverage on checking and savings balances is held at partner banks and their program network. Certain conditions must be met for pass-through coverage to apply. Learn more <A>here</A>.
              </li>
            </ol>
          </div>
        </div>
      </Reveal>
    </footer>
  );
}

// ---- Yoink motion (inlined, no dependencies): Reveal ----

const YK_EASE = "cubic-bezier(0.16, 1, 0.3, 1)";

const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;

function ykReducedMotion(): boolean {
  return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
}

// "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance.
// Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed,
// and there is a box to watch), and a safety net reveals anything on screen that is still hidden.
type YkRevealState = "idle" | "hidden" | "shown";

function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState {
  const [state, setState] = useState<YkRevealState>("idle");
  useYkLayoutEffect(() => {
    const el = ref.current;
    if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return;
    // watch the element's own box, or its children when it has none (display: contents)
    const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]);
    const onScreen = (t: Element) => {
      const r = t.getBoundingClientRect();
      return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth;
    };
    if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible
    let shown = false;
    const show = (v: boolean) => {
      if (v !== shown) (shown = v), setState(v ? "shown" : "hidden");
    };
    setState("hidden");
    const inView = new Set<Element>();
    const io = new IntersectionObserver((entries) => {
      for (const e of entries) {
        if (e.isIntersecting) inView.add(e.target);
        else inView.delete(e.target);
      }
      if (inView.size) {
        show(true);
        if (once) io.disconnect();
      } else if (!once) show(false);
    });
    const watched = new Set<Element>();
    const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t)));
    watch();
    // safety net: styles that land after mount (display: contents) get watched too, and nothing
    // stays hidden for more than a moment while it is actually on screen
    const start = Date.now();
    const net = setInterval(() => {
      if (shown) return once && clearInterval(net);
      watch();
      if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true);
    }, 600);
    return () => {
      io.disconnect();
      clearInterval(net);
    };
  }, [once]);
  return state;
}

type YkRevealFrom = "up" | "down" | "left" | "right" | "scale" | "blur" | "none";

/** Fades content in as it scrolls into view. */
function Reveal({
  children,
  from = "up",
  delay = 0,
  duration = 700,
  distance = 24,
  once = true,
  as = "div",
  className,
  style,
}: {
  children?: ReactNode;
  from?: YkRevealFrom;
  delay?: number;
  duration?: number;
  distance?: number;
  once?: boolean;
  as?: ElementType;
  className?: string;
  style?: CSSProperties;
}) {
  const Tag = as;
  const ref = useRef<HTMLElement>(null);
  const state = useYkReveal(ref, once);
  const hidden = state === "hidden";
  const offset = {
    up: `translate3d(0, ${distance}px, 0)`,
    down: `translate3d(0, ${-distance}px, 0)`,
    left: `translate3d(${-distance}px, 0, 0)`,
    right: `translate3d(${distance}px, 0, 0)`,
    scale: "scale(0.94)",
    blur: `translate3d(0, ${distance / 2}px, 0)`,
    none: "none",
  }[from];
  const t = `${duration}ms ${YK_EASE} ${delay}ms`;
  return (
    <Tag
      ref={ref}
      className={className}
      style={{
        ...style,
        ...(hidden && { opacity: 0, transform: offset, filter: from === "blur" ? "blur(12px)" : undefined }),
        ...(state === "shown" && { transition: `opacity ${t}, transform ${t}, filter ${t}` }),
      }}
    >
      {children}
    </Tag>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Twilight Ledger

The whole style →

Light Release Notes Header

Changelog

Cinematic Landscape Hero

Heroes

Frosted Transparent Header

Headers & nav bars

Glass Email Capture Pill

Forms

Accordion Feature List with Product Mock

Feature sections

Dark Glass Account Panel Mockup

Media & mockups