Neon Agent Prompt Hero
Left-aligned two-line display headline with grey subhead, a white pill CTA plus 'Connect with' icon row, then a hairline-framed video stage of a glowing chat composer floating in black with a deep blue aura. A faint SVG grid pattern sits behind. A duration chip sits bottom-right.
Rebuilt from framer.com in the Obsidian Canvas style.
Looks exactly like framer.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
Pass headline, subhead, ctaLabel, connectLabel, duration, placeholder, chatTitle and modelName as props; all have defaults. The video stage is recreated in code with a pulsing blue aura behind a glowing composer mockup.
components/agent-prompt-hero.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Props = { headline?: string; subhead?: string; ctaLabel?: string; connectLabel?: string; duration?: string; placeholder?: string; chatTitle?: string; modelName?: string; }; export default function NeonAgentPromptHero({ headline = "Northwind is the calm studio for teams shipping with an assistant on call", subhead = "Plan your launch with helpers and shape it on a shared board.", ctaLabel = "Start for free", connectLabel = "Works with", duration = "0:36", placeholder = "Ask Northwind...", chatTitle = "New Thread", modelName = "Atlas 2.1", }: Props) { return ( <section className="relative isolate overflow-hidden bg-canvas text-primary"> <GridPattern variant="grid" size={78} color="color-mix(in oklab, white 5%, transparent)" fade="bottom" /> <div className="mx-auto max-w-[1200px] px-5 pt-20 md:px-0 md:pt-24"> <Reveal from="up"> <h1 className="font-display text-display max-w-[780px] text-primary tracking-[-0.03em]">{headline}</h1> <p className="mt-4 max-w-[700px] text-lead text-secondary">{subhead}</p> <div className="mt-7 flex flex-wrap items-center gap-5"> <a href="#" className="rounded-lg bg-inverse-surface px-3 py-2 text-ui font-medium text-canvas shadow-button-lift transition-transform duration-surface-hover ease-surface-hover hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue">{ctaLabel}</a> <div className="flex items-center gap-3 text-caption text-muted"> <span>{connectLabel}</span> <svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" className="text-secondary"><circle cx="7" cy="7" r="5" fill="none" stroke="currentColor" /><circle cx="7" cy="7" r="1.5" fill="currentColor" /></svg> <svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" className="text-secondary"><path d="M7 1l5 3v6l-5 3-5-3V4z" fill="none" stroke="currentColor" /></svg> <svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" className="text-secondary"><rect x="2" y="2" width="10" height="10" rx="3" fill="none" stroke="currentColor" /></svg> </div> </div> </Reveal> </div> <div className="mx-auto mt-14 max-w-[1200px] border-y border-hairline px-5 md:px-0"> <div className="relative flex min-h-[460px] items-center justify-center overflow-hidden py-16 md:min-h-[670px]"> <div className="pointer-events-none absolute left-1/2 top-1/2 h-[520px] w-[760px] -translate-x-1/2 -translate-y-1/2 animate-pulse rounded-full bg-[radial-gradient(closest-side,var(--color-accent-deep-blue),transparent)] opacity-60 blur-2xl" /> <Reveal from="scale" duration={900} className="relative w-full max-w-[444px]"> <div className="flex gap-3"> <div className="flex h-[54px] flex-1 items-center justify-between rounded-xl border border-hairline bg-surface-raised/60 px-4 text-lead text-secondary backdrop-blur"> <span>{chatTitle}</span> <svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path d="M2 4l4 4 4-4" fill="none" stroke="currentColor" strokeWidth="1.5" /></svg> </div> <button aria-label="New chat" className="flex h-[54px] w-[54px] items-center justify-center rounded-xl bg-surface-high text-2xl text-secondary">+</button> </div> <div className="mt-5 h-px bg-hairline" /> <div className="relative mt-4 h-[222px] rounded-xl border border-accent-blue bg-accent-blue-wash/40 p-5 shadow-blue-glow backdrop-blur"> <p className="text-lead text-muted">{placeholder}</p> <div className="absolute inset-x-5 bottom-5 flex items-center justify-between border-t border-hairline pt-4"> <span className="text-lead text-secondary">{modelName} ⌄</span> <div className="flex gap-2"> <span className="flex h-9 w-9 items-center justify-center rounded-md bg-surface-high text-secondary">▷</span> <span className="flex h-9 w-9 items-center justify-center rounded-md bg-surface-high text-secondary">+</span> <span className="flex h-9 w-9 items-center justify-center rounded-md bg-surface-high text-secondary">↑</span> </div> </div> </div> </Reveal> <span className="absolute bottom-4 right-3 rounded-sm bg-surface px-2 py-1 font-mono text-caption text-secondary">{duration}</span> </div> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal, GridPattern ---- 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; } // Background and overlay layers sit inside their parent: make sure it can hold them. function ykPrepareParent(el: HTMLElement | null, isolate = false) { const p = el?.parentElement; if (!p) return; const cs = getComputedStyle(p); if (cs.position === "static") p.style.position = "relative"; if (isolate && cs.isolation !== "isolate" && cs.zIndex === "auto") p.style.isolation = "isolate"; } 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> ); } const YK_GRID_CSS = `@keyframes yk-grid-sweep{from{-webkit-mask-position:150% 0;mask-position:150% 0}to{-webkit-mask-position:-50% 0;mask-position:-50% 0}} @media (prefers-reduced-motion:reduce){[data-yk-sweep]{display:none}}`; /** A faint grid or dot pattern behind a section, fading out at the edges. */ function GridPattern({ variant = "grid", size = 32, color = "color-mix(in oklab, currentColor 12%, transparent)", fade = "radial", shimmer = false, className, style, }: { variant?: "grid" | "dots"; size?: number; color?: string; fade?: "radial" | "top" | "bottom" | "none"; shimmer?: boolean; className?: string; style?: CSSProperties; }) { const ref = useRef<HTMLDivElement>(null); useYkLayoutEffect(() => ykPrepareParent(ref.current, true), []); const paint = (c: string) => variant === "dots" ? { backgroundImage: `radial-gradient(circle at center, ${c} 1.2px, transparent 1.6px)`, backgroundSize: `${size}px ${size}px` } : { backgroundImage: `linear-gradient(to right, ${c} 1px, transparent 1px), linear-gradient(to bottom, ${c} 1px, transparent 1px)`, backgroundSize: `${size}px ${size}px` }; const mask = { radial: "radial-gradient(ellipse at center, black 30%, transparent 75%)", top: "linear-gradient(to bottom, black, transparent 85%)", bottom: "linear-gradient(to top, black, transparent 85%)", none: undefined, }[fade]; const sweep = "linear-gradient(110deg, transparent 40%, black 50%, transparent 60%)"; return ( <div ref={ref} aria-hidden="true" data-yk-grid="" className={className} style={{ position: "absolute", inset: 0, zIndex: -1, pointerEvents: "none", maskImage: mask, WebkitMaskImage: mask, ...style }} > <div style={{ position: "absolute", inset: 0, ...paint(color) }} /> {shimmer && ( <> <style>{YK_GRID_CSS}</style> <div data-yk-sweep="" style={{ position: "absolute", inset: 0, ...paint(`color-mix(in oklab, ${color} 100%, currentColor 30%)`), maskImage: sweep, WebkitMaskImage: sweep, maskSize: "250% 100%", WebkitMaskSize: "250% 100%", animation: "yk-grid-sweep 7s ease-in-out infinite", }} /> </> )} </div> ); }"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Props = { headline?: string; subhead?: string; ctaLabel?: string; connectLabel?: string; duration?: string; placeholder?: string; chatTitle?: string; modelName?: string; }; export default function NeonAgentPromptHero({ headline = "Northwind is the calm studio for teams shipping with an assistant on call", subhead = "Plan your launch with helpers and shape it on a shared board.", ctaLabel = "Start for free", connectLabel = "Works with", duration = "0:36", placeholder = "Ask Northwind...", chatTitle = "New Thread", modelName = "Atlas 2.1", }: Props) { return ( <section className="relative isolate overflow-hidden bg-background text-foreground"> <GridPattern variant="grid" size={78} color="color-mix(in oklab, white 5%, transparent)" fade="bottom" /> <div className="mx-auto max-w-[1200px] px-5 pt-20 md:px-0 md:pt-24"> <Reveal from="up"> <h1 className="font-sans text-obsidian-display max-w-[780px] text-foreground tracking-[-0.03em]">{headline}</h1> <p className="mt-4 max-w-[700px] text-obsidian-lead text-muted-foreground">{subhead}</p> <div className="mt-7 flex flex-wrap items-center gap-5"> <a href="#" className="rounded-xl bg-primary px-3 py-2 text-obsidian-ui font-medium text-primary-foreground shadow-obsidian-button-lift transition-transform duration-obsidian-surface-hover ease-obsidian-surface-hover hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary">{ctaLabel}</a> <div className="flex items-center gap-3 text-obsidian-caption text-muted-foreground"> <span>{connectLabel}</span> <svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" className="text-muted-foreground"><circle cx="7" cy="7" r="5" fill="none" stroke="currentColor" /><circle cx="7" cy="7" r="1.5" fill="currentColor" /></svg> <svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" className="text-muted-foreground"><path d="M7 1l5 3v6l-5 3-5-3V4z" fill="none" stroke="currentColor" /></svg> <svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" className="text-muted-foreground"><rect x="2" y="2" width="10" height="10" rx="3" fill="none" stroke="currentColor" /></svg> </div> </div> </Reveal> </div> <div className="mx-auto mt-14 max-w-[1200px] border-y border-border px-5 md:px-0"> <div className="relative flex min-h-[460px] items-center justify-center overflow-hidden py-16 md:min-h-[670px]"> <div className="pointer-events-none absolute left-1/2 top-1/2 h-[520px] w-[760px] -translate-x-1/2 -translate-y-1/2 animate-pulse rounded-full bg-[radial-gradient(closest-side,var(--color-obsidian-accent-deep-blue),transparent)] opacity-60 blur-2xl" /> <Reveal from="scale" duration={900} className="relative w-full max-w-[444px]"> <div className="flex gap-3"> <div className="flex h-[54px] flex-1 items-center justify-between rounded-2xl border border-border bg-secondary/60 px-4 text-obsidian-lead text-muted-foreground backdrop-blur"> <span>{chatTitle}</span> <svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path d="M2 4l4 4 4-4" fill="none" stroke="currentColor" strokeWidth="1.5" /></svg> </div> <button aria-label="New chat" className="flex h-[54px] w-[54px] items-center justify-center rounded-2xl bg-accent text-2xl text-muted-foreground">+</button> </div> <div className="mt-5 h-px bg-border" /> <div className="relative mt-4 h-[222px] rounded-2xl border border-primary bg-foreground/40 p-5 shadow-obsidian-blue-glow backdrop-blur"> <p className="text-obsidian-lead text-muted-foreground">{placeholder}</p> <div className="absolute inset-x-5 bottom-5 flex items-center justify-between border-t border-border pt-4"> <span className="text-obsidian-lead text-muted-foreground">{modelName} ⌄</span> <div className="flex gap-2"> <span className="flex h-9 w-9 items-center justify-center rounded-md bg-accent text-muted-foreground">▷</span> <span className="flex h-9 w-9 items-center justify-center rounded-md bg-accent text-muted-foreground">+</span> <span className="flex h-9 w-9 items-center justify-center rounded-md bg-accent text-muted-foreground">↑</span> </div> </div> </div> </Reveal> <span className="absolute bottom-4 right-3 rounded-md bg-card px-2 py-1 font-mono text-obsidian-caption text-muted-foreground">{duration}</span> </div> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal, GridPattern ---- 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; } // Background and overlay layers sit inside their parent: make sure it can hold them. function ykPrepareParent(el: HTMLElement | null, isolate = false) { const p = el?.parentElement; if (!p) return; const cs = getComputedStyle(p); if (cs.position === "static") p.style.position = "relative"; if (isolate && cs.isolation !== "isolate" && cs.zIndex === "auto") p.style.isolation = "isolate"; } 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> ); } const YK_GRID_CSS = `@keyframes yk-grid-sweep{from{-webkit-mask-position:150% 0;mask-position:150% 0}to{-webkit-mask-position:-50% 0;mask-position:-50% 0}} @media (prefers-reduced-motion:reduce){[data-yk-sweep]{display:none}}`; /** A faint grid or dot pattern behind a section, fading out at the edges. */ function GridPattern({ variant = "grid", size = 32, color = "color-mix(in oklab, currentColor 12%, transparent)", fade = "radial", shimmer = false, className, style, }: { variant?: "grid" | "dots"; size?: number; color?: string; fade?: "radial" | "top" | "bottom" | "none"; shimmer?: boolean; className?: string; style?: CSSProperties; }) { const ref = useRef<HTMLDivElement>(null); useYkLayoutEffect(() => ykPrepareParent(ref.current, true), []); const paint = (c: string) => variant === "dots" ? { backgroundImage: `radial-gradient(circle at center, ${c} 1.2px, transparent 1.6px)`, backgroundSize: `${size}px ${size}px` } : { backgroundImage: `linear-gradient(to right, ${c} 1px, transparent 1px), linear-gradient(to bottom, ${c} 1px, transparent 1px)`, backgroundSize: `${size}px ${size}px` }; const mask = { radial: "radial-gradient(ellipse at center, black 30%, transparent 75%)", top: "linear-gradient(to bottom, black, transparent 85%)", bottom: "linear-gradient(to top, black, transparent 85%)", none: undefined, }[fade]; const sweep = "linear-gradient(110deg, transparent 40%, black 50%, transparent 60%)"; return ( <div ref={ref} aria-hidden="true" data-yk-grid="" className={className} style={{ position: "absolute", inset: 0, zIndex: -1, pointerEvents: "none", maskImage: mask, WebkitMaskImage: mask, ...style }} > <div style={{ position: "absolute", inset: 0, ...paint(color) }} /> {shimmer && ( <> <style>{YK_GRID_CSS}</style> <div data-yk-sweep="" style={{ position: "absolute", inset: 0, ...paint(`color-mix(in oklab, ${color} 100%, currentColor 30%)`), maskImage: sweep, WebkitMaskImage: sweep, maskSize: "250% 100%", WebkitMaskSize: "250% 100%", animation: "yk-grid-sweep 7s ease-in-out infinite", }} /> </> )} </div> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- 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: not passedStays invisible after its animation: <div> "Northwind is the calm studio for teams s"Stays invisible after its animation: <div> "New Thread"Keeps animating when reduced motion is turned on