Podcast Subscribe 1
Podcast subscribe block: gives a new visitor a three-episode starter pack (or gives a regular listener the latest three) on an oversized number rail, then asks for one email.
Use it in a prompt
Use content/podcast-subscribe 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/content/podcast-subscribe.tsx. - Import it and pass your copy and images (Props tab):
import { PodcastSubscribe } from "@/components/funneldna/content/podcast-subscribe"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/podcast-subscribe/component.tsx 480 lines
// layout: number-rail
// Podcast subscribe block: gives a new visitor a three-episode starter pack (or gives a regular listener the latest three) on an oversized number rail, then asks for one email.
import * as React from 'react';
import { AlertCircle, CalendarDays, Clock, Lock, MonitorPlay, Music, Podcast, Rss, type LucideIcon } from 'lucide-react';
import { FX_HOST, Pattern } from '../fx/fx';
export type PodcastEpisode = {
title: string;
/** Running time as shown, e.g. '32 min'. */
runtime: string;
/** One short line on what the listener gets from the episode. */
detail?: string;
/** Release date shown beside the runtime, e.g. 'Nov 18'. */
date?: string;
/** Where the episode plays. When set, the whole row becomes a link. */
href?: string;
};
export type PodcastPlatform = {
label: string;
href: string;
/** Picks a generic glyph. These are never official platform marks. */
kind?: 'podcast' | 'music' | 'video' | 'rss';
};
export type PodcastSubscribeMode = 'new' | 'listening';
export type PodcastSubscribeCopy = {
switchLabel: string;
newLabel: string;
listeningLabel: string;
starterHeading: string;
starterNote: string;
latestHeading: string;
latestNote: string;
formLabel: string;
emailPlaceholder: string;
buttonLabel: string;
buttonSublabel: string;
privacy: string;
platformsLabel: string;
emailRequired: string;
emailInvalid: string;
/** Value shown in the field for the error state preview. */
errorSample: string;
};
export type PodcastSubscribeProps = {
showName?: string;
/** Optional line under the show name. */
host?: string;
/** The supplied release cadence. */
cadence?: string;
/** Square cover art (slot: product). */
coverImage?: string;
coverAlt?: string;
headline?: React.ReactNode;
/** Short paragraphs. Each one opens with a bold lead-in. */
paragraphs?: { lead: string; text: string }[];
starterEpisodes?: PodcastEpisode[];
latestEpisodes?: PodcastEpisode[];
defaultMode?: PodcastSubscribeMode;
copy?: Partial<PodcastSubscribeCopy>;
platforms?: PodcastPlatform[];
/** Receives the validated email and the list the visitor was viewing. */
onSubmit?: (values: { email: string; mode: PodcastSubscribeMode }) => void;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
className?: string;
};
export function PodcastSubscribe(props: PodcastSubscribeProps) {
const {
showName = 'The Ops Room',
host = '',
cadence = 'New episode every Tuesday',
coverImage,
coverAlt = '',
headline = 'Fix the ops behind your agency, one Tuesday at a time',
paragraphs = DEFAULT_PARAGRAPHS,
starterEpisodes = DEFAULT_STARTER,
latestEpisodes = DEFAULT_LATEST,
defaultMode = 'new',
platforms = [],
onSubmit,
state = 'default',
className,
} = props;
const copy: PodcastSubscribeCopy = { ...DEFAULT_COPY, ...props.copy };
const uid = React.useId();
const ids = {
head: `${uid}-head`,
list: `${uid}-list`,
email: `${uid}-email`,
error: `${uid}-error`,
privacy: `${uid}-privacy`,
};
const disabled = state === 'disabled';
const forcedError = state === 'error';
const [mode, setMode] = React.useState<PodcastSubscribeMode>(defaultMode);
const [email, setEmail] = React.useState(forcedError ? copy.errorSample : '');
const [error, setError] = React.useState<string | null>(forcedError ? copy.emailInvalid : null);
const inputRef = React.useRef<HTMLInputElement>(null);
const cardRef = React.useRef<HTMLDivElement>(null);
const [seen, setSeen] = React.useState(false);
React.useEffect(() => {
const el = cardRef.current;
if (!el || typeof IntersectionObserver === 'undefined') {
setSeen(true);
return;
}
const io = new IntersectionObserver(
(entries) => {
if (entries.some((e) => e.isIntersecting)) {
setSeen(true);
io.disconnect();
}
},
{ threshold: 0.1 },
);
io.observe(el);
return () => io.disconnect();
}, []);
React.useEffect(() => {
if (state === 'error') {
setEmail(copy.errorSample);
setError(copy.emailInvalid);
}
}, [state, copy.errorSample, copy.emailInvalid]);
const check = (value: string) => {
const v = value.trim();
if (!v) return copy.emailRequired;
return EMAIL_RE.test(v) ? null : copy.emailInvalid;
};
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const v = e.target.value;
setEmail(v);
if (error && !check(v)) setError(null);
};
const handleBlur = () => {
if (email.trim()) setError(check(email));
};
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (disabled) return;
const problem = check(email);
setError(problem);
if (problem) {
inputRef.current?.focus();
return;
}
onSubmit?.({ email: email.trim(), mode });
};
const episodes = mode === 'new' ? starterEpisodes : latestEpisodes;
const heading = mode === 'new' ? copy.starterHeading : copy.latestHeading;
const note = mode === 'new' ? copy.starterNote : copy.latestNote;
const buttonClass = ['ps-btn', state === 'hover' ? 'is-hover' : '', state === 'active' ? 'is-active' : '']
.filter(Boolean)
.join(' ');
return (
<section
className={['cf-podcast-subscribe', className].filter(Boolean).join(' ')}
style={FX_HOST}
aria-labelledby={ids.head}
>
<style>{CSS}</style>
<Pattern name='waves' fade='corner' tone='band-ink' />
<div className='ps-wrap'>
<aside className='ps-aside'>
{coverImage ? (
<div className='ps-cover'>
<img src={coverImage} alt={coverAlt} width={800} height={800} />
</div>
) : null}
<div className='ps-id'>
<p className='ps-show'>{showName}</p>
{host ? <p className='ps-host'>{host}</p> : null}
{cadence ? (
<p className='ps-cadence'>
<CalendarDays className='ps-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{cadence}
</p>
) : null}
</div>
</aside>
<div className='ps-main'>
<h2 id={ids.head} className='ps-h2'>
{headline}
</h2>
{paragraphs.map((p, i) => (
<p className='ps-lead' key={i}>
<strong>{p.lead}</strong> {p.text}
</p>
))}
<div ref={cardRef} className={seen ? 'ps-card is-seen' : 'ps-card'}>
<div className='ps-card-head'>
<div className='ps-card-title' aria-live='polite'>
<h3 id={ids.list}>{heading}</h3>
{note ? <p>{note}</p> : null}
</div>
<div className='ps-switch' role='group' aria-label={copy.switchLabel}>
<button type='button' aria-pressed={mode === 'new'} onClick={() => setMode('new')}>
{copy.newLabel}
</button>
<button type='button' aria-pressed={mode === 'listening'} onClick={() => setMode('listening')}>
{copy.listeningLabel}
</button>
</div>
</div>
{episodes.length > 0 ? (
<ol className='ps-rail' key={mode} aria-labelledby={ids.list}>
{episodes.map((ep, i) => (
<li
key={`${mode}-${i}`}
className={ep.href ? 'ps-row has-link' : 'ps-row'}
style={{ '--i': i } as React.CSSProperties}
>
<span className='ps-num' aria-hidden='true'>
{String(i + 1).padStart(2, '0')}
</span>
<div className='ps-row-body'>
<h4 className='ps-row-title'>
{ep.href ? (
<a className='ps-row-link' href={ep.href}>
{ep.title}
</a>
) : (
ep.title
)}
</h4>
{ep.detail ? <p className='ps-row-detail'>{ep.detail}</p> : null}
<p className='ps-meta'>
<Clock className='ps-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{ep.date ? `${ep.date} · ${ep.runtime}` : ep.runtime}
</p>
</div>
</li>
))}
</ol>
) : null}
<form className='ps-form' noValidate onSubmit={handleSubmit}>
<fieldset className='ps-fieldset' disabled={disabled}>
<label className='ps-label' htmlFor={ids.email}>
{copy.formLabel}
</label>
<input
ref={inputRef}
id={ids.email}
className='ps-input'
type='email'
name='email'
autoComplete='email'
inputMode='email'
placeholder={copy.emailPlaceholder}
value={email}
onChange={handleChange}
onBlur={handleBlur}
aria-invalid={error ? true : undefined}
aria-describedby={error ? `${ids.error} ${ids.privacy}` : ids.privacy}
/>
{error ? (
<p id={ids.error} className='ps-error' role='alert'>
<AlertCircle className='ps-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{error}
</p>
) : null}
<button type='submit' className={buttonClass}>
<span className='ps-btn-main'>{copy.buttonLabel}</span>
{copy.buttonSublabel ? <span className='ps-btn-sub'>{copy.buttonSublabel}</span> : null}
</button>
{copy.privacy ? (
<p id={ids.privacy} className='ps-privacy'>
<Lock className='ps-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.privacy}
</p>
) : null}
</fieldset>
</form>
{platforms.length > 0 ? (
<p className='ps-platforms'>
<span className='ps-platforms-label'>{copy.platformsLabel}</span>
{platforms.map((p, i) => {
const Icon = PLATFORM_ICONS[p.kind ?? 'podcast'];
return (
<a key={i} className='ps-platform' href={p.href}>
<Icon className='ps-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{p.label}
</a>
);
})}
</p>
) : null}
</div>
</div>
</div>
</section>
);
}
export default PodcastSubscribe;
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
const PLATFORM_ICONS: Record<NonNullable<PodcastPlatform['kind']>, LucideIcon> = {
podcast: Podcast,
music: Music,
video: MonitorPlay,
rss: Rss,
};
const DEFAULT_COPY: PodcastSubscribeCopy = {
switchLabel: 'Choose which episodes to show',
newLabel: 'New here',
listeningLabel: 'Been listening',
starterHeading: 'Start with these three',
starterNote: 'The episodes we’d hand every new agency operator first.',
latestHeading: 'Catch the latest three',
latestNote: 'The newest episodes, newest first.',
formLabel: 'Get new episodes plus the starter pack',
emailPlaceholder: 'you@agency.com',
buttonLabel: 'Send me the starter pack',
buttonSublabel: 'Free · three episodes to start',
privacy: 'No spam. Unsubscribe anytime.',
platformsLabel: 'Or listen on',
emailRequired: 'Enter your email so we can send the starter pack.',
emailInvalid: 'That email looks incomplete. Try something like you@agency.com.',
errorSample: 'sam@agency',
};
const DEFAULT_PARAGRAPHS = [
{
lead: 'Short, practical episodes.',
text: 'Each one fixes one operations problem: hiring, handoffs, pricing or client onboarding.',
},
{
lead: 'New here?',
text: 'Start with the three below, then get every new episode straight to your inbox.',
},
];
const DEFAULT_STARTER: PodcastEpisode[] = [
{
title: 'The handoff checklist that stops dropped client work',
detail: 'Map every step from signed contract to kickoff call.',
runtime: '32 min',
},
{
title: 'Pricing retainers you won’t regret in month three',
detail: 'Set scope, limits and a review point before you quote.',
runtime: '41 min',
},
{
title: 'Hiring your first ops lead with one scorecard',
detail: 'What to test for, and the question that shows it fastest.',
runtime: '28 min',
},
];
const DEFAULT_LATEST: PodcastEpisode[] = [
{
title: 'Run a weekly ops review in 30 minutes',
detail: 'One agenda, three numbers, and a decision log.',
date: 'Nov 18',
runtime: '26 min',
},
{
title: 'When to say no to a client request',
detail: 'A simple test for scope creep that keeps the relationship.',
date: 'Nov 11',
runtime: '34 min',
},
{
title: 'Write SOPs your team will actually open',
detail: 'Shorter, findable, and owned by the person who does the work.',
date: 'Nov 4',
runtime: '38 min',
},
];
const CSS = `
.cf-podcast-subscribe{--ps-btn:var(--button-bg,var(--cta,oklch(0.58 0.21 29.5)));--ps-btn-2:var(--button-bg-2,var(--cta-2,oklch(0.51 0.21 29.5)));--ps-shadow:var(--shadow,oklch(0.22 0.03 256));--ps-ink:var(--ink,oklch(0.21 0.034 263));--ps-muted:var(--muted,oklch(0.45 0.03 258));--ps-card:var(--card,oklch(1 0 0));--ps-line:oklch(from var(--ps-ink) l c h / 0.12);--ps-focus:var(--field-focus,var(--accent,oklch(0.5 0.17 257)));--ps-link:var(--link,var(--accent,oklch(0.5 0.17 257)));position:relative;isolation:isolate;overflow:hidden;box-sizing:border-box;background:var(--band,oklch(0.27 0.067 256));color:var(--band-ink,oklch(1 0 0));font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);}
.cf-podcast-subscribe *,.cf-podcast-subscribe *::before,.cf-podcast-subscribe *::after{box-sizing:border-box;}
.cf-podcast-subscribe .ps-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(260px,400px) minmax(0,1fr);gap:clamp(32px,5vw,72px);align-items:start;}
.cf-podcast-subscribe .ps-aside{position:sticky;top:24px;display:flex;flex-direction:column;gap:20px;min-width:0;}
.cf-podcast-subscribe .ps-cover{width:100%;aspect-ratio:1/1;}
.cf-podcast-subscribe .ps-cover img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;border-radius:12px;filter:drop-shadow(0 2px 3px oklch(from var(--ps-shadow) calc(l - 0.08) c h / 0.5)) drop-shadow(0 18px 22px oklch(from var(--ps-shadow) calc(l - 0.08) c h / 0.42));}
.cf-podcast-subscribe .ps-id{min-width:0;}
.cf-podcast-subscribe .ps-show{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-0.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;}
.cf-podcast-subscribe .ps-host{margin:8px 0 0;font-size:0.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty;}
.cf-podcast-subscribe .ps-cadence{display:inline-block;margin:12px 0 0;padding:6px 12px;border-radius:999px;background:oklch(from var(--band-ink,oklch(1 0 0)) l c h / 0.12);font-size:0.875rem;line-height:1.2;font-weight:800;}
.cf-podcast-subscribe .ps-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em;flex:none;}
.cf-podcast-subscribe .ps-main{min-width:0;}
.cf-podcast-subscribe .ps-h2{margin:0 0 16px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;}
.cf-podcast-subscribe .ps-lead{margin:0 0 12px;max-width:62ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;}
.cf-podcast-subscribe .ps-lead:last-of-type{margin-bottom:0;}
.cf-podcast-subscribe .ps-lead strong{font-weight:800;}
.cf-podcast-subscribe .ps-card{margin-top:32px;background:var(--ps-card);color:var(--ps-ink);border:1px solid var(--card-border,var(--ps-line));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 256 / 0.22),0 12px 24px -8px oklch(0.22 0.03 256 / 0.32)));padding:clamp(20px,3vw,32px);}
.cf-podcast-subscribe .ps-card-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px 24px;}
.cf-podcast-subscribe .ps-card-title{flex:1 1 220px;min-width:0;}
.cf-podcast-subscribe .ps-card-title h3{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-0.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;}
.cf-podcast-subscribe .ps-card-title p{margin:8px 0 0;color:var(--ps-muted);font-size:0.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty;}
.cf-podcast-subscribe .ps-switch{display:inline-flex;flex:none;gap:4px;padding:4px;border-radius:999px;background:color-mix(in oklch,var(--ps-ink) 6%,var(--ps-card));}
.cf-podcast-subscribe .ps-switch button{appearance:none;border:0;margin:0;min-height:44px;padding:0 18px;border-radius:999px;background:transparent;color:var(--ps-ink);font-family:var(--font-body,inherit);font-size:0.9375rem;font-weight:800;line-height:1.2;white-space:nowrap;cursor:pointer;transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;}
.cf-podcast-subscribe .ps-switch button:hover{background:color-mix(in oklch,var(--ps-ink) 11%,var(--ps-card));}
.cf-podcast-subscribe .ps-switch button[aria-pressed='true']{background:var(--band,oklch(0.27 0.067 256));color:var(--band-ink,oklch(1 0 0));box-shadow:var(--shadow-sm,0 1px 1px oklch(0.22 0.03 256 / 0.18),0 1px 3px oklch(0.22 0.03 256 / 0.14));}
.cf-podcast-subscribe .ps-switch button:active{transform:scale(0.97);}
.cf-podcast-subscribe .ps-switch button:focus-visible{outline:3px solid var(--ps-focus);outline-offset:2px;}
.cf-podcast-subscribe .ps-rail{list-style:none;margin:16px 0 0;padding:0;}
.cf-podcast-subscribe .ps-row{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:20px;align-items:start;margin:0 -12px;padding:16px 12px;border-radius:10px;animation:cfps-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * .07s);animation-play-state:paused;transition:background .16s ease;}
.cf-podcast-subscribe .ps-card.is-seen .ps-row{animation-play-state:running;}
.cf-podcast-subscribe .ps-row + .ps-row::before{content:'';position:absolute;top:0;left:12px;right:12px;height:1px;background:var(--ps-line);}
.cf-podcast-subscribe .ps-row.has-link:hover{background:color-mix(in oklch,var(--ps-ink) 4%,var(--ps-card));}
.cf-podcast-subscribe .ps-row:has(.ps-row-link:focus-visible){outline:3px solid var(--ps-focus);outline-offset:0;}
.cf-podcast-subscribe .ps-num{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:0.9;letter-spacing:-0.03em;font-variant-numeric:lining-nums tabular-nums;font-feature-settings:'lnum' 1,'tnum' 1;color:var(--accent,oklch(0.5 0.17 257));min-width:2ch;}
.cf-podcast-subscribe .ps-row-body{min-width:0;}
.cf-podcast-subscribe .ps-row-title{margin:2px 0 0;font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;text-wrap:pretty;}
.cf-podcast-subscribe .ps-row-link{color:inherit;text-decoration:none;}
.cf-podcast-subscribe .ps-row-link::after{content:'';position:absolute;inset:0;border-radius:10px;}
.cf-podcast-subscribe .ps-row-link:focus-visible{outline:none;}
.cf-podcast-subscribe .ps-row.has-link:hover .ps-row-link{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:0.18em;}
.cf-podcast-subscribe .ps-row-detail{margin:8px 0 0;color:var(--ps-muted);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty;}
.cf-podcast-subscribe .ps-meta{margin:8px 0 0;color:var(--ps-muted);font-size:0.9375rem;line-height:1.4;font-weight:600;font-variant-numeric:tabular-nums;}
.cf-podcast-subscribe .ps-form{margin:24px 0 0;padding:clamp(16px,2.5vw,24px);border-radius:10px;background:color-mix(in oklch,var(--ps-ink) 4%,var(--ps-card));}
.cf-podcast-subscribe .ps-fieldset{border:0;margin:0;padding:0;min-width:0;}
.cf-podcast-subscribe .ps-label{display:block;margin:0 0 12px;color:var(--label-ink,var(--ps-ink));font-size:1.0625rem;line-height:1.3;font-weight:700;}
.cf-podcast-subscribe .ps-input{display:block;width:100%;height:56px;margin:0;padding:0 16px;border:1px solid var(--field-border,color-mix(in oklch,var(--ps-ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));background:var(--field,oklch(1 0 0));color:var(--field-ink,var(--ps-ink));font-family:var(--font-body,inherit);font-size:1.0625rem;line-height:1.2;transition:border-color .16s ease,box-shadow .16s ease;}
.cf-podcast-subscribe .ps-input::placeholder{color:color-mix(in oklch,var(--field-ink,oklch(0.21 0.034 263)) 65%,var(--field,oklch(1 0 0)));opacity:1;}
.cf-podcast-subscribe .ps-input:hover{border-color:color-mix(in oklch,var(--ps-ink) 40%,transparent);}
.cf-podcast-subscribe .ps-input:focus{outline:none;border-color:var(--ps-focus);box-shadow:0 0 0 3px oklch(from var(--ps-focus) l c h / 0.35);}
.cf-podcast-subscribe .ps-input[aria-invalid='true']{border-color:var(--danger,oklch(0.5 0.17 27));}
.cf-podcast-subscribe .ps-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger,oklch(0.5 0.17 27)) l c h / 0.3);}
.cf-podcast-subscribe .ps-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--ps-ink) 4%,var(--field,oklch(1 0 0)));}
.cf-podcast-subscribe .ps-error{margin:8px 0 0;color:var(--danger,oklch(0.5 0.17 27));font-size:0.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty;}
.cf-podcast-subscribe .ps-btn{appearance:none;border:0;margin:12px 0 0;width:100%;min-height:64px;padding:10px 28px;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-align:center;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(180deg,oklch(from var(--ps-btn) calc(l + 0.04) c h),oklch(from var(--ps-btn-2) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink,oklch(1 0 0)));font-family:var(--button-font,var(--font-display,inherit));text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--ps-btn) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--ps-btn) calc(l - 0.16) c h),0 1px 2px oklch(from var(--ps-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--ps-shadow) l c h / 0.45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;}
.cf-podcast-subscribe .ps-btn-main{font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;font-weight:var(--button-weight,800);text-wrap:balance;}
.cf-podcast-subscribe .ps-btn-sub{font-family:var(--font-body,inherit);font-size:0.9375rem;line-height:1.3;font-weight:600;text-transform:none;text-wrap:pretty;}
.cf-podcast-subscribe .ps-btn:hover,.cf-podcast-subscribe .ps-btn.is-hover{background:linear-gradient(180deg,oklch(from var(--ps-btn) calc(l - 0.01) c h),oklch(from var(--ps-btn-2) calc(l - 0.07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--ps-btn) calc(l + 0.1) c h / 0.7),inset 0 -3px 0 oklch(from var(--ps-btn) calc(l - 0.2) c h),0 1px 2px oklch(from var(--ps-shadow) l c h / 0.34),0 10px 18px -6px oklch(from var(--ps-shadow) l c h / 0.55));}
.cf-podcast-subscribe .ps-btn:active,.cf-podcast-subscribe .ps-btn.is-active{transform:translateY(1px);background:linear-gradient(180deg,oklch(from var(--ps-btn) calc(l - 0.05) c h),oklch(from var(--ps-btn-2) calc(l - 0.08) c h));box-shadow:inset 0 2px 3px oklch(from var(--ps-btn) calc(l - 0.22) c h / 0.55),inset 0 -2px 0 oklch(from var(--ps-btn) calc(l - 0.16) c h),0 1px 1px oklch(from var(--ps-shadow) l c h / 0.3);}
.cf-podcast-subscribe .ps-btn:focus-visible{outline:3px solid var(--ps-focus);outline-offset:3px;}
.cf-podcast-subscribe .ps-btn:disabled{cursor:not-allowed;transform:none;background:var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263)));color:var(--button-2-ink,var(--secondary-ink,oklch(0.21 0.034 263)));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 1px oklch(0.22 0.03 256 / 0.18),0 1px 3px oklch(0.22 0.03 256 / 0.14)));}
.cf-podcast-subscribe .ps-privacy{margin:12px 0 0;color:var(--ps-muted);font-size:0.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty;}
.cf-podcast-subscribe .ps-platforms{margin:24px 0 0;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 16px;font-size:0.9375rem;line-height:1.4;}
.cf-podcast-subscribe .ps-platforms-label{color:var(--ps-muted);font-weight:600;}
.cf-podcast-subscribe .ps-platform{color:var(--ps-link);font-weight:700;white-space:nowrap;border-radius:4px;text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:oklch(from var(--ps-link) l c h / 0.45);text-underline-offset:0.18em;transition:color .16s ease;}
.cf-podcast-subscribe .ps-platform:hover{color:oklch(from var(--ps-link) calc(l - 0.08) c h);text-decoration-color:currentColor;}
.cf-podcast-subscribe .ps-platform:focus-visible{outline:3px solid var(--ps-focus);outline-offset:2px;}
@media (max-width:899px){
.cf-podcast-subscribe .ps-wrap{grid-template-columns:minmax(0,1fr);gap:32px;}
.cf-podcast-subscribe .ps-aside{position:static;flex-direction:row;align-items:center;gap:16px;}
.cf-podcast-subscribe .ps-cover{width:clamp(120px,22vw,168px);flex:0 0 auto;}
.cf-podcast-subscribe .ps-cover img{filter:drop-shadow(0 2px 3px oklch(from var(--ps-shadow) calc(l - 0.08) c h / 0.5)) drop-shadow(0 8px 12px oklch(from var(--ps-shadow) calc(l - 0.08) c h / 0.4));}
.cf-podcast-subscribe .ps-cadence{display:block;margin-top:8px;padding:0;background:none;border-radius:0;font-size:0.9375rem;font-weight:700;line-height:1.4;}
}
@media (max-width:560px){
.cf-podcast-subscribe .ps-switch{display:flex;width:100%;}
.cf-podcast-subscribe .ps-switch button{flex:1 1 0;padding:0 12px;}
.cf-podcast-subscribe .ps-row{column-gap:12px;}
.cf-podcast-subscribe .ps-btn{padding:10px 16px;}
.cf-podcast-subscribe .ps-platforms{gap:8px 20px;}
.cf-podcast-subscribe .ps-platforms-label{flex-basis:100%;}
}
@media (prefers-reduced-motion:reduce){
.cf-podcast-subscribe .ps-row{animation:none;}
.cf-podcast-subscribe .ps-row,.cf-podcast-subscribe .ps-btn,.cf-podcast-subscribe .ps-switch button,.cf-podcast-subscribe .ps-input,.cf-podcast-subscribe .ps-platform{transition:none;}
.cf-podcast-subscribe .ps-btn:active,.cf-podcast-subscribe .ps-btn.is-active,.cf-podcast-subscribe .ps-switch button:active{transform:none;}
}
@keyframes cfps-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
`;
pieces/content/podcast-subscribe/specimen.tsx 32 lines
import __studioImage4525325b from "../assets/77d01056411d190e.webp";
import * as React from 'react';
import { PodcastSubscribe } from '../podcast-subscribe';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export default function PodcastSubscribeSpecimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<PodcastSubscribe
state={state}
showName='The Ops Room'
host='A weekly show for agency operators'
cadence='New episode every Tuesday'
coverImage={slot(
'product',
__studioImage4525325b
)}
coverAlt='The Ops Room podcast cover art: a studio microphone in front of a lit workflow board'
copy={{ privacy: defaults.sample.registration.privacy }}
platforms={[
{ label: 'Apple Podcasts', href: '#', kind: 'podcast' },
{ label: 'Spotify', href: '#', kind: 'music' },
{ label: 'YouTube', href: '#', kind: 'video' },
{ label: 'RSS feed', href: '#', kind: 'rss' },
]}
/>
);
}
| Name | Type | Details |
|---|---|---|
showName OptionalPodcastSubscribe |
string |
|
host OptionalPodcastSubscribe |
string |
|
cadence OptionalPodcastSubscribe |
string |
|
coverImage OptionalPodcastSubscribe |
string |
|
coverAlt OptionalPodcastSubscribe |
string |
|
headline OptionalPodcastSubscribe |
React.ReactNode |
|
paragraphs OptionalPodcastSubscribe |
{ lead: string; text: string }[] |
|
starterEpisodes OptionalPodcastSubscribe |
PodcastEpisode[] |
|
latestEpisodes OptionalPodcastSubscribe |
PodcastEpisode[] |
|
defaultMode OptionalPodcastSubscribe |
PodcastSubscribeMode |
|
copy OptionalPodcastSubscribe |
Partial<PodcastSubscribeCopy> |
|
platforms OptionalPodcastSubscribe |
PodcastPlatform[] |
|
onSubmit OptionalPodcastSubscribe |
(values: { email: string; mode: PodcastSubscribeMode }) => void |
|
state OptionalPodcastSubscribe |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalPodcastSubscribe |
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--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.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
77d01056411d190e.webp
image/webp · 135 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB