Page sections / Heroes

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.

ImagesSwap it for a library image or one of your own.All images in this style →

Choose an image

Image

Loading…

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>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Moonlit Atelier

The whole style →

Inline Update Strip

Changelog

Hairline Capability Grid

Lists

Transparent Minimal Nav Bar

Headers & nav bars

Dark Prompt Composer

Prompt & chat inputs

Perspective Floating App Window

Media & mockups

Model Picker Popover

Popovers