Cards & content / Cards

Kanban Shared Inbox with Live Cursors

Inbox window with columns (Review, Scheduled, Next steps, Offer) of dark rounded cards with title, sender, category chip and time. Colored multiplayer cursor flags (blue Erin, gray Agent) float over cards; the right and bottom fade into black.

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

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

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

Usage

Props: eyebrow, title, subtitle, and columns (array of {name, cards:[{title, from, tag, time, dim}]}). Renders standalone; the Erin and Agent cursors drift between positions automatically.

components/kanban-shared-inbox.tsx
"use client";

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

type Card = { title: string; from: string; tag: string; time: string; dim?: boolean };

const defaultColumns: { name: string; cards: Card[] }[] = [
  { name: "Review", cards: [
    { title: "Application for Product Designer role", from: "Maya Ellison", tag: "Design", time: "Yesterday" },
    { title: "Backend Engineer", from: "Tomas Reyes", tag: "Engineering", time: "8:42 AM" },
    { title: "Senior Brand Designer application", from: "Priya Nair", tag: "Design", time: "9:14 AM" },
    { title: "Application for Product Designer role", from: "Owen Barlow", tag: "Design", time: "9:14 AM", dim: true },
  ] },
  { name: "Scheduled", cards: [
    { title: "Partnerships Lead", from: "Jamie Hart", tag: "Marketing", time: "Yesterday" },
    { title: "Support Specialist", from: "Nadia Karim", tag: "Success", time: "May 17", dim: true },
    { title: "Finance & Planning analyst", from: "Luca Bianchi", tag: "Ops", time: "May 12" },
  ] },
  { name: "Next steps", cards: [
    { title: "Keen to join the Northwind crew", from: "Sam Archer", tag: "Success", time: "May 9" },
  ] },
  { name: "Offer", cards: [
    { title: "Loved your component library", from: "Alex Moreau", tag: "Engineering", time: "May 4" },
  ] },
];

function Cursor({ label, blue, className }: { label: string; blue?: boolean; className?: string }) {
  const c = blue ? "#3b9bff" : "#8a8f98";
  return (
    <div className={"pointer-events-none absolute z-20 transition-all duration-[1800ms] ease-in-out " + (className || "")}>
      <svg width="16" height="16" viewBox="0 0 16 16" fill={c}><path d="M1 1l13 5-5.5 2L6 14z" /></svg>
      <span className="ml-3 -mt-0.5 inline-block rounded px-1.5 py-0.5 text-caption text-white" style={{ background: c }}>{label}</span>
    </div>
  );
}

export default function KanbanSharedInbox({
  eyebrow = "Team mailboxes",
  title = "Collaborate through your inbox",
  subtitle = "Give everyone access to a mailbox, hand off threads, and continue right where a teammate paused.",
  columns = defaultColumns,
}: { eyebrow?: string; title?: string; subtitle?: string; columns?: typeof defaultColumns }) {
  const [pos, setPos] = useState(0);
  useEffect(() => {
    const t = setInterval(() => setPos((p) => (p + 1) % 2), 2600);
    return () => clearInterval(t);
  }, []);
  const tagCls = (t: string) =>
    t === "Engineering" || t === "Success" ? "bg-accent-blue/15 text-accent-blue" : "bg-surface-high text-secondary";
  return (
    <section className="relative overflow-hidden bg-background px-4 py-20 text-primary">
      <div className="mx-auto max-w-2xl text-center">
        <p className="text-ui text-secondary">{eyebrow}</p>
        <h2 className="mt-4 bg-silver-text bg-clip-text font-display text-5xl font-medium tracking-[-0.04em] text-transparent md:text-6xl">{title}</h2>
        <p className="mx-auto mt-5 max-w-md text-lead text-secondary">{subtitle}</p>
      </div>
      <Reveal from="up" className="relative mx-auto mt-14 h-[640px] max-w-5xl overflow-hidden rounded-[28px] border border-hairline bg-surface/60">
        <div className="absolute inset-x-0 top-0 h-48 bg-top-glow opacity-60" />
        <div className="relative flex items-center justify-between px-6 py-4">
          <span className="h-4 w-4 rounded-sm border border-hairline" />
          <span className="text-ui text-secondary">Inboxes / <b className="font-medium text-primary">Recruiting</b></span>
          <button className="rounded-lg bg-paper px-3 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="relative flex gap-4 px-6">
          <div className="hidden w-8 flex-col gap-4 pt-12 sm:flex">
            {[0, 1, 2, 3, 4].map((i) => <span key={i} className={"h-5 w-5 rounded-sm border border-hairline " + (i === 0 ? "bg-surface-high" : "")} />)}
          </div>
          <div className="min-w-0 flex-1">
            <h3 className="text-h2 font-medium">Inbox</h3>
            <div className="mt-8 flex gap-6 overflow-hidden">
              {columns.map((col) => (
                <div key={col.name} className="w-[248px] shrink-0">
                  <p className="mb-6 text-ui text-secondary">{col.name}</p>
                  <div className="flex flex-col gap-4">
                    {col.cards.map((c, i) => (
                      <div key={i} className={"flex h-[136px] flex-col justify-between rounded-xl bg-surface-raised p-4 transition-colors duration-hover-color hover:bg-surface-high " + (c.dim ? "opacity-50" : "")}>
                        <div>
                          <p className="line-clamp-2 text-ui font-medium text-primary">{c.title}</p>
                          <p className="mt-1 text-caption text-secondary">{c.from}</p>
                        </div>
                        <div className="flex items-center justify-between text-caption text-secondary">
                          <span className={"rounded-md px-2 py-1 " + tagCls(c.tag)}>{c.tag}</span>
                          <span>{c.time}</span>
                        </div>
                      </div>
                    ))}
                  </div>
                </div>
              ))}
            </div>
          </div>
        </div>
        <Cursor label="Erin" blue className={pos ? "left-[430px] top-[420px]" : "left-[260px] top-[150px]"} />
        <Cursor label="Agent" className={pos ? "left-[620px] top-[240px]" : "left-[790px] top-[190px]"} />
        <div className="pointer-events-none absolute inset-y-0 right-0 w-48 bg-[linear-gradient(270deg,#000_0%,rgba(0,0,0,0.6)_40%,transparent_100%)]" />
        <div className="pointer-events-none absolute inset-x-0 bottom-0 h-48 bg-[linear-gradient(transparent_0%,rgba(0,0,0,0.6)_60%,#000_100%)]" />
      </Reveal>
    </section>
  );
}

// ---- 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 · 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