Cobalt Engraving Hero
Full-bleed cobalt hero with a giant three-line light condensed headline on the left and a tall duotone engraved illustration (multi-armed figure with radiating lines) cropped on the right. Inset thin frame border with a corner notch, a WebGL/canvas grain background, and edge-fade radial masks.
Rebuilt from hermes-agent.nousresearch.com in the Electric Ultramarine Engraving style.
Looks exactly like hermes-agent.nousresearch.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: line1–line3 (headline), primaryLabel, secondaryLabel, imageSrc (stock photo duotoned as illustration), and commands (object of tab name to install command). Renders standalone with defaults.
components/cobalt-engraving-hero.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, type CSSProperties } from "react"; import { useState } from "react"; export default function CobaltEngravingHero({ line1 = "The Guide", line2 = "That Learns", line3 = "Your Craft", primaryLabel = "Download for desktop", secondaryLabel = "Run in the cloud", // ?bg=&ink= recolours it to exactly this section's cobalt and paper, so it sits in the page imageSrc = "https://yoink-app.fly.dev/gen/illustration-engraved-oracle.webp?bg=0000f2&ink=f2f2f2", imageAlt = "Engraving of a classical head crowned with an astrolabe, rays of light fanning out behind it", commands = { macOS: "curl -fsSL https://example.com/install.sh | bash", Linux: "curl -fsSL https://example.com/install-linux.sh | bash", Windows: "iwr https://example.com/install.ps1 | iex", } as Record<string, string>, }) { const tabs = Object.keys(commands); const [tab, setTab] = useState(tabs[0]); const [copied, setCopied] = useState(false); const copy = () => { try { navigator.clipboard.writeText(commands[tab]); } catch {} setCopied(true); setTimeout(() => setCopied(false), 1200); }; return ( <section className="relative isolate min-h-[700px] overflow-hidden bg-cobalt text-paper"> {/* the engraving: on the right on wide screens (its background is the section's own colour, so only the line work shows), under the copy on phones */} <img src={imageSrc} alt={imageAlt} width={896} height={1216} className="pointer-events-none absolute right-[3%] top-1/2 hidden h-[108%] max-h-[860px] w-auto -translate-y-1/2 lg:block" loading="eager" /> <Grain opacity={0.1} blend="overlay" /> <div className="pointer-events-none absolute inset-2 border border-hairline-light" /> <span className="pointer-events-none absolute left-2 top-2 h-4 w-4 border-l-2 border-t-2 border-paper opacity-0 transition-opacity duration-frame-flash ease-frame-flash hover:opacity-45" /> <div className="relative mx-auto max-w-6xl px-6 py-16 md:px-12 md:py-20"> <h1 className="font-display text-[64px] font-light leading-[0.95] tracking-[-0.01em] sm:text-[96px] md:text-[124px]"> {line1}<br />{line2}<br />{line3} </h1> <div className="mt-8 flex flex-wrap gap-1 font-display text-button uppercase"> <button className="bg-paper px-4 py-2.5 text-cobalt transition-colors hover:bg-paper-tint focus-visible:outline focus-visible:outline-2 focus-visible:outline-paper">{primaryLabel}</button> <button className="bg-hairline-light px-4 py-2.5 text-paper transition-colors hover:bg-overlay-soft focus-visible:outline focus-visible:outline-2 focus-visible:outline-paper">{secondaryLabel}</button> </div> <p className="mt-12 font-mono text-micro uppercase">Install via terminal</p> <div className="mt-4 max-w-[450px] bg-cobalt-shade p-1 font-mono text-caption"> <div role="tablist" className="grid grid-cols-3 gap-1"> {tabs.map((t) => ( <button key={t} role="tab" aria-selected={tab === t} onClick={() => setTab(t)} className={"py-1.5 " + (tab === t ? "bg-cobalt" : "underline hover:bg-overlay-soft")}>{t}</button> ))} </div> <div className="flex items-center justify-between gap-3 px-3 py-3"> <code className="truncate">{commands[tab]}</code> <button onClick={copy} aria-label="Copy command" className="shrink-0 text-micro focus-visible:outline focus-visible:outline-1">{copied ? "OK" : "⧉"}</button> </div> </div> <img src={imageSrc} alt="" aria-hidden="true" width={896} height={1216} className="mx-auto mt-10 w-full max-w-[420px] lg:hidden" loading="lazy" /> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Grain ---- const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; // 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"; } const YK_GRAIN_CSS = `@keyframes yk-grain{0%{transform:translate(0,0)}25%{transform:translate(-3%,2%)}50%{transform:translate(2%,-3%)}75%{transform:translate(-2%,-1%)}100%{transform:translate(1%,3%)}} @media (prefers-reduced-motion:reduce){[data-yk-grain] *{animation:none!important}}`; const YK_NOISE = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.6 -0.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`; /** A film-grain texture over a section (adds tactile depth to flat colour or gradients). */ function Grain({ opacity = 0.12, blend = "overlay", animated = false, className, style, }: { opacity?: number; blend?: CSSProperties["mixBlendMode"]; animated?: boolean; className?: string; style?: CSSProperties; }) { const ref = useRef<HTMLDivElement>(null); useYkLayoutEffect(() => ykPrepareParent(ref.current), []); return ( <div ref={ref} aria-hidden="true" data-yk-grain="" className={className} style={{ position: "absolute", inset: 0, overflow: "hidden", pointerEvents: "none", borderRadius: "inherit", opacity, mixBlendMode: blend, ...style }} > {animated && <style>{YK_GRAIN_CSS}</style>} <div style={{ position: "absolute", inset: "-10%", backgroundImage: YK_NOISE, animation: animated ? "yk-grain 0.9s steps(4) infinite" : undefined }} /> </div> ); }"use client"; import { useEffect, useLayoutEffect, useRef, type CSSProperties } from "react"; import { useState } from "react"; export default function CobaltEngravingHero({ line1 = "The Guide", line2 = "That Learns", line3 = "Your Craft", primaryLabel = "Download for desktop", secondaryLabel = "Run in the cloud", // ?bg=&ink= recolours it to exactly this section's cobalt and paper, so it sits in the page imageSrc = "https://yoink-app.fly.dev/gen/illustration-engraved-oracle.webp?bg=0000f2&ink=f2f2f2", imageAlt = "Engraving of a classical head crowned with an astrolabe, rays of light fanning out behind it", commands = { macOS: "curl -fsSL https://example.com/install.sh | bash", Linux: "curl -fsSL https://example.com/install-linux.sh | bash", Windows: "iwr https://example.com/install.ps1 | iex", } as Record<string, string>, }) { const tabs = Object.keys(commands); const [tab, setTab] = useState(tabs[0]); const [copied, setCopied] = useState(false); const copy = () => { try { navigator.clipboard.writeText(commands[tab]); } catch {} setCopied(true); setTimeout(() => setCopied(false), 1200); }; return ( <section className="relative isolate min-h-[700px] overflow-hidden bg-background text-foreground"> {/* the engraving: on the right on wide screens (its background is the section's own colour, so only the line work shows), under the copy on phones */} <img src={imageSrc} alt={imageAlt} width={896} height={1216} className="pointer-events-none absolute right-[3%] top-1/2 hidden h-[108%] max-h-[860px] w-auto -translate-y-1/2 lg:block" loading="eager" /> <Grain opacity={0.1} blend="overlay" /> <div className="pointer-events-none absolute inset-2 border border-border" /> <span className="pointer-events-none absolute left-2 top-2 h-4 w-4 border-l-2 border-t-2 border-foreground opacity-0 transition-opacity duration-electric-frame-flash ease-electric-frame-flash hover:opacity-45" /> <div className="relative mx-auto max-w-6xl px-6 py-16 md:px-12 md:py-20"> <h1 className="font-sans text-[64px] font-light leading-[0.95] tracking-[-0.01em] sm:text-[96px] md:text-[124px]"> {line1}<br />{line2}<br />{line3} </h1> <div className="mt-8 flex flex-wrap gap-1 font-sans text-electric-button uppercase"> <button className="bg-foreground px-4 py-2.5 text-background transition-colors hover:bg-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground">{primaryLabel}</button> <button className="bg-border px-4 py-2.5 text-background transition-colors hover:bg-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground">{secondaryLabel}</button> </div> <p className="mt-12 font-mono text-electric-micro uppercase">Install via terminal</p> <div className="mt-4 max-w-[450px] bg-primary p-1 font-mono text-electric-caption"> <div role="tablist" className="grid grid-cols-3 gap-1"> {tabs.map((t) => ( <button key={t} role="tab" aria-selected={tab === t} onClick={() => setTab(t)} className={"py-1.5 " + (tab === t ? "bg-background" : "underline hover:bg-foreground")}>{t}</button> ))} </div> <div className="flex items-center justify-between gap-3 px-3 py-3"> <code className="truncate">{commands[tab]}</code> <button onClick={copy} aria-label="Copy command" className="shrink-0 text-electric-micro focus-visible:outline focus-visible:outline-1">{copied ? "OK" : "⧉"}</button> </div> </div> <img src={imageSrc} alt="" aria-hidden="true" width={896} height={1216} className="mx-auto mt-10 w-full max-w-[420px] lg:hidden" loading="lazy" /> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Grain ---- const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; // 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"; } const YK_GRAIN_CSS = `@keyframes yk-grain{0%{transform:translate(0,0)}25%{transform:translate(-3%,2%)}50%{transform:translate(2%,-3%)}75%{transform:translate(-2%,-1%)}100%{transform:translate(1%,3%)}} @media (prefers-reduced-motion:reduce){[data-yk-grain] *{animation:none!important}}`; const YK_NOISE = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.6 -0.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`; /** A film-grain texture over a section (adds tactile depth to flat colour or gradients). */ function Grain({ opacity = 0.12, blend = "overlay", animated = false, className, style, }: { opacity?: number; blend?: CSSProperties["mixBlendMode"]; animated?: boolean; className?: string; style?: CSSProperties; }) { const ref = useRef<HTMLDivElement>(null); useYkLayoutEffect(() => ykPrepareParent(ref.current), []); return ( <div ref={ref} aria-hidden="true" data-yk-grain="" className={className} style={{ position: "absolute", inset: 0, overflow: "hidden", pointerEvents: "none", borderRadius: "inherit", opacity, mixBlendMode: blend, ...style }} > {animated && <style>{YK_GRAIN_CSS}</style>} <div style={{ position: "absolute", inset: "-10%", backgroundImage: YK_NOISE, animation: animated ? "yk-grain 0.9s steps(4) infinite" : undefined }} /> </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: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.