Page sections / Heroes

Centered Glow Hero

Large centered white headline with a two-line subhead over a pure near-black canvas with an animated canvas bloom. Below it sit a light download button, mono requirements and Homebrew notes, and a thin red-tinted announcement pill.

Rebuilt from raycast.com in the Obsidian Launcher style.

npx shadcn@latest add https://yoink-app.fly.dev/r/obsidian-launcher/blocks/centered-glow-hero.json

Looks exactly like raycast.com: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

All copy is exposed via props (brand, navLinks, headline, subhead, ctaLabel, requirements, installLabel, legacyLabel, pillLabel) and renders standalone with defaults. The animated bloom is built from Aurora and GridPattern over the canvas colour.

components/centered-glow-hero.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, type CSSProperties } from "react";
type Props = {
  brand?: string;
  navLinks?: string[];
  headline?: string;
  subhead?: string;
  ctaLabel?: string;
  requirements?: string;
  installLabel?: string;
  legacyLabel?: string;
  pillLabel?: string;
};

const Apple = () => (
  <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
    <path d="M16.4 12.6c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.8-1.8-3.4-1.8-1.4-.1-2.8.9-3.5.9s-1.8-.8-3-.8c-1.5 0-3 .9-3.8 2.3-1.6 2.8-.4 7 1.2 9.3.8 1.1 1.700 2.400 2.900 2.300 1.200 0 1.600-.7 3-.7s1.800.7 3 .7 2-1.100 2.800-2.200c.9-1.300 1.200-2.500 1.300-2.600-.1 0-2.500-1-2.500-3.900zM14.100 5.700c.6-.8 1.100-1.800.9-2.900-.9 0-2 .6-2.700 1.400-.6.700-1.100 1.800-1 2.800 1 .1 2.100-.5 2.800-1.300z" />
  </svg>
);

export default function CenteredGlowHero({
  brand = "Northwind",
  navLinks = ["Store", "Pro", "AI", "Mobile", "Windows", "Teams", "Enterprise", "Blog", "Pricing"],
  headline = "One keystroke to anything you need.",
  subhead = "A set of sharp everyday tools living inside one extensible command bar. Quick, comfortable and dependable.",
  ctaLabel = "Download for Mac",
  requirements = "Requires a recent macOS and Apple Silicon",
  installLabel = "Install via Homebrew",
  legacyLabel = "Download v1",
  pillLabel = "Introducing Northwind Plugins",
}: Props) {
  return (
    <section className="relative isolate min-h-screen overflow-hidden bg-canvas text-primary font-sans">
      <Aurora colors={["var(--color-accent-red)", "var(--color-accent-blue)"]} speed={0.6} blur={120} opacity={0.18} />
      <GridPattern variant="dots" size={28} color="color-mix(in oklab, white 6%, transparent)" fade="radial" />
      <div className="pointer-events-none absolute inset-x-0 bottom-0 -z-0 h-1/3 bg-gradient-to-b from-transparent to-canvas" />

      <header className="relative z-10 mx-auto mt-4 flex max-w-[1204px] items-center justify-between gap-4 rounded-xl border border-hairline bg-glass-panel px-5 py-3 backdrop-blur md:px-8">
        <a href="#" className="flex items-center gap-2 font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-red">
          <svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true"><rect x="6" y="6" width="12" height="12" rx="2" transform="rotate(45 12 12)" fill="var(--color-accent-red)" /></svg>
          {brand}
        </a>
        <nav aria-label="Main" className="hidden gap-6 text-ui text-secondary lg:flex">
          {navLinks.map((l) => (
            <a key={l} href="#" className="transition-colors duration-200 hover:text-primary focus-visible:text-primary focus-visible:outline-none">{l}</a>
          ))}
        </nav>
        <div className="flex items-center gap-4">
          <a href="#" className="hidden text-ui text-secondary transition-colors duration-200 hover:text-primary sm:block">Log in</a>
          <a href="#" className="flex items-center gap-2 rounded-lg bg-button-light px-3 py-1.5 text-ui text-surface-elevated"><Apple />Download</a>
        </div>
      </header>

      <div className="relative z-10 mx-auto flex min-h-[calc(100vh-100px)] max-w-3xl flex-col items-center justify-between px-6 pb-8 pt-24 text-center">
        <div className="mt-16 animate-fade-in-up md:mt-28">
          <h1 className="text-balance text-5xl font-semibold leading-[1.05] tracking-tight text-primary md:text-7xl">{headline}</h1>
          <p className="mx-auto mt-8 max-w-md text-balance text-body-lg text-primary">{subhead}</p>
        </div>

        <div className="mt-16 flex flex-col items-center gap-3">
          <a href="#" className="inline-flex items-center gap-2 rounded-lg bg-[#e6e6e6] px-3.5 py-2 text-ui font-medium text-surface-elevated shadow-keycap transition-all duration-200 ease-out hover:bg-white hover:shadow-button-light-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-red">
            <Apple />
            {ctaLabel}
          </a>
          <p className="mt-2 animate-[fadeTo40_300ms_ease-out_forwards] font-mono text-caption text-secondary opacity-40">{requirements}</p>
          <div className="flex items-center gap-3 font-mono text-caption text-secondary">
            <button type="button" className="text-[#9c9c9d] transition-colors duration-200 hover:text-white focus-visible:text-white">{installLabel}</button>
            <span aria-hidden="true">|</span>
            <button type="button" className="text-[#9c9c9d] transition-colors duration-200 hover:text-white focus-visible:text-white">{legacyLabel}</button>
          </div>
          <a href="#" className="mt-6 inline-flex items-center gap-2 rounded-pill border border-accent-red/30 bg-accent-red-wash px-3 py-1.5 text-ui text-primary transition-colors duration-200 hover:border-accent-red/60">
            {pillLabel}
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6" /></svg>
          </a>
        </div>
      </div>
    </section>
  );
}

// ---- Yoink motion (inlined, no dependencies): Aurora, GridPattern ----

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_AURORA_CSS = `@keyframes yk-aurora-a{0%{transform:translate3d(-10%,-6%,0) scale(1)}50%{transform:translate3d(12%,8%,0) scale(1.18)}100%{transform:translate3d(-4%,12%,0) scale(0.95)}}
@keyframes yk-aurora-b{0%{transform:translate3d(8%,10%,0) scale(1.1)}50%{transform:translate3d(-14%,-4%,0) scale(0.9)}100%{transform:translate3d(6%,-10%,0) scale(1.15)}}
@keyframes yk-aurora-c{0%{transform:translate3d(0,0,0) scale(0.9) rotate(0deg)}50%{transform:translate3d(-8%,10%,0) scale(1.2) rotate(40deg)}100%{transform:translate3d(10%,-6%,0) scale(1) rotate(80deg)}}
@media (prefers-reduced-motion:reduce){[data-yk-aurora] *{animation:none!important}}`;

/** Slow-moving blurred colour blobs behind a section: drop it in as the first child. */
function Aurora({
  colors = ["var(--color-primary, currentColor)", "var(--color-accent, currentColor)", "var(--color-ring, currentColor)"],
  speed = 1,
  blur = 80,
  opacity = 0.5,
  className,
  style,
}: {
  colors?: string[];
  speed?: number;
  blur?: number;
  opacity?: number;
  className?: string;
  style?: CSSProperties;
}) {
  const ref = useRef<HTMLDivElement>(null);
  useYkLayoutEffect(() => ykPrepareParent(ref.current, true), []);
  const spots = [
    { left: "-10%", top: "-20%", size: "60%", anim: "a", dur: 18 },
    { left: "45%", top: "-10%", size: "55%", anim: "b", dur: 22 },
    { left: "15%", top: "35%", size: "65%", anim: "c", dur: 26 },
    { left: "60%", top: "40%", size: "45%", anim: "a", dur: 20 },
  ];
  return (
    <div
      ref={ref}
      aria-hidden="true"
      data-yk-aurora=""
      className={className}
      style={{ position: "absolute", inset: 0, zIndex: -1, overflow: "hidden", pointerEvents: "none", borderRadius: "inherit", opacity, ...style }}
    >
      <style>{YK_AURORA_CSS}</style>
      {spots.map((s, i) => (
        <div
          key={i}
          style={{
            position: "absolute",
            left: s.left,
            top: s.top,
            width: s.size,
            aspectRatio: "1",
            borderRadius: "50%",
            background: `radial-gradient(circle at center, ${colors[i % colors.length]}, transparent 68%)`,
            filter: `blur(${blur}px)`,
            animation: `yk-aurora-${s.anim} ${s.dur / Math.max(speed, 0.05)}s ease-in-out ${-i * 3}s infinite alternate`,
          }}
        />
      ))}
    </div>
  );
}

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
—

More from Obsidian Launcher

The whole style →

AI Agent Bento Showcase

Feature sections

Blog Category Filter Row

Tab bars

Frosted Pill Navbar

Headers & nav bars

Light Pill Download Button

Buttons

Launcher Window Showcase

Media & mockups

Keycap Feature Grid

Feature sections