Podcast Hero 1
Podcast show hero: the host stands beside the tilted cover art and speaks the show's promise, the latest episode is one tap from playing, and every supplied platform sits right under it.
Use it in a prompt
Use hero/podcast-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/podcast-hero.tsx. - Import it and pass your copy and images (Props tab):
import { PodcastHero } from "@/components/funneldna/hero/podcast-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/podcast-hero/component.tsx 670 lines
// layout: presenter-cutout
// Podcast show hero: the host stands beside the tilted cover art and speaks the show's promise, the latest episode is one tap from playing, and every supplied platform sits right under it.
import * as React from 'react'
import { Mic, Pause, Play } from 'lucide-react'
import { Divider, FX_HOST, Spot } from '../fx/fx'
export type PodcastHeroEpisode = {
title: string
number?: string // shown through copy.episodeNumber
length?: string // e.g. '38 min'
date?: string
image?: string // episode poster; falls back to the cover art
}
export type PodcastHeroTopic = {
title: string
detail?: string
spot?: string // an imported fx spot asset (import savings from '../fx/spots/savings')
}
export type PodcastHeroPlatform = {
label: string
href: string
image?: string // a supplied platform mark; the button is text-only without it
imageAlt?: string
}
export type PodcastHeroCopy = {
hostsLabel: string // '{names}' is replaced by the host names
hostsJoin: string // placed between the last two host names
latest: string
nowPlaying: string
episodeNumber: string // '{number}'
play: string
pause: string
note: string // one short line beside the play button; '' hides it
posterPlay: string // '{title}'
posterPause: string // '{title}'
follow: string
platformsLabel: string // accessible name of the platform list
}
export type PodcastHeroState = 'default' | 'hover' | 'active' | 'disabled' | 'playing'
export type PodcastHeroProps = {
showName?: React.ReactNode
promise?: React.ReactNode // the one-line promise, set as the hosts' own words
aside?: React.ReactNode // italic aside in the host's voice, after the promise
hosts?: string[]
facts?: string[] // schedule, episode count, rating: supplied facts only, empty by default
coverImage?: string // slot: product (square cover art)
coverAlt?: string
presenterCutoutImage?: string // slot: presenter-cutout (transparent background)
presenterAlt?: string
topics?: PodcastHeroTopic[]
episode?: PodcastHeroEpisode
playing?: boolean // the page's player is playing; drives the waveform and the pause label
onPlay?: () => void // called by the poster and the play button; the page owns playback
platforms?: PodcastHeroPlatform[]
disabled?: boolean // the episode can't be played yet
state?: PodcastHeroState
copy?: Partial<PodcastHeroCopy>
className?: string
}
const DEFAULT_COPY: PodcastHeroCopy = {
hostsLabel: 'Hosted by {names}',
hostsJoin: ' & ',
latest: 'Latest',
nowPlaying: 'Now playing',
episodeNumber: 'Episode {number}',
play: 'Start listening',
pause: 'Pause episode',
note: 'Free to listen · No sign-up',
posterPlay: 'Play {title}',
posterPause: 'Pause {title}',
follow: 'Follow free wherever you listen',
platformsLabel: 'Listen on',
}
export function PodcastHero(props: PodcastHeroProps) {
const {
showName = 'The Weekly Show',
promise = 'Short, practical episodes that help you run your business better, one week at a time.',
aside,
hosts = [],
facts = [],
coverImage,
coverAlt = 'Show cover art',
presenterCutoutImage,
presenterAlt = 'Show host',
topics = [],
episode,
playing,
onPlay,
platforms = [],
disabled,
state = 'default',
className,
} = props
const copy: PodcastHeroCopy = { ...DEFAULT_COPY, ...props.copy }
const isPlaying = playing ?? state === 'playing'
const isDisabled = disabled ?? state === 'disabled'
const titleId = React.useId()
const episodeId = React.useId()
const hasLeft = Boolean(coverImage) || topics.length > 0
const poster = episode ? episode.image ?? coverImage : undefined
const handlePlay = () => {
if (!isDisabled) onPlay?.()
}
const meta = episode
? ([
episode.number ? fill(copy.episodeNumber, { number: episode.number }) : '',
episode.length ?? '',
episode.date ?? '',
].filter(Boolean) as string[])
: []
return (
<section
className={'cf-podcast-hero' + (className ? ' ' + className : '')}
data-state={state}
aria-labelledby={titleId}
style={FX_HOST}
>
<Divider shape='curve' tone='surface' height={56} />
<style>{CSS}</style>
<div className={'ph-grid' + (hasLeft ? '' : ' is-single')}>
{hasLeft && (
<div className='ph-left'>
{coverImage && (
<div className={'ph-visual ph-in' + (presenterCutoutImage ? ' has-cutout' : '')} style={delay(0)}>
<div className='ph-cover'>
<img src={coverImage} alt={coverAlt} width={640} height={640} />
</div>
{presenterCutoutImage && (
<img className='ph-cutout' src={presenterCutoutImage} alt={presenterAlt} width={512} height={512} />
)}
</div>
)}
{topics.length > 0 && (
<ul className='ph-topics'>
{topics.map((topic, i) => (
<li key={topic.title} className='ph-topic ph-in' style={delay(i + 2)}>
{topic.spot && (
<span className='ph-topic-spot'>
<Spot src={topic.spot} size={56} shade='band' light='band-ink' />
</span>
)}
<span>
<strong>{topic.title}</strong>
{topic.detail && <span className='ph-topic-detail'>{topic.detail}</span>}
</span>
</li>
))}
</ul>
)}
</div>
)}
<div className='ph-right'>
<div className='ph-copy ph-in' style={delay(1)}>
<h1 id={titleId} className='ph-h1'>{showName}</h1>
{promise && (
<p className='ph-promise'>
“{promise}
{aside && (
<>
{' '}
<em className='ph-aside'>{aside}</em>
</>
)}
”
</p>
)}
{hosts.length > 0 && (
<p className='ph-hosts'>
<Mic size={18} strokeWidth={2.5} aria-hidden='true' className='ph-inline-icon' />
{fill(copy.hostsLabel, { names: joinNames(hosts, copy.hostsJoin) })}
</p>
)}
{facts.length > 0 && (
<ul className='ph-facts'>
{facts.map((fact) => (
<li key={fact}>{fact}</li>
))}
</ul>
)}
</div>
{episode && (
<article
className='ph-card ph-in'
data-playing={isPlaying ? '' : undefined}
aria-labelledby={episodeId}
style={delay(2)}
>
<div className='ph-ep'>
{poster && (
<button
type='button'
className='ph-poster'
onClick={handlePlay}
disabled={isDisabled}
aria-pressed={isPlaying}
aria-label={fill(isPlaying ? copy.posterPause : copy.posterPlay, { title: episode.title })}
>
<img src={poster} alt='' width={104} height={104} />
<span className='ph-disc' aria-hidden='true'>
{isPlaying ? (
<Pause size={20} strokeWidth={2.5} fill='currentColor' />
) : (
<Play size={20} strokeWidth={2.5} fill='currentColor' />
)}
</span>
</button>
)}
<div className='ph-ep-text'>
<h2 id={episodeId} className='ph-ep-title'>{episode.title}</h2>
<p className='ph-meta'>
<span className='ph-flag'>{isPlaying ? copy.nowPlaying : copy.latest}</span>
{meta.map((item) => (
<React.Fragment key={item}>
{' '}
<span className='ph-meta-item'>{item}</span>
</React.Fragment>
))}
</p>
</div>
</div>
<div className='ph-wave' aria-hidden='true'>
{BARS.map((h, i) => (
<span key={i} style={{ '--h': h, '--i': i } as React.CSSProperties} />
))}
</div>
<div className='ph-act'>
<button
type='button'
className='ph-cta'
onClick={handlePlay}
disabled={isDisabled}
aria-pressed={isPlaying}
>
{isPlaying ? (
<Pause size={20} strokeWidth={2.5} fill='currentColor' aria-hidden='true' />
) : (
<Play size={20} strokeWidth={2.5} fill='currentColor' aria-hidden='true' />
)}
<span>{isPlaying ? copy.pause : copy.play}</span>
</button>
{copy.note && <p className='ph-note'>{copy.note}</p>}
</div>
</article>
)}
{platforms.length > 0 && (
<nav className='ph-follow ph-in' aria-label={copy.platformsLabel} style={delay(3)}>
<p className='ph-follow-line'>{copy.follow}</p>
<ul className='ph-platforms'>
{platforms.map((platform) => (
<li key={platform.label}>
<a className='ph-plat' href={platform.href}>
{platform.image && (
<img src={platform.image} alt={platform.imageAlt ?? ''} width={20} height={20} />
)}
<span>{platform.label}</span>
</a>
</li>
))}
</ul>
</nav>
)}
</div>
</div>
</section>
)
}
export default PodcastHero
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((text, key) => text.split('{' + key + '}').join(values[key]), template)
}
function joinNames(names: string[], join: string) {
if (names.length < 2) return names[0] ?? ''
return names.slice(0, -1).join(', ') + join + names[names.length - 1]
}
function delay(step: number): React.CSSProperties {
return { '--d': Math.min(step * 0.07, 0.28) + 's' } as React.CSSProperties
}
const BARS = Array.from({ length: 56 }, (_, i) => {
const v = 0.52 + 0.3 * Math.sin(i * 0.9) + 0.18 * Math.sin(i * 2.3 + 1)
return Math.round(Math.min(1, Math.max(0.2, v)) * 100)
})
const CSS = `
.cf-podcast-hero {
--ph-band: var(--band, oklch(0.27 0.067 256));
--ph-on: var(--band-ink, oklch(1 0 0));
--ph-soft: color-mix(in oklab, var(--ph-on) 82%, var(--ph-band));
--ph-plat-base: var(--secondary, oklch(0.93 0.015 263));
--ph-plat-fill: linear-gradient(var(--button-2-bg, transparent), var(--button-2-bg, transparent));
--ph-shadow: var(--shadow, oklch(0.22 0.03 256));
--ph-btn: var(--button-bg, var(--cta, oklch(0.58 0.21 29)));
--ph-btn-2: var(--button-bg-2, var(--cta-2, oklch(0.51 0.21 29)));
--ph-btn-ink: var(--button-ink, var(--cta-ink, oklch(1 0 0)));
--ph-focus: var(--field-focus, var(--accent, oklch(0.5 0.17 257)));
--ph-ink: var(--ink, oklch(0.21 0.034 263));
--ph-card: var(--card, oklch(1 0 0));
--ph-btn-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--ph-btn) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--ph-btn) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--ph-shadow) l c h / 0.35), 0 8px 16px -6px oklch(from var(--ph-shadow) l c h / 0.5));
position: relative;
overflow-x: clip;
background: var(--ph-band);
color: var(--ph-on);
font-family: var(--font-body, system-ui, sans-serif);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) calc(clamp(64px, 8.5vw, 120px) + 56px);
}
.cf-podcast-hero * { box-sizing: border-box; }
.cf-podcast-hero .ph-grid {
position: relative;
z-index: 1;
max-width: 1120px;
margin: 0 auto;
display: grid;
grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
gap: clamp(32px, 5vw, 72px);
align-items: start;
}
.cf-podcast-hero .ph-grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
.cf-podcast-hero .ph-left,
.cf-podcast-hero .ph-right { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.cf-podcast-hero .ph-left { gap: 40px; }
.cf-podcast-hero .ph-visual { position: relative; padding: 3% 4% 5% 3%; }
.cf-podcast-hero .ph-visual.has-cutout { padding: 3% 20% 12% 2%; }
.cf-podcast-hero .ph-cover {
transform: rotate(-3deg);
filter: drop-shadow(0 2px 3px oklch(from var(--ph-shadow) calc(l - 0.06) c h / 0.55)) drop-shadow(0 18px 22px oklch(from var(--ph-shadow) calc(l - 0.06) c h / 0.45));
transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.cf-podcast-hero .ph-visual:hover .ph-cover { transform: rotate(-1.5deg); }
.cf-podcast-hero .ph-cover img {
display: block;
width: 100%;
height: auto;
aspect-ratio: 1;
object-fit: cover;
object-position: center;
border-radius: 12px;
}
.cf-podcast-hero .ph-cutout {
position: absolute;
right: -2%;
bottom: 0;
width: 50%;
height: auto;
aspect-ratio: 1;
object-fit: contain;
object-position: bottom center;
filter: drop-shadow(0 2px 3px oklch(from var(--ph-shadow) calc(l - 0.06) c h / 0.5)) drop-shadow(0 14px 18px oklch(from var(--ph-shadow) calc(l - 0.06) c h / 0.4));
pointer-events: none;
}
.cf-podcast-hero .ph-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.cf-podcast-hero .ph-topic { display: flex; align-items: center; gap: 16px; }
.cf-podcast-hero .ph-topic-spot { flex: 0 0 auto; display: inline-flex; }
.cf-podcast-hero .ph-topic strong {
display: block;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.3;
text-wrap: balance;
}
.cf-podcast-hero .ph-topic-detail {
display: block;
margin-top: 2px;
font-size: .9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--ph-soft);
text-wrap: pretty;
}
.cf-podcast-hero .ph-h1 {
margin: 0 0 max(24px, 0.46em);
font-family: var(--font-display, inherit);
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.04;
text-wrap: balance;
color: var(--ph-on);
}
.cf-podcast-hero .ph-promise {
margin: 0 0 20px;
max-width: 60ch;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.35;
font-weight: 600;
text-wrap: pretty;
}
.cf-podcast-hero .ph-aside { font-style: normal; font-weight: 500; color: var(--ph-soft); }
.cf-podcast-hero .ph-hosts {
margin: 0;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.4;
font-weight: 700;
color: var(--ph-soft);
text-wrap: pretty;
}
.cf-podcast-hero .ph-inline-icon { display: inline-block; vertical-align: -0.18em; margin-inline-end: .45em; }
.cf-podcast-hero .ph-facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-podcast-hero .ph-facts li {
min-height: 30px;
display: inline-flex;
align-items: center;
padding: 4px 12px;
border-radius: 999px;
background: oklch(from var(--ph-on) l c h / 0.12);
color: var(--ph-on);
font-size: .875rem;
font-weight: 800;
line-height: 1.2;
}
.cf-podcast-hero .ph-card {
display: flex;
flex-direction: column;
gap: 24px;
padding: clamp(20px, 3vw, 32px);
background: var(--ph-card);
color: var(--ph-ink);
border: 1px solid var(--card-border, oklch(from var(--ph-ink) l c h / 0.12));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--ph-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--ph-shadow) l c h / 0.32)));
transition: border-color .16s ease;
}
.cf-podcast-hero .ph-card[data-playing] { border-color: oklch(from var(--accent, oklch(0.5 0.17 257)) l c h / 0.55); }
.cf-podcast-hero .ph-ep { display: flex; align-items: flex-start; gap: 20px; }
.cf-podcast-hero .ph-poster {
position: relative;
flex: 0 0 auto;
width: 104px;
height: 104px;
padding: 0;
border: 0;
border-radius: 8px;
overflow: hidden;
cursor: pointer;
background: color-mix(in oklch, var(--ph-ink) 4%, var(--ph-card));
}
.cf-podcast-hero .ph-poster img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cf-podcast-hero .ph-poster::after {
content: '';
position: absolute;
inset: 0;
background: oklch(from var(--ph-band) l c h / 0.28);
transition: background .16s ease;
}
.cf-podcast-hero .ph-disc {
position: absolute;
inset: 0;
z-index: 1;
margin: auto;
width: 48px;
height: 48px;
border-radius: 999px;
display: grid;
place-items: center;
color: var(--ph-btn-ink);
background: linear-gradient(oklch(from var(--ph-btn) calc(l + 0.04) c h), oklch(from var(--ph-btn-2) calc(l - 0.02) c h));
box-shadow: inset 0 1px 0 oklch(from var(--ph-btn) calc(l + 0.14) c h / 0.7), inset 0 -2px 0 oklch(from var(--ph-btn) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--ph-shadow) l c h / 0.4), 0 6px 10px -4px oklch(from var(--ph-shadow) l c h / 0.5);
transition: transform .16s ease;
}
.cf-podcast-hero .ph-poster:hover:not(:disabled) .ph-disc,
.cf-podcast-hero[data-state='hover'] .ph-poster:not(:disabled) .ph-disc { transform: scale(1.07); }
.cf-podcast-hero .ph-poster:hover:not(:disabled)::after { background: oklch(from var(--ph-band) l c h / 0.4); }
.cf-podcast-hero .ph-poster:active:not(:disabled) .ph-disc,
.cf-podcast-hero[data-state='active'] .ph-poster:not(:disabled) .ph-disc { transform: scale(.95); }
.cf-podcast-hero .ph-poster:focus-visible { outline: 3px solid oklch(from var(--ph-focus) l c h / 0.6); outline-offset: 3px; }
.cf-podcast-hero .ph-poster:disabled { cursor: not-allowed; }
.cf-podcast-hero .ph-poster:disabled .ph-disc {
background: var(--secondary, oklch(0.93 0.015 263));
color: var(--secondary-ink, oklch(0.21 0.034 263));
box-shadow: var(--shadow-sm, 0 1px 2px oklch(from var(--ph-shadow) l c h / 0.2));
}
.cf-podcast-hero .ph-ep-text { flex: 1; min-width: 0; padding-top: 2px; }
.cf-podcast-hero .ph-ep-title {
margin: 0 0 8px;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
text-wrap: balance;
color: var(--ph-ink);
}
.cf-podcast-hero .ph-meta {
margin: 0;
font-size: .9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted, oklch(0.45 0.03 258));
}
.cf-podcast-hero .ph-flag { font-weight: 800; color: var(--accent, oklch(0.5 0.17 257)); white-space: nowrap; }
.cf-podcast-hero .ph-meta-item { white-space: nowrap; }
.cf-podcast-hero .ph-meta-item::before { content: '·'; margin: 0 .45em 0 .1em; }
.cf-podcast-hero .ph-wave {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2px;
height: 36px;
padding: 0 2px;
}
.cf-podcast-hero .ph-wave span {
flex: 1 1 0;
min-width: 2px;
max-width: 5px;
height: calc(var(--h) * 1%);
border-radius: 999px;
background: oklch(from var(--ph-ink) l c h / 0.16);
transform-origin: center;
transition: background .2s ease;
}
.cf-podcast-hero .ph-card[data-playing] .ph-wave span {
background: var(--accent-fill, var(--accent, oklch(0.5 0.17 257)));
animation: ph-wave .9s cubic-bezier(.45, 0, .55, 1) infinite alternate;
animation-delay: calc(var(--i) * -0.13s);
}
@keyframes ph-wave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.cf-podcast-hero .ph-act { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.cf-podcast-hero .ph-cta {
width: 100%;
min-height: 64px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 0 28px;
border: 0;
cursor: pointer;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display, inherit));
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;
color: var(--ph-btn-ink);
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--ph-btn) calc(l + 0.04) c h), oklch(from var(--ph-btn-2) calc(l - 0.02) c h));
box-shadow: var(--ph-btn-shadow);
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-podcast-hero .ph-cta svg { flex: 0 0 auto; }
.cf-podcast-hero .ph-cta:hover:not(:disabled),
.cf-podcast-hero[data-state='hover'] .ph-cta:not(:disabled) {
background: linear-gradient(oklch(from var(--ph-btn) calc(l - 0.01) c h), oklch(from var(--ph-btn-2) calc(l - 0.07) c h));
box-shadow: var(--ph-btn-shadow), 0 10px 18px -8px oklch(from var(--ph-shadow) l c h / 0.4);
}
.cf-podcast-hero .ph-cta:active:not(:disabled),
.cf-podcast-hero[data-state='active'] .ph-cta:not(:disabled) {
transform: translateY(1px);
background: linear-gradient(oklch(from var(--ph-btn) calc(l - 0.04) c h), oklch(from var(--ph-btn-2) calc(l - 0.08) c h));
box-shadow: inset 0 2px 4px oklch(from var(--ph-btn) calc(l - 0.2) c h / 0.5), inset 0 -2px 0 oklch(from var(--ph-btn) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--ph-shadow) l c h / 0.3);
}
.cf-podcast-hero .ph-cta:focus-visible { outline: 3px solid oklch(from var(--ph-focus) l c h / 0.6); outline-offset: 3px; }
.cf-podcast-hero .ph-cta:disabled {
cursor: not-allowed;
background: var(--secondary, oklch(0.93 0.015 263));
color: var(--secondary-ink, oklch(0.21 0.034 263));
text-shadow: none;
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(from var(--ph-shadow) l c h / 0.2)));
}
.cf-podcast-hero .ph-note {
margin: 0;
text-align: center;
font-size: .9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
.cf-podcast-hero .ph-follow-line {
margin: 0 0 12px;
font-size: .9375rem;
line-height: 1.4;
font-weight: 700;
color: var(--ph-soft);
}
.cf-podcast-hero .ph-platforms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cf-podcast-hero .ph-plat {
min-height: 48px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0 20px;
border-radius: var(--button-radius, var(--radius, 12px));
background: var(--ph-plat-fill), var(--ph-plat-base);
color: var(--button-2-ink, var(--secondary-ink, oklch(0.21 0.034 263)));
border: 1px solid var(--button-2-border, transparent);
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(from var(--ph-shadow) l c h / 0.2)));
font-family: var(--button-font, var(--font-display, inherit));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: 1rem;
line-height: 1.2;
text-decoration: none;
transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.cf-podcast-hero .ph-plat:hover {
background: linear-gradient(oklch(from var(--ph-on) l c h / 0.16), oklch(from var(--ph-on) l c h / 0.16)), var(--ph-plat-fill), var(--ph-plat-base);
border-color: oklch(from var(--ph-on) l c h / 0.55);
}
.cf-podcast-hero .ph-plat:active {
transform: translateY(1px);
box-shadow: none;
background: linear-gradient(oklch(from var(--ph-on) l c h / 0.24), oklch(from var(--ph-on) l c h / 0.24)), var(--ph-plat-fill), var(--ph-plat-base);
}
.cf-podcast-hero .ph-plat:focus-visible { outline: 3px solid var(--ph-on); outline-offset: 3px; }
.cf-podcast-hero .ph-plat img { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.cf-podcast-hero .ph-in { animation: ph-rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes ph-rise { from { opacity: .82; transform: translateY(8px); } }
@media (max-width: 860px) {
.cf-podcast-hero .ph-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.cf-podcast-hero .ph-left,
.cf-podcast-hero .ph-right { display: contents; }
.cf-podcast-hero .ph-visual { order: 1; width: 100%; max-width: 460px; }
.cf-podcast-hero .ph-visual.has-cutout { padding: 2% 22% 12% 2%; }
.cf-podcast-hero .ph-copy { order: 2; }
.cf-podcast-hero .ph-card { order: 3; }
.cf-podcast-hero .ph-follow { order: 4; }
.cf-podcast-hero .ph-topics { order: 5; }
}
@media (max-width: 560px) {
.cf-podcast-hero .ph-card { gap: 20px; }
.cf-podcast-hero .ph-ep { gap: 16px; }
.cf-podcast-hero .ph-poster { width: 80px; height: 80px; }
.cf-podcast-hero .ph-disc { width: 40px; height: 40px; }
.cf-podcast-hero .ph-wave span:nth-child(n + 41) { display: none; }
.cf-podcast-hero .ph-cta { padding: 12px 20px; }
.cf-podcast-hero .ph-platforms li { flex: 1 1 auto; }
.cf-podcast-hero .ph-plat { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
.cf-podcast-hero .ph-in,
.cf-podcast-hero .ph-card[data-playing] .ph-wave span { animation: none; }
.cf-podcast-hero .ph-cover,
.cf-podcast-hero .ph-cta,
.cf-podcast-hero .ph-disc,
.cf-podcast-hero .ph-plat,
.cf-podcast-hero .ph-wave span { transition: none; }
.cf-podcast-hero .ph-visual:hover .ph-cover { transform: rotate(-3deg); }
}
`
pieces/hero/podcast-hero/specimen.tsx 49 lines
import __studioImagedb9af53f from "../assets/1e8b2eb5ac09d5c7.webp";
import __studioImaged354908a from "../assets/0d4e33ecc8c35b70.webp";
import { PodcastHero } from '../podcast-hero'
import { slot } from '../../slots'
import savings from '../../fx/spots/savings'
import pin from '../../fx/spots/pin'
import community from '../../fx/spots/community'
export const states = ['default', 'hover', 'active', 'disabled', 'playing']
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'playing'
export default function PodcastHeroSpecimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<PodcastHero
state={state}
showName='Main Street Mic'
promise='Every Tuesday, two shop owners trade the fixes that keep a small business busy, profitable and open on Main Street.'
aside='(Yes, even if you’ve never written a business plan.)'
hosts={['Rosa Alvarez', 'Dev Okafor']}
facts={['New episodes every Tuesday', '148 episodes']}
coverImage={slot(
'product',
__studioImagedb9af53f
)}
coverAlt='Main Street Mic podcast cover art'
presenterCutoutImage={slot('presenter-cutout', __studioImaged354908a)}
presenterAlt='Rosa Alvarez, co-host of Main Street Mic'
topics={[
{ title: 'Price it so it pays', detail: 'Margins, menus and the money talk', spot: savings },
{ title: 'Get found by locals', detail: 'Signs, search and word of mouth', spot: pin },
{ title: 'Hire your first help', detail: 'When, who and what to pay', spot: community },
]}
episode={{
title: 'Raise your prices without losing your regulars',
number: '148',
length: '38 min',
date: 'Nov 18',
}}
platforms={[
{ label: 'Any podcast app', href: '#follow-app' },
{ label: 'Web player', href: '#follow-web' },
{ label: 'RSS feed', href: '#follow-rss' },
{ label: 'Email me new episodes', href: '#follow-email' },
]}
copy={{ play: 'Hear the pricing fix', pause: 'Pause episode' }}
/>
)
}
| Name | Type | Details |
|---|---|---|
showName OptionalPodcastHero |
React.ReactNode |
|
promise OptionalPodcastHero |
React.ReactNode |
|
aside OptionalPodcastHero |
React.ReactNode |
|
hosts OptionalPodcastHero |
string[] |
|
facts OptionalPodcastHero |
string[] |
|
coverImage OptionalPodcastHero |
string |
|
coverAlt OptionalPodcastHero |
string |
|
presenterCutoutImage OptionalPodcastHero |
string |
|
presenterAlt OptionalPodcastHero |
string |
|
topics OptionalPodcastHero |
PodcastHeroTopic[] |
|
episode OptionalPodcastHero |
PodcastHeroEpisode |
|
playing OptionalPodcastHero |
boolean |
|
onPlay OptionalPodcastHero |
() => void |
|
platforms OptionalPodcastHero |
PodcastHeroPlatform[] |
|
disabled OptionalPodcastHero |
boolean |
|
state OptionalPodcastHero |
PodcastHeroState |
|
copy OptionalPodcastHero |
Partial<PodcastHeroCopy> |
|
className OptionalPodcastHero |
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.
--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).
-
0d114386aa55e8d2.webp
image/webp · 15.6 KB
-
0d4e33ecc8c35b70.webp
image/webp · 103 KB
-
1e8b2eb5ac09d5c7.webp
image/webp · 59.6 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
87170e25e6a4d825.webp
image/webp · 18.7 KB