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.
npx shadcn@latest add https://justyoink.it/r/twilight-ledger-0e1ecf/mine/disclaimer-glass-bar.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
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> ); }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-background text-foreground"> <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 " /> <div className="mx-auto flex max-w-xl flex-col items-center px-6 pt-24 text-center"> <h2 className="font-sans text-twilight-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-2xl border border-border bg-background/70 px-6 py-3.5 text-center text-twilight-caption text-foreground 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- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.