Three-Up Feature Card with Mockup Well
Stacked card on surface fill: ink title, muted description, orange 'Learn more →' link, then a square tinted well (stone, sage, slate, or pale) with a cropped floating UI vignette such as subagent lists, rules file, command palette or checkpoint timeline. Bottom edges often fade via mask.
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
Props: heading, subheading, and features (title, description, href, linkLabel) for the three cards. The mockup wells (task list, rules file, search trace) are built in and animate in on load.
components/three-up-feature-card.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useState } from "react"; type Feature = { title: string; description: string; href: string; linkLabel: string }; export default function ThreeUpFeatureCards(props: { heading?: string; subheading?: string; features?: Feature[]; }) { const heading = props.heading ?? "Reads every corner of your project, at any scale"; const subheading = props.subheading ?? "Northwind Studio maps your repository first, then starts making careful changes."; const features: Feature[] = props.features ?? [ { title: "Parallel workers", description: "Several helpers tackle separate parts of a job at once, each picking the tool that fits.", href: "#", linkLabel: "Learn more" }, { title: "Shared conventions", description: "Write down how your group builds things and every suggestion follows the same playbook.", href: "#", linkLabel: "Learn more" }, { title: "Instant lookup", description: "Built for huge repositories, scanning vast numbers of files returns answers in a blink.", href: "#", linkLabel: "Learn more" }, ]; const [hover, setHover] = useState<number | null>(null); const tasks = [ { t: "Draft billing schema", m: "Editing files • Model A", on: true }, { t: "Onboarding checklist view", m: "Building page • Model B", on: true }, { t: "Add retry coverage", m: "Writing tests • Model C", on: true }, { t: "Polish release notes", m: "Pending • Model D", on: false }, ]; const steps = [ ["Searched", "invoice reminder flow"], ["Read", "src/billing/Reminder.ts"], ["Read", "lib/mail/queue.ts"], ["Read", "db/invoices.ts"], ["Grepped", "sendReminder"], ]; const Spinner = () => ( <span className="h-3.5 w-3.5 shrink-0 animate-spin rounded-full border-2 border-ink-faint border-t-transparent motion-reduce:animate-none" /> ); return ( <section className="bg-canvas px-5 py-14 font-sans text-ink md:px-[70px]"> <div className="mx-auto max-w-[1300px]"> <Reveal from="up"> <h2 className="text-h2 text-ink">{heading}</h2> <p className="max-w-md text-h2 text-ink-muted">{subheading}</p> </Reveal> <Stagger step={110} className="mt-12 grid gap-3 md:grid-cols-3"> {features.map((f, i) => ( <article key={f.title} onMouseEnter={() => setHover(i)} onMouseLeave={() => setHover(null)} className="flex flex-col rounded-xs border border-hairline bg-surface p-[17px]" > <h3 className="text-body text-ink">{f.title}</h3> <p className="mt-1 min-h-[48px] text-body text-ink-muted">{f.description}</p> <a href={f.href} className="mt-5 inline-block self-start text-body text-accent underline-offset-4 hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent"> {f.linkLabel} → </a> <div className={`relative mt-6 aspect-square overflow-hidden rounded-xs ${ i === 0 ? "bg-media-stone" : i === 1 ? "bg-media-sage" : "bg-surface-sunken" }`} > {i === 0 && ( <div className="absolute inset-x-[10%] top-[19%]"> <p className="mb-2 text-caption text-ink-muted">Started 4 subagents ⌄</p> <div className="space-y-2"> {tasks.map((k, j) => ( <div key={k.t} style={{ animationDelay: `${j * 140}ms` }} className={`flex animate-rise-in items-center gap-3 rounded-md border border-hairline bg-surface px-3 py-2 transition-transform duration-spring-pop ease-spring-pop ${k.on ? "" : "opacity-70"} ${hover === i ? "scale-[1.01]" : ""}`} > {k.on ? <Spinner /> : <span className="h-3.5 w-3.5 rounded-full border border-hairline" />} <div className="min-w-0"> <p className="truncate text-ui text-ink">{k.t}</p> <p className="truncate text-product-micro text-ink-muted">{k.m}</p> </div> </div> ))} </div> </div> )} {i === 1 && ( <div className="absolute bottom-0 left-[7%] right-0 top-[7%] overflow-hidden rounded-tl-md bg-surface shadow-window"> <div className="flex gap-1.5 bg-surface-sunken px-3 py-2"> {[0, 1, 2].map((d) => ( <span key={d} className="h-2.5 w-2.5 rounded-full bg-hairline" /> ))} </div> <pre className="whitespace-pre-wrap p-4 font-mono text-[11px] leading-5 text-ink-muted">{`---\ndescription: Calm layout primitives\nglobs: src/ui/**/*\n---\n\n# Layout System\n\n## Patterns\n- Use Stack for vertical flow\n- Keyboard focus moves by row\n- Animations use 120ms ease-out\n- Spacing follows 4px grid\n- Palette opens with /`}</pre> <div className="pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-surface to-transparent" /> </div> )} {i === 2 && ( <div className="absolute inset-x-[9%] top-[24%]"> <div className="animate-fade-in rounded-md border border-hairline bg-surface-deep px-3 py-2 text-ui text-ink"> Where does the reminder email get queued after a failure? </div> <ul className="mt-5 space-y-3 px-1"> {steps.map(([a, b], j) => ( <li key={b} style={{ animationDelay: `${j * 140}ms` }} className="animate-rise-in text-ui text-ink-muted"> <span className="text-ink">{a}</span> <span className="text-ink-faint">{b}</span> </li> ))} </ul> </div> )} </div> </article> ))} </Stagger> </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, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useState } from "react"; type Feature = { title: string; description: string; href: string; linkLabel: string }; export default function ThreeUpFeatureCards(props: { heading?: string; subheading?: string; features?: Feature[]; }) { const heading = props.heading ?? "Reads every corner of your project, at any scale"; const subheading = props.subheading ?? "Northwind Studio maps your repository first, then starts making careful changes."; const features: Feature[] = props.features ?? [ { title: "Parallel workers", description: "Several helpers tackle separate parts of a job at once, each picking the tool that fits.", href: "#", linkLabel: "Learn more" }, { title: "Shared conventions", description: "Write down how your group builds things and every suggestion follows the same playbook.", href: "#", linkLabel: "Learn more" }, { title: "Instant lookup", description: "Built for huge repositories, scanning vast numbers of files returns answers in a blink.", href: "#", linkLabel: "Learn more" }, ]; const [hover, setHover] = useState<number | null>(null); const tasks = [ { t: "Draft billing schema", m: "Editing files • Model A", on: true }, { t: "Onboarding checklist view", m: "Building page • Model B", on: true }, { t: "Add retry coverage", m: "Writing tests • Model C", on: true }, { t: "Polish release notes", m: "Pending • Model D", on: false }, ]; const steps = [ ["Searched", "invoice reminder flow"], ["Read", "src/billing/Reminder.ts"], ["Read", "lib/mail/queue.ts"], ["Read", "db/invoices.ts"], ["Grepped", "sendReminder"], ]; const Spinner = () => ( <span className="h-3.5 w-3.5 shrink-0 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent motion-reduce:animate-none" /> ); return ( <section className="bg-background px-5 py-14 font-sans text-foreground md:px-[70px]"> <div className="mx-auto max-w-[1300px]"> <Reveal from="up"> <h2 className="text-warm-h2 text-foreground">{heading}</h2> <p className="max-w-md text-warm-h2 text-muted-foreground">{subheading}</p> </Reveal> <Stagger step={110} className="mt-12 grid gap-3 md:grid-cols-3"> {features.map((f, i) => ( <article key={f.title} onMouseEnter={() => setHover(i)} onMouseLeave={() => setHover(null)} className="flex flex-col rounded-sm border border-border bg-card p-[17px]" > <h3 className="text-warm-body text-foreground">{f.title}</h3> <p className="mt-1 min-h-[48px] text-warm-body text-muted-foreground">{f.description}</p> <a href={f.href} className="mt-5 inline-block self-start text-warm-body text-primary underline-offset-4 hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary"> {f.linkLabel} → </a> <div className={`relative mt-6 aspect-square overflow-hidden rounded-sm ${ i === 0 ? "bg-foreground" : i === 1 ? "bg-muted" : "bg-muted" }`} > {i === 0 && ( <div className="absolute inset-x-[10%] top-[19%]"> <p className="mb-2 text-warm-caption text-muted-foreground">Started 4 subagents ⌄</p> <div className="space-y-2"> {tasks.map((k, j) => ( <div key={k.t} style={{ animationDelay: `${j * 140}ms` }} className={`flex animate-warm-rise-in items-center gap-3 rounded-md border border-border bg-card px-3 py-2 transition-transform duration-warm-spring-pop ease-warm-spring-pop ${k.on ? "" : "opacity-70"} ${hover === i ? "scale-[1.01]" : ""}`} > {k.on ? <Spinner /> : <span className="h-3.5 w-3.5 rounded-full border border-border" />} <div className="min-w-0"> <p className="truncate text-warm-ui text-foreground">{k.t}</p> <p className="truncate text-warm-product-micro text-muted-foreground">{k.m}</p> </div> </div> ))} </div> </div> )} {i === 1 && ( <div className="absolute bottom-0 left-[7%] right-0 top-[7%] overflow-hidden rounded-tl-md bg-card shadow-warm-window"> <div className="flex gap-1.5 bg-muted px-3 py-2"> {[0, 1, 2].map((d) => ( <span key={d} className="h-2.5 w-2.5 rounded-full bg-border" /> ))} </div> <pre className="whitespace-pre-wrap p-4 font-mono text-[11px] leading-5 text-muted-foreground">{`---\ndescription: Calm layout primitives\nglobs: src/ui/**/*\n---\n\n# Layout System\n\n## Patterns\n- Use Stack for vertical flow\n- Keyboard focus moves by row\n- Animations use 120ms ease-out\n- Spacing follows 4px grid\n- Palette opens with /`}</pre> <div className="pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-card to-transparent" /> </div> )} {i === 2 && ( <div className="absolute inset-x-[9%] top-[24%]"> <div className="animate-warm-fade-in rounded-md border border-border bg-secondary px-3 py-2 text-warm-ui text-foreground"> Where does the reminder email get queued after a failure? </div> <ul className="mt-5 space-y-3 px-1"> {steps.map(([a, b], j) => ( <li key={b} style={{ animationDelay: `${j * 140}ms` }} className="animate-warm-rise-in text-warm-ui text-muted-foreground"> <span className="text-foreground">{a}</span> <span className="text-muted-foreground">{b}</span> </li> ))} </ul> </div> )} </div> </article> ))} </Stagger> </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 (16 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 (1 element)
- 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.