Page sections / Feature sections
AI Agent Bento Showcase
Centered red mono eyebrow 'AI AGENT', headline, grey subhead, then a large chat-app mockup card with traffic lights, sidebar and tool-call steps, and two smaller cards (quick prompt bar, extensions) beneath. Each card has a faded gradient border, title and grey description, with a coral glow behind.
Rebuilt from raycast.com in the Obsidian Launcher style.
Looks exactly like raycast.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
All copy is configurable via props (eyebrow, title, subtitle, linkLabel, prompts, typed). Renders standalone with defaults; the typed prompt loops with a blinking caret.
components/ai-agent-bento.tsx
"use client"; import { useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useEffect, useState } from "react"; type Props = { eyebrow?: string; title?: string; subtitle?: string; linkLabel?: string; prompts?: string[]; typed?: string; }; function Dot({ c }: { c: string }) { return <span className={"h-3 w-3 rounded-full " + c} />; } export default function AiAgentBentoShowcase({ eyebrow = "SMART HELPER", title = "Say hello to your digital teammate", subtitle = "Northwind Assist connects with the apps your team already uses to finish the busy work.", linkLabel = "Explore Northwind Assist", prompts = ["Condense these notes", "Write a thank-you message", "Why did this build fail", "Plan next week's sprint", "Rewrite this headline", "Book a call with Maya"], typed = "Reserve a room for Friday", }: Props) { const [n, setN] = useState(0); useEffect(() => { const t = setInterval(() => setN((v) => (v >= typed.length + 12 ? 0 : v + 1)), 90); return () => clearInterval(t); }, [typed]); const shown = typed.slice(0, n); const chats = ["Summarise inbox", "Draft release notes", "Rename photos", "Build a budget sheet", "Review traffic stats", "Triage bug reports"]; const card = "relative overflow-hidden rounded-xl border border-hairline bg-canvas"; return ( <section className="relative bg-canvas px-4 py-20 text-primary font-sans"> <div className="pointer-events-none absolute left-1/2 top-40 h-[420px] w-[800px] -translate-x-1/2 bg-[radial-gradient(at_30%_55%,rgba(255,73,57,0.22),transparent_70%)] blur-3xl" /> <div className="relative mx-auto max-w-5xl"> <Reveal className="mx-auto max-w-xl text-center"> <p className="font-mono text-xs uppercase tracking-[0.2em] text-accent-red">{eyebrow}</p> <h2 className="mt-3 text-4xl font-semibold tracking-[-0.02em] text-primary">{title}</h2> <p className="mt-5 text-lg text-tertiary">{subtitle}</p> </Reveal> <div className="mt-14 grid gap-6"> <div className={card}> <div className="grid h-[400px] md:grid-cols-[290px_1fr]"> <div className="border-r border-hairline bg-surface/60 p-3"> <div className="mb-4 flex items-center gap-2 px-2 pt-1"> <Dot c="bg-[#ff5f57]" /><Dot c="bg-[#febc2e]" /><Dot c="bg-[#28c840]" /> </div> <div className="rounded-lg bg-overlay-subtle px-3 py-2 text-sm text-faint">Search chats</div> <ul className="mt-3 space-y-1 text-sm"> {chats.map((c, i) => ( <li key={c} className={"rounded-md px-3 py-1.5 " + (i === 0 ? "bg-overlay-subtle text-primary" : "text-secondary")} style={{ opacity: 1 - i * 0.13 }}>{c}</li> ))} </ul> </div> <div className="hidden p-4 md:block"> <div className="text-sm">Summarise inbox<div className="font-mono text-[10px] text-tertiary">Model Atlas Pro</div></div> <div className="ml-auto mt-8 max-w-md rounded-lg bg-overlay-subtle p-3 text-sm text-secondary">Look through my inbox for unread invoices and add a reminder in Tasks for each.</div> <ul className="mt-8 space-y-3 text-sm text-tertiary"> {["Scanning unread mail", "Reading invoice details", "Creating reminders"].map((s, i) => ( <li key={s} className="flex items-center gap-2"><span className={"h-3 w-3 rounded-full " + ["bg-accent-blue", "bg-accent-yellow", "bg-accent-green"][i]} />{s}</li> ))} </ul> <p className="mt-6 text-sm text-tertiary">Found 4 unpaid invoices. A reminder for each one is now waiting in Tasks.</p> </div> </div> <div className="p-6"> <h3 className="text-ui font-medium">Team Chat</h3> <p className="mt-1 max-w-md text-sm text-tertiary">The built-in helper plugs into your daily apps and speeds up routine work.</p> </div> </div> <div className="grid gap-6 md:grid-cols-2"> <div className={card}> <div className="m-3 flex items-center gap-3 rounded-xl border border-hairline px-4 py-4"> <span className="h-4 w-4 rotate-45 rounded-xs bg-secondary" /> <span className="flex-1 text-lg text-secondary">{shown}<span className="animate-caret-blink">|</span></span> <span className="font-mono text-xs text-faint">Instant</span> </div> <Stagger step={120} from="down" className="h-[240px] space-y-2 overflow-hidden px-8 pt-3 text-lg text-faint"> {prompts.map((p) => <div key={p}>{p}</div>)} </Stagger> <div className="p-6"> <h3 className="text-ui font-medium">Instant Prompt</h3> <p className="mt-1 text-sm text-tertiary">One shortcut away, the helper answers without pulling you out of your flow.</p> </div> </div> <div className={card}> <div className="m-3 h-[300px] rounded-xl border border-hairline bg-gradient-to-b from-surface to-canvas"> <div className="grid grid-cols-3 gap-3 p-6"> {["bg-accent-red", "bg-accent-blue", "bg-accent-green", "bg-accent-yellow", "bg-accent-blue", "bg-accent-red"].map((c, i) => ( <div key={i} className="flex aspect-square items-center justify-center rounded-lg bg-overlay-subtle"><span className={"h-6 w-6 rounded-md opacity-80 " + c} /></div> ))} </div> </div> <div className="p-6"> <h3 className="text-ui font-medium">Plug-ins</h3> <p className="mt-1 text-sm text-tertiary">Link every app you love so the helper can act wherever you already work.</p> </div> </div> </div> </div> <div className="mt-12 text-center"> <a href="#" className="group inline-flex items-center gap-1 text-ui text-[#9c9c9d] transition-colors duration-300 ease-in-out hover:text-white focus-visible:text-white focus-visible:outline-none"> {linkLabel} <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth="1.5" className="transition-transform duration-300 ease-in-out group-hover:translate-x-[2px]"><path d="M2 7h10M8 3l4 4-4 4" /></svg> </a> </div> </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 { useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useEffect, useState } from "react"; type Props = { eyebrow?: string; title?: string; subtitle?: string; linkLabel?: string; prompts?: string[]; typed?: string; }; function Dot({ c }: { c: string }) { return <span className={"h-3 w-3 rounded-full " + c} />; } export default function AiAgentBentoShowcase({ eyebrow = "SMART HELPER", title = "Say hello to your digital teammate", subtitle = "Northwind Assist connects with the apps your team already uses to finish the busy work.", linkLabel = "Explore Northwind Assist", prompts = ["Condense these notes", "Write a thank-you message", "Why did this build fail", "Plan next week's sprint", "Rewrite this headline", "Book a call with Maya"], typed = "Reserve a room for Friday", }: Props) { const [n, setN] = useState(0); useEffect(() => { const t = setInterval(() => setN((v) => (v >= typed.length + 12 ? 0 : v + 1)), 90); return () => clearInterval(t); }, [typed]); const shown = typed.slice(0, n); const chats = ["Summarise inbox", "Draft release notes", "Rename photos", "Build a budget sheet", "Review traffic stats", "Triage bug reports"]; const card = "relative overflow-hidden rounded-2xl border border-border bg-background"; return ( <section className="relative bg-background px-4 py-20 text-foreground font-sans"> <div className="pointer-events-none absolute left-1/2 top-40 h-[420px] w-[800px] -translate-x-1/2 bg-[radial-gradient(at_30%_55%,rgba(255,73,57,0.22),transparent_70%)] blur-3xl" /> <div className="relative mx-auto max-w-5xl"> <Reveal className="mx-auto max-w-xl text-center"> <p className="font-mono text-xs uppercase tracking-[0.2em] text-primary">{eyebrow}</p> <h2 className="mt-3 text-4xl font-semibold tracking-[-0.02em] text-foreground">{title}</h2> <p className="mt-5 text-lg text-muted-foreground">{subtitle}</p> </Reveal> <div className="mt-14 grid gap-6"> <div className={card}> <div className="grid h-[400px] md:grid-cols-[290px_1fr]"> <div className="border-r border-border bg-card/60 p-3"> <div className="mb-4 flex items-center gap-2 px-2 pt-1"> <Dot c="bg-[#ff5f57]" /><Dot c="bg-[#febc2e]" /><Dot c="bg-[#28c840]" /> </div> <div className="rounded-xl bg-foreground px-3 py-2 text-sm text-background">Search chats</div> <ul className="mt-3 space-y-1 text-sm"> {chats.map((c, i) => ( <li key={c} className={"rounded-lg px-3 py-1.5 " + (i === 0 ? "bg-foreground text-background" : "text-muted-foreground")} style={{ opacity: 1 - i * 0.13 }}>{c}</li> ))} </ul> </div> <div className="hidden p-4 md:block"> <div className="text-sm">Summarise inbox<div className="font-mono text-[10px] text-muted-foreground">Model Atlas Pro</div></div> <div className="ml-auto mt-8 max-w-md rounded-xl bg-foreground p-3 text-sm text-background">Look through my inbox for unread invoices and add a reminder in Tasks for each.</div> <ul className="mt-8 space-y-3 text-sm text-muted-foreground"> {["Scanning unread mail", "Reading invoice details", "Creating reminders"].map((s, i) => ( <li key={s} className="flex items-center gap-2"><span className={"h-3 w-3 rounded-full " + ["bg-obsidian-accent-blue", "bg-obsidian-accent-yellow", "bg-obsidian-accent-green"][i]} />{s}</li> ))} </ul> <p className="mt-6 text-sm text-muted-foreground">Found 4 unpaid invoices. A reminder for each one is now waiting in Tasks.</p> </div> </div> <div className="p-6"> <h3 className="text-obsidian-ui font-medium">Team Chat</h3> <p className="mt-1 max-w-md text-sm text-muted-foreground">The built-in helper plugs into your daily apps and speeds up routine work.</p> </div> </div> <div className="grid gap-6 md:grid-cols-2"> <div className={card}> <div className="m-3 flex items-center gap-3 rounded-2xl border border-border px-4 py-4"> <span className="h-4 w-4 rotate-45 rounded-md bg-foreground" /> <span className="flex-1 text-lg text-muted-foreground">{shown}<span className="animate-obsidian-caret-blink">|</span></span> <span className="font-mono text-xs text-muted-foreground">Instant</span> </div> <Stagger step={120} from="down" className="h-[240px] space-y-2 overflow-hidden px-8 pt-3 text-lg text-muted-foreground"> {prompts.map((p) => <div key={p}>{p}</div>)} </Stagger> <div className="p-6"> <h3 className="text-obsidian-ui font-medium">Instant Prompt</h3> <p className="mt-1 text-sm text-muted-foreground">One shortcut away, the helper answers without pulling you out of your flow.</p> </div> </div> <div className={card}> <div className="m-3 h-[300px] rounded-2xl border border-border bg-gradient-to-b from-card to-background"> <div className="grid grid-cols-3 gap-3 p-6"> {["bg-primary", "bg-obsidian-accent-blue", "bg-obsidian-accent-green", "bg-obsidian-accent-yellow", "bg-obsidian-accent-blue", "bg-primary"].map((c, i) => ( <div key={i} className="flex aspect-square items-center justify-center rounded-xl bg-foreground"><span className={"h-6 w-6 rounded-lg opacity-80 " + c} /></div> ))} </div> </div> <div className="p-6"> <h3 className="text-obsidian-ui font-medium">Plug-ins</h3> <p className="mt-1 text-sm text-muted-foreground">Link every app you love so the helper can act wherever you already work.</p> </div> </div> </div> </div> <div className="mt-12 text-center"> <a href="#" className="group inline-flex items-center gap-1 text-obsidian-ui text-muted-foreground transition-colors duration-300 ease-in-out hover:text-foreground focus-visible:text-foreground focus-visible:outline-none"> {linkLabel} <svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth="1.5" className="transition-transform duration-300 ease-in-out group-hover:translate-x-[2px]"><path d="M2 7h10M8 3l4 4-4 4" /></svg> </a> </div> </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: not passedScrolls sideways at phone width (390px)Scrolls sideways at tablet width (768px)
- Dark mode: not passedElements must meet minimum color contrast ratio thresholds (4 elements)
- Themeable: not passed3 hard-coded colours (bg-[#ff5f57], bg-[#febc2e], bg-[#28c840]). These ignore the theme and break dark mode.
- Animates cleanly: not passedKeeps animating when reduced motion is turned on