Expert Hero 1
Expert authority hero: the presenter's promise as one huge quote beside a cut-out portrait that breaks out of a colour block, with one book-a-call action that stays one tap away.
Use it in a prompt
Use hero/expert-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/expert-hero.tsx. - Import it and pass your copy and images (Props tab):
import { ExpertHero } from "@/components/funneldna/hero/expert-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/expert-hero/component.tsx 755 lines
// layout: quote-led
// Expert authority hero: the presenter's promise as one huge quote beside a cut-out portrait that breaks out of a colour block, with one book-a-call action that stays one tap away.
import * as React from 'react';
import { BadgeCheck, CalendarCheck, ChevronDown, X } from 'lucide-react';
export type ExpertHeroStep = {
/** Short step name, set bold. */
title: string;
/** One sentence under the title. */
detail?: string;
};
export type ExpertHeroCopy = {
/** Label of the disclosure under the button. */
stepsToggle?: string;
/** Accessible name of the disclosure panel. */
stepsLabel?: string;
/** Accessible name of the credentials list. */
credentialsLabel?: string;
/** Portrait alt template; {name} is replaced with presenterName. */
portraitAlt?: string;
/** Portrait alt when no presenter name is given. */
portraitAltFallback?: string;
/** Accessible name of the sticky bar. */
stickyRegion?: string;
/** Accessible label of the sticky bar's close button. */
stickyClose?: string;
};
export type ExpertHeroProps = {
/** The presenter's promise in their own words; renders as the page h1. */
quote?: React.ReactNode;
/** A phrase inside a string quote, set in the accent colour. */
emphasis?: string;
/** Shown under the quote after a dash; also leads the sticky bar. Empty hides it. */
presenterName?: string;
/** Short role beside the name, in muted text. */
presenterRole?: string;
/** Supplied credentials only, one short line each. Empty by default. */
credentials?: string[];
/** Slot presenter-cutout (or presenter with portraitFit photo). */
portraitImage?: string;
/** Overrides the generated portrait alt (see copy.portraitAlt). */
portraitAlt?: string;
/** cutout: transparent image that breaks out of the colour block; photo: a rectangular photo that fills it. */
portraitFit?: 'cutout' | 'photo';
/** Book cover or podcast badge on a transparent background (slot product). */
badgeImage?: string;
badgeAlt?: string;
/** Line beside the badge; shown only with a badge image. */
badgeCaption?: string;
/** One-sentence punch lines; a single-word line is set large for emphasis. */
lines?: string[];
/** The question the button answers. */
question?: string;
/** Main button label. */
label?: string;
/** Calendar-icon line under the button. */
reassurance?: string;
/** Booking destination; renders the button as a link when set and not disabled. */
href?: string;
/** Click handler for the main and sticky buttons. */
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
/** What happens after the click, in a disclosure under the button. Empty hides it. */
steps?: ExpertHeroStep[];
/** Show a top bar with the same action once the hero action scrolls away. */
sticky?: boolean;
/** Sticky bar button label. */
stickyLabel?: string;
/** Sticky bar supporting line (the bar's title when no presenter name). */
stickyLine?: string;
/** Accessible names, disclosure label and alt templates. */
copy?: ExpertHeroCopy;
/** Forces a button state for previews. */
state?: 'default' | 'hover' | 'active' | 'disabled';
id?: string;
className?: string;
};
export function ExpertHero(props: ExpertHeroProps) {
const {
quote = 'Give me one call and I’ll map your first funnel with you.',
emphasis = 'map your first funnel',
presenterName = '',
presenterRole = '',
credentials = [],
portraitImage,
portraitAlt,
portraitFit = 'cutout',
badgeImage,
badgeAlt = '',
badgeCaption = '',
lines = ['You bring the offer.', 'We map every page your funnel needs, in one call.', 'Mapped.'],
question = 'Ready to map your first funnel?',
label = 'I’m ready, book my call',
reassurance = 'Pick a time that works for you',
href,
onAction,
steps = DEFAULT_STEPS,
sticky = false,
stickyLabel = 'Book my call',
stickyLine = 'Your first funnel, mapped in one call',
copy,
state = 'default',
id,
className,
} = props;
const text = { ...DEFAULT_COPY, ...copy };
const uid = React.useId();
const headingId = `${uid}-heading`;
const panelId = `${uid}-steps`;
const [open, setOpen] = React.useState(false);
const [barVisible, setBarVisible] = React.useState(false);
const [dismissed, setDismissed] = React.useState(false);
const toggleRef = React.useRef<HTMLButtonElement>(null);
const actionRef = React.useRef<HTMLDivElement>(null);
const hasPortrait = Boolean(portraitImage);
const disabled = state === 'disabled';
const alt =
portraitAlt ??
(presenterName ? text.portraitAlt.replace('{name}', presenterName) : text.portraitAltFallback);
React.useEffect(() => {
if (!sticky || dismissed) {
setBarVisible(false);
return;
}
const el = actionRef.current;
if (!el || typeof IntersectionObserver === 'undefined') return;
const io = new IntersectionObserver(([entry]) => {
setBarVisible(!entry.isIntersecting && entry.boundingClientRect.top < 0);
});
io.observe(el);
return () => io.disconnect();
}, [sticky, dismissed]);
const renderAction = (labelText: string, variant: 'main' | 'bar') => {
const cls = `cf-expert-hero__btn cf-expert-hero__btn--${variant}`;
if (href && !disabled) {
return (
<a className={cls} data-state={state} href={href} onClick={onAction}>
{labelText}
</a>
);
}
return (
<button type="button" className={cls} data-state={state} disabled={disabled} onClick={onAction}>
{labelText}
</button>
);
};
const onMoreKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
if (event.key === 'Escape' && open) {
event.stopPropagation();
setOpen(false);
toggleRef.current?.focus();
}
};
const onBarKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
if (event.key === 'Escape') setDismissed(true);
};
const showBar = sticky && barVisible && !dismissed;
return (
<section
id={id}
className={['cf-expert-hero', className].filter(Boolean).join(' ')}
data-portrait={hasPortrait ? 'yes' : 'no'}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<div className="cf-expert-hero__inner">
<figure className="cf-expert-hero__quote" data-reveal="" style={revealDelay(0)}>
<span className="cf-expert-hero__mark" aria-hidden="true">
“
</span>
<blockquote className="cf-expert-hero__bq">
<h1 id={headingId} className="cf-expert-hero__h1">
{withEmphasis(quote, emphasis)}
</h1>
</blockquote>
{presenterName || credentials.length > 0 ? (
<figcaption className="cf-expert-hero__by">
{presenterName ? (
<p className="cf-expert-hero__name">
<span aria-hidden="true">— </span>
{presenterName}
{presenterRole ? <span className="cf-expert-hero__role">{presenterRole}</span> : null}
</p>
) : null}
{credentials.length > 0 ? (
<ul className="cf-expert-hero__creds" aria-label={text.credentialsLabel}>
{credentials.map((item) => (
<li key={item}>
<BadgeCheck className="cf-expert-hero__ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{item}
</li>
))}
</ul>
) : null}
</figcaption>
) : null}
</figure>
{hasPortrait ? (
<div
className="cf-expert-hero__visual"
data-fit={portraitFit}
data-badge={badgeImage ? 'yes' : 'no'}
data-reveal=""
style={revealDelay(1)}
>
<div className="cf-expert-hero__stage">
<div className="cf-expert-hero__clip">
<img className="cf-expert-hero__portrait" src={portraitImage} alt={alt} loading="eager" />
</div>
{badgeImage ? <img className="cf-expert-hero__badge" src={badgeImage} alt={badgeAlt} /> : null}
</div>
{badgeImage && badgeCaption ? <p className="cf-expert-hero__badge-cap">{badgeCaption}</p> : null}
</div>
) : null}
<div className="cf-expert-hero__copy" data-reveal="" style={revealDelay(2)}>
{lines.length > 0 ? (
<div className="cf-expert-hero__lines">
{lines.map((line, i) => (
<p
key={`${i}-${line}`}
className={isOneWord(line) ? 'cf-expert-hero__punch' : 'cf-expert-hero__line'}
>
{line}
</p>
))}
</div>
) : null}
<div className="cf-expert-hero__action" ref={actionRef}>
{question ? <p className="cf-expert-hero__ask">{question}</p> : null}
{renderAction(label, 'main')}
{reassurance ? (
<p className="cf-expert-hero__assure">
<CalendarCheck className="cf-expert-hero__ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{reassurance}
</p>
) : null}
{steps.length > 0 ? (
<div className="cf-expert-hero__more" onKeyDown={onMoreKeyDown}>
<button
ref={toggleRef}
type="button"
className="cf-expert-hero__toggle"
aria-expanded={open}
aria-controls={panelId}
onClick={() => setOpen((v) => !v)}
>
{text.stepsToggle}
<ChevronDown size={18} strokeWidth={2.5} aria-hidden="true" />
</button>
<div id={panelId} className="cf-expert-hero__panel" role="region" aria-label={text.stepsLabel} hidden={!open}>
<ol className="cf-expert-hero__steps">
{steps.map((step, i) => (
<li key={`${i}-${step.title}`} className="cf-expert-hero__step">
<span className="cf-expert-hero__num" aria-hidden="true">
{i + 1}
</span>
<div>
<p className="cf-expert-hero__step-t">{step.title}</p>
{step.detail ? <p className="cf-expert-hero__step-d">{step.detail}</p> : null}
</div>
</li>
))}
</ol>
</div>
</div>
) : null}
</div>
</div>
</div>
{sticky ? (
<div
className="cf-expert-hero__bar"
data-show={showBar ? 'yes' : 'no'}
role="region"
aria-label={text.stickyRegion}
aria-hidden={showBar ? undefined : true}
onKeyDown={onBarKeyDown}
>
<div className="cf-expert-hero__bar-in">
{hasPortrait ? (
<span className="cf-expert-hero__thumb" data-fit={portraitFit}>
<img src={portraitImage} alt="" />
</span>
) : null}
<p className="cf-expert-hero__bar-text">
<strong>{presenterName || stickyLine}</strong>
{presenterName && stickyLine ? <span>{stickyLine}</span> : null}
</p>
{renderAction(stickyLabel, 'bar')}
<button
type="button"
className="cf-expert-hero__close"
aria-label={text.stickyClose}
onClick={() => setDismissed(true)}
>
<X size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
</div>
) : null}
</section>
);
}
export default ExpertHero;
const DEFAULT_STEPS: ExpertHeroStep[] = [
{ title: 'Tell me where you are', detail: 'Your offer, who it’s for and what you’ve built so far.' },
{ title: 'We map your next step', detail: 'The pages your funnel needs and the job each one does.' },
{ title: 'You leave with a plan', detail: 'A short, clear list you can start on the same day.' },
];
const DEFAULT_COPY: Required<ExpertHeroCopy> = {
stepsToggle: 'What happens on the call?',
stepsLabel: 'What happens on the call',
credentialsLabel: 'Credentials',
portraitAlt: 'Portrait of {name}',
portraitAltFallback: 'Portrait of the presenter',
stickyRegion: 'Book a call',
stickyClose: 'Hide this bar',
};
/** Wraps the first occurrence of `emphasis` in a string quote with the accent em. */
function withEmphasis(quote: React.ReactNode, emphasis?: string): React.ReactNode {
if (typeof quote !== 'string' || !emphasis) return quote;
const at = quote.indexOf(emphasis);
if (at < 0) return quote;
return (
<>
{quote.slice(0, at)}
<em className="cf-expert-hero__em">{emphasis}</em>
{quote.slice(at + emphasis.length)}
</>
);
}
function isOneWord(line: string) {
return line.trim().split(' ').filter(Boolean).length === 1;
}
/** Staggered entrance delay for each revealed column, capped at 0.28s. */
function revealDelay(index: number) {
return { ['--eh-d']: `${Math.min(index * 0.07, 0.28)}s` } as React.CSSProperties;
}
const CSS = `
.cf-expert-hero{
--eh-r: var(--radius, 12px);
--eh-shadow: var(--shadow, oklch(0.22 0.03 260));
--eh-badge-w: clamp(96px, 30%, 168px);
--eh-badge-x: clamp(-28px, -2.5vw, -10px);
position: relative;
background: var(--surface);
color: var(--ink);
font-family: var(--font-body);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
overflow-x: clip;
}
.cf-expert-hero *, .cf-expert-hero *::before, .cf-expert-hero *::after{ box-sizing: border-box; }
.cf-expert-hero__inner{
max-width: 1120px;
margin: 0 auto;
display: grid;
grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
grid-template-rows: auto 1fr;
grid-template-areas: 'quote visual' 'copy visual';
column-gap: clamp(32px, 5vw, 72px);
row-gap: clamp(24px, 3vw, 32px);
align-items: start;
}
.cf-expert-hero[data-portrait=no] .cf-expert-hero__inner{
grid-template-columns: minmax(0, 46rem);
grid-template-rows: auto auto;
grid-template-areas: 'quote' 'copy';
justify-content: center;
}
.cf-expert-hero__quote{ grid-area: quote; margin: 0; min-width: 0; }
.cf-expert-hero__mark{
display: block;
height: .5em;
margin: 0 0 8px -0.04em;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(2.5rem, 5.4vw, 4.875rem);
line-height: 1;
color: var(--accent-fill, var(--accent));
}
.cf-expert-hero__bq{ margin: 0; }
.cf-expert-hero__h1{
margin: 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
letter-spacing: var(--display-tracking, -0.025em);
font-size: clamp(2.5rem, 5.4vw, 4.875rem);
line-height: 1.04;
color: var(--ink);
text-wrap: balance;
}
.cf-expert-hero__em{ font-style: normal; color: var(--accent); }
.cf-expert-hero__by{ margin-top: clamp(16px, 1.6vw, 24px); display: grid; gap: 8px; }
.cf-expert-hero__name{
margin: 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--ink);
text-wrap: balance;
}
.cf-expert-hero__role{
display: inline-block;
margin-inline-start: .5em;
font-family: var(--font-body);
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
font-weight: 600;
letter-spacing: 0;
color: var(--muted);
}
.cf-expert-hero__creds{
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 6px 20px;
font-size: .9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted);
}
.cf-expert-hero__creds li{ min-width: 0; text-wrap: pretty; }
.cf-expert-hero__ico{
display: inline-block;
vertical-align: -0.18em;
margin-inline-end: .4em;
color: var(--accent);
}
.cf-expert-hero__visual{ grid-area: visual; min-width: 0; padding-top: clamp(48px, 6vw, 84px); }
.cf-expert-hero__visual[data-badge=yes]{ padding-bottom: 12px; }
.cf-expert-hero__stage{
position: relative;
aspect-ratio: 4 / 5;
border-radius: var(--eh-r);
background:
radial-gradient(120% 78% at 50% 16%, oklch(from var(--band) calc(max(l, 0.27) + 0.1) c h / .92), oklch(from var(--band) max(l, 0.27) c h / 0) 64%),
oklch(from var(--band) max(l, 0.27) c h);
box-shadow:
inset 0 1px 0 oklch(from var(--band) calc(max(l, 0.27) + 0.12) c h / .7),
inset 0 0 0 1px oklch(from var(--band-ink) l c h / .08),
var(--shadow-md, 0 1px 2px oklch(from var(--eh-shadow) l c h / .22), 0 4px 10px -2px oklch(from var(--eh-shadow) l c h / .2));
}
.cf-expert-hero__clip{
position: absolute;
inset: 0;
clip-path: inset(-22% 0 0 0 round 0 0 var(--eh-r) var(--eh-r));
}
.cf-expert-hero__portrait{
position: absolute;
left: 0;
right: 0;
bottom: 0;
display: block;
width: 100%;
height: 118%;
object-fit: cover;
object-position: 50% 100%;
filter: drop-shadow(0 2px 3px oklch(from var(--eh-shadow) l c h / .3));
}
.cf-expert-hero__visual[data-fit=photo]{ padding-top: 0; }
.cf-expert-hero__visual[data-fit=photo] .cf-expert-hero__clip{ clip-path: none; overflow: hidden; border-radius: var(--eh-r); }
.cf-expert-hero__visual[data-fit=photo] .cf-expert-hero__portrait{ height: 100%; object-position: 50% 25%; filter: none; }
.cf-expert-hero__badge{
position: absolute;
z-index: 2;
left: var(--eh-badge-x);
bottom: -28px;
width: var(--eh-badge-w);
aspect-ratio: 1;
object-fit: contain;
object-position: 0 100%;
filter: drop-shadow(0 2px 3px oklch(from var(--eh-shadow) l c h / .35)) drop-shadow(0 12px 14px oklch(from var(--eh-shadow) l c h / .28));
}
.cf-expert-hero__badge-cap{
margin: 12px 0 0;
padding-inline-start: calc(var(--eh-badge-w) + var(--eh-badge-x) + 16px);
min-height: 24px;
font-size: .9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted);
text-wrap: pretty;
}
.cf-expert-hero__copy{ grid-area: copy; min-width: 0; display: grid; gap: clamp(32px, 3.4vw, 40px); align-content: start; }
.cf-expert-hero__lines{ display: grid; gap: 8px; }
.cf-expert-hero__line{
margin: 0;
max-width: 34em;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--ink);
text-wrap: pretty;
}
.cf-expert-hero__punch{
margin: 4px 0 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--ink);
}
.cf-expert-hero__action{ display: grid; gap: 12px; justify-items: stretch; width: 100%; max-width: 26rem; }
.cf-expert-hero__ask{
margin: 0 0 4px;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--ink);
text-wrap: balance;
}
.cf-expert-hero__assure{
margin: 0;
font-size: .9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted);
text-wrap: pretty;
}
.cf-expert-hero__btn{
--eh-b: var(--button-bg, var(--cta));
--eh-b2: var(--button-bg-2, var(--cta-2));
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
min-height: 72px;
margin: 0;
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-wrap: balance;
text-decoration: none;
color: var(--button-ink, var(--cta-ink));
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--eh-b) calc(l + 0.04) c h), oklch(from var(--eh-b2) calc(l - 0.02) c h));
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--eh-b) calc(l + 0.14) c h / .7),
inset 0 -3px 0 oklch(from var(--eh-b) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--eh-shadow) l c h / .3),
0 8px 16px -6px oklch(from var(--eh-shadow) l c h / .45));
cursor: pointer;
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
-webkit-tap-highlight-color: transparent;
}
.cf-expert-hero__btn--main{ width: 100%; }
.cf-expert-hero__btn:not(:disabled):hover, .cf-expert-hero__btn[data-state=hover]:not(:disabled){
transform: translateY(-1px);
background: linear-gradient(oklch(from var(--eh-b) calc(l - 0.01) c h), oklch(from var(--eh-b2) calc(l - 0.07) c h));
box-shadow:
inset 0 1px 0 oklch(from var(--eh-b) calc(l + 0.12) c h / .7),
inset 0 -3px 0 oklch(from var(--eh-b) calc(l - 0.18) c h),
0 1px 2px oklch(from var(--eh-shadow) l c h / .32),
0 12px 20px -8px oklch(from var(--eh-shadow) l c h / .5);
}
.cf-expert-hero__btn:not(:disabled):active, .cf-expert-hero__btn[data-state=active]:not(:disabled){
transform: translateY(1px);
background: linear-gradient(oklch(from var(--eh-b) calc(l - 0.06) c h), oklch(from var(--eh-b2) calc(l - 0.08) c h));
box-shadow:
inset 0 2px 4px oklch(from var(--eh-b) calc(l - 0.2) c h / .55),
inset 0 -2px 0 oklch(from var(--eh-b) calc(l - 0.16) c h),
0 1px 1px oklch(from var(--eh-shadow) l c h / .3);
}
.cf-expert-hero__btn:focus-visible{ outline: 3px solid var(--field-focus, var(--accent)); outline-offset: 3px; }
.cf-expert-hero__btn:disabled{
cursor: not-allowed;
transform: none;
background: var(--secondary, color-mix(in oklch, var(--ink) 10%, var(--surface)));
color: var(--secondary-ink, var(--ink));
text-shadow: none;
box-shadow: inset 0 -2px 0 oklch(from var(--secondary, oklch(0.93 0.015 263)) calc(l - 0.1) c h);
}
.cf-expert-hero__more{ justify-self: stretch; display: grid; gap: 12px; justify-items: start; margin-top: 4px; }
.cf-expert-hero__toggle{
appearance: none;
display: inline-flex;
align-items: center;
justify-self: start;
text-align: left;
gap: 8px;
min-height: 44px;
margin: 0 0 0 -4px;
padding: 8px 4px;
border: 0;
border-radius: var(--button-radius, 8px);
background: none;
font: inherit;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
font-weight: 700;
color: var(--link, var(--accent));
text-decoration: underline;
text-decoration-color: oklch(from var(--link, var(--accent)) l c h / .45);
text-underline-offset: .18em;
cursor: pointer;
}
.cf-expert-hero__toggle:hover{ color: oklch(from var(--link, var(--accent)) calc(l - 0.08) c h); text-decoration-color: currentColor; }
.cf-expert-hero__toggle:focus-visible{ outline: 3px solid var(--field-focus, var(--accent)); outline-offset: 2px; }
.cf-expert-hero__toggle svg{ flex: none; transition: transform .2s ease; }
.cf-expert-hero__toggle[aria-expanded=true] svg{ transform: rotate(180deg); }
.cf-expert-hero__panel{
width: 100%;
max-width: 36rem;
padding: clamp(20px, 3vw, 28px);
border-radius: var(--eh-r);
background: color-mix(in oklch, var(--ink) 5%, var(--surface));
}
.cf-expert-hero__panel[hidden]{ display: none; }
.cf-expert-hero__panel:not([hidden]){ animation: cf-eh-rise .3s cubic-bezier(.2,.7,.2,1) both; }
.cf-expert-hero__steps{ list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.cf-expert-hero__step{ display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 12px; align-items: baseline; }
.cf-expert-hero__num{
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1;
color: var(--accent);
font-variant-numeric: tabular-nums;
}
.cf-expert-hero__step-t{ margin: 0; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.35; font-weight: 800; color: var(--ink); }
.cf-expert-hero__step-d{ margin: 4px 0 0; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.cf-expert-hero__bar{
position: fixed;
z-index: 60;
top: 0;
left: 0;
right: 0;
background: var(--card);
color: var(--ink);
border-bottom: 1px solid var(--card-border, oklch(from var(--ink) l c h / .12));
box-shadow: var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(from var(--eh-shadow) l c h / .22), 0 4px 10px -2px oklch(from var(--eh-shadow) l c h / .2)));
transform: translateY(-110%);
visibility: hidden;
transition: transform .28s cubic-bezier(.2,.7,.2,1), visibility 0s linear .28s;
}
.cf-expert-hero__bar[data-show=yes]{
transform: none;
visibility: visible;
transition: transform .28s cubic-bezier(.2,.7,.2,1), visibility 0s;
}
.cf-expert-hero__bar-in{
max-width: 1120px;
margin: 0 auto;
padding: 10px clamp(16px, 5vw, 48px);
display: flex;
align-items: center;
gap: 16px;
}
.cf-expert-hero__thumb{
flex: none;
position: relative;
width: 44px;
height: 44px;
border-radius: 8px;
overflow: hidden;
background: var(--band);
}
.cf-expert-hero__thumb img{ display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.cf-expert-hero__thumb[data-fit=cutout] img{ transform: scale(1.6); transform-origin: 50% 12%; }
.cf-expert-hero__bar-text{ flex: 1 1 auto; min-width: 0; margin: 0; display: grid; gap: 2px; line-height: 1.25; }
.cf-expert-hero__bar-text strong{ font-size: clamp(1.0625rem, 1.25vw, 1.125rem); font-weight: 800; color: var(--ink); text-wrap: balance; }
.cf-expert-hero__bar-text span{ font-size: .9375rem; font-weight: 500; color: var(--muted); text-wrap: pretty; }
.cf-expert-hero__btn--bar{ flex: none; min-height: 48px; padding: 0 22px; font-size: 1.125rem; white-space: nowrap; }
.cf-expert-hero__close{
flex: none;
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
margin: 0 -8px 0 0;
padding: 0;
border: 0;
border-radius: 999px;
background: none;
color: var(--muted);
cursor: pointer;
transition: background .16s ease, color .16s ease;
}
.cf-expert-hero__close:hover{
background: var(--button-2-bg, var(--secondary, color-mix(in oklch, var(--ink) 6%, var(--card))));
color: var(--button-2-ink, var(--secondary-ink, var(--ink)));
}
.cf-expert-hero__close:focus-visible{ outline: 3px solid var(--field-focus, var(--accent)); outline-offset: 1px; }
@keyframes cf-eh-rise{ from{ opacity: .82; transform: translateY(8px); } to{ opacity: 1; transform: none; } }
.cf-expert-hero [data-reveal]{ animation: cf-eh-rise .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--eh-d, 0s); }
@media (max-width: 760px){
.cf-expert-hero__inner{
grid-template-columns: minmax(0, 1fr);
grid-template-rows: auto;
grid-template-areas: 'quote' 'visual' 'copy';
row-gap: 24px;
}
.cf-expert-hero__visual{ padding-top: 44px; }
.cf-expert-hero__stage{ aspect-ratio: 6 / 5; }
.cf-expert-hero__visual[data-fit=photo] .cf-expert-hero__stage{ aspect-ratio: 4 / 3; }
.cf-expert-hero__copy{ gap: 24px; }
.cf-expert-hero__btn--main{ width: 100%; padding: 0 20px; }
.cf-expert-hero__bar-in{ gap: 12px; }
.cf-expert-hero__bar-text span{ display: none; }
.cf-expert-hero__btn--bar{ padding: 0 18px; }
}
@media (max-width: 420px){
.cf-expert-hero__thumb{ display: none; }
}
@media (prefers-reduced-motion: reduce){
.cf-expert-hero [data-reveal], .cf-expert-hero__panel:not([hidden]){ animation: none; }
.cf-expert-hero__btn, .cf-expert-hero__toggle svg, .cf-expert-hero__bar, .cf-expert-hero__close{ transition: none; }
.cf-expert-hero__btn:not(:disabled):hover, .cf-expert-hero__btn[data-state=hover]:not(:disabled){ transform: none; }
.cf-expert-hero__btn:not(:disabled):active, .cf-expert-hero__btn[data-state=active]:not(:disabled){ transform: none; }
}
`;
pieces/hero/expert-hero/specimen.tsx 48 lines
import __studioImage55833aa7 from "../assets/f122a436150469c4.webp";
import __studioImagea2773d18 from "../assets/9e24497567fa2951.webp";
// Specimen: quote-led expert hero with a fictional presenter, the sample kit's guide as the book badge and the sticky top bar on.
import * as React from 'react';
import { ExpertHero } from '../expert-hero';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled';
export default function ExpertHeroSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const guide = defaults.sample.items[0];
return (
<ExpertHero
state={state}
quote="Give me one call and I’ll map your first funnel with you."
emphasis="map your first funnel"
presenterName="Maya Chen"
presenterRole="Funnel strategist"
credentials={['12 years building funnels', 'Host of The Launch Desk podcast']}
portraitImage={slot('presenter-cutout', __studioImage55833aa7)}
portraitAlt="Maya Chen, funnel strategist"
portraitFit="cutout"
badgeImage={slot('product', __studioImagea2773d18)}
badgeAlt={`${guide.name} book`}
badgeCaption={`Author of the ${guide.name}`}
lines={[
'You bring the offer.',
'In one call, we map every page your funnel needs and what each one has to say.',
'Mapped.',
]}
question="Ready to map your first funnel?"
label="I’m ready, book my call"
reassurance="Pick a time that suits you · 30-minute video call"
href="#book-call"
steps={[
{ title: 'Tell me about your offer', detail: 'Who it’s for, what it costs and what you’ve tried so far.' },
{ title: 'We map your funnel', detail: 'Every page you need, in order, with the job each one does.' },
{ title: 'You leave with a plan', detail: 'A short list you can start on tonight.' },
]}
sticky
stickyLabel="Book my call"
stickyLine="Your first funnel, mapped in one call"
/>
);
}
| Name | Type | Details |
|---|---|---|
quote OptionalExpertHero |
React.ReactNode |
|
emphasis OptionalExpertHero |
string |
|
presenterName OptionalExpertHero |
string |
|
presenterRole OptionalExpertHero |
string |
|
credentials OptionalExpertHero |
string[] |
|
portraitImage OptionalExpertHero |
string |
|
portraitAlt OptionalExpertHero |
string |
|
portraitFit OptionalExpertHero |
'cutout' | 'photo' |
|
badgeImage OptionalExpertHero |
string |
|
badgeAlt OptionalExpertHero |
string |
|
badgeCaption OptionalExpertHero |
string |
|
lines OptionalExpertHero |
string[] |
|
question OptionalExpertHero |
string |
|
label OptionalExpertHero |
string |
|
reassurance OptionalExpertHero |
string |
|
href OptionalExpertHero |
string |
|
onAction OptionalExpertHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
steps OptionalExpertHero |
ExpertHeroStep[] |
|
sticky OptionalExpertHero |
boolean |
|
stickyLabel OptionalExpertHero |
string |
|
stickyLine OptionalExpertHero |
string |
|
copy OptionalExpertHero |
ExpertHeroCopy |
|
state OptionalExpertHero |
'default' | 'hover' | 'active' | 'disabled' |
|
id OptionalExpertHero |
string |
|
className OptionalExpertHero |
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-ink- Secondary button.
--card-border--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter-cutout- The presenter on a transparent background.
product- The main product shot or cover (ebook, kit, bottle).
-
9e24497567fa2951.webp
image/webp · 72.1 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f122a436150469c4.webp
image/webp · 97.4 KB