Page sections / Feature sections

Platform Bento Grid

Large rounded bordered grid of mixed-span cells (2-col and 3-col rows) each housing a cropped dark product UI (Core Web Vitals bars, CMS tree, site settings, branches, uptime, locales, analytics chart) with bottom fade masks and an 'Arrow link' label at the bottom-left. Cells are divided by hairlines only.

Rebuilt from framer.com in the Obsidian Canvas style.

npx shadcn@latest add https://yoink-app.fly.dev/r/obsidian-canvas-cc37fa/blocks/platform-bento-grid.json

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

Usage

Props: title, subtitle, and labels (array of 7 strings for the first seven cell labels). Renders standalone; the grid is divided by hairlines and each preview fades at the bottom via a mask, with arrows nudging on label hover.

components/platform-bento-grid.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Cell = { label: string };

type Props = {
  title?: string;
  subtitle?: string;
  labels?: string[];
};

const Arrow = () => (
  <svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.4" className="transition-transform duration-surface-hover ease-surface-hover group-hover:translate-x-1"><path d="M2 8h12M9 3l5 5-5 5" /></svg>
);

function Label({ text }: { text: string }) {
  return (
    <a href="#" className="group absolute bottom-0 left-0 z-10 flex items-center gap-2 p-6 text-lead text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent-blue">
      {text}<Arrow />
    </a>
  );
}

function Cellbox({ label, className = "", children }: { label: string; className?: string; children: React.ReactNode }) {
  return (
    <div className={`relative h-[240px] overflow-hidden border-hairline sm:h-[320px] lg:h-[400px] ${className}`}>
      <div className="absolute inset-0 [mask-image:linear-gradient(black_55%,transparent_92%)]">{children}</div>
      <Label text={label} />
    </div>
  );
}

function Row({ name, count, active, indent }: { name: string; count?: string; active?: boolean; indent?: boolean }) {
  return (
    <div className={`flex items-center justify-between rounded-md px-3 py-1.5 text-caption ${indent ? "pl-9" : ""} ${active ? "bg-surface-high text-primary" : "text-secondary"}`}>
      <span>{name}</span>{count && <span className="text-muted">{count}</span>}
    </div>
  );
}

function Bar({ k, v }: { k: string; v: string }) {
  return (
    <div className="mb-5">
      <div className="mb-2 flex justify-between text-ui"><span className="text-muted">{k}</span><span className="text-accent-blue">{v}</span></div>
      <div className="h-1.5 rounded-full bg-surface-raised" />
    </div>
  );
}

export default function PlatformBentoGrid({
  title = "Built for launch, ready to scale",
  subtitle = "Everything a team needs to ship a site, with content, hosting, reporting and search tooling in one place.",
  labels = ["Speed", "Content", "Metadata", "Teamwork", "Uptime", "Languages", "Protection"],
}: Props) {
  return (
    <section className="bg-canvas px-6 py-24 text-primary">
      <div className="mx-auto max-w-[1200px]">
        <Reveal>
          <h2 className="max-w-xl font-display text-h1 text-primary">{title}</h2>
          <p className="mt-4 max-w-lg text-lead text-secondary">{subtitle}</p>
        </Reveal>
        <div className="mt-16 overflow-hidden rounded-xl border border-hairline">
          <div className="grid md:grid-cols-2">
            <Cellbox label={labels[0]} className="border-b md:border-r">
              <div className="mx-auto mt-16 w-full max-w-[300px] px-6 sm:px-0 lg:mt-[100px]">
                <div className="mb-5 flex justify-between text-ui"><span>Page Vitals</span><span className="rounded-sm border border-success/50 px-1.5 text-caption text-success">GOOD</span></div>
                <Bar k="LCP" v="1.1s" /><Bar k="INP" v="95ms" /><Bar k="CLS" v="0.01" />
              </div>
            </Cellbox>
            <Cellbox label={labels[1]} className="border-b">
              <div className="ml-12 mt-12 flex h-full rounded-lg border border-hairline bg-surface">
                <div className="w-[250px] shrink-0 border-r border-hairline p-2">
                  <Row name="Articles" /><Row name="Jobs" /><Row name="Events" /><Row name="Tags" indent count="13" /><Row name="Hosts" indent count="18" /><Row name="Sessions" indent count="89" active /><Row name="Guides" />
                </div>
                <div className="flex-1 p-4 text-caption text-muted">Title</div>
              </div>
            </Cellbox>
          </div>
          <div className="grid md:grid-cols-3">
            <Cellbox label={labels[2]} className="border-b md:border-r">
              <div className="ml-12 mt-12 h-full rounded-lg border border-hairline bg-surface p-7">
                <div className="text-h3">Site Settings</div>
                <div className="mt-6 text-caption text-muted">Title</div>
                <div className="mt-2 w-44 rounded-md bg-surface-raised px-3 py-1.5 text-caption">Studio: a sample page</div>
                <div className="mt-5 text-caption text-muted">Description</div>
                <div className="mt-2 rounded-md bg-surface-raised p-3 text-caption text-secondary">A short description for search engines and sharing.</div>
              </div>
            </Cellbox>
            <div className="border-b md:border-r border-hairline">
              <Cellbox label={labels[3]} className="!h-[240px] border-b">
                <div className="mx-auto mt-12 w-[240px] pt-2">
                  <div className="mb-3 text-caption text-primary">Branches</div>
                  <Row name="Main" count="1m" /><Row name="use-cases" count="1m" active /><Row name="publishing" indent count="8m" />
                </div>
              </Cellbox>
              <Cellbox label={labels[5]} className="!h-[240px]">
                <div className="mx-auto mt-12 w-[240px] pt-2">
                  <div className="mb-3 text-caption text-primary">Locales</div>
                  <Row name="Dutch" count="35%" active /><Row name="Italian" count="100%" /><Row name="Chinese" count="90%" />
                </div>
              </Cellbox>
            </div>
            <div className="border-b border-hairline">
              <Cellbox label={labels[4]} className="!h-[240px] border-b">
                <div className="relative flex h-full flex-col items-center pt-12">
                  <div className="absolute inset-x-0 bottom-0 h-24 rounded-t-full bg-surface-raised/40 blur-xl" />
                  <div className="font-display text-display text-primary">99.99%</div>
                  <div className="font-display text-display text-faint">uptime</div>
                </div>
              </Cellbox>
              <Cellbox label={labels[6]} className="!h-[240px]">
                <div className="ml-6 mt-[75px] flex h-[66px] items-center gap-4 rounded-full border border-hairline px-6 text-muted">
                  <span>←</span><span>→</span><span>↻</span>
                  <span className="rounded-md bg-accent-blue-wash px-3 py-1 text-ui text-secondary">https://www.example.com</span>
                </div>
              </Cellbox>
            </div>
          </div>
          <div className="grid md:grid-cols-[1.2fr_1fr]">
            <Cellbox label="Analytics" className="md:border-r">
              <div className="ml-12 mt-12 h-full rounded-lg border border-hairline bg-surface p-6">
                <div className="flex gap-8 text-caption text-muted">{[["Live","400"],["Unique","1.7M"],["Views","3.2M"],["Bounce","85%"]].map(([a,b])=>(<div key={a}>{a}<div className="text-ui text-primary">{b}</div></div>))}</div>
                <svg viewBox="0 0 700 211" className="mt-8 w-full" fill="none" stroke="currentColor"><path className="text-secondary" d="M0 150 L60 130 L120 140 L180 90 L240 100 L300 60 L360 90 L420 50 L480 80 L540 60 L600 40 L700 30" /><path className="text-faint" strokeDasharray="2 4" d="M0 190 L120 170 L240 150 L300 120 L420 130 L540 120 L700 100" /></svg>
              </div>
            </Cellbox>
            <Cellbox label="Experiments">
              <div className="ml-6 mt-8 text-caption text-muted">Page views<div className="text-ui text-primary">9.6K</div>
                <svg viewBox="0 0 300 80" className="mt-8 w-full max-w-[330px]"><path d="M0 0 C100 0 150 70 300 80 L0 80Z" className="fill-surface-high" /></svg>
              </div>
            </Cellbox>
          </div>
        </div>
      </div>
    </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 · 4d ago
—

More from Obsidian Canvas

The whole style →

Minimal Black Header

Headers & nav bars

Audience Icon Grid

Feature sections

Sticky-date Changelog Entry

Changelog

Neon Agent Prompt Hero

Heroes

Hairline Triple Feature Strip

Feature sections

App-Window Marketplace Browser

Media & mockups