Rotating Audience Hero 1
Rotating audience hero: names who it is for, one audience at a time, so every visitor sees their own craft in the promise. Tapping a photo locks the headline to them, right above the one action.
Use it in a prompt
Use hero/rotating-audience-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/rotating-audience-hero.tsx. - Import it and pass your copy and images (Props tab):
import { RotatingAudienceHero } from "@/components/funneldna/hero/rotating-audience-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/rotating-audience-hero/component.tsx 403 lines
// layout: segmented-stepper
// Rotating audience hero: names who it is for, one audience at a time, so every visitor sees their own craft in the promise. Tapping a photo locks the headline to them, right above the one action.
import * as React from 'react';
import { Pause, Play } from 'lucide-react';
import { Divider, FX_HOST, Glow } from '../fx/fx';
export type RotatingAudience = {
/** Word or phrase that fills the headline slot, e.g. potters. */
label: string;
/** Letter greeting while this audience is shown, e.g. Dear potter, */
salutation?: string;
/** One sentence written to this audience. It swaps in place without moving the layout. */
line?: React.ReactNode;
/** Small photo of this audience (image slot item-n). */
image?: string;
};
export type RotatingAudienceHeroProps = {
/** Words before the rotating audience slot. */
headlinePrefix?: string;
/** Audiences named one by one in the headline slot. */
audiences?: RotatingAudience[];
/** Optional words after the audience slot. */
headlineSuffix?: string;
/** Greeting used when an audience has no salutation of its own. */
greeting?: string;
/** Letter paragraph shared by every audience. */
lead?: React.ReactNode;
/** Owner sign-off before the action. Empty renders nothing. */
signOff?: string;
actionLabel?: string;
/** One reassurance line under the button. Empty renders nothing. */
actionNote?: string;
/** Proof line under the action. Empty renders nothing. */
proof?: React.ReactNode;
href?: string;
onAction?: () => void;
disabled?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled';
/** Milliseconds each audience stays in the headline. */
interval?: number;
/** Instruction above the photo row. */
hint?: string;
pauseLabel?: string;
playLabel?: string;
/** Accessible name of the photo row. */
groupLabel?: string;
/** Word before the last audience when the list is written out (reduced motion). */
listJoin?: string;
className?: string;
};
const DEFAULT_AUDIENCES: RotatingAudience[] = [
{ label: 'coaches', salutation: 'Dear coach,' },
{ label: 'consultants', salutation: 'Dear consultant,' },
{ label: 'studio owners', salutation: 'Dear studio owner,' },
];
export function RotatingAudienceHero(props: RotatingAudienceHeroProps) {
const {
headlinePrefix = 'The booking page for',
audiences = DEFAULT_AUDIENCES,
headlineSuffix = '',
greeting = 'Dear friend,',
lead = 'One page where clients pick a time, pay up front and get a reminder, so your calendar fills while you work.',
signOff = '',
actionLabel = 'Send me my booking page',
actionNote = '',
proof,
href,
onAction,
disabled = false,
state = 'default',
interval = 2800,
hint = 'Tap yours to lock it in',
pauseLabel = 'Pause',
playLabel = 'Keep rotating',
groupLabel = 'Who it’s for',
listJoin = 'and',
className,
} = props;
const list = audiences.filter((a) => a && a.label);
const count = list.length;
const headingId = React.useId();
const reduce = usePrefersReducedMotion();
const [pos, setPos] = React.useState({ cur: 0, prev: -1 });
const [locked, setLocked] = React.useState(false);
const [held, setHeld] = React.useState(false);
const cur = count ? Math.min(pos.cur, count - 1) : 0;
const canRotate = count > 1 && !reduce;
const running = canRotate && !locked && !held;
const dwell = Math.max(1200, interval);
React.useEffect(() => {
if (!running) return undefined;
const id = window.setInterval(() => {
setPos((p) => ({ cur: (p.cur + 1) % count, prev: p.cur }));
}, dwell);
return () => window.clearInterval(id);
}, [running, count, dwell]);
const choose = (i: number) => {
setPos((p) => (p.cur === i ? p : { cur: i, prev: p.cur }));
setLocked(true);
};
const salutes = count ? list.map((a) => a.salutation || greeting) : [greeting];
const hasSalute = salutes.some(Boolean);
const oneSalute = salutes.every((s) => s === salutes[0]);
const hasLines = list.some((a) => a.line);
const hasImages = list.some((a) => Boolean(a.image));
const isDisabled = disabled || state === 'disabled';
const forced = state === 'hover' || state === 'active' ? state : undefined;
const cta = href && !isDisabled ? (
<a className='rah-cta' data-state={forced} href={href} onClick={onAction ? () => onAction() : undefined}>
{actionLabel}
</a>
) : (
<button type='button' className='rah-cta' data-state={forced} disabled={isDisabled} onClick={() => onAction?.()}>
{actionLabel}
</button>
);
const onBlurHold = (e: React.FocusEvent<HTMLDivElement>) => {
if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setHeld(false);
};
return (
<section
className={['cf-rotating-audience-hero', className].filter(Boolean).join(' ')}
style={FX_HOST}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<div className='rah-glow rah-glow--a' aria-hidden='true'>
<Glow />
</div>
<div className='rah-glow rah-glow--b' aria-hidden='true'>
<Glow />
</div>
<div className='rah-wrap'>
<div className='rah-inner'>
<h1 id={headingId} className='rah-h1'>
<span className='rah-prefix'>{headlinePrefix}</span>
{count > 0 ? ' ' : null}
{count > 0 ? (
<span className='rah-roll' aria-hidden='true'>
{list.map((a, i) => (
<span
key={i}
className='rah-word'
data-pos={i === cur ? 'active' : i === pos.prev ? 'leaving' : 'waiting'}
>
{a.label}
</span>
))}
</span>
) : null}
{count > 0 ? (
<span className='rah-list'>
{list.map((a, i) => (
<React.Fragment key={i}>
{listSeparator(i, count, listJoin)}
<span className='rah-li' data-on={i === cur ? 'true' : 'false'}>
{a.label}
</span>
</React.Fragment>
))}
</span>
) : null}
{headlineSuffix ? <span className='rah-suffix'> {headlineSuffix}</span> : null}
</h1>
<div className='rah-body'>
<div className='rah-copy'>
<div className='rah-letter'>
{hasSalute ? (
<p className='rah-salute'>
{oneSalute ? (
salutes[0]
) : (
<span className='rah-stack'>
{salutes.map((s, i) => (
<span key={i} data-on={i === cur ? 'true' : 'false'} aria-hidden={i === cur ? undefined : true}>
{s}
</span>
))}
</span>
)}
</p>
) : null}
{hasLines ? (
<p className='rah-line'>
<span className='rah-stack'>
{list.map((a, i) => (
<span key={i} data-on={i === cur ? 'true' : 'false'} aria-hidden={i === cur ? undefined : true}>
{a.line}
</span>
))}
</span>
</p>
) : null}
{lead ? <p className='rah-lead'>{lead}</p> : null}
{signOff ? <p className='rah-sign'>{signOff}</p> : null}
</div>
<div className='rah-action'>
{cta}
{actionNote ? <p className='rah-note'>{actionNote}</p> : null}
{proof ? <p className='rah-proof'>{proof}</p> : null}
</div>
</div>
{hasImages ? (
<div className='rah-photo' aria-hidden='true'>
{list.map((a, i) =>
a.image ? (
<img
key={i}
className='rah-photo-img'
data-on={i === cur ? 'true' : 'false'}
src={a.image}
alt=''
width={640}
height={512}
decoding='async'
/>
) : null,
)}
</div>
) : null}
</div>
</div>
{count > 1 ? (
<div className='rah-pick'>
<div className='rah-pickhead'>
{hint ? <p className='rah-hint'>{hint}</p> : null}
{canRotate ? (
<button type='button' className='rah-toggle' onClick={() => setLocked((l) => !l)}>
{locked ? (
<Play size={16} strokeWidth={2.5} aria-hidden='true' />
) : (
<Pause size={16} strokeWidth={2.5} aria-hidden='true' />
)}
<span>{locked ? playLabel : pauseLabel}</span>
</button>
) : null}
</div>
<div
className='rah-track'
role='group'
aria-label={groupLabel}
onMouseEnter={() => setHeld(true)}
onMouseLeave={() => setHeld(false)}
onFocus={() => setHeld(true)}
onBlur={onBlurHold}
>
{list.map((a, i) => {
const on = i === cur;
return (
<button
key={i}
type='button'
className='rah-seg'
data-on={on ? 'true' : 'false'}
data-img={a.image ? 'true' : 'false'}
aria-pressed={on}
onClick={() => choose(i)}
>
{a.image ? <img className='rah-seg-img' src={a.image} alt='' width={56} height={56} decoding='async' /> : null}
<span className='rah-seg-label'>{a.label}</span>
<span className='rah-bar' aria-hidden='true'>
{on ? (
<span
key={`${cur}-${running ? 'run' : 'still'}`}
className='rah-fill'
data-run={running ? 'true' : 'false'}
style={{ animationDuration: `${dwell}ms` }}
/>
) : null}
</span>
</button>
);
})}
</div>
</div>
) : null}
</div>
<Divider shape='angle' tone='surface' height={56} />
</section>
);
}
export default RotatingAudienceHero;
function usePrefersReducedMotion() {
const [reduce, setReduce] = React.useState(false);
React.useEffect(() => {
if (typeof window === 'undefined' || !window.matchMedia) return undefined;
const mq = window.matchMedia('(prefers-reduced-motion: reduce)');
const update = () => setReduce(mq.matches);
update();
mq.addEventListener('change', update);
return () => mq.removeEventListener('change', update);
}, []);
return reduce;
}
function listSeparator(i: number, count: number, join: string) {
if (i === 0) return '';
if (i === count - 1) return ` ${join} `;
return ', ';
}
const CSS = `
.cf-rotating-audience-hero{--rah-ink:var(--band-ink,#fff);--rah-emph:color-mix(in oklab,var(--accent-fill,var(--accent,#2f6fd6)) 52%,var(--band-ink,#fff));--rah-chip:oklch(from var(--band-ink,#fff) l c h / .08);--rah-chip-hover:oklch(from var(--band-ink,#fff) l c h / .15);--rah-hair:oklch(from var(--band-ink,#fff) l c h / .16);--rah-shade:var(--shadow,oklch(.22 .03 260));--rah-btn:var(--button-bg,var(--cta,#d6402b));--rah-btn-2:var(--button-bg-2,var(--cta-2,#b8321f));--rah-ease:cubic-bezier(.2,.7,.2,1);position:relative;isolation:isolate;overflow:hidden;background:var(--band,#13294b);color:var(--rah-ink);font-family:var(--font-body);padding-block:clamp(56px,8vw,112px) calc(clamp(64px,8.5vw,120px) + 56px);padding-inline:clamp(16px,5vw,48px)}
.cf-rotating-audience-hero *,.cf-rotating-audience-hero *::before,.cf-rotating-audience-hero *::after{box-sizing:border-box}
.cf-rotating-audience-hero .rah-glow{position:absolute;z-index:0;pointer-events:none;-webkit-mask-image:radial-gradient(closest-side,black 30%,transparent 100%);mask-image:radial-gradient(closest-side,black 30%,transparent 100%)}
.cf-rotating-audience-hero .rah-glow--a{inset-block-start:-14%;inset-inline-start:-16%;inline-size:72%;block-size:78%}
.cf-rotating-audience-hero .rah-glow--b{inset-block-end:6%;inset-inline-end:-20%;inline-size:56%;block-size:56%}
.cf-rotating-audience-hero .rah-wrap{position:relative;z-index:1;max-inline-size:1120px;margin-inline:auto;min-inline-size:0;container:rah / inline-size}
.cf-rotating-audience-hero .rah-inner{min-inline-size:0}
.cf-rotating-audience-hero .rah-h1{margin:0;color:var(--rah-ink);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);font-size:clamp(2.5rem,.75rem + 6.4cqi,4.875rem);line-height:1.04;text-wrap:balance;overflow-wrap:break-word;hyphens:manual}
.cf-rotating-audience-hero .rah-body{margin-block-start:clamp(24px,3vw,32px);display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(32px,5vw,72px);align-items:start;min-inline-size:0}
.cf-rotating-audience-hero .rah-copy{min-inline-size:0;max-inline-size:40rem}
.cf-rotating-audience-hero .rah-photo{display:none;position:relative;aspect-ratio:5 / 4;border-radius:12px;overflow:hidden;background:var(--rah-chip)}
.cf-rotating-audience-hero .rah-photo-img{position:absolute;inset:0;display:block;inline-size:100%;block-size:100%;object-fit:cover;object-position:50% 35%;opacity:0;transform:scale(1.04);transition:opacity .6s var(--rah-ease),transform 1.2s var(--rah-ease)}
.cf-rotating-audience-hero .rah-photo-img[data-on='true']{opacity:1;transform:none}
@container rah (min-width: 52rem){.cf-rotating-audience-hero .rah-body{grid-template-columns:minmax(0,40rem) minmax(0,1fr)}.cf-rotating-audience-hero .rah-photo{display:block}}
.cf-rotating-audience-hero .rah-roll{display:grid;justify-items:start;align-items:start;min-inline-size:0;overflow:hidden;padding:.24em .08em .26em;margin:-.24em -.08em -.26em;color:var(--rah-emph)}
@container rah (min-width: 48rem){.cf-rotating-audience-hero .rah-roll{display:inline-grid;vertical-align:top}}
.cf-rotating-audience-hero .rah-word{grid-area:1 / 1;min-inline-size:0;max-inline-size:100%;transition:transform .55s var(--rah-ease),opacity .4s var(--rah-ease);will-change:transform}
.cf-rotating-audience-hero .rah-word[data-pos='waiting']{transform:translateY(calc(100% + .6em));opacity:0}
.cf-rotating-audience-hero .rah-word[data-pos='leaving']{transform:translateY(calc(-100% - .6em));opacity:0}
.cf-rotating-audience-hero .rah-word[data-pos='active']{transform:none;opacity:1}
.cf-rotating-audience-hero .rah-list{position:absolute;inline-size:1px;block-size:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.cf-rotating-audience-hero .rah-li[data-on='true']{color:var(--rah-emph)}
.cf-rotating-audience-hero .rah-letter{min-inline-size:0}
.cf-rotating-audience-hero .rah-salute{margin:0 0 8px;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:700}
.cf-rotating-audience-hero .rah-line{margin:0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500}
.cf-rotating-audience-hero .rah-lead{margin:12px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:400;text-wrap:pretty}
.cf-rotating-audience-hero .rah-sign{margin:16px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-rotating-audience-hero .rah-stack{display:grid;min-inline-size:0}
.cf-rotating-audience-hero .rah-stack > span{grid-area:1 / 1;min-inline-size:0;text-wrap:pretty;overflow-wrap:anywhere;opacity:0;visibility:hidden;transition:opacity .35s var(--rah-ease),visibility 0s linear .35s}
.cf-rotating-audience-hero .rah-stack > span[data-on='true']{opacity:1;visibility:visible;transition:opacity .35s var(--rah-ease) .08s,visibility 0s}
.cf-rotating-audience-hero .rah-action{margin-block-start:clamp(24px,3vw,32px);display:grid;justify-items:stretch;gap:12px;inline-size:fit-content;max-inline-size:100%;min-inline-size:0}
.cf-rotating-audience-hero .rah-action > .rah-cta{inline-size:100%;min-inline-size:min(100%,20rem)}
.cf-rotating-audience-hero .rah-note,.cf-rotating-audience-hero .rah-proof{margin:0;min-inline-size:0;font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-rotating-audience-hero .rah-proof{font-weight:500}
.cf-rotating-audience-hero .rah-cta{display:inline-flex;align-items:center;justify-content:center;min-block-size:72px;max-inline-size:100%;min-inline-size:0;padding:14px 32px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--rah-btn) calc(l + .04) c h),oklch(from var(--rah-btn-2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink,#fff));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;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--rah-btn) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--rah-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--rah-shade) l c h / .45),0 8px 16px -6px oklch(from var(--rah-shade) l c h / .55));transition:box-shadow .16s ease,transform .16s ease;-webkit-tap-highlight-color:transparent}
.cf-rotating-audience-hero .rah-cta:not(:disabled):hover,.cf-rotating-audience-hero .rah-cta[data-state='hover']{background:linear-gradient(oklch(from var(--rah-btn) calc(l - .01) c h),oklch(from var(--rah-btn-2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--rah-btn) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--rah-btn) calc(l - .2) c h),0 1px 2px oklch(from var(--rah-shade) l c h / .5),0 10px 20px -6px oklch(from var(--rah-shade) l c h / .65))}
.cf-rotating-audience-hero .rah-cta:not(:disabled):active,.cf-rotating-audience-hero .rah-cta[data-state='active']{background:linear-gradient(oklch(from var(--rah-btn) calc(l - .04) c h),oklch(from var(--rah-btn-2) calc(l - .08) c h));transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--rah-btn) calc(l - .22) c h / .5),inset 0 -2px 0 oklch(from var(--rah-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--rah-shade) l c h / .45)}
.cf-rotating-audience-hero .rah-cta:focus-visible{outline:3px solid var(--rah-ink);outline-offset:3px}
.cf-rotating-audience-hero .rah-cta:disabled{background:var(--button-2-bg,var(--secondary,#e6e9ef));color:var(--button-2-ink,var(--secondary-ink,#16233a));text-shadow:none;cursor:not-allowed;transform:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--rah-shade) l c h / .2)))}
.cf-rotating-audience-hero .rah-pick{margin-block-start:clamp(40px,6vw,64px);min-inline-size:0}
.cf-rotating-audience-hero .rah-pickhead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin-block-end:12px;min-inline-size:0}
.cf-rotating-audience-hero .rah-hint{margin:0;min-inline-size:0;font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-rotating-audience-hero .rah-toggle{margin-inline-start:auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-block-size:44px;padding:0 16px;border-radius:var(--button-radius,var(--radius,12px));border:1px solid var(--button-2-border,transparent);background:var(--button-2-bg,var(--secondary,oklch(.93 .015 263)));color:var(--button-2-ink,var(--secondary-ink,oklch(.21 .034 263)));font-family:var(--font-body);font-size:.9375rem;font-weight:700;line-height:1.2;cursor:pointer;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--rah-shade) l c h / .2)));transition:background-color .16s ease,transform .16s ease}
.cf-rotating-audience-hero .rah-toggle svg{flex:none}
.cf-rotating-audience-hero .rah-toggle:hover{background:oklch(from var(--button-2-bg,var(--secondary,oklch(.93 .015 263))) calc(l - .05) c h)}
.cf-rotating-audience-hero .rah-toggle:active{transform:translateY(1px)}
.cf-rotating-audience-hero .rah-toggle:focus-visible{outline:3px solid var(--rah-ink);outline-offset:2px}
.cf-rotating-audience-hero .rah-track{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12.5rem),1fr));gap:8px;padding:8px;min-inline-size:0;border-radius:calc(var(--radius,12px) + 8px);background:var(--rah-chip);border:1px solid var(--rah-hair)}
.cf-rotating-audience-hero .rah-seg{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;min-inline-size:0;min-block-size:72px;padding:8px 16px 12px 8px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:transparent;color:var(--rah-ink);font-family:var(--font-body);font-size:1rem;font-weight:700;line-height:1.2;text-align:start;cursor:pointer;transition:background-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease;-webkit-tap-highlight-color:transparent}
.cf-rotating-audience-hero .rah-seg[data-img='false']{grid-template-columns:minmax(0,1fr);padding-inline:16px}
.cf-rotating-audience-hero .rah-seg:hover{background:var(--rah-chip-hover)}
.cf-rotating-audience-hero .rah-seg:active{transform:translateY(1px)}
.cf-rotating-audience-hero .rah-seg:focus-visible{outline:3px solid var(--rah-ink);outline-offset:2px}
.cf-rotating-audience-hero .rah-seg[data-on='true']{background:var(--card,#fff);color:var(--ink,#16233a);box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--rah-shade) l c h / .22),0 4px 10px -2px oklch(from var(--rah-shade) l c h / .2))}
.cf-rotating-audience-hero .rah-seg-img{display:block;inline-size:56px;block-size:56px;border-radius:8px;object-fit:cover;object-position:50% 35%;filter:saturate(.55);opacity:.82;transition:filter .2s ease,opacity .2s ease}
.cf-rotating-audience-hero .rah-seg:hover .rah-seg-img,.cf-rotating-audience-hero .rah-seg[data-on='true'] .rah-seg-img{filter:none;opacity:1}
.cf-rotating-audience-hero .rah-seg-label{min-inline-size:0;overflow-wrap:anywhere;hyphens:auto;text-wrap:pretty}
.cf-rotating-audience-hero .rah-bar{position:absolute;inset-inline:12px;inset-block-end:5px;block-size:3px;border-radius:999px;overflow:hidden;opacity:0;background:oklch(from var(--ink,#16233a) l c h / .1)}
.cf-rotating-audience-hero .rah-seg[data-on='true'] .rah-bar{opacity:1}
.cf-rotating-audience-hero .rah-fill{display:block;block-size:100%;border-radius:inherit;background:var(--accent-fill,var(--accent,#2f6fd6));transform-origin:left center;transform:scaleX(1)}
.cf-rotating-audience-hero .rah-fill[data-run='true']{animation-name:cf-rah-fill;animation-timing-function:linear;animation-fill-mode:both}
@keyframes cf-rah-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@container rah (width < 40rem){
.cf-rotating-audience-hero .rah-track{grid-template-columns:repeat(auto-fit,minmax(5rem,1fr));gap:6px;padding:6px}
.cf-rotating-audience-hero .rah-seg{grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center;gap:8px;min-block-size:56px;padding:6px 6px 14px;font-size:.875rem;font-weight:800}
.cf-rotating-audience-hero .rah-seg[data-img='false']{padding:12px 8px 16px}
.cf-rotating-audience-hero .rah-seg-img{inline-size:100%;max-inline-size:6.5rem;block-size:auto;aspect-ratio:1 / 1}
.cf-rotating-audience-hero .rah-bar{inset-inline:10px}
}
@container rah (width < 30rem){
.cf-rotating-audience-hero .rah-action{inline-size:100%}
.cf-rotating-audience-hero .rah-cta{inline-size:100%;padding-inline:20px}
}
@media (prefers-reduced-motion: reduce){
.cf-rotating-audience-hero .rah-roll{display:none}
.cf-rotating-audience-hero .rah-list{position:static;inline-size:auto;block-size:auto;margin:0;overflow:visible;clip-path:none;white-space:normal}
.cf-rotating-audience-hero .rah-toggle{display:none}
.cf-rotating-audience-hero .rah-fill[data-run='true']{animation:none}
.cf-rotating-audience-hero .rah-word,.cf-rotating-audience-hero .rah-stack > span,.cf-rotating-audience-hero .rah-stack > span[data-on='true'],.cf-rotating-audience-hero .rah-cta,.cf-rotating-audience-hero .rah-seg,.cf-rotating-audience-hero .rah-seg-img,.cf-rotating-audience-hero .rah-photo-img{transition:none}
.cf-rotating-audience-hero .rah-photo-img{transform:none}
.cf-rotating-audience-hero .rah-cta:not(:disabled):hover,.cf-rotating-audience-hero .rah-cta[data-state='hover']{transform:none}
}
`;
pieces/hero/rotating-audience-hero/specimen.tsx 54 lines
import __studioImagefc4cd47a from "../assets/b9a66ef32b1c9ada.webp";
import __studioImage4f670abd from "../assets/ce6fa1c2b6b17012.webp";
import __studioImagee039a289 from "../assets/f8788a1327f10181.webp";
// Specimen: Kiln & Co., fictional scheduling for small studios, naming potters, yoga teachers and tattoo artists one by one.
import { RotatingAudienceHero } from '../rotating-audience-hero';
import { slot } from '../../slots';
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled';
export const states = ['default', 'hover', 'active', 'disabled'];
export default function RotatingAudienceHeroSpecimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<RotatingAudienceHero
state={state}
headlinePrefix='The booking page for'
audiences={[
{
label: 'potters',
salutation: 'Dear potter,',
line: 'You’d rather be at the wheel than answering “is Saturday’s class full?” for the ninth time.',
image: slot(
'item-1',
__studioImagefc4cd47a,
),
},
{
label: 'yoga teachers',
salutation: 'Dear yoga teacher,',
line: 'You’d rather be cueing the next breath than refunding the student who forgot her 7 a.m. flow.',
image: slot(
'item-2',
__studioImage4f670abd,
),
},
{
label: 'tattoo artists',
salutation: 'Dear tattoo artist,',
line: 'You’d rather be at the chair than chasing deposits from clients who never show.',
image: slot(
'item-3',
__studioImagee039a289,
),
},
]}
lead='Kiln & Co. gives your studio one page where people pick a slot, pay the deposit and get a reminder, so your calendar fills while your hands are busy.'
signOff='— Mara Ellison, founder of Kiln & Co.'
actionLabel='Send me my booking page'
actionNote='Free 14-day trial · No card needed'
proof='Booked by 1,400 small studios'
hint='Tap your craft to lock it in'
/>
);
}
| Name | Type | Details |
|---|---|---|
headlinePrefix OptionalRotatingAudienceHero |
string |
|
audiences OptionalRotatingAudienceHero |
RotatingAudience[] |
|
headlineSuffix OptionalRotatingAudienceHero |
string |
|
greeting OptionalRotatingAudienceHero |
string |
|
lead OptionalRotatingAudienceHero |
React.ReactNode |
|
signOff OptionalRotatingAudienceHero |
string |
|
actionLabel OptionalRotatingAudienceHero |
string |
|
actionNote OptionalRotatingAudienceHero |
string |
|
proof OptionalRotatingAudienceHero |
React.ReactNode |
|
href OptionalRotatingAudienceHero |
string |
|
onAction OptionalRotatingAudienceHero |
() => void |
|
disabled OptionalRotatingAudienceHero |
boolean |
|
state OptionalRotatingAudienceHero |
'default' | 'hover' | 'active' | 'disabled' |
|
interval OptionalRotatingAudienceHero |
number |
|
hint OptionalRotatingAudienceHero |
string |
|
pauseLabel OptionalRotatingAudienceHero |
string |
|
playLabel OptionalRotatingAudienceHero |
string |
|
groupLabel OptionalRotatingAudienceHero |
string |
|
listJoin OptionalRotatingAudienceHero |
string |
|
className OptionalRotatingAudienceHero |
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.
--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.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
b9a66ef32b1c9ada.webp
image/webp · 159 KB
-
ce6fa1c2b6b17012.webp
image/webp · 78.6 KB
-
f8788a1327f10181.webp
image/webp · 144 KB