Cards & content / Media & mockups

Launcher Window Showcase

A code-drawn macOS desktop frame with menubar and a floating launcher panel (search field, list with color swatches, detail preview, footer action bar), lit by a red/blue radial glow and a starfield. A dock of keycap icon buttons with a tooltip sits beneath.

Rebuilt from raycast.com in the Obsidian Launcher style.

npx shadcn@latest add https://justyoink.it/r/obsidian-launcher/blocks/launcher-window-showcase.json

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

Usage

Props: title, subtitle, captionStrong, caption. Hover or click the dock keys to show tooltips and swap the launcher panel content.

components/launcher-window-showcase.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
import { useState } from "react";

type Props = {
  title?: string;
  subtitle?: string;
  captionStrong?: string;
  caption?: string;
};

const colorItems = [
  { n: "#FF6363", c: "#FF6363" },
  { n: "#59D499", c: "#59D499" },
  { n: "#56C2FF", c: "#56C2FF" },
  { n: "#FFC531", c: "#FFC531" },
];

const keys = [
  { label: "Snippet Vault", d: "M9 4h6v3H9zM7 6H6v14h12V6h-1" },
  { label: "Ask Assistant", d: "M12 3l2 6 6 2-6 2-2 6-2-6-6-2 6-2z" },
  { label: "Emoji Finder", d: "M12 4a8 8 0 100 16 8 8 0 000-16zM9 10h.01M15 10h.01M9 15c2 1.5 4 1.5 6 0" },
  { label: "Quick Math", d: "M7 4h10v16H7zM9 7h6M9 11h.01M12 11h.01M15 11h.01M9 15h.01M12 15h.01M15 15h.01" },
  { label: "Window Grid", d: "M5 5h6v6H5zM13 5h6v6h-6zM5 13h6v6H5zM13 13h6v6h-6z" },
];

const stars = Array.from({ length: 40 }, (_, i) => ({
  x: (i * 53) % 100,
  y: (i * 37 + 11) % 100,
  s: 1 + (i % 3) * 0.6,
}));

export default function LauncherWindowShowcase({
  title = "Fewer clicks, more flow.",
  subtitle = "One panel, every tool within reach.",
  captionStrong = "Keep Everything.",
  caption = "Stop hunting through old tabs - with Snippet Vault nothing slips away.",
}: Props) {
  const [active, setActive] = useState(0);
  const [hover, setHover] = useState<number | null>(null);
  const shown = hover ?? active;

  return (
    <section className="relative isolate overflow-hidden bg-canvas px-4 py-24 font-sans text-primary">
      <div className="mx-auto max-w-[720px] text-center">
        <Reveal>
          <h2 className="text-h2 text-primary">{title}</h2>
          <p className="text-h2 text-tertiary">{subtitle}</p>
        </Reveal>
      </div>

      <div className="relative mx-auto mt-14 max-w-[1200px] rounded-xl border border-hairline bg-surface p-2 shadow-soft-glow">
        <div className="relative aspect-[1.62/1] min-h-[560px] overflow-hidden rounded-lg bg-[#07080a]">
          <div className="absolute inset-0">
            {stars.map((s, i) => (
              <div
                key={i}
                className="absolute rounded-full bg-primary/70 transition-transform duration-[2000ms] motion-reduce:transition-none"
                style={{ left: `${s.x}%`, top: `${s.y}%`, width: s.s, height: s.s }}
              />
            ))}
          </div>
          <div className="absolute inset-0 bg-[radial-gradient(60%_50%_at_50%_85%,rgba(255,60,60,0.35),transparent),radial-gradient(40%_40%_at_20%_70%,rgba(86,194,255,0.12),transparent)]" />
          <div className="absolute inset-0 backdrop-blur-[2px]" />

          <div className="relative flex items-center justify-between px-5 py-3 text-ui text-secondary">
            <div className="flex items-center gap-5">
              <span className="h-3 w-3 rounded-full bg-secondary" />
              <b className="text-primary">Finder</b>
              <span className="hidden sm:inline">File</span>
              <span className="hidden sm:inline">Edit</span>
              <span className="hidden md:inline">View</span>
              <span className="hidden md:inline">Window</span>
            </div>
            <div className="flex items-center gap-4">
              <span className="hidden sm:inline">Lunch · 37m left</span>
              <span>Mon Jun 22 9:41 AM</span>
            </div>
          </div>

          <div className="relative mx-auto mt-8 w-[92%] max-w-[750px] overflow-hidden rounded-xl border border-hairline bg-[rgba(17,18,23,0.96)] shadow-keycap backdrop-blur-[30px]">
            <div className="flex items-center gap-3 border-b border-hairline px-5 py-4">
              <span className="text-secondary">‹</span>
              <span className="flex-1 text-body text-tertiary">
                {shown === 0 ? "Type to filter entries..." : `Search ${keys[shown].label}...`}
                <span className="ml-0.5 inline-block h-4 w-px animate-caret-blink bg-primary align-middle" />
              </span>
              <span className="text-caption text-secondary">All Types ⌄</span>
            </div>
            <div className="grid grid-cols-[1fr] sm:grid-cols-[270px_1fr]">
              <div className="border-r border-hairline p-2">
                <p className="px-2 py-2 text-caption text-tertiary">Today</p>
                {colorItems.map((it, i) => (
                  <div key={it.n} className={`flex items-center gap-3 rounded-md px-2 py-2 text-ui ${i === 0 ? "bg-overlay-subtle" : ""}`}>
                    <span className="h-5 w-5 rounded-md" style={{ background: it.c }} />
                    {shown === 0 ? it.n : `${keys[shown].label} ${i + 1}`}
                  </div>
                ))}
                {["https://example.dev", "hello@example.dev"].map((t) => (
                  <div key={t} className="flex items-center gap-3 px-2 py-2 text-ui text-secondary">
                    <span className="h-5 w-5 rounded-md bg-surface-elevated" />
                    {t}
                  </div>
                ))}
              </div>
              <div className="hidden p-5 sm:block">
                <div className="mx-auto w-48 rounded-lg bg-primary p-1 pb-2">
                  <div className="h-30 h-[120px] rounded-md" style={{ background: colorItems[shown % 4].c }} />
                  <p className="mt-2 px-1 font-mono text-caption text-canvas">{colorItems[shown % 4].n}</p>
                </div>
                <div className="mt-8 space-y-1 text-caption">
                  <p className="text-tertiary">Information</p>
                  {[["Source", "Code Editor"], ["Type", "Color"], ["Copied", "Today at 13:35"]].map(([a, b]) => (
                    <div key={a} className="flex justify-between rounded-xs bg-overlay-subtle px-2 py-1.5">
                      <span className="text-tertiary">{a}</span>
                      <span>{b}</span>
                    </div>
                  ))}
                </div>
              </div>
            </div>
            <div className="flex items-center justify-between border-t border-hairline px-3 py-2 text-caption">
              <span className="rounded-pill bg-overlay-subtle px-3 py-1.5">{keys[shown].label}</span>
              <span className="rounded-pill bg-overlay-subtle px-3 py-1.5 text-secondary">Copy to Clipboard ⏎ &nbsp; Actions ⌘K</span>
            </div>
          </div>

          <div className="absolute inset-x-0 bottom-5 flex flex-col items-center">
            <div className="mb-2 h-8">
              {hover !== null && (
                <span className="rounded-md border border-hairline bg-canvas px-2 py-1 text-ui">{keys[hover].label}</span>
              )}
            </div>
            <div className="flex gap-2 rounded-xl border border-hairline bg-overlay-subtle p-1.5">
              {keys.map((k, i) => (
                <button
                  key={k.label}
                  aria-label={k.label}
                  aria-pressed={active === i}
                  onClick={() => setActive(i)}
                  onMouseEnter={() => setHover(i)}
                  onMouseLeave={() => setHover(null)}
                  onFocus={() => setHover(i)}
                  onBlur={() => setHover(null)}
                  className={`flex h-12 w-12 items-center justify-center rounded-lg border border-hairline bg-keycap-face text-secondary shadow-keycap transition-all duration-button-lift ease-button-lift hover:-translate-y-0.5 hover:text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-red ${active === i ? "scale-110 text-primary" : ""}`}
                >
                  <svg viewBox="0 0 24 24" className="h-5 w-5" fill="none" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round"><path d={k.d} /></svg>
                </button>
              ))}
            </div>
          </div>
        </div>
      </div>

      <p className="mx-auto mt-10 max-w-[460px] text-center text-body text-tertiary">
        <b className="font-medium text-primary">{captionStrong}</b> {caption}
      </p>
    </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 Obsidian Launcher

The whole style →

AI Agent Bento Showcase

Feature sections

Blog Category Filter Row

Tab bars

Frosted Pill Navbar

Headers & nav bars

Centered Glow Hero

Heroes

Light Pill Download Button

Buttons

Keycap Feature Grid

Feature sections