Cards & content / Media & mockups
Tabbed App Window Showcase
Two-tone heading, outlined pill tabs (active has a dark 1px border), then a large rounded 1070px frame with traffic-light dots containing a muted product UI video/screenshot of a dashboard.
Rebuilt from supabase.com in the Emerald Paper Precision style.
npx shadcn@latest add https://yoink-app.fly.dev/r/emerald-paper-precision/blocks/tabbed-app-window.json
Looks exactly like supabase.com: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://yoink-app.fly.dev/r/emerald-paper-precision/mine/tabbed-app-window.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: headingStrong, headingMuted, and tabs (array of {id,label,title,empty,cta}). Clicking a tab swaps the mock app window content with a fade-in; the frame itself reveals on scroll.
components/tabbed-app-window.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useState } from "react"; type Tab = { id: string; label: string; title: string; empty: string; cta: string }; const defaultTabs: Tab[] = [ { id: "tables", label: "Data Explorer", title: "Data Explorer", empty: "There are no records available in this workspace.", cta: "Create a new record" }, { id: "queries", label: "Query Console", title: "Query Console", empty: "You have not saved any queries yet.", cta: "Write a new query" }, { id: "rules", label: "Access Rules", title: "Access Rules", empty: "No access rules are defined for this workspace.", cta: "Add a new rule" }, ]; export default function TabbedAppWindowShowcase({ headingStrong = "Stay in flow and run your product", headingMuted = "without ever leaving one console", tabs = defaultTabs, }: { headingStrong?: string; headingMuted?: string; tabs?: Tab[]; }) { const [active, setActive] = useState(0); const tab = tabs[active]; const icons = Array.from({ length: 12 }); return ( <section className="bg-canvas px-4 py-16 md:px-8 md:py-24"> <div className="mx-auto max-w-[1088px]"> <h2 className="font-display text-h2 tracking-[-0.02em]"> <span className="block text-ink">{headingStrong}</span> <span className="block text-ink-muted">{headingMuted}</span> </h2> <div role="tablist" aria-label="Product areas" className="mt-8 flex flex-wrap gap-3"> {tabs.map((t, i) => ( <button key={t.id} role="tab" aria-selected={i === active} onClick={() => setActive(i)} className={`rounded-pill border px-8 py-2 text-body transition-colors duration-hover-color ease-hover-color focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand ${ i === active ? "border-ink bg-surface text-ink" : "border-hairline text-ink-soft hover:border-hairline-strong" }`} > {t.label} </button> ))} </div> <Reveal from="none" duration={100} delay={200} className="mt-8"> <div className="overflow-hidden rounded-[28px] border border-hairline bg-surface"> <div className="flex gap-2 px-5 py-4"> <span className="h-2.5 w-2.5 rounded-pill bg-hairline" /> <span className="h-2.5 w-2.5 rounded-pill bg-hairline" /> <span className="h-2.5 w-2.5 rounded-pill bg-hairline" /> </div> <div key={tab.id} className="flex h-[420px] animate-fade-in border-t border-hairline md:h-[560px]"> <div className="hidden w-14 shrink-0 flex-col items-center gap-3 border-r border-hairline py-4 sm:flex"> {icons.map((_, i) => ( <span key={i} className={`h-4 w-4 rounded-xs border ${i === 2 ? "border-ink-soft bg-surface-muted" : "border-ink-faint"}`} /> ))} </div> <div className="hidden w-52 shrink-0 border-r border-hairline p-3 md:block lg:w-56"> <p className="px-1 pb-3 text-label text-ink">{tab.title}</p> <div className="rounded-md border border-hairline px-2 py-1 font-mono text-caption text-ink-soft">scope: default</div> <div className="mt-2 rounded-md border border-hairline px-2 py-1 text-center text-caption text-ink-soft">+ New item</div> <div className="mt-3 rounded-md border border-hairline px-2 py-1 text-caption text-ink-faint">Search...</div> <div className="mt-3 rounded-md border border-hairline bg-surface-muted p-4 text-center text-caption text-ink-muted"> <p className="text-ink">No entries available</p> <p className="mt-1">Nothing here yet</p> </div> </div> <div className="flex min-w-0 flex-1 flex-col"> <div className="flex items-center gap-3 border-b border-hairline px-4 py-3 text-caption text-ink-soft"> <span>Northwind Dev</span> <span className="rounded-pill border border-hairline px-2 text-ink-muted">Pro</span> <span className="text-ink-faint">/</span> <span>Atlas Project</span> <span className="ml-auto rounded-md border border-hairline px-2 py-0.5">Feedback</span> </div> <div className="flex flex-1 items-center justify-center bg-surface-muted p-4"> <div className="w-full max-w-[290px] rounded-md border border-hairline bg-surface p-5 shadow-popover"> <p className="text-label text-ink">{tab.title}</p> <p className="mt-4 text-caption text-ink-soft">{tab.empty}</p> <button className="mt-4 rounded-md bg-brand-bright px-2.5 py-1 text-caption text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand">{tab.cta}</button> </div> </div> </div> </div> </div> </Reveal> </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> ); }"use client"; import { useEffect, useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useState } from "react"; type Tab = { id: string; label: string; title: string; empty: string; cta: string }; const defaultTabs: Tab[] = [ { id: "tables", label: "Data Explorer", title: "Data Explorer", empty: "There are no records available in this workspace.", cta: "Create a new record" }, { id: "queries", label: "Query Console", title: "Query Console", empty: "You have not saved any queries yet.", cta: "Write a new query" }, { id: "rules", label: "Access Rules", title: "Access Rules", empty: "No access rules are defined for this workspace.", cta: "Add a new rule" }, ]; export default function TabbedAppWindowShowcase({ headingStrong = "Stay in flow and run your product", headingMuted = "without ever leaving one console", tabs = defaultTabs, }: { headingStrong?: string; headingMuted?: string; tabs?: Tab[]; }) { const [active, setActive] = useState(0); const tab = tabs[active]; const icons = Array.from({ length: 12 }); return ( <section className="bg-background px-4 py-16 md:px-8 md:py-24"> <div className="mx-auto max-w-[1088px]"> <h2 className="font-sans text-emerald-h2 tracking-[-0.02em]"> <span className="block text-foreground">{headingStrong}</span> <span className="block text-muted-foreground">{headingMuted}</span> </h2> <div role="tablist" aria-label="Product areas" className="mt-8 flex flex-wrap gap-3"> {tabs.map((t, i) => ( <button key={t.id} role="tab" aria-selected={i === active} onClick={() => setActive(i)} className={`rounded-full border px-8 py-2 text-emerald-body transition-colors duration-emerald-hover-color ease-emerald-hover-color focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${ i === active ? "border-foreground bg-card text-foreground" : "border-border text-muted-foreground hover:border-border" }`} > {t.label} </button> ))} </div> <Reveal from="none" duration={100} delay={200} className="mt-8"> <div className="overflow-hidden rounded-[28px] border border-border bg-card"> <div className="flex gap-2 px-5 py-4"> <span className="h-2.5 w-2.5 rounded-full bg-border" /> <span className="h-2.5 w-2.5 rounded-full bg-border" /> <span className="h-2.5 w-2.5 rounded-full bg-border" /> </div> <div key={tab.id} className="flex h-[420px] animate-emerald-fade-in border-t border-border md:h-[560px]"> <div className="hidden w-14 shrink-0 flex-col items-center gap-3 border-r border-border py-4 sm:flex"> {icons.map((_, i) => ( <span key={i} className={`h-4 w-4 rounded-md border ${i === 2 ? "border-muted-foreground bg-muted" : "border-muted-foreground"}`} /> ))} </div> <div className="hidden w-52 shrink-0 border-r border-border p-3 md:block lg:w-56"> <p className="px-1 pb-3 text-emerald-label text-foreground">{tab.title}</p> <div className="rounded-md border border-border px-2 py-1 font-mono text-emerald-caption text-muted-foreground">scope: default</div> <div className="mt-2 rounded-md border border-border px-2 py-1 text-center text-emerald-caption text-muted-foreground">+ New item</div> <div className="mt-3 rounded-md border border-border px-2 py-1 text-emerald-caption text-muted-foreground">Search...</div> <div className="mt-3 rounded-md border border-border bg-muted p-4 text-center text-emerald-caption text-muted-foreground"> <p className="text-foreground">No entries available</p> <p className="mt-1">Nothing here yet</p> </div> </div> <div className="flex min-w-0 flex-1 flex-col"> <div className="flex items-center gap-3 border-b border-border px-4 py-3 text-emerald-caption text-muted-foreground"> <span>Northwind Dev</span> <span className="rounded-full border border-border px-2 text-muted-foreground">Pro</span> <span className="text-muted-foreground">/</span> <span>Atlas Project</span> <span className="ml-auto rounded-md border border-border px-2 py-0.5">Feedback</span> </div> <div className="flex flex-1 items-center justify-center bg-muted p-4"> <div className="w-full max-w-[290px] rounded-md border border-border bg-card p-5 shadow-emerald-popover"> <p className="text-emerald-label text-foreground">{tab.title}</p> <p className="mt-4 text-emerald-caption text-muted-foreground">{tab.empty}</p> <button className="mt-4 rounded-md bg-primary px-2.5 py-1 text-emerald-caption text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary">{tab.cta}</button> </div> </div> </div> </div> </div> </Reveal> </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- Accessible: not passedElements must meet minimum color contrast ratio thresholds (1 element)
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.