Inline Token Hero 1
Inline-token hero: the promise headline shows the product inside the sentence (a photo pill and a live UI chip), then the sign-up actions and the product window rising onto an angled page-colour field.
Use it in a prompt
Use hero/inline-token-hero from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/hero/inline-token-hero.tsx. - Import it and pass your copy and images (Props tab):
import { InlineTokenHero } from "@/components/funneldna/hero/inline-token-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/inline-token-hero/component.tsx 451 lines
// layout: diagonal-split
// Inline-token hero: the promise headline shows the product inside the sentence (a photo pill and a live UI chip), then the sign-up actions and the product window rising onto an angled page-colour field.
import React from "react";
import { Lock, Star, Tag } from "lucide-react";
import { Backdrop, FX_HOST } from "../fx/fx";
import interior from "../fx/backdrops/interior";
export type InlineTokenPhoto = { kind: "photo"; src?: string; alt: string };
export type InlineTokenClock = { kind: "clock"; time: string; suffix?: string };
export type InlineTokenPrice = { kind: "price"; amount: string; suffix?: string };
export type InlineTokenStars = { kind: "stars"; rating: string; suffix?: string };
export type InlineToken = InlineTokenPhoto | InlineTokenClock | InlineTokenPrice | InlineTokenStars;
export type InlineTokenHeroAction = "primary" | "secondary" | "email";
export type InlineTokenHeroProps = {
// The headline as words and inline tokens, read in order; a token stays on the line with the word after it
headline?: Array<string | InlineToken>;
// One short sentence per line under the headline
leadLines?: string[];
// A single-word punch line after the lead ("Booked.")
punch?: string;
primaryLabel?: string;
primaryHref?: string;
secondaryLabel?: string;
secondaryHref?: string;
// Official provider mark shown in the secondary button
secondaryMark?: "google" | "microsoft" | "none";
// Quiet text link in the terms line (e.g. "Sign up with email")
emailLabel?: string;
emailHref?: string;
// Terms or reassurance after the email link; empty by default so a page states only its own facts
terms?: string;
// Product screen shown in the window (slot: product); the window is omitted without it
screenImage?: string;
screenAlt?: string;
// Address shown in the window bar
windowUrl?: string;
// Backdrop photo behind the band (an fx backdrop asset; a page scene image replaces it)
backdropImage?: string;
onAction?: (action: InlineTokenHeroAction) => void;
state?: "default" | "hover" | "active" | "disabled";
disabled?: boolean;
className?: string;
};
const DEFAULT_HEADLINE: Array<string | InlineToken> = [
"Where",
{ kind: "photo", alt: "A client arriving for a booked session" },
"clients find",
{ kind: "clock", time: "9:00", suffix: "AM" },
"the time to book",
];
export function InlineTokenHero(props: InlineTokenHeroProps) {
const {
headline = DEFAULT_HEADLINE,
leadLines = ["Share one link.", "Clients pick a time that suits them."],
punch = "Booked.",
primaryLabel = "Create my booking page",
primaryHref,
secondaryLabel = "Continue with Google",
secondaryHref,
secondaryMark = "google",
emailLabel = "Sign up with email",
emailHref,
terms = "",
screenImage,
screenAlt = "Your booking page with a calendar and open class times",
windowUrl = "yourstudio.com/book",
backdropImage = interior,
onAction,
state = "default",
disabled = false,
className,
} = props;
const headingId = React.useId();
const isDisabled = disabled || state === "disabled";
const forced = state === "hover" ? " is-hover" : state === "active" ? " is-active" : "";
const rootClass = "cf-inline-token-hero" + (screenImage ? "" : " is-bare") + (className ? " " + className : "");
return (
<section className={rootClass} style={FX_HOST} aria-labelledby={headingId}>
<style>{CSS}</style>
<Backdrop src={backdropImage} treatment="scrim-dark" />
<div className="ith-top">
<h1 id={headingId} className="ith-h1">
{renderHeadline(headline, backdropImage)}
</h1>
{leadLines.length > 0 || punch ? (
<p className="ith-lead">
{leadLines.map((line, i) => (
<span key={i} className="ith-lead-line">
{line}
</span>
))}
{punch ? <strong className="ith-punch">{punch}</strong> : null}
</p>
) : null}
<div className="ith-actions">
<ActionControl
className={"ith-btn ith-btn--primary" + forced}
href={primaryHref}
disabled={isDisabled}
onClick={() => onAction?.("primary")}
>
<span className="ith-btn-label">{primaryLabel}</span>
</ActionControl>
{secondaryLabel ? (
<ActionControl
className={"ith-btn ith-btn--secondary" + forced}
href={secondaryHref}
disabled={isDisabled}
onClick={() => onAction?.("secondary")}
>
{secondaryMark === "google" ? <GoogleMark /> : null}
{secondaryMark === "microsoft" ? <MicrosoftMark /> : null}
<span className="ith-btn-label">{secondaryLabel}</span>
</ActionControl>
) : null}
</div>
{emailLabel || terms ? (
<p className="ith-terms">
{emailLabel ? (
<TextAction href={emailHref} disabled={isDisabled} onClick={() => onAction?.("email")}>
{emailLabel}
</TextAction>
) : null}
{emailLabel && terms ? <span aria-hidden="true"> · </span> : null}
{terms}
</p>
) : null}
</div>
{screenImage ? (
<div className="ith-stage">
<div className="ith-field" aria-hidden="true" />
<figure className="ith-window">
<div className="ith-bar" aria-hidden="true">
<span className="ith-dots">
<span />
<span />
<span />
</span>
{windowUrl ? (
<span className="ith-address">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
<span className="ith-url">{windowUrl}</span>
</span>
) : (
<span />
)}
<span />
</div>
<img className="ith-screen" src={screenImage} alt={screenAlt} width={1600} height={1000} />
</figure>
</div>
) : null}
</section>
);
}
export default InlineTokenHero;
function renderHeadline(segments: Array<string | InlineToken>, fallbackPhoto: string) {
const out: React.ReactNode[] = [];
let skip = -1;
let tokenCount = 0;
segments.forEach((seg, i) => {
const space = out.length ? " " : "";
if (typeof seg === "string") {
let words = seg.trim().split(" ").filter(Boolean);
if (skip === i) words = words.slice(1);
if (words.length) out.push(<React.Fragment key={i}>{space + words.join(" ")}</React.Fragment>);
return;
}
const next = segments[i + 1];
let glued = "";
if (typeof next === "string") {
const first = next.trim().split(" ").filter(Boolean)[0];
if (first) {
glued = first;
skip = i + 1;
}
}
const delay = 0.42 + tokenCount * 0.14;
tokenCount += 1;
out.push(
<React.Fragment key={i}>
{space}
<span className="ith-glue">
<TokenView token={seg} delay={delay} fallbackPhoto={fallbackPhoto} />
{glued ? " " + glued : null}
</span>
</React.Fragment>
);
});
return out;
}
const TICKS = Array.from({ length: 12 }, (_, i) => i);
function parseTime(time: string) {
const parts = time.split(":");
const h = parseInt(parts[0], 10);
const m = parts.length > 1 ? parseInt(parts[1], 10) : 0;
return { h: Number.isFinite(h) ? h : 9, m: Number.isFinite(m) ? m : 0 };
}
function TokenView({ token, delay, fallbackPhoto }: { token: InlineToken; delay: number; fallbackPhoto: string }) {
const style = { "--d": delay + "s" } as React.CSSProperties;
if (token.kind === "photo") {
return (
<span className="ith-tok ith-photo" style={style} aria-hidden="true">
<img src={token.src || fallbackPhoto} alt={token.alt} />
</span>
);
}
if (token.kind === "clock") {
const { h, m } = parseTime(token.time);
const hourAngle = (h % 12) * 30 + m * 0.5;
const minuteAngle = m * 6;
return (
<span className="ith-tok ith-chip" style={style} aria-hidden="true">
<span className="ith-chip-in">
<span className="ith-clock">
{TICKS.map((t) => (
<span
key={t}
className={"ith-tick" + (t % 3 === 0 ? " is-major" : "")}
style={{ transform: "rotate(" + t * 30 + "deg)" }}
/>
))}
<span className="ith-hand ith-hand--h" style={{ "--a": hourAngle + "deg" } as React.CSSProperties} />
<span className="ith-hand ith-hand--m" style={{ "--a": minuteAngle + "deg" } as React.CSSProperties} />
<span className="ith-pin" />
</span>
<span className="ith-chip-text">
{token.time}
{token.suffix ? <span className="ith-chip-sub">{" " + token.suffix}</span> : null}
</span>
</span>
</span>
);
}
const isStars = token.kind === "stars";
return (
<span className="ith-tok ith-chip" style={style} aria-hidden="true">
<span className="ith-chip-in">
{isStars ? (
<Star className="ith-chip-icon ith-star" fill="currentColor" strokeWidth={2.5} aria-hidden="true" />
) : (
<Tag className="ith-chip-icon" strokeWidth={2.5} aria-hidden="true" />
)}
<span className="ith-chip-text">
{token.kind === "stars" ? token.rating : token.amount}
{token.suffix ? <span className="ith-chip-sub">{" " + token.suffix}</span> : null}
</span>
</span>
</span>
);
}
function ActionControl({
className,
href,
disabled,
onClick,
children,
}: {
className: string;
href?: string;
disabled?: boolean;
onClick: () => void;
children: React.ReactNode;
}) {
if (href && !disabled) {
return (
<a
className={className}
href={href}
onClick={onClick}
style={{ borderRadius: "var(--button-radius, var(--radius, 12px))", fontFamily: "var(--button-font, var(--font-display))" }}
>
{children}
</a>
);
}
return (
<button
type="button"
className={className}
disabled={disabled}
onClick={onClick}
style={{ borderRadius: "var(--button-radius, var(--radius, 12px))", fontFamily: "var(--button-font, var(--font-display))" }}
>
{children}
</button>
);
}
// The quiet "sign up with email" link: always a text link (never a button shape), so it stays below the two CTAs.
function TextAction({
href,
disabled,
onClick,
children,
}: {
href?: string;
disabled?: boolean;
onClick: () => void;
children: React.ReactNode;
}) {
if (disabled) {
return (
<a className="ith-link" role="link" aria-disabled="true">
{children}
</a>
);
}
if (href) {
return (
<a className="ith-link" href={href} onClick={onClick}>
{children}
</a>
);
}
return (
<a
className="ith-link"
role="button"
tabIndex={0}
onClick={onClick}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
onClick();
}
}}
>
{children}
</a>
);
}
// Official Google mark: keeps its official colours (theme-contract exception for provider marks).
function GoogleMark() {
return (
<svg className="ith-mark" viewBox="0 0 48 48" aria-hidden="true" data-official-mark="Google">
<path fill="#FFC107" d="M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z" />
<path fill="#FF3D00" d="m6.306 14.691 6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z" />
<path fill="#4CAF50" d="M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.91 11.91 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z" />
<path fill="#1976D2" d="M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z" />
</svg>
);
}
// Official Microsoft mark: keeps its official colours (theme-contract exception for provider marks).
function MicrosoftMark() {
return (
<svg className="ith-mark" viewBox="0 0 22 22" aria-hidden="true" data-official-mark="Microsoft">
<rect x="0" y="0" width="10" height="10" fill="#F25022" />
<rect x="12" y="0" width="10" height="10" fill="#7FBA00" />
<rect x="0" y="12" width="10" height="10" fill="#00A4EF" />
<rect x="12" y="12" width="10" height="10" fill="#FFB900" />
</svg>
);
}
const CSS = `
.cf-inline-token-hero{position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body)}
.cf-inline-token-hero *,.cf-inline-token-hero *::before,.cf-inline-token-hero *::after{box-sizing:border-box}
.cf-inline-token-hero .ith-top{position:relative;z-index:1;max-width:1120px;margin:0 auto;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) 0;text-align:center}
.cf-inline-token-hero.is-bare .ith-top{padding-bottom:clamp(64px,8.5vw,120px)}
.cf-inline-token-hero .ith-h1{margin:0 auto;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.08;text-wrap:balance;color:var(--band-ink);animation:cf-ith-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-inline-token-hero .ith-glue{white-space:nowrap}
.cf-inline-token-hero .ith-tok{display:inline-block;height:.82em;vertical-align:-0.08em;overflow:hidden;transform-origin:50% 60%;animation:cf-ith-pop .3s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--d,.42s)}
.cf-inline-token-hero .ith-photo{width:1.5em;border-radius:min(var(--radius,12px),.22em);background:oklch(from var(--band) calc(l + .08) c h)}
.cf-inline-token-hero .ith-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.cf-inline-token-hero .ith-chip{border-radius:min(var(--radius,12px),.22em);background:oklch(from var(--band) calc(l + .08) c h);box-shadow:inset 0 0 0 1px oklch(from var(--band-ink) l c h / .18),inset 0 1px 0 oklch(from var(--band-ink) l c h / .12);color:var(--band-ink)}
.cf-inline-token-hero .ith-chip-in{display:flex;align-items:center;gap:.12em;height:100%;padding:0 .2em 0 .13em}
.cf-inline-token-hero .ith-chip-text{font-size:max(14px,.3em);font-weight:800;letter-spacing:0;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-inline-token-hero .ith-chip-sub{font-weight:700;color:color-mix(in oklch,var(--band-ink) 80%,var(--band))}
.cf-inline-token-hero .ith-chip-icon{flex:none;width:max(16px,.32em);height:max(16px,.32em)}
.cf-inline-token-hero .ith-star{color:var(--accent-fill,var(--accent))}
.cf-inline-token-hero .ith-clock{position:relative;flex:none;width:.56em;height:.56em;border-radius:50%;background:var(--card);box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .18)}
.cf-inline-token-hero .ith-tick{position:absolute;inset:0}
.cf-inline-token-hero .ith-tick::before{content:"";position:absolute;left:50%;top:.04em;width:max(1px,.016em);height:.04em;transform:translateX(-50%);border-radius:1px;background:color-mix(in oklch,var(--ink) 40%,var(--card))}
.cf-inline-token-hero .ith-tick.is-major::before{width:max(1.5px,.024em);height:.07em;background:var(--ink)}
.cf-inline-token-hero .ith-hand{position:absolute;left:50%;bottom:50%;width:max(1.5px,.028em);margin-left:calc(max(1.5px,.028em) / -2);border-radius:99px;background:var(--ink);transform-origin:50% 100%;transform:rotate(var(--a))}
.cf-inline-token-hero .ith-hand--h{height:.14em;animation:cf-ith-sweep-h .8s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--d,.42s)}
.cf-inline-token-hero .ith-hand--m{height:.21em;animation:cf-ith-sweep-m .8s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--d,.42s)}
.cf-inline-token-hero .ith-pin{position:absolute;left:50%;top:50%;width:.07em;height:.07em;transform:translate(-50%,-50%);border-radius:50%;background:var(--accent-fill,var(--accent))}
.cf-inline-token-hero .ith-lead{margin:24px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:color-mix(in oklch,var(--band-ink) 86%,var(--band));text-wrap:pretty}
.cf-inline-token-hero .ith-lead-line{display:block}
.cf-inline-token-hero .ith-punch{display:block;margin-top:8px;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--band-ink)}
.cf-inline-token-hero .ith-actions{margin-top:32px;display:flex;justify-content:center;flex-wrap:wrap;gap:12px}
.cf-inline-token-hero .ith-btn{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:72px;min-width:min(100%,300px);padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;letter-spacing:0;text-decoration:none;white-space:nowrap;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-inline-token-hero .ith-btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-inline-token-hero .ith-btn--primary{color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .35),0 8px 16px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .5))}
.cf-inline-token-hero .ith-btn--primary:not(:disabled):hover,.cf-inline-token-hero .ith-btn--primary.is-hover:not(:disabled){transform:translateY(-1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .18) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .4),0 10px 18px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .6))}
.cf-inline-token-hero .ith-btn--primary:not(:disabled):active,.cf-inline-token-hero .ith-btn--primary.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .2) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .35)}
.cf-inline-token-hero .ith-btn--secondary{color:var(--button-2-ink,var(--secondary-ink));background:var(--button-2-bg,var(--secondary));box-shadow:var(--button-2-shadow,var(--shadow-sm));outline:1px solid var(--button-2-border,transparent);outline-offset:-1px}
.cf-inline-token-hero .ith-btn--secondary:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-inline-token-hero .ith-btn--secondary:not(:disabled):hover,.cf-inline-token-hero .ith-btn--secondary.is-hover:not(:disabled){transform:translateY(-1px);background:color-mix(in oklch,var(--button-2-bg,var(--secondary)) 90%,var(--button-2-ink,var(--secondary-ink)))}
.cf-inline-token-hero .ith-btn--secondary:not(:disabled):active,.cf-inline-token-hero .ith-btn--secondary.is-active:not(:disabled){transform:translateY(1px);background:color-mix(in oklch,var(--button-2-bg,var(--secondary)) 84%,var(--button-2-ink,var(--secondary-ink)));box-shadow:inset 0 2px 3px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .22)}
.cf-inline-token-hero .ith-btn:disabled{cursor:not-allowed;transform:none;background:oklch(from var(--band) calc(l + .14) c h);color:color-mix(in oklch,var(--band-ink) 74%,var(--band));text-shadow:none;box-shadow:none;outline:0}
.cf-inline-token-hero .ith-btn:disabled .ith-mark{opacity:.55}
.cf-inline-token-hero .ith-mark{flex:none;width:22px;height:22px}
.cf-inline-token-hero .ith-terms{margin:16px auto 0;max-width:40rem;font-size:15px;line-height:1.4;font-weight:500;color:color-mix(in oklch,var(--band-ink) 82%,var(--band));text-wrap:pretty}
.cf-inline-token-hero .ith-link{font-weight:700;color:var(--band-ink);text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / .5);text-underline-offset:.18em;cursor:pointer;transition:text-decoration-color .16s ease}
.cf-inline-token-hero .ith-link:hover{text-decoration-color:var(--band-ink)}
.cf-inline-token-hero .ith-link:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px;border-radius:4px}
.cf-inline-token-hero .ith-link[aria-disabled="true"]{cursor:not-allowed;text-decoration-color:oklch(from var(--band-ink) l c h / .3)}
.cf-inline-token-hero .ith-stage{position:relative;margin-top:clamp(48px,6vw,72px);padding:0 clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-inline-token-hero .ith-field{position:absolute;inset:34% 0 0 0;z-index:0;background:var(--surface);clip-path:polygon(0 22%,100% 0,100% 100%,0 100%)}
.cf-inline-token-hero .ith-window{position:relative;z-index:1;max-width:1040px;margin:0 auto;overflow:hidden;background:var(--card);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32)));animation:cf-ith-window .45s .2s cubic-bezier(.2,.7,.2,1) both}
.cf-inline-token-hero .ith-bar{display:grid;grid-template-columns:1fr minmax(0,auto) 1fr;align-items:center;gap:12px;padding:12px 16px;background:color-mix(in oklch,var(--ink) 3%,var(--card));border-bottom:1px solid oklch(from var(--ink) l c h / .1)}
.cf-inline-token-hero .ith-dots{display:flex;gap:8px}
.cf-inline-token-hero .ith-dots span{width:12px;height:12px;border-radius:50%;background:color-mix(in oklch,var(--ink) 18%,var(--card))}
.cf-inline-token-hero .ith-address{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%;min-height:32px;padding:4px 16px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--muted);font-size:14px;line-height:1.2;font-weight:600}
.cf-inline-token-hero .ith-address svg{flex:none}
.cf-inline-token-hero .ith-url{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
.cf-inline-token-hero .ith-screen{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:top center;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
@keyframes cf-ith-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-ith-pop{from{opacity:.82;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
@keyframes cf-ith-sweep-m{from{transform:rotate(calc(var(--a) - 150deg))}to{transform:rotate(var(--a))}}
@keyframes cf-ith-sweep-h{from{transform:rotate(calc(var(--a) - 30deg))}to{transform:rotate(var(--a))}}
@keyframes cf-ith-window{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:560px){
.cf-inline-token-hero .ith-h1{line-height:1.1}
.cf-inline-token-hero .ith-actions{flex-direction:column;align-items:stretch}
.cf-inline-token-hero .ith-btn{width:100%;min-width:0;min-height:64px;padding:0 20px;white-space:normal;text-align:center}
.cf-inline-token-hero .ith-field{inset:40% 0 0 0;clip-path:polygon(0 14%,100% 0,100% 100%,0 100%)}
.cf-inline-token-hero .ith-bar{padding:10px 12px;gap:8px}
.cf-inline-token-hero .ith-dots{gap:6px}
.cf-inline-token-hero .ith-dots span{width:10px;height:10px}
.cf-inline-token-hero .ith-address{padding:4px 12px}
.cf-inline-token-hero .ith-screen{aspect-ratio:4/3}
}
@media (prefers-reduced-motion: reduce){
.cf-inline-token-hero .ith-h1,.cf-inline-token-hero .ith-tok,.cf-inline-token-hero .ith-hand--h,.cf-inline-token-hero .ith-hand--m,.cf-inline-token-hero .ith-window{animation:none}
.cf-inline-token-hero .ith-btn{transition:none}
.cf-inline-token-hero .ith-btn--primary:not(:disabled):hover,.cf-inline-token-hero .ith-btn--secondary:not(:disabled):hover,.cf-inline-token-hero .ith-btn.is-hover,.cf-inline-token-hero .ith-btn.is-active{transform:none}
}
`;
pieces/hero/inline-token-hero/specimen.tsx 50 lines
import __studioImageaa8f379c from "../assets/50031e308dbc38de.webp";
import __studioImaged0570c2b from "../assets/ee5cc8e56e79448a.webp";
import React from "react";
import { InlineTokenHero } from "../inline-token-hero";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import spa from "../../fx/backdrops/spa";
export const states = ["default", "hover", "active", "disabled"];
export default function InlineTokenHeroSpecimen({
state = "default",
}: {
state?: "default" | "hover" | "active" | "disabled";
}) {
return (
<InlineTokenHero
state={state}
headline={[
"Where",
{
kind: "photo",
src: slot(
"presenter",
__studioImaged0570c2b
),
alt: "A Studio Lumen teacher guiding a student in a morning class",
},
"your students book",
{ kind: "clock", time: "6:30", suffix: "AM" },
"their next class",
]}
leadLines={["Share one Studio Lumen link.", "Students pick a class and pay upfront."]}
punch="Booked."
primaryLabel="Build my booking page"
secondaryLabel="Continue with Google"
secondaryMark="google"
emailLabel="Sign up with email"
terms={"No card to start. " + defaults.sample.guarantee + " on paid plans."}
windowUrl="studiolumen.com/maya"
backdropImage={spa}
screenImage={slot(
"product",
__studioImageaa8f379c
)}
screenAlt="The Studio Lumen booking page: teacher profile, class calendar and open class times"
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalInlineTokenHero |
Array<string | InlineToken> |
|
leadLines OptionalInlineTokenHero |
string[] |
|
punch OptionalInlineTokenHero |
string |
|
primaryLabel OptionalInlineTokenHero |
string |
|
primaryHref OptionalInlineTokenHero |
string |
|
secondaryLabel OptionalInlineTokenHero |
string |
|
secondaryHref OptionalInlineTokenHero |
string |
|
secondaryMark OptionalInlineTokenHero |
"google" | "microsoft" | "none" |
|
emailLabel OptionalInlineTokenHero |
string |
|
emailHref OptionalInlineTokenHero |
string |
|
terms OptionalInlineTokenHero |
string |
|
screenImage OptionalInlineTokenHero |
string |
|
screenAlt OptionalInlineTokenHero |
string |
|
windowUrl OptionalInlineTokenHero |
string |
|
backdropImage OptionalInlineTokenHero |
string |
|
onAction OptionalInlineTokenHero |
(action: InlineTokenHeroAction) => void |
|
state OptionalInlineTokenHero |
"default" | "hover" | "active" | "disabled" |
|
disabled OptionalInlineTokenHero |
boolean |
|
className OptionalInlineTokenHero |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter- A photo of the host, coach or founder.
product- The main product shot or cover (ebook, kit, bottle).
-
50031e308dbc38de.webp
image/webp · 13.2 KB
-
8ce62e067659355c.webp
image/webp · 25.6 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
ee5cc8e56e79448a.webp
image/webp · 88.4 KB
-
f012a8b62d09e377.webp
image/webp · 60 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB