Page sections / Heroes

Inline-Chip Headline Hero

Giant tightly-tracked centered headline with small rounded media chips embedded mid-sentence (grainy photo thumbnail, analog clock with UTC, mini booking pill). Above sit a NEW pill badge linking to an announcement; below are a muted subline, dark and outlined OAuth buttons, a small footnote with copy-able code pill, and a row of AI-tool glyphs.

Rebuilt from cal.com in the Warm Paper Calendar style.

npx shadcn@latest add https://justyoink.it/r/warm-paper-calendar/blocks/headline-inline-chips-hero.json

Looks exactly like cal.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

All copy, link targets and the thumbnail (imageSrc) are props with defaults, so it renders standalone with no props. The code pill copies state-only (visual feedback); wire it to navigator.clipboard if needed.

components/headline-inline-chips-hero.tsx
"use client";

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

export default function InlineChipHeadlineHero({
  badgeLabel = "NEW",
  badgeText = "Northwind opens its public beta",
  badgeHref = "#",
  lineOneStart = "Where",
  lineOneEnd = "teams",
  lineTwoStart = "shape",
  lineTwoEnd = "the week ahead",
  subline = "Bringing calm to the calendars of busy crews everywhere.",
  primaryLabel = "Continue with Google",
  secondaryLabel = "Continue with Microsoft",
  footnoteLink = "Join with email.",
  footnoteText = "Free to try, no card needed. For bots:",
  codeText = "Open northwind.dev/api.md",
  imageSrc = "https://yoink-app.fly.dev/stock/people-2.jpg",
}: {
  badgeLabel?: string;
  badgeText?: string;
  badgeHref?: string;
  lineOneStart?: string;
  lineOneEnd?: string;
  lineTwoStart?: string;
  lineTwoEnd?: string;
  subline?: string;
  primaryLabel?: string;
  secondaryLabel?: string;
  footnoteLink?: string;
  footnoteText?: string;
  codeText?: string;
  imageSrc?: string;
}) {
  const [copied, setCopied] = useState(false);
  const chip = "inline-flex align-middle items-center rounded-lg bg-panel shadow-ring-inset";
  return (
    <section className="bg-canvas px-4 py-24 text-ink md:py-32">
      <div className="mx-auto flex max-w-5xl flex-col items-center text-center">
        <Reveal from="up">
          <a href={badgeHref} className="inline-flex items-center gap-2 rounded-md border border-hairline bg-canvas p-[3px] pr-3 text-ui transition-colors duration-100 hover:bg-panel focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">
            <span className="rounded-sm bg-panel px-2 py-1 text-caption text-muted">{badgeLabel}</span>
            <span className="text-sm">{badgeText}</span>
          </a>
        </Reveal>

        <h1 className="mt-6 font-display text-[44px] font-semibold leading-[1.1] tracking-[-0.03em] text-ink-deep sm:text-[64px] md:text-[84px]">
          <span>{lineOneStart} </span>
          <span className="relative mx-1 inline-block h-[0.8em] w-[1.4em] overflow-hidden rounded-lg align-middle">
            <img src={imageSrc} alt="Two people chatting at a table" width={120} height={69} className="h-full w-full object-cover sepia" />
            <span className="absolute inset-0 bg-ink-deep/20" />
          </span>
          <span> {lineOneEnd} </span>
          <span className={`${chip} ml-1 flex-col items-start gap-1 p-[9px] text-left align-middle`}>
            <span className="flex items-center gap-2 text-[15px] font-medium leading-none tracking-normal">Team sync <span className="rounded-sm bg-hairline px-1.5 py-0.5 text-[13px] text-muted">45m</span></span>
            <span className="flex w-full items-center gap-1.5 rounded-md bg-canvas px-2 py-1 text-[16px] font-medium leading-none tracking-normal shadow-hairline-inset"><i className="h-2 w-2 rounded-full bg-success" />9:30 AM</span>
          </span>
          <br />
          <span>{lineTwoStart} </span>
          <span className={`${chip} mx-1 gap-2 p-1 pr-4`}>
            <svg viewBox="0 0 60 60" className="h-[0.75em] w-[0.75em]" aria-hidden="true">
              <circle cx="30" cy="30" r="28" fill="#fff" stroke="currentColor" strokeOpacity=".15" />
              {/* 9:30, like the chip above */}
              <path d="M30 30L17.5 25" stroke="currentColor" strokeWidth="4" strokeLinecap="round" />
              <path d="M30 30V50" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" />
              <circle cx="30" cy="30" r="2.5" fill="currentColor" />
            </svg>
            <span className="text-[18px] font-medium tracking-normal">GMT</span>
          </span>
          <span> {lineTwoEnd}</span>
        </h1>

        <p className="mt-6 text-lead text-soft">{subline}</p>

        <div className="mt-8 flex w-full flex-col items-center justify-center gap-4 sm:flex-row">
          <a href="#" className="inline-flex h-16 w-full max-w-[312px] items-center justify-center gap-3 rounded-lg bg-ink text-xl font-medium text-canvas transition-opacity duration-150 hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ink">
            <span className="grid h-5 w-5 place-items-center rounded-full bg-canvas text-[11px] font-bold text-ink">G</span>
            {primaryLabel}
          </a>
          <a href="#" className="inline-flex h-16 w-full max-w-[312px] items-center justify-center gap-3 rounded-lg bg-canvas text-xl font-medium text-ink shadow-ring-raised transition-colors duration-color-transition hover:bg-panel focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ink">
            <span className="grid h-5 w-5 grid-cols-2 gap-px"><i className="bg-alert" /><i className="bg-success" /><i className="bg-blue" /><i className="bg-sand" /></span>
            {secondaryLabel}
          </a>
        </div>

        <p className="mt-5 flex flex-wrap items-center justify-center gap-x-1.5 gap-y-2 text-ui text-muted">
          <a href="#" className="font-medium text-ink transition-colors hover:text-muted">{footnoteLink}</a>
          <span>{footnoteText}</span>
          <button type="button" onClick={() => { setCopied(true); setTimeout(() => setCopied(false), 1500); }} className="inline-flex items-center gap-1.5 rounded-md bg-panel px-2 py-0.5 font-mono text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink" aria-label="Copy link">
            {copied ? "Copied" : codeText}
            <svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" aria-hidden="true"><rect x="3.5" y="3.5" width="6" height="6" rx="1" /><path d="M2 8V3a1 1 0 011-1h5" /></svg>
          </button>
        </p>

        <div className="mt-6 flex items-center gap-2">
          {["Assistant one", "Assistant two", "Assistant three", "Assistant four"].map((n, i) => (
            <a key={n} href="#" aria-label={n} className="grid h-10 w-10 place-items-center rounded-md transition-colors duration-150 hover:bg-[#f3f4f6] focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink">
              <svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.6" aria-hidden="true">
                {i === 0 && <path d="M10 2v16M2 10h16M4.5 4.5l11 11M15.5 4.5l-11 11" />}
                {i === 1 && <circle cx="10" cy="10" r="7" />}
                {i === 2 && <path d="M10 3l7 12H3z" />}
                {i === 3 && <rect x="4" y="4" width="12" height="12" rx="3" />}
              </svg>
            </a>
          ))}
        </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 · 3d ago
—

More from Warm Paper Calendar

The whole style →

Floating Pill Navigation Bar

Headers & nav bars

Hub-and-Spoke Integration Diagram

Animated graphics

Customer Story Accordion

Accordions

Frosted Desktop Booking Mockup

Media & mockups

Monochrome Logo Grid

Logo clouds

Step Accordion with Grain Photo

Feature sections