Cards & content / Media & mockups
Agent Chat Window Mockup
Code-drawn macOS window with traffic lights, three panes (task list with green/red diff counts, chat transcript with file chips and composer, preview), tiny 11–13px type, soft layered shadow, optionally with amber Continue/Build buttons and numbered option chips.
Rebuilt from cursor.com/product in the Warm Paper Editorial style.
Looks exactly like cursor.com: brings its fonts and colours, namespaced so your own theme stays untouched.
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
Renders standalone; override windowTitle, heading, prompt, question, options, docTitle, docBody, running and tasks (title, meta, time, add, del, active) via props to change the mockup content.
components/agent-chat-mockup.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Task = { title: string; meta: string; time?: string; add?: string; del?: string; active?: boolean }; export default function AgentChatWindowMockup({ windowTitle = "Studio Desktop", heading = "Plan Dashboard Redesign", prompt = "let's sketch a dashboard overview with a calendar-style layout, similar to a weekly planner", question = "How should the overview be navigated?", options = ["Tabs across the top", "Sidebar with sections", "Both tabs and sidebar"], docTitle = "Dashboard Overview", docBody = "A weekly grid of cards showing upcoming work, letting you jump to any item quickly.", running = { title: "Draft Marketing Site", meta: "Reading files" }, tasks = [ { title: "Plan Dashboard Redesign", meta: "Drafted outline", time: "now", add: "+18", del: "-2", active: true }, { title: "Chart Library Trial", meta: "Chart experiments", time: "12m" }, { title: "Set up Lint Rules for API", meta: "Config cleanup", time: "34m" }, { title: "Billing Export Tool", meta: "CSV writer", time: "50m", add: "+120", del: "-14" }, ] as Task[], }: { windowTitle?: string; heading?: string; prompt?: string; question?: string; options?: string[]; docTitle?: string; docBody?: string; running?: { title: string; meta: string }; tasks?: Task[]; }) { return ( <section className="bg-canvas px-4 py-10 font-sans text-ink"> <div className="mx-auto max-w-[1300px] rounded-lg bg-media-sage p-4 sm:p-8 md:p-12"> <Reveal from="up"> <div className="mx-auto max-w-[1080px] overflow-hidden rounded-lg border border-hairline bg-surface shadow-window"> <div className="relative flex h-7 items-center border-b border-hairline bg-surface px-3"> <div className="flex gap-1.5" aria-hidden> <i className="h-2.5 w-2.5 rounded-full bg-surface-deep" /> <i className="h-2.5 w-2.5 rounded-full bg-surface-deep" /> <i className="h-2.5 w-2.5 rounded-full bg-surface-deep" /> </div> <span className="absolute inset-x-0 text-center text-[11px] text-ink-muted">{windowTitle}</span> </div> <div className="grid min-h-[560px] text-[12px] md:grid-cols-[220px_340px_1fr]"> <aside className="hidden border-r border-hairline bg-surface-sunken p-2 md:block"> <p className="px-2 py-2 text-[11px] uppercase text-ink-muted">In progress 1</p> <div className="flex gap-2 rounded-md px-2 py-1.5 transition-colors duration-150 hover:bg-surface-deep"> <svg className="mt-0.5 h-3.5 w-3.5 animate-spin text-ink-faint" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"><path d="M8 2a6 6 0 1 0 6 6" /></svg> <div><p className="animate-shimmer">{running.title}</p><p className="text-ink-faint">{running.meta}</p></div> </div> <p className="px-2 pb-2 pt-4 text-[11px] uppercase text-ink-muted">Ready for review {tasks.length}</p> <Stagger step={140} from="up" distance={8} className="flex flex-col"> {tasks.map((t) => ( <div key={t.title} className={`rounded-md px-2 py-1.5 transition-colors duration-150 hover:bg-surface-deep ${t.active ? "bg-surface-deep" : ""}`}> <div className="flex justify-between gap-2"><span className="truncate">{t.title}</span><span className="text-ink-faint">{t.time}</span></div> <p className="truncate text-ink-faint"> {t.add && <span className="text-positive">{t.add} </span>} {t.del && <span className="text-negative">{t.del} · </span>} {t.meta} </p> </div> ))} </Stagger> </aside> <div className="flex flex-col gap-3 border-hairline p-3 md:border-r"> <p className="text-ink-muted">{heading}</p> <p className="rounded-md border border-hairline bg-surface p-2.5 text-[13px] leading-snug">{prompt}</p> <div className="flex flex-col gap-1.5 text-ink-muted"> <p>Thought <span className="text-ink-faint">4s</span></p> <p>Read <span className="text-ink-faint">Layout.tsx</span></p> </div> <p className="rounded-md border border-hairline px-2.5 py-2">plan-outline.md <span className="text-positive">+42</span></p> <p className="text-[13px] leading-snug">Drafted the outline in <code className="rounded-xs bg-surface-deep px-1 font-mono text-[12px]">plan-outline.md</code>. A few quick questions first:</p> <div className="mt-auto rounded-md border border-hairline p-3"> <p className="text-[11px] text-ink-muted">Questions</p> <p className="mb-2 mt-1">{question}</p> <ul className="flex flex-col gap-1.5"> {options.map((o, i) => ( <li key={o} className="flex items-center gap-2 text-ink-muted"> <span className="flex h-4 w-4 items-center justify-center rounded-xs border border-hairline text-[10px]">{i + 1}</span>{o} </li> ))} </ul> <div className="mt-2 flex justify-end gap-3 text-ink-muted"> <button className="focus-visible:outline focus-visible:outline-1">Skip</button> <button className="rounded-xs bg-amber px-2 py-0.5 text-surface focus-visible:outline focus-visible:outline-1">Continue</button> </div> </div> <div className="rounded-md border border-hairline p-3 text-ink-faint">Add follow-up…</div> </div> <div className="hidden p-3 md:block"> <div className="flex items-center justify-between border-b border-hairline pb-2 text-ink-muted"> <span>Plans › plan-outline.md</span> <button className="rounded-xs bg-amber px-2 py-0.5 text-surface focus-visible:outline focus-visible:outline-1">Build</button> </div> <div className="px-8 pt-8"> <h3 className="text-[18px]">{docTitle}</h3> <p className="mt-4 max-w-sm text-[13px] leading-relaxed text-ink-muted">{docBody}</p> <p className="mt-6">Trigger</p> <p className="mt-1 max-w-sm text-[13px] leading-relaxed text-ink-muted">Menu item in the sidebar, hotkey G, or a tap on the logo.</p> </div> </div> </div> </div> </Reveal> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal, Stagger ---- 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> ); } /** Reveals each direct child one after another when the group scrolls into view. */ function Stagger({ children, step = 90, from = "up", distance = 20, duration = 650, delay = 0, once = true, as = "div", className, style, }: { children?: ReactNode; step?: number; from?: "up" | "down" | "left" | "right" | "scale" | "fade"; distance?: number; duration?: number; delay?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); useYkLayoutEffect(() => { const items = Array.from(ref.current?.children ?? []) as HTMLElement[]; if (state === "idle") return; 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.92)", fade: "none", }[from]; if (state === "hidden") { for (const el of items) Object.assign(el.style, { transition: "none", opacity: "0", transform: offset }); return; } items.forEach((el, i) => { const t = `${duration}ms ${YK_EASE} ${delay + i * step}ms`; Object.assign(el.style, { transition: `opacity ${t}, transform ${t}`, opacity: "", transform: "" }); }); // hand the children their own transitions back once everything has landed const done = setTimeout(() => items.forEach((el) => (el.style.transition = "")), delay + items.length * step + duration + 50); return () => clearTimeout(done); }, [state]); return ( <Tag ref={ref} className={className} style={style}> {children} </Tag> ); }"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Task = { title: string; meta: string; time?: string; add?: string; del?: string; active?: boolean }; export default function AgentChatWindowMockup({ windowTitle = "Studio Desktop", heading = "Plan Dashboard Redesign", prompt = "let's sketch a dashboard overview with a calendar-style layout, similar to a weekly planner", question = "How should the overview be navigated?", options = ["Tabs across the top", "Sidebar with sections", "Both tabs and sidebar"], docTitle = "Dashboard Overview", docBody = "A weekly grid of cards showing upcoming work, letting you jump to any item quickly.", running = { title: "Draft Marketing Site", meta: "Reading files" }, tasks = [ { title: "Plan Dashboard Redesign", meta: "Drafted outline", time: "now", add: "+18", del: "-2", active: true }, { title: "Chart Library Trial", meta: "Chart experiments", time: "12m" }, { title: "Set up Lint Rules for API", meta: "Config cleanup", time: "34m" }, { title: "Billing Export Tool", meta: "CSV writer", time: "50m", add: "+120", del: "-14" }, ] as Task[], }: { windowTitle?: string; heading?: string; prompt?: string; question?: string; options?: string[]; docTitle?: string; docBody?: string; running?: { title: string; meta: string }; tasks?: Task[]; }) { return ( <section className="bg-background px-4 py-10 font-sans text-foreground"> <div className="mx-auto max-w-[1300px] rounded-lg bg-muted p-4 sm:p-8 md:p-12"> <Reveal from="up"> <div className="mx-auto max-w-[1080px] overflow-hidden rounded-lg border border-border bg-card shadow-warm-window"> <div className="relative flex h-7 items-center border-b border-border bg-card px-3"> <div className="flex gap-1.5" aria-hidden> <i className="h-2.5 w-2.5 rounded-full bg-secondary" /> <i className="h-2.5 w-2.5 rounded-full bg-secondary" /> <i className="h-2.5 w-2.5 rounded-full bg-secondary" /> </div> <span className="absolute inset-x-0 text-center text-[11px] text-muted-foreground">{windowTitle}</span> </div> <div className="grid min-h-[560px] text-[12px] md:grid-cols-[220px_340px_1fr]"> <aside className="hidden border-r border-border bg-muted p-2 md:block"> <p className="px-2 py-2 text-[11px] uppercase text-muted-foreground">In progress 1</p> <div className="flex gap-2 rounded-md px-2 py-1.5 transition-colors duration-150 hover:bg-secondary"> <svg className="mt-0.5 h-3.5 w-3.5 animate-spin text-muted-foreground" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"><path d="M8 2a6 6 0 1 0 6 6" /></svg> <div><p className="animate-warm-shimmer">{running.title}</p><p className="text-muted-foreground">{running.meta}</p></div> </div> <p className="px-2 pb-2 pt-4 text-[11px] uppercase text-muted-foreground">Ready for review {tasks.length}</p> <Stagger step={140} from="up" distance={8} className="flex flex-col"> {tasks.map((t) => ( <div key={t.title} className={`rounded-md px-2 py-1.5 transition-colors duration-150 hover:bg-secondary ${t.active ? "bg-secondary" : ""}`}> <div className="flex justify-between gap-2"><span className="truncate">{t.title}</span><span className="text-muted-foreground">{t.time}</span></div> <p className="truncate text-muted-foreground"> {t.add && <span className="text-warm-positive">{t.add} </span>} {t.del && <span className="text-destructive">{t.del} · </span>} {t.meta} </p> </div> ))} </Stagger> </aside> <div className="flex flex-col gap-3 border-border p-3 md:border-r"> <p className="text-muted-foreground">{heading}</p> <p className="rounded-md border border-border bg-card p-2.5 text-[13px] leading-snug">{prompt}</p> <div className="flex flex-col gap-1.5 text-muted-foreground"> <p>Thought <span className="text-muted-foreground">4s</span></p> <p>Read <span className="text-muted-foreground">Layout.tsx</span></p> </div> <p className="rounded-md border border-border px-2.5 py-2">plan-outline.md <span className="text-warm-positive">+42</span></p> <p className="text-[13px] leading-snug">Drafted the outline in <code className="rounded-sm bg-secondary px-1 font-mono text-[12px]">plan-outline.md</code>. A few quick questions first:</p> <div className="mt-auto rounded-md border border-border p-3"> <p className="text-[11px] text-muted-foreground">Questions</p> <p className="mb-2 mt-1">{question}</p> <ul className="flex flex-col gap-1.5"> {options.map((o, i) => ( <li key={o} className="flex items-center gap-2 text-muted-foreground"> <span className="flex h-4 w-4 items-center justify-center rounded-sm border border-border text-[10px]">{i + 1}</span>{o} </li> ))} </ul> <div className="mt-2 flex justify-end gap-3 text-muted-foreground"> <button className="focus-visible:outline focus-visible:outline-1">Skip</button> <button className="rounded-sm bg-warm-amber px-2 py-0.5 text-card focus-visible:outline focus-visible:outline-1">Continue</button> </div> </div> <div className="rounded-md border border-border p-3 text-muted-foreground">Add follow-up…</div> </div> <div className="hidden p-3 md:block"> <div className="flex items-center justify-between border-b border-border pb-2 text-muted-foreground"> <span>Plans › plan-outline.md</span> <button className="rounded-sm bg-warm-amber px-2 py-0.5 text-card focus-visible:outline focus-visible:outline-1">Build</button> </div> <div className="px-8 pt-8"> <h3 className="text-[18px]">{docTitle}</h3> <p className="mt-4 max-w-sm text-[13px] leading-relaxed text-muted-foreground">{docBody}</p> <p className="mt-6">Trigger</p> <p className="mt-1 max-w-sm text-[13px] leading-relaxed text-muted-foreground">Menu item in the sidebar, hotkey G, or a tap on the logo.</p> </div> </div> </div> </div> </Reveal> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal, Stagger ---- 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> ); } /** Reveals each direct child one after another when the group scrolls into view. */ function Stagger({ children, step = 90, from = "up", distance = 20, duration = 650, delay = 0, once = true, as = "div", className, style, }: { children?: ReactNode; step?: number; from?: "up" | "down" | "left" | "right" | "scale" | "fade"; distance?: number; duration?: number; delay?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); useYkLayoutEffect(() => { const items = Array.from(ref.current?.children ?? []) as HTMLElement[]; if (state === "idle") return; 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.92)", fade: "none", }[from]; if (state === "hidden") { for (const el of items) Object.assign(el.style, { transition: "none", opacity: "0", transform: offset }); return; } items.forEach((el, i) => { const t = `${duration}ms ${YK_EASE} ${delay + i * step}ms`; Object.assign(el.style, { transition: `opacity ${t}, transform ${t}`, opacity: "", transform: "" }); }); // hand the children their own transitions back once everything has landed const done = setTimeout(() => items.forEach((el) => (el.style.transition = "")), delay + items.length * step + duration + 50); return () => clearTimeout(done); }, [state]); return ( <Tag ref={ref} className={className} style={style}> {children} </Tag> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: not passedElements must meet minimum color contrast ratio thresholds (33 elements)
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: not passedElements must meet minimum color contrast ratio thresholds (3 elements)
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: not passedKeeps animating when reduced motion is turned on