Overlays & feedback / Toasts & snackbars

Square Outline Cookie Panel

Floating bottom-right panel with a square 1px ink border over the grey canvas, a heavy serif title, small body copy, a hairline, then Deny all text link, Settings outline pill and Accept all solid pill.

Rebuilt from epic.net in the Gallery Graphite Editorial style.

npx shadcn@latest add https://justyoink.it/r/gallery-graphite-editorial/blocks/outlined-cookie-panel.json

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

Usage

Props: title, body, denyLabel, settingsLabel, acceptLabel and onDeny/onSettings/onAccept callbacks. Deny and Accept dismiss the panel; it is fixed bottom-right (full width on mobile).

components/outlined-cookie-panel.tsx
import { useState } from "react";

export default function SquareOutlineCookiePanel({
  title = "We value your privacy",
  body = "We use cookies and similar technologies to personalise content, study how the site is used and improve your experience. By continuing to browse you agree to their use.",
  denyLabel = "Deny all",
  settingsLabel = "Settings",
  acceptLabel = "Accept all",
  onDeny,
  onSettings,
  onAccept,
}: {
  title?: string;
  body?: string;
  denyLabel?: string;
  settingsLabel?: string;
  acceptLabel?: string;
  onDeny?: () => void;
  onSettings?: () => void;
  onAccept?: () => void;
}) {
  const [open, setOpen] = useState(true);
  if (!open) return null;
  const close = (cb?: () => void) => () => {
    cb?.();
    setOpen(false);
  };
  const focus = "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ink";
  return (
    <div className="fixed inset-x-4 bottom-4 z-50 sm:inset-x-auto sm:right-4 sm:w-[360px]">
      <section
        role="dialog"
        aria-label="Cookie consent"
        className="animate-popup-in border border-ink bg-canvas p-5 text-ink shadow-[0_10px_30px_-12px_rgba(0,0,0,0.25)]"
      >
        <h2 className="font-display text-[32px] font-black leading-[0.95] tracking-[-0.01em]">{title}</h2>
        <p className="mt-4 font-sans text-[11px] leading-[1.5]">{body}</p>
        <hr className="mt-5 border-0 border-t border-ink" />
        <div className="mt-4 flex items-center justify-between gap-2">
          <button
            type="button"
            onClick={close(onDeny)}
            className={`font-sans text-[10px] font-medium uppercase tracking-[0.06em] hover:underline ${focus}`}
          >
            {denyLabel}
          </button>
          <div className="flex items-center gap-2">
            <button
              type="button"
              onClick={onSettings}
              className={`rounded-full border border-ink px-4 py-2 font-sans text-[10px] font-medium uppercase tracking-[0.06em] transition-colors duration-300 hover:bg-ink hover:text-canvas ${focus}`}
            >
              {settingsLabel}
            </button>
            <button
              type="button"
              onClick={close(onAccept)}
              className={`rounded-full border border-ink bg-ink px-4 py-2 font-sans text-[10px] font-medium uppercase tracking-[0.06em] text-canvas transition-colors duration-300 hover:bg-transparent hover:text-ink ${focus}`}
            >
              {acceptLabel}
            </button>
          </div>
        </div>
      </section>
    </div>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Gallery Graphite Editorial

The whole style →

Outlined Arrow Pill Button

Buttons

Rounded Showreel Video Frame

Media & mockups

Line-Art Blueprint Illustration

Animated graphics

Tracked Micro Label

Badges & tags

Hairline Minimal Header

Headers & nav bars

Floating Object Project Hero

Heroes