Cards & content / Media & mockups

App-Window Marketplace Browser

A macOS-style window frame with traffic-light dots, tab bar, search field, category link columns, segmented Trending/Best/Recent filter and a 4-up grid of 20px-rounded 4:3 template thumbnails with title, author and price pill (Free/$99). Includes an 'Agent Templates' promo card with a blue 'New' badge.

Rebuilt from framer.com in the Obsidian Canvas style.

npx shadcn@latest add https://justyoink.it/r/obsidian-canvas-cc37fa/blocks/marketplace-window.json

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

Images5 in this component. Swap any for a library image or one of your own.All images in this style →

Choose an image

Image

Loading…

Usage

Props: heading, count, ctaLabel, items (title, author, price, img) and promoImage; all have defaults so it renders with no props. Tabs and filter pills are interactive local state.

components/marketplace-window.tsx
"use client";

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

type Item = { title: string; author: string; price: string; img: string; pos?: string };

const DEFAULT_ITEMS: Item[] = [
  { title: "Orbit Folio", author: "Mara Lindqvist", price: "Free", img: "https://yoink-app.fly.dev/stock/workspace-4.jpg" },
  { title: "Night Reel", author: "Joel Okafor", price: "$99", img: "https://yoink-app.fly.dev/stock/landscape-3.jpg" },
  { title: "Greenfield", author: "Tava Studio", price: "Free", img: "https://yoink-app.fly.dev/stock/landscape-1.jpg" },
  { title: "Ember Agency", author: "Nordic Works", price: "$99", img: "https://yoink-app.fly.dev/stock/abstract-2.jpg" },
];

const COLUMNS: { head: string; links: string[] }[] = [
  { head: "Portfolio", links: ["Artists", "Designers", "Photography", "Resume"] },
  { head: "Software", links: ["AI", "Apps", "Fintech", "SaaS"] },
  { head: "Agency", links: ["Architecture", "Design", "Marketing", "Web Design"] },
  { head: "Ecommerce", links: ["Beauty", "Digital", "Fashion", "Furniture"] },
  { head: "Services", links: ["Consulting", "Education", "Legal", "Home Services"] },
  { head: "Health", links: ["Fitness", "Medical", "Therapy", "Wellness"] },
  { head: "Publishing", links: ["Blogs", "Entertainment", "Magazines", "News"] },
  { head: "Property", links: ["Agents", "Construction", "Listings", "Management"] },
  { head: "Hospitality", links: ["Food", "Hotels", "Restaurants", "Travel"] },
  { head: "Events", links: ["Conferences", "Sports", "Venues", "Weddings"] },
];

export default function AppWindowMarketplaceBrowser({
  heading = "Browse the template bazaar",
  count = "12,480 Resources",
  ctaLabel = "Open the bazaar",
  items = DEFAULT_ITEMS,
  promoImage = "https://yoink-app.fly.dev/stock/abstract-3.jpg",
}: {
  heading?: string;
  count?: string;
  ctaLabel?: string;
  items?: Item[];
  promoImage?: string;
}) {
  const [tab, setTab] = useState("Templates");
  const [filter, setFilter] = useState("Trending");
  const btn = "transition-colors duration-surface-hover ease-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue";
  return (
    <section className="bg-canvas px-4 py-16 text-primary md:px-8">
      <div className="mx-auto max-w-[1200px]">
        <Reveal>
          <div className="mb-10 flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
            <h2 className="font-display text-h2 tracking-tight">{heading}</h2>
            <div className="flex items-center gap-4">
              <span className="text-ui text-muted">{count}</span>
              <button className={`${btn} rounded-md bg-surface-raised px-3.5 py-2 text-ui hover:bg-surface-high`}>{ctaLabel}</button>
            </div>
          </div>
        </Reveal>
        <div className="overflow-hidden rounded-[28px] border border-hairline bg-surface">
          <div className="flex items-center gap-2 border-b border-hairline px-4 py-3.5">
            <span className="h-3.5 w-3.5 rounded-full bg-[#ff5f57]" />
            <span className="h-3.5 w-3.5 rounded-full bg-[#febc2e]" />
            <span className="h-3.5 w-3.5 rounded-full bg-[#28c840]" />
            <span className="ml-4 h-7 w-7 rounded-md bg-surface-raised" />
            <span className="ml-auto text-lead text-muted" aria-hidden>+</span>
          </div>
          <div className="flex flex-wrap items-center gap-3 border-b border-hairline px-3 py-2.5">
            <button className={`${btn} flex items-center gap-2 rounded-md bg-surface-raised px-3 py-1.5 text-ui`}>
              <span className="h-3 w-3 rounded-sm bg-primary" />Marketplace
            </button>
            <nav className="order-last flex w-full justify-center gap-6 md:order-none md:w-auto md:flex-1">
              {["Templates", "Components", "Plugins", "Vectors"].map((t) => (
                <button key={t} onClick={() => setTab(t)} aria-pressed={tab === t} className={`text-ui duration-link-brighten ${tab === t ? "text-primary" : "text-muted hover:text-primary"} focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue`}>{t}</button>
              ))}
            </nav>
            <input aria-label="Search" placeholder={`Search ${tab}…`} className="ml-auto w-full rounded-md bg-surface-raised px-3 py-2 text-ui placeholder:text-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue md:w-60" />
          </div>
          <div className="px-5 py-10 md:px-5">
            <div className="flex flex-col gap-8 md:flex-row md:items-start md:justify-between">
              <div className="md:pt-6">
                <h3 className="font-display text-h2">{tab}</h3>
                <p className="mt-5 max-w-xs text-body text-muted">Browse polished starting points and find the right base for your next launch.</p>
              </div>
              <div className="flex gap-4 rounded-xl border border-hairline bg-canvas/40 p-4 md:max-w-[350px]">
                <img src={promoImage} alt="" width={134} height={101} className="h-[101px] w-[134px] shrink-0 rounded-[10px] object-cover" loading="lazy" />
                <div>
                  <div className="flex items-center gap-2 text-ui">Agent Kits <span className="rounded-sm bg-accent-blue-wash px-1.5 text-caption text-accent-blue">New</span></div>
                  <p className="mt-2 text-caption text-muted">Built-in guidelines let assistants tweak these layouts for you. Just ask, then ship.</p>
                </div>
              </div>
            </div>
            <div className="mt-12 grid grid-cols-2 gap-x-6 gap-y-8 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-10">
              {COLUMNS.map((c) => (
                <div key={c.head} className="flex flex-col gap-2.5 text-ui">
                  <span className="text-primary">{c.head}</span>
                  {c.links.map((l) => (
                    <a key={l} href="#" className="text-muted duration-link-brighten hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue">{l}</a>
                  ))}
                </div>
              ))}
            </div>
            <div className="mt-14 flex items-center justify-between">
              <div className="flex gap-1 rounded-md bg-canvas/30 p-0.5">
                {["Trending", "Best", "Recent"].map((f) => (
                  <button key={f} onClick={() => setFilter(f)} aria-pressed={filter === f} className={`${btn} rounded-md px-3 py-1.5 text-ui ${filter === f ? "bg-surface-raised text-primary" : "text-muted hover:text-primary"}`}>{f}</button>
                ))}
              </div>
              <div className="hidden gap-2 sm:flex">
                {["All", "Price", "Style"].map((f) => (
                  <button key={f} className={`${btn} rounded-md bg-surface-raised px-3 py-1.5 text-ui hover:bg-surface-high`}>{f} ⌄</button>
                ))}
              </div>
            </div>
            <div className="mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-4">
              {items.map((it) => (
                <article key={it.title} className="group">
                  <div className="aspect-[4/3] overflow-hidden rounded-[20px] border border-hairline">
                    <img src={it.img} alt={`${it.title} template preview`} width={275} height={207} loading="lazy" className="h-full w-full object-cover transition-transform duration-500 group-hover:scale-105" />
                  </div>
                  <div className="mt-3 flex items-center justify-between">
                    <div className="text-ui">
                      <div className="text-primary">{it.title}</div>
                      <div className="text-muted">{it.author}</div>
                    </div>
                    <span className="rounded-md bg-surface-raised px-2.5 py-1.5 text-ui">{it.price}</span>
                  </div>
                </article>
              ))}
            </div>
          </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

Platform Bento Grid

Feature sections

Audience Icon Grid

Feature sections

Sticky-date Changelog Entry

Changelog

Neon Agent Prompt Hero

Heroes

Hairline Triple Feature Strip

Feature sections