Page sections / Feature sections

Split Headline and Lead Section Intro

Two-column section opener: 48px two-line headline on the left, 24px secondary-grey lead paragraph and a quiet 'Learn more →' link on the right, above a large dimmed product mockup.

Rebuilt from linear.app in the Obsidian Precision style.

npx shadcn@latest add https://yoink-app.fly.dev/r/obsidian-precision-5cbef2/blocks/split-section-header.json

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

Usage

Props: titleTop, titleBottom, lead, linkLabel, href. Renders standalone; the send button group fades in on scroll and the mockup board fades out at its edges via CSS mask.

components/split-section-header.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
const msgs = [
  { n: "mara", i: "M", t: "Has anyone noticed the web dashboard loads slowly after a long idle period?" },
  { n: "theo", i: "T", t: "Yes, we still block the first paint on a full account sync each time..." },
  { n: "juno", i: "J", t: "We could paint sooner and hydrate the rest in the background. Let's also add timing so we see how often it happens." },
];

const cols = [
  { name: "Backlog", c: "24", cards: [["ENG-311", "Simplify onboarding copy", ["Design"]], ["ENG-318", "Retry failed webhook calls", ["Bug"]]] },
  { name: "Todo", c: "71", cards: [["ENG-926", "Remove style inconsistencies", ["Bug", "Design"]], ["ENG-2088", "TypeError: undefined property", ["Bug"]], ["ENG-924", "Upgrade the model version", ["AI"]]] },
  { name: "In Progress", c: "3", cards: [["ENG-1487", "Drop unused fields from API", []], ["MKT-1028", "Launch page assets", ["Design"]]] },
];

export default function SplitHeadlineLeadIntro({
  titleTop = "Capture",
  titleBottom = "and workflows",
  lead = "Quietly convert team chatter and user notes into clear tasks that are automatically sorted, tagged, and ranked for the right owners.",
  linkLabel = "Read more",
  href = "#",
}: {
  titleTop?: string;
  titleBottom?: string;
  lead?: string;
  linkLabel?: string;
  href?: string;
}) {
  return (
    <section className="relative overflow-hidden bg-canvas text-primary font-sans">
      <div className="mx-auto max-w-[1280px] px-5 py-16 md:px-10 md:py-24">
        <div className="grid gap-8 md:grid-cols-2">
          <h2 className="text-[40px] leading-[1.05] tracking-[-0.03em] font-medium md:text-[48px]">
            {titleTop}<br />{titleBottom}
          </h2>
          <div>
            <p className="text-[20px] leading-[1.35] text-secondary md:text-[24px]">{lead}</p>
            <a href={href} className="group mt-10 inline-flex items-center gap-1.5 text-ui text-tertiary transition-colors duration-link-color hover:text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-indigo">
              {linkLabel}
              <span aria-hidden className="transition-transform group-hover:translate-x-0.5">→</span>
            </a>
          </div>
        </div>

        <div className="relative mt-16 h-[560px] md:mt-20">
          <div className="absolute inset-0 left-[140px] hidden overflow-hidden opacity-60 md:block [mask-image:linear-gradient(to_bottom,#000_30%,transparent_95%),linear-gradient(to_right,transparent,#000_15%,#000_80%,transparent)] [mask-composite:intersect]">
            <div className="grid h-full grid-cols-3 gap-3 rounded-xl border border-hairline bg-surface p-4">
              {cols.map((col) => (
                <div key={col.name} className="space-y-2">
                  <div className="mb-4 flex items-center gap-2 text-ui text-secondary"><span className="h-3 w-3 rounded-full border border-tertiary" />{col.name}<span className="text-tertiary">{col.c}</span></div>
                  {col.cards.map((c) => (
                    <div key={c[0] as string} className="rounded-lg border border-hairline bg-canvas/60 p-3">
                      <div className="text-micro text-quaternary">{c[0] as string}</div>
                      <div className="mt-1.5 text-ui text-secondary">{c[1] as string}</div>
                      <div className="mt-3 flex gap-1.5">
                        {(c[2] as string[]).map((l) => (
                          <span key={l} className="flex items-center gap-1.5 rounded-pill border border-hairline px-2 py-0.5 text-micro text-secondary">
                            <i className={`h-1.5 w-1.5 rounded-full ${l === "Bug" ? "bg-danger" : l === "Design" ? "bg-info-blue" : "bg-tertiary"}`} />{l}
                          </span>
                        ))}
                      </div>
                    </div>
                  ))}
                </div>
              ))}
            </div>
          </div>

          <div className="absolute left-0 top-0 w-full max-w-[480px] overflow-hidden rounded-xl border border-hairline bg-surface shadow-high">
            <div className="pointer-events-none absolute inset-0 bg-corner-glow" />
            <div className="relative flex items-center justify-between border-b border-hairline px-5 py-4">
              <div className="flex items-baseline gap-2"><span className="text-title font-medium">Thread</span><span className="text-ui text-tertiary">#product</span></div>
              <span aria-hidden className="text-tertiary">⋮</span>
            </div>
            <ul className="relative space-y-5 px-5 py-6">
              {msgs.map((m) => (
                <li key={m.n} className="flex gap-3">
                  <span className="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-surface-raised text-ui text-secondary">{m.i}</span>
                  <div>
                    <div className="text-ui"><b className="font-medium">{m.n}</b> <span className="text-tertiary">4:31 PM</span></div>
                    <p className="text-ui text-secondary">{m.t}</p>
                  </div>
                </li>
              ))}
            </ul>
            <div className="relative m-3 rounded-lg border border-hairline bg-canvas/50 p-4">
              <p className="text-ui text-secondary"><span className="rounded-xs bg-accent-indigo/20 px-1 text-accent-indigo">@Helper</span> create tasks and assign to me</p>
              <div className="mt-10 flex items-center justify-between text-tertiary">
                <div className="flex items-center gap-3 text-ui"><span className="flex h-8 w-8 items-center justify-center rounded-pill bg-surface-raised">+</span><span>Aa</span><span>☺</span><span>@</span></div>
                <Reveal from="none" duration={800}>
                  <div className="flex overflow-hidden rounded-md bg-accent-indigo text-primary ring-2 ring-accent-indigo/50">
                    <button aria-label="Send" className="px-3 py-1.5 focus-visible:outline focus-visible:outline-2">➤</button>
                    <button aria-label="Send options" className="border-l border-white/20 px-2 py-1.5">⌄</button>
                  </div>
                </Reveal>
              </div>
            </div>
          </div>
        </div>

        <div className="mt-16 grid gap-6 text-ui text-tertiary md:grid-cols-2">
          <span>Features</span>
          <div className="flex gap-12">
            <ul className="space-y-2"><li>Assistant +</li><li>Sorting +</li></ul>
            <ul className="space-y-2 border-l border-hairline pl-12"><li>Requests +</li><li>Questions +</li></ul>
          </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 Obsidian Precision

The whole style →

Bold Colour Testimonial Cards

Testimonials

Mono Uppercase Feature Tab List with Document Preview

Tab bars

Nested Initiatives Table

Tables

Quarterly Roadmap Board

Cards

Blur-In Word Hero with Floating App Window

Heroes

Frosted Hairline Header

Headers & nav bars