Page sections / Feature sections

Automation Bento Trio

A wide Snippets card with a teal/blue ribbon artwork and a glass chat composer, plus two half-width cards: Quicklinks search results list and large 3D keycaps (option + command + L). Each card has an icon-and-title header and grey description.

Rebuilt from raycast.com in the Obsidian Launcher style.

npx shadcn@latest add https://justyoink.it/r/obsidian-launcher/blocks/automation-bento-trio.json

Looks exactly like raycast.com: 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: heading, subheading, imageSrc (ribbon artwork behind the composer). Renders standalone; the composer text types out with a caret, keycaps press on hover and list rows highlight on hover.

components/automation-bento-trio.tsx
"use client";

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

type Props = {
  heading?: string;
  subheading?: string;
  imageSrc?: string;
};

const Icon = ({ d }: { d: string }) => (
  <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d={d} /></svg>
);

function Key({ label, sym }: { label: string; sym?: string }) {
  return (
    <div className="group relative flex h-[106px] min-w-[84px] items-end rounded-lg border border-hairline bg-keycap-face px-3.5 pb-3 shadow-keycap transition-transform duration-button-lift ease-button-lift hover:translate-y-[3px] hover:shadow-none">
      {sym && <span className="absolute right-3 top-2 text-xl text-secondary">{sym}</span>}
      <span className="text-h2 text-primary">{label}</span>
    </div>
  );
}

export default function AutomationBentoTrio({
  heading = "Skip the busywork.",
  subheading = "Let your tools handle the routine for you.",
  imageSrc = "https://yoink-app.fly.dev/stock/abstract-5.jpg",
}: Props) {
  const [active, setActive] = useState(0);
  const rows = [
    { n: "Northwind Board", u: "northwind.app", c: "bg-accent-blue" },
    { n: "Altura Notes", u: "altura.io", c: "bg-accent-green" },
    { n: "Kitefield Docs", u: "kitefield.dev", c: "bg-accent-yellow" },
  ];
  const card = "relative overflow-hidden rounded-xl border border-hairline bg-surface";
  return (
    <section className="bg-canvas px-4 py-20 text-primary font-sans">
      <div className="mx-auto max-w-[1204px]">
        <Reveal className="mb-12 text-center">
          <h2 className="text-body-lg text-primary">{heading}</h2>
          <p className="text-body-lg text-tertiary">{subheading}</p>
        </Reveal>

        <div className={`${card} grid min-h-[218px] md:grid-cols-2`}>
          <div className="relative z-10 flex flex-col justify-center p-6">
            <div className="mb-4 flex items-center gap-3"><Icon d="M4 6h16M7 12h10M10 18h4" /><h3 className="text-body-lg">Macros</h3></div>
            <p className="max-w-[360px] text-ui text-secondary">Tired of retyping the same reply? Save it once and drop it in with a short keyword.</p>
          </div>
          <div className="relative min-h-[218px]">
            <img src={imageSrc} alt="" width={800} height={643} className="absolute inset-0 h-full w-full object-cover opacity-75" />
            <div className="absolute inset-0 bg-[linear-gradient(90deg,var(--color-surface),transparent_50%)]" />
            <div className="absolute left-4 right-4 top-6 h-[260px] rounded-xl border border-hairline bg-glass-panel p-5 backdrop-blur-[15px] md:left-0 md:right-24">
              <p className="text-ui text-primary">Sure, here you go:</p>
              <div className="mt-4 h-16 text-secondary"><Typewriter phrases={["Thanks for reaching out!", "Happy to help with that."]} caret /></div>
              <div className="absolute inset-x-5 bottom-5 flex items-center justify-between">
                <span className="grid h-8 w-8 place-items-center rounded-md border border-hairline bg-overlay-subtle text-secondary">☺</span>
                <button className="rounded-md bg-button-light px-3 py-1.5 text-ui text-surface-elevated shadow-keycap focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-red">Send</button>
              </div>
            </div>
          </div>
        </div>

        <div className="mt-10 grid gap-10 md:grid-cols-2">
          <div className={`${card} flex flex-col`}>
            <div className="relative h-[200px] overflow-hidden p-6 pb-0 [mask-image:linear-gradient(#000_75%,transparent)]">
              <div className="rounded-t-xl border border-hairline bg-overlay-subtle pb-4">
                <div className="flex items-center gap-3 px-4 py-4 text-body-lg"><span className="h-4 w-4 rotate-45 rounded-xs bg-accent-red" />search</div>
                <p className="px-4 pb-2 text-caption text-tertiary">Results</p>
                <ul className="px-2">
                  {rows.map((r, i) => (
                    <li key={r.n}>
                      <button onMouseEnter={() => setActive(i)} className={`flex w-full items-center gap-3 rounded-md px-2 py-2 text-left text-ui transition-colors duration-link-color ${active === i ? "bg-surface-hover" : ""}`}>
                        <span className={`h-4 w-4 rounded-xs ${r.c}`} />
                        <span>{r.n}</span><span className="text-tertiary">{r.u}</span>
                      </button>
                    </li>
                  ))}
                </ul>
              </div>
            </div>
            <div className="p-6 pt-5">
              <div className="mb-4 flex items-center gap-3"><Icon d="M10 14a4 4 0 0 0 5.6 0l3-3a4 4 0 0 0-5.6-5.6l-1 1M14 10a4 4 0 0 0-5.6 0l-3 3a4 4 0 0 0 5.6 5.6l1-1" /><h3 className="text-body-lg">Shortcuts</h3></div>
              <p className="max-w-[360px] text-ui text-secondary">No more piles of open tabs. Save links and jump to them from anywhere.</p>
            </div>
          </div>

          <div className={`${card} flex flex-col`}>
            <div className="flex flex-1 flex-wrap items-center justify-center gap-3 px-6 py-12">
              <Key label="option" sym="⌥" /><span className="text-tertiary">+</span>
              <Key label="command" sym="⌘" /><span className="text-tertiary">+</span>
              <Key label="L" />
            </div>
            <div className="p-6 pt-0">
              <div className="mb-4 flex items-center gap-3"><Icon d="M5 8h14v10H5zM12 4v4M9 13h.01M15 13h.01" /><h3 className="text-body-lg">Keys and Nicknames</h3></div>
              <p className="max-w-[420px] text-ui text-secondary">Speed up your day by binding keys or short names to the actions you use most.</p>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}

// ---- Yoink motion (inlined, no dependencies): Reveal, Typewriter ----

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

const ykSrOnly: CSSProperties = { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap", border: 0 };

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

const YK_CARET_CSS = `@keyframes yk-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){[data-yk-caret]{animation:none!important}}`;

/** Types out phrases one character at a time, deletes them, and moves on to the next. */
function Typewriter({
  phrases = ["Ship faster.", "Look sharper.", "Sleep better."],
  typeSpeed = 55,
  deleteSpeed = 30,
  pause = 1600,
  loop = true,
  caret = true,
  className,
  style,
}: {
  phrases?: string[];
  typeSpeed?: number;
  deleteSpeed?: number;
  pause?: number;
  loop?: boolean;
  caret?: boolean;
  className?: string;
  style?: CSSProperties;
}) {
  const ref = useRef<HTMLSpanElement>(null);
  const state = useYkReveal(ref);
  const [text, setText] = useState(phrases[0] ?? "");
  useYkLayoutEffect(() => {
    if (state === "hidden") setText("");
  }, [state]);
  useEffect(() => {
    if (state !== "shown" || !phrases.length) return;
    let p = 0, n = 0, deleting = false, timer: ReturnType<typeof setTimeout>;
    const tick = () => {
      const full = phrases[p];
      if (!deleting) {
        n++;
        setText(full.slice(0, n));
        if (n < full.length) return (timer = setTimeout(tick, typeSpeed));
        if (!loop && p === phrases.length - 1) return;
        deleting = true;
        return (timer = setTimeout(tick, pause));
      }
      n--;
      setText(full.slice(0, n));
      if (n > 0) return (timer = setTimeout(tick, deleteSpeed));
      deleting = false;
      p = (p + 1) % phrases.length;
      timer = setTimeout(tick, typeSpeed * 4);
    };
    timer = setTimeout(tick, typeSpeed * 4);
    return () => clearTimeout(timer);
  }, [state, phrases.join("|"), typeSpeed, deleteSpeed, pause, loop]);
  return (
    <span ref={ref} className={className} style={style}>
      <span style={ykSrOnly}>{phrases.join(" ")}</span>
      <span aria-hidden="true">
        {text}
        {caret && (
          <>
            <style>{YK_CARET_CSS}</style>
            <span
              data-yk-caret=""
              style={{ display: "inline-block", width: "0.08em", height: "1em", marginLeft: "0.06em", verticalAlign: "-0.12em", background: "currentColor", animation: "yk-caret 1s steps(1) infinite" }}
            />
          </>
        )}
      </span>
    </span>
  );
}

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

Launcher Window Showcase

Media & mockups