Cards & content / Media & mockups

Blue-Glow Inbox Mockup

Hero of a grid-lined black page with a vertical blue beam. Below, a hairline inbox window with icon rail, breadcrumb selector, white Compose button and message rows with colored label chips and avatar initials, bottom fade-out, and an overlay of mono 'AGENT READ' tags with corner brackets and a JSON snippet.

Rebuilt from resend.com/products/inboxes in the Obsidian Serif Glow style.

npx shadcn@latest add https://justyoink.it/r/obsidian-serif-glow/blocks/agent-inbox-mockup.json

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

Usage

Props: title and breadcrumb. Renders standalone; the agent tag steps across rows every ~2.8s while the active row fades to full opacity with a springy ease.

components/agent-inbox-mockup.tsx
"use client";

import { useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
import { useEffect, useState } from "react";

const rows = [
  { from: "Mara Lindqvist", tag: "Support", tone: "blue", subject: "Queue latency rose", body: "9% since this morning.", time: "Just now", av: "E", strong: true },
  { from: "Kitefield", tag: "Agent", tone: "gray", subject: "Connect your agent?", body: "Draft replies for the team.", time: "8:42 AM", av: "Z" },
  { from: "Oren Walsh", tag: "Hiring", tone: "gray", subject: "Re: Designer interview", body: "Friday at 3pm works.", time: "7:16 AM", av: "" },
  { from: "Altura", tag: "Incident", tone: "blue", subject: "Callback failed", body: "504 on the last 9 events.", time: "Yesterday", av: "L" },
  { from: "Northwind", subject: "Volume forecast", body: "1M events next quarter.", time: "Yesterday", av: "B" },
  { from: "Dev Anand", subject: "Certificate pending", body: "Domain not verified.", time: "Yesterday", av: "Z" },
  { from: "Lumen", subject: "Evening digest", body: "3 urgent, 2 unassigned.", time: "Yesterday", av: "" },
  { from: "Tomas Reyes", subject: "Invoice replies", body: "Nobody is watching billing@.", time: "Mon", av: "A" },
  { from: "Registry", subject: "v2.3.0 released", body: "Read the notes.", time: "Mon", av: "Z" },
  { from: "Hana Moritz", subject: "Rota update", body: "Cover the weekend shift.", time: "Sun", av: "" },
  { from: "Postbox", subject: "First message in", body: "Assign it or pass it on.", time: "Sun", av: "I" },
];

export default function BlueGlowInboxMockup({ title = "Inbox", breadcrumb = "Support" }: { title?: string; breadcrumb?: string }) {
  const [active, setActive] = useState(0);
  useEffect(() => {
    const t = setInterval(() => setActive((a) => (a + 1) % 8), 2800);
    return () => clearInterval(t);
  }, []);
  return (
    <section className="relative isolate overflow-hidden bg-background px-4 pt-24 text-primary">
      <div className="absolute inset-x-0 top-0 -z-10 h-[420px] text-primary">
        <GridPattern variant="grid" size={72} color="color-mix(in oklab, currentColor 8%, transparent)" fade="bottom" />
      </div>
      <div className="pointer-events-none absolute left-1/2 top-0 -z-10 h-28 w-40 -translate-x-1/2 bg-[linear-gradient(to_bottom,transparent,var(--color-accent-blue))] opacity-60 blur-2xl" />
      <Reveal from="up">
        <div className="relative mx-auto max-w-[1152px] overflow-hidden rounded-t-xl border border-hairline bg-surface/60 shadow-glow-blue">
          <div className="absolute inset-x-0 top-0 h-px bg-accent-blue/70" />
          <div className="flex items-center justify-between px-5 py-4">
            <div className="w-16" />
            <div className="text-ui text-secondary">Inboxes / <span className="font-medium text-primary">{breadcrumb}</span> ▾</div>
            <button className="rounded-pill bg-paper px-4 py-2 text-ui font-medium text-black focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue">Compose</button>
          </div>
          <div className="flex">
            <div className="hidden w-14 flex-col items-center gap-5 pt-4 sm:flex">
              {[0, 1, 2, 3, 4, 5].map((i) => (
                <span key={i} className={`h-4 w-4 rounded-sm border ${i === 1 ? "border-primary bg-surface-high" : "border-hairline"} `} />
              ))}
            </div>
            <div className="relative flex-1 px-4 pb-0 sm:px-6">
              <h2 className="mb-4 mt-2 text-h2 font-medium">{title}</h2>
              <ul className="h-[540px] overflow-hidden">
                {rows.map((r, i) => (
                  <li key={i} className={`flex h-12 items-center gap-4 text-ui transition-opacity duration-[600ms] ease-[cubic-bezier(0.34,1.56,0.64,1)] ${i === active ? "opacity-100" : "opacity-[0.55]"}`}>
                    <span className={`w-28 shrink-0 truncate sm:w-52 ${i === 0 ? "font-medium text-primary" : "text-secondary"}`}>{r.from}</span>
                    <span className="flex min-w-0 flex-1 items-center gap-2 truncate">
                      {r.tag && <span className={`rounded-sm px-2 py-0.5 text-caption ${r.tone === "blue" ? "bg-accent-blue/20 text-accent-blue" : "bg-surface-high text-secondary"}`}>{r.tag}</span>}
                      <span className={`truncate ${r.strong ? "font-medium text-primary" : "text-secondary"}`}>{r.subject} – {r.body}</span>
                    </span>
                    <span className="text-secondary">{r.time}</span>
                    <span className="flex h-6 w-6 items-center justify-center rounded-pill bg-surface-high text-caption">{r.av || ""}</span>
                  </li>
                ))}
              </ul>
              <div
                className="pointer-events-none absolute right-24 hidden transition-all duration-[1200ms] md:block"
                style={{ top: 96 + (active % 8) * 48 - 12 }}
              >
                <div className="relative border border-hairline px-3 py-3 font-mono text-[11px] text-primary">
                  <span className="absolute -left-px -top-px h-2 w-2 border-l border-t border-primary" />
                  <span className="absolute -bottom-px -right-px h-2 w-2 border-b border-r border-primary" />
                  "read": <span className="text-accent-orange">true</span>
                  <span className="absolute -top-4 left-full ml-1 whitespace-nowrap bg-background px-1 text-[9px]">AGENT <span className="text-muted">SEEK 568037</span></span>
                </div>
              </div>
            </div>
          </div>
          <div className="pointer-events-none absolute inset-x-0 bottom-0 h-48 bg-[linear-gradient(transparent,rgba(0,0,0,0.6)_60%,#000)]" />
        </div>
      </Reveal>
    </section>
  );
}

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

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;
}

// Background and overlay layers sit inside their parent: make sure it can hold them.
function ykPrepareParent(el: HTMLElement | null, isolate = false) {
  const p = el?.parentElement;
  if (!p) return;
  const cs = getComputedStyle(p);
  if (cs.position === "static") p.style.position = "relative";
  if (isolate && cs.isolation !== "isolate" && cs.zIndex === "auto") p.style.isolation = "isolate";
}

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>
  );
}

const YK_GRID_CSS = `@keyframes yk-grid-sweep{from{-webkit-mask-position:150% 0;mask-position:150% 0}to{-webkit-mask-position:-50% 0;mask-position:-50% 0}}
@media (prefers-reduced-motion:reduce){[data-yk-sweep]{display:none}}`;

/** A faint grid or dot pattern behind a section, fading out at the edges. */
function GridPattern({
  variant = "grid",
  size = 32,
  color = "color-mix(in oklab, currentColor 12%, transparent)",
  fade = "radial",
  shimmer = false,
  className,
  style,
}: {
  variant?: "grid" | "dots";
  size?: number;
  color?: string;
  fade?: "radial" | "top" | "bottom" | "none";
  shimmer?: boolean;
  className?: string;
  style?: CSSProperties;
}) {
  const ref = useRef<HTMLDivElement>(null);
  useYkLayoutEffect(() => ykPrepareParent(ref.current, true), []);
  const paint = (c: string) =>
    variant === "dots"
      ? { backgroundImage: `radial-gradient(circle at center, ${c} 1.2px, transparent 1.6px)`, backgroundSize: `${size}px ${size}px` }
      : { backgroundImage: `linear-gradient(to right, ${c} 1px, transparent 1px), linear-gradient(to bottom, ${c} 1px, transparent 1px)`, backgroundSize: `${size}px ${size}px` };
  const mask = {
    radial: "radial-gradient(ellipse at center, black 30%, transparent 75%)",
    top: "linear-gradient(to bottom, black, transparent 85%)",
    bottom: "linear-gradient(to top, black, transparent 85%)",
    none: undefined,
  }[fade];
  const sweep = "linear-gradient(110deg, transparent 40%, black 50%, transparent 60%)";
  return (
    <div
      ref={ref}
      aria-hidden="true"
      data-yk-grid=""
      className={className}
      style={{ position: "absolute", inset: 0, zIndex: -1, pointerEvents: "none", maskImage: mask, WebkitMaskImage: mask, ...style }}
    >
      <div style={{ position: "absolute", inset: 0, ...paint(color) }} />
      {shimmer && (
        <>
          <style>{YK_GRID_CSS}</style>
          <div
            data-yk-sweep=""
            style={{
              position: "absolute",
              inset: 0,
              ...paint(`color-mix(in oklab, ${color} 100%, currentColor 30%)`),
              maskImage: sweep,
              WebkitMaskImage: sweep,
              maskSize: "250% 100%",
              WebkitMaskSize: "250% 100%",
              animation: "yk-grid-sweep 7s ease-in-out infinite",
            }}
          />
        </>
      )}
    </div>
  );
}

Quality checks

Automated, in a real browser · 5d ago
—

More from Obsidian Serif Glow

The whole style →

Blue Glass Agent Config Card

Forms

Hairline Use-Case Grid

Feature sections

Serif Hero with Dark 3D Object

Heroes

Monochrome Logo Cloud

Logo clouds

Language Picker and Code Window

Code blocks

Glossy Icon Section Header

Feature sections