Painted Landscape Hero
Full-bleed dimmed landscape painting (brightness .78, saturate .9) under a dark gradient scrim fading to canvas. Giant centered serif headline, Geist subhead, and a dark rounded prompt box. A tilted app window peeks in at the bottom.
Rebuilt from silico.ai in the Moonlit Atelier style.
npx shadcn@latest add https://justyoink.it/r/moonlit-atelier/blocks/painted-landscape-hero.json
Looks exactly like silico.ai: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/moonlit-atelier/mine/painted-landscape-hero.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: brand, navLinks, headlineLines (each line fades up with 100ms stagger), subhead, placeholder, hint, imageSrc (defaults to a stock landscape). Renders standalone with no props.
components/painted-landscape-hero.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; import { useState } from "react"; export default function PaintedLandscapeHero({ brand = "Aldene", navLinks = ["Product", "Why Aldene", "Capabilities", "Features", "Pricing", "Desktop app"], headlineLines = ["Collective Reasoning", "Without Limits"], subhead = "Several leading AI models, collaborating as a single crew. Hand over the entire job and receive it back complete.", placeholder = "Draft a launch checklist for my pottery shop", hint = "Aldene chooses the best models for you", imageSrc = "https://yoink-app.fly.dev/stock/landscape-3.jpg", }: { brand?: string; navLinks?: string[]; headlineLines?: string[]; subhead?: string; placeholder?: string; hint?: string; imageSrc?: string; }) { const [value, setValue] = useState(""); return ( <section className="relative isolate min-h-[900px] overflow-hidden bg-canvas font-sans text-primary"> <img src={imageSrc} alt="" width={1600} height={1067} className="absolute inset-0 -z-20 h-full w-full object-cover" style={{ filter: "brightness(0.78) saturate(0.9)" }} /> <div className="absolute inset-0 -z-10 bg-[linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.35),var(--color-canvas))]" /> <header className="flex items-center justify-between px-6 py-5 md:px-10"> <div className="flex items-center gap-8"> <a href="#" className="flex items-center gap-2 text-sm font-medium focus-visible:outline focus-visible:outline-2"> <svg width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="currentColor" strokeWidth="1.6" aria-hidden="true"><circle cx="14" cy="14" r="11" /><path d="M14 3c-5 5-5 17 0 22M3 14c5-5 17-5 22 0" /></svg> {brand} </a> <nav aria-label="Main" className="hidden gap-6 text-sm text-secondary lg:flex"> {navLinks.map((l) => ( <a key={l} href="#" className="transition-colors duration-ui-hover ease-ui-hover hover:text-primary">{l}</a> ))} </nav> </div> <div className="flex items-center gap-5 text-sm"> <a href="#" className="text-secondary hover:text-primary">Log in</a> <a href="#" className="rounded-pill bg-paper px-4 py-2.5 font-medium text-canvas transition-opacity duration-ui-hover hover:opacity-85">Get started</a> </div> </header> <div className="mx-auto mt-24 flex max-w-4xl flex-col items-center px-6 text-center md:mt-32"> <h1 className="font-serif text-[clamp(2.3rem,7vw,6rem)] leading-[1.05] tracking-[-0.02em]"> {headlineLines.map((line, i) => ( <Reveal key={line} as="span" from="up" distance={11} duration={800} delay={100 + i * 100} className="block">{line}</Reveal> ))} </h1> <Reveal from="up" distance={12} duration={900} delay={400} className="w-full"> <p className="mx-auto mt-6 max-w-xl text-lead text-secondary">{subhead}</p> <form onSubmit={(e) => e.preventDefault()} className="mx-auto mt-8 w-full max-w-[680px] overflow-hidden rounded-xl border border-hairline bg-surface-high/95 text-left shadow-float-window backdrop-blur"> <label className="sr-only" htmlFor="hero-prompt">Prompt</label> <input id="hero-prompt" value={value} onChange={(e) => setValue(e.target.value)} placeholder={placeholder} className="h-[58px] w-full bg-transparent px-5 text-body text-primary placeholder:text-muted focus:outline-none" /> <div className="flex items-center justify-between border-t border-hairline px-5 py-3"> <span className="text-caption text-muted">{hint}</span> <button type="submit" aria-label="Send" className="flex h-9 w-9 items-center justify-center rounded-pill bg-paper text-canvas transition-opacity duration-ui-hover hover:opacity-85 focus-visible:outline focus-visible:outline-2"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" aria-hidden="true"><path d="M8 13V3M3.5 7.5 8 3l4.5 4.5" /></svg> </button> </div> </form> </Reveal> </div> <div className="absolute inset-x-0 bottom-0 mx-auto h-[120px] max-w-[1320px] px-2 [perspective:1200px]" aria-hidden="true"> <div className="grid h-[300px] origin-bottom grid-cols-[260px_1fr] overflow-hidden rounded-t-[28px] border border-hairline bg-canvas-warm shadow-float-window [transform:rotateX(8deg)] md:grid-cols-[270px_1fr_380px]"> <div className="border-r border-hairline p-4"> <div className="mb-6 h-8 w-8 rounded-pill border border-secondary/60" /> <div className="rounded-md border border-hairline bg-surface px-3 py-2 text-caption text-secondary">+ New chat</div> <div className="mt-6 text-caption text-muted">Today</div> <div className="mt-2 rounded-md bg-surface-raised px-3 py-2 text-caption text-primary">Spring campaign plan</div> </div> <div className="p-4"><div className="text-caption font-medium text-primary">Spring campaign plan</div></div> <div className="hidden border-l border-hairline bg-surface p-4 md:block"> <div className="text-caption text-muted">Workspace 4b2e19d0</div> <div className="mt-3 flex gap-4 text-caption"><span className="text-muted">Files</span><span className="border-b border-primary pb-1 text-primary">Agents</span></div> </div> </div> </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"; export default function PaintedLandscapeHero({ brand = "Aldene", navLinks = ["Product", "Why Aldene", "Capabilities", "Features", "Pricing", "Desktop app"], headlineLines = ["Collective Reasoning", "Without Limits"], subhead = "Several leading AI models, collaborating as a single crew. Hand over the entire job and receive it back complete.", placeholder = "Draft a launch checklist for my pottery shop", hint = "Aldene chooses the best models for you", imageSrc = "https://yoink-app.fly.dev/stock/landscape-3.jpg", }: { brand?: string; navLinks?: string[]; headlineLines?: string[]; subhead?: string; placeholder?: string; hint?: string; imageSrc?: string; }) { const [value, setValue] = useState(""); return ( <section className="relative isolate min-h-[900px] overflow-hidden bg-background font-sans text-foreground"> <img src={imageSrc} alt="" width={1600} height={1067} className="absolute inset-0 -z-20 h-full w-full object-cover" style={{ filter: "brightness(0.78) saturate(0.9)" }} /> <div className="absolute inset-0 -z-10 bg-[linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.35),var(--color-background))]" /> <header className="flex items-center justify-between px-6 py-5 md:px-10"> <div className="flex items-center gap-8"> <a href="#" className="flex items-center gap-2 text-sm font-medium focus-visible:outline focus-visible:outline-2"> <svg width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="currentColor" strokeWidth="1.6" aria-hidden="true"><circle cx="14" cy="14" r="11" /><path d="M14 3c-5 5-5 17 0 22M3 14c5-5 17-5 22 0" /></svg> {brand} </a> <nav aria-label="Main" className="hidden gap-6 text-sm text-muted-foreground lg:flex"> {navLinks.map((l) => ( <a key={l} href="#" className="transition-colors duration-moonlit-ui-hover ease-moonlit-ui-hover hover:text-foreground">{l}</a> ))} </nav> </div> <div className="flex items-center gap-5 text-sm"> <a href="#" className="text-muted-foreground hover:text-foreground">Log in</a> <a href="#" className="rounded-full bg-foreground px-4 py-2.5 font-medium text-background transition-opacity duration-moonlit-ui-hover hover:opacity-85">Get started</a> </div> </header> <div className="mx-auto mt-24 flex max-w-4xl flex-col items-center px-6 text-center md:mt-32"> <h1 className="font-sans text-[clamp(2.3rem,7vw,6rem)] leading-[1.05] tracking-[-0.02em]"> {headlineLines.map((line, i) => ( <Reveal key={line} as="span" from="up" distance={11} duration={800} delay={100 + i * 100} className="block">{line}</Reveal> ))} </h1> <Reveal from="up" distance={12} duration={900} delay={400} className="w-full"> <p className="mx-auto mt-6 max-w-xl text-moonlit-lead text-muted-foreground">{subhead}</p> <form onSubmit={(e) => e.preventDefault()} className="mx-auto mt-8 w-full max-w-[680px] overflow-hidden rounded-2xl border border-border bg-muted/95 text-left shadow-moonlit-float-window backdrop-blur"> <label className="sr-only" htmlFor="hero-prompt">Prompt</label> <input id="hero-prompt" value={value} onChange={(e) => setValue(e.target.value)} placeholder={placeholder} className="h-[58px] w-full bg-transparent px-5 text-moonlit-body text-foreground placeholder:text-muted-foreground focus:outline-none" /> <div className="flex items-center justify-between border-t border-border px-5 py-3"> <span className="text-moonlit-caption text-muted-foreground">{hint}</span> <button type="submit" aria-label="Send" className="flex h-9 w-9 items-center justify-center rounded-full bg-primary text-primary-foreground transition-opacity duration-moonlit-ui-hover hover:opacity-85 focus-visible:outline focus-visible:outline-2"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" aria-hidden="true"><path d="M8 13V3M3.5 7.5 8 3l4.5 4.5" /></svg> </button> </div> </form> </Reveal> </div> <div className="absolute inset-x-0 bottom-0 mx-auto h-[120px] max-w-[1320px] px-2 [perspective:1200px]" aria-hidden="true"> <div className="grid h-[300px] origin-bottom grid-cols-[260px_1fr] overflow-hidden rounded-t-[28px] border border-border bg-card shadow-moonlit-float-window [transform:rotateX(8deg)] md:grid-cols-[270px_1fr_380px]"> <div className="border-r border-border p-4"> <div className="mb-6 h-8 w-8 rounded-full border border-muted-foreground/60" /> <div className="rounded-md border border-border bg-muted px-3 py-2 text-moonlit-caption text-muted-foreground">+ New chat</div> <div className="mt-6 text-moonlit-caption text-muted-foreground">Today</div> <div className="mt-2 rounded-md bg-muted px-3 py-2 text-moonlit-caption text-foreground">Spring campaign plan</div> </div> <div className="p-4"><div className="text-moonlit-caption font-medium text-foreground">Spring campaign plan</div></div> <div className="hidden border-l border-border bg-muted p-4 md:block"> <div className="text-moonlit-caption text-muted-foreground">Workspace 4b2e19d0</div> <div className="mt-3 flex gap-4 text-moonlit-caption"><span className="text-muted-foreground">Files</span><span className="border-b border-foreground pb-1 text-foreground">Agents</span></div> </div> </div> </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.