Overlays & feedback / Toasts & snackbars

Glass Disclaimer Banner

Dark translucent rounded bar pinned to the hero bottom containing small centered regulatory text.

Rebuilt from mercury.com in the Twilight Ledger style.

npx shadcn@latest add https://justyoink.it/r/twilight-ledger-0e1ecf/blocks/disclaimer-glass-bar.json

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

ImagesSwap it for a library image or one of your own.All images in this style →

Choose an image

Image

Loading…

Usage

Props: text (disclaimer copy), hideOnScroll (slides the bar down and fades it after scrolling 80px), imageSrc (hero backdrop photo). Renders standalone with no props.

components/disclaimer-glass-bar.tsx
import { useEffect, useState } from "react";

interface Props {
  text?: string;
  hideOnScroll?: boolean;
  imageSrc?: string;
}

export default function GlassDisclaimerBanner({
  text = "Northwind Ledger is a financial software company, not a bank. Accounts are held with our partner institutions, who are members of the national deposit insurance program.",
  hideOnScroll = true,
  imageSrc = "https://yoink-app.fly.dev/stock/landscape-2.jpg",
}: Props) {
  const [away, setAway] = useState(false);

  useEffect(() => {
    if (!hideOnScroll) return;
    const onScroll = () => setAway(window.scrollY > 80);
    onScroll();
    window.addEventListener("scroll", onScroll, { passive: true });
    return () => window.removeEventListener("scroll", onScroll);
  }, [hideOnScroll]);

  return (
    <section className="relative isolate h-[560px] w-full overflow-hidden bg-canvas text-ink">
      <img
        src={imageSrc}
        alt=""
        width={1600}
        height={1068}
        className="absolute inset-0 -z-10 h-full w-full object-cover"
      />
      <div className="absolute inset-0 -z-10 bg-hero-scrim" />
      <div className="mx-auto flex max-w-xl flex-col items-center px-6 pt-24 text-center">
        <h2 className="font-display text-h1">Calm, clear finances</h2>
      </div>
      <div className="pointer-events-none absolute inset-x-0 bottom-0 flex justify-center px-4 pb-4 sm:px-6">
        <aside
          role="note"
          aria-label="Disclaimer"
          className={`pointer-events-auto w-full max-w-[950px] rounded-lg border border-hairline bg-canvas/70 px-6 py-3.5 text-center text-caption text-ink backdrop-blur-xl transition-all duration-500 ease-[cubic-bezier(0.76,0,0.24,1)] motion-reduce:transition-none ${
            away ? "translate-y-[140%] opacity-0" : "translate-y-0 opacity-100"
          }`}
        >
          {text}
        </aside>
      </div>
    </section>
  );
}

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