Prize Cards 2
JV contest prize spotlight: the grand prize lit on a dark stage, 2nd to 5th in a row beneath and a contest toggle, so Dream 100 partners see a prize worth mailing for and grab their affiliate link.
Use it in a prompt
Use jv/prize-cards-2 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/jv/prize-cards-2.tsx. - Import it and pass your copy and images (Props tab):
import { PrizeCards2 } from "@/components/funneldna/jv/prize-cards-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/jv/prize-cards-2/component.tsx 384 lines
// layout: spotlight-row
// JV contest prize spotlight: the grand prize lit on a dark stage, 2nd to 5th in a row beneath and a contest toggle, so Dream 100 partners see a prize worth mailing for and grab their affiliate link.
'use client'
import * as React from 'react'
import { CalendarDays, Target } from 'lucide-react'
import { FX_HOST, Spot, Spotlight } from '../fx/fx'
export type ContestPrize = {
/** The place as a numeral: '1', '2'… */
rank: string
/** Ordinal suffix set beside the numeral: 'st', 'nd'… */
suffix?: string
title: string
/** Pre-formatted value line: 'Worth $6,500'. */
value?: string
detail?: string
/** What it takes to win this place. */
toWin: string
/** Grand prize image (a transparent cut-out works best). */
image?: string
imageAlt?: string
/** fx Spot asset (imported module) for a runner-up card. */
spot?: string
}
export type ContestCategory = {
id: string
/** Toggle label: 'Top sales'. */
label: string
/** How this contest is ranked: 'Ranked by total sales'. */
metric?: string
grand: ContestPrize
places: ContestPrize[]
}
export type PrizeCards2Copy = {
grandLabel: string
/** Bold lead-in before each threshold. */
toWinLabel: string
/** Accessible name of the contest toggle. */
toggleLabel: string
/** Screen-reader note after a switch; {label} is the contest name. */
announce: string
/** Accessible name of the runner-up row. */
rowLabel: string
/** Phone-only hint under the scrolling row. */
swipeHint: string
}
export type PrizeCards2Props = {
headline?: React.ReactNode
/** Phrase inside a string headline that gets the marker stroke. */
highlight?: string
lead?: React.ReactNode
categories?: ContestCategory[]
/** Category id shown first. */
defaultCategory?: string
actionLabel?: string
/** One short line under the button. */
actionNote?: string
href?: string
onAction?: (event: React.MouseEvent<HTMLElement>) => void
/** Contest dates line. */
dates?: string
rulesLabel?: string
rulesHref?: string
copy?: Partial<PrizeCards2Copy>
state?: 'default' | 'hover' | 'active' | 'disabled'
className?: string
}
export function PrizeCards2({
headline = 'Promote the launch and win a prize worth promoting for',
highlight = 'a prize worth promoting for',
lead = 'Pick the contest that fits your audience, earn your commission on every sale and compete with the other partners for the prizes below.',
categories = DEFAULT_CATEGORIES,
defaultCategory,
actionLabel = 'Get my affiliate link',
actionNote = 'Free to join. Takes 30 seconds.',
href,
onAction,
dates,
rulesLabel = 'Read the contest rules',
rulesHref,
copy,
state = 'default',
className,
}: PrizeCards2Props) {
const c: PrizeCards2Copy = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const [activeId, setActiveId] = React.useState<string | undefined>(defaultCategory ?? categories[0]?.id)
const [announced, setAnnounced] = React.useState(false)
const active = categories.find((cat) => cat.id === activeId) ?? categories[0]
if (!active) return null
const grand = active.grand
const places = active.places
const panelId = `${uid}-panel`
const headingId = `${uid}-heading`
const disabled = state === 'disabled'
const cols = Math.min(4, Math.max(1, places.length))
const select = (id: string) => {
setActiveId(id)
setAnnounced(true)
}
const action =
href && !disabled ? (
<a className='cf-pc2__cta' href={href} onClick={onAction}>
{actionLabel}
</a>
) : (
<button type='button' className='cf-pc2__cta' disabled={disabled} onClick={onAction}>
{actionLabel}
</button>
)
return (
<section
className={['cf-pc2', className].filter(Boolean).join(' ')}
data-state={state}
style={FX_HOST}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<Spotlight />
<div className='cf-pc2__inner'>
<header className='cf-pc2__head'>
<h2 id={headingId} className='cf-pc2__h2'>
{renderHeadline(headline, highlight)}
</h2>
{lead && <p className='cf-pc2__lead'>{lead}</p>}
{categories.length > 1 && (
<div className='cf-pc2__toggle' role='group' aria-label={c.toggleLabel}>
{categories.map((cat) => (
<button
key={cat.id}
type='button'
className='cf-pc2__tab'
aria-pressed={cat.id === active.id}
aria-controls={panelId}
onClick={() => select(cat.id)}
>
{cat.label}
</button>
))}
</div>
)}
<p className='cf-pc2__sr' aria-live='polite'>
{announced ? c.announce.replace('{label}', active.label) : ''}
</p>
</header>
<div id={panelId} key={active.id}>
<div className={grand.image ? 'cf-pc2__stage' : 'cf-pc2__stage cf-pc2__stage--solo'}>
{grand.image && (
<figure className='cf-pc2__figure cf-pc2__swap'>
<img
className='cf-pc2__img'
src={grand.image}
alt={grand.imageAlt ?? grand.title}
width={520}
height={520}
decoding='async'
/>
</figure>
)}
<div className='cf-pc2__details cf-pc2__swap'>
<div className='cf-pc2__rank'>
<span className='cf-pc2__bignum'>
{grand.rank}
{grand.suffix && <span className='cf-pc2__suf'>{grand.suffix}</span>}
</span>
<span className='cf-pc2__rankmeta'>
<span className='cf-pc2__rankname'>{c.grandLabel}</span>
{active.metric && <span className='cf-pc2__metric'>{active.metric}</span>}
</span>
</div>
<h3 className='cf-pc2__title'>{grand.title}</h3>
{grand.value && <p className='cf-pc2__value'>{grand.value}</p>}
{grand.detail && <p className='cf-pc2__detail'>{grand.detail}</p>}
<p className='cf-pc2__win'>
<Target className='cf-pc2__ico' size={18} strokeWidth={2.5} aria-hidden='true' />
<strong>{c.toWinLabel}</strong> {grand.toWin}
</p>
<div className='cf-pc2__actions'>
{action}
{actionNote && <p className='cf-pc2__note'>{actionNote}</p>}
</div>
</div>
</div>
{places.length > 0 && (
<div className='cf-pc2__rowwrap'>
<ul
className='cf-pc2__row'
tabIndex={0}
aria-label={c.rowLabel}
style={{ ['--pc2-cols' as string]: String(cols) } as React.CSSProperties}
>
{places.map((p, i) => (
<li
key={`${p.rank}-${p.title}`}
className='cf-pc2__card cf-pc2__swap'
style={{ animationDelay: `${Math.min((i + 1) * 0.07, 0.28)}s` }}
>
<div className='cf-pc2__cardtop'>
<span className='cf-pc2__cardnum'>
{p.rank}
{p.suffix && <span className='cf-pc2__cardsuf'>{p.suffix}</span>}
</span>
{p.spot && <Spot src={p.spot} size={56} />}
</div>
<h3 className='cf-pc2__cardtitle'>{p.title}</h3>
{p.value && <p className='cf-pc2__cardvalue'>{p.value}</p>}
{p.detail && <p className='cf-pc2__carddetail'>{p.detail}</p>}
<p className='cf-pc2__cardwin'>
<Target className='cf-pc2__ico' size={16} strokeWidth={2.5} aria-hidden='true' />
<strong>{c.toWinLabel}</strong> {p.toWin}
</p>
</li>
))}
</ul>
{places.length > 1 && <p className='cf-pc2__hint'>{c.swipeHint}</p>}
</div>
)}
</div>
{(dates || rulesHref) && (
<div className='cf-pc2__foot'>
{dates && (
<p>
<CalendarDays className='cf-pc2__ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{dates}
</p>
)}
{rulesHref && (
<p>
<a className='cf-pc2__rules' href={rulesHref}>
{rulesLabel}
</a>
</p>
)}
</div>
)}
</div>
</section>
)
}
export default PrizeCards2
function renderHeadline(headline: React.ReactNode, highlight?: string) {
if (typeof headline !== 'string' || !highlight) return headline
const at = headline.indexOf(highlight)
if (at < 0) return headline
return (
<>
{headline.slice(0, at)}
<span className='cf-pc2__mark'>{highlight}</span>
{headline.slice(at + highlight.length)}
</>
)
}
const DEFAULT_COPY: PrizeCards2Copy = {
grandLabel: 'Grand prize',
toWinLabel: 'To win:',
toggleLabel: 'Choose a contest',
announce: 'Showing the {label} prizes.',
rowLabel: 'More prizes',
swipeHint: 'Swipe to see every prize',
}
const DEFAULT_CATEGORIES: ContestCategory[] = [
{
id: 'sales',
label: 'Top sales',
metric: 'Ranked by total sales',
grand: {
rank: '1',
suffix: 'st',
title: 'The Creator Studio Bundle',
value: 'Worth $6,500',
detail: 'A pro laptop, a mirrorless camera and a studio mic, shipped to your door after the launch.',
toWin: 'the most sales in launch week, with at least 50 sales.',
},
places: [
{ rank: '2', suffix: 'nd', title: '$2,500 cash bonus', detail: 'Paid on top of your commissions.', toWin: '2nd most sales, at least 30.' },
{ rank: '3', suffix: 'rd', title: '$1,500 cash bonus', detail: 'Paid on top of your commissions.', toWin: '3rd most sales, at least 20.' },
{ rank: '4', suffix: 'th', title: 'A weekend away for two', value: 'Worth $1,000', toWin: '4th most sales, at least 15.' },
{ rank: '5', suffix: 'th', title: 'A VIP mastermind seat', value: 'Worth $750', toWin: '5th most sales, at least 10.' },
],
},
{
id: 'leads',
label: 'Most leads',
metric: 'Ranked by new leads you send',
grand: {
rank: '1',
suffix: 'st',
title: 'The Remote Office E-Bike',
value: 'Worth $4,000',
detail: 'A premium electric bike with a rear rack for your laptop bag.',
toWin: 'the most new opt-ins from your link in launch week, with at least 1,000 leads.',
},
places: [
{ rank: '2', suffix: 'nd', title: '$1,500 cash bonus', detail: 'Paid on top of your commissions.', toWin: '2nd most leads, at least 600.' },
{ rank: '3', suffix: 'rd', title: '$1,000 cash bonus', detail: 'Paid on top of your commissions.', toWin: '3rd most leads, at least 400.' },
{ rank: '4', suffix: 'th', title: 'Studio headphones', value: 'Worth $400', toWin: '4th most leads, at least 250.' },
{ rank: '5', suffix: 'th', title: 'A free year of the course', value: 'Worth $588', toWin: '5th most leads, at least 150.' },
],
},
]
const CSS = `
.cf-pc2{--pc2-shadow:var(--shadow,oklch(0.22 0.03 260));--pc2-gutter:clamp(16px,5vw,48px);--pc2-btn:var(--button-bg,var(--cta,#d93a2b));--pc2-btn-2:var(--button-bg-2,var(--cta-2,#b8281c));--pc2-soft:color-mix(in oklab,var(--band-ink,#fff) 86%,var(--band,#16233f));position:relative;overflow:hidden;isolation:isolate;background:var(--band,#16233f);color:var(--band-ink,#fff);font-family:var(--font-body,system-ui,sans-serif);padding-block:clamp(56px,8vw,112px) clamp(64px,8.5vw,120px)}
.cf-pc2 *,.cf-pc2 *::before,.cf-pc2 *::after{box-sizing:border-box}
.cf-pc2 :where(h2,h3,p,ul,figure){margin:0}
.cf-pc2__inner{position:relative;z-index:1;max-width:1120px;margin-inline:auto;padding-inline:var(--pc2-gutter)}
.cf-pc2__head{max-width:46rem;margin-inline:auto;text-align:center}
.cf-pc2__h2{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(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--band-ink,#fff)}
.cf-pc2__mark{color:var(--accent-fill-ink,#fff);background:linear-gradient(176deg,transparent 7%,var(--accent-fill,var(--accent,#2f5ad0)) 7%,var(--accent-fill,var(--accent,#2f5ad0)) 93%,transparent 93%);padding:0 .14em;margin:0 -.04em;border-radius:.1em .32em .14em .26em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-pc2__lead{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:var(--pc2-soft)}
.cf-pc2__toggle{display:inline-flex;gap:4px;margin-top:28px;padding:5px;border-radius:999px;background:oklch(from var(--band-ink,#fff) l c h / .12);box-shadow:inset 0 1px 2px oklch(from var(--pc2-shadow) l c h / .35)}
.cf-pc2__tab{appearance:none;border:0;min-height:48px;min-width:9rem;padding:0 24px;border-radius:999px;background:transparent;color:var(--band-ink,#fff);font-family:var(--font-body,inherit);font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.15;white-space:nowrap;cursor:pointer;transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-pc2__tab:hover{background:oklch(from var(--band-ink,#fff) l c h / .12)}
.cf-pc2__tab:active{transform:scale(.97)}
.cf-pc2__tab[aria-pressed='true']{background:var(--card,#fff);color:var(--ink,#1a2233);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--pc2-shadow) l c h / .3))}
.cf-pc2__tab:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:2px}
.cf-pc2__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cf-pc2__stage{display:grid;gap:clamp(24px,4vw,56px);margin-top:clamp(40px,5vw,64px);align-items:start}
.cf-pc2__figure{position:relative;width:100%;max-width:520px;justify-self:center}
.cf-pc2__figure::after{content:'';position:absolute;z-index:0;left:14%;right:14%;bottom:3%;height:10%;border-radius:50%;background:radial-gradient(closest-side,oklch(from var(--pc2-shadow) calc(l - .08) c h / .55),transparent)}
.cf-pc2__img{position:relative;z-index:1;display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--pc2-shadow) l c h / .45)) drop-shadow(0 18px 22px oklch(from var(--pc2-shadow) l c h / .4))}
.cf-pc2__rank{display:flex;align-items:flex-end;gap:16px}
.cf-pc2__bignum{display:inline-flex;align-items:flex-start;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(5rem,9vw,8rem);line-height:.82;letter-spacing:-.05em;font-variant-numeric:tabular-nums;color:var(--band-ink,#fff)}
.cf-pc2__suf{margin:.06em 0 0 .06em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:0}
.cf-pc2__rankmeta{display:flex;flex-direction:column;gap:4px;padding-bottom:4px;text-align:left}
.cf-pc2__rankname{font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--band-ink,#fff)}
.cf-pc2__metric{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--pc2-soft)}
.cf-pc2__title{margin-top:24px;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(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--band-ink,#fff)}
.cf-pc2__value{display:inline-flex;align-items:center;min-height:36px;margin-top:16px;padding:4px 16px;border-radius:999px;background:var(--accent-fill,var(--accent,#2f5ad0));color:var(--accent-fill-ink,#fff);font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums}
.cf-pc2__detail{margin-top:16px;max-width:52ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty;color:var(--pc2-soft)}
.cf-pc2__win{margin-top:20px;padding:14px 18px;border-radius:12px;background:oklch(from var(--band-ink,#fff) l c h / .1);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty;color:var(--band-ink,#fff)}
.cf-pc2__win strong,.cf-pc2__cardwin strong{font-weight:800}
.cf-pc2__ico{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em;flex:none}
.cf-pc2__actions{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:28px}
.cf-pc2__cta{display:inline-flex;align-items:center;justify-content:center;min-height:72px;min-width:320px;max-width:100%;padding:0 32px;border:0;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;white-space:nowrap;text-decoration:none;color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--pc2-btn) calc(l + .04) c h),oklch(from var(--pc2-btn-2) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pc2-btn) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--pc2-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--pc2-shadow) l c h / .45),0 8px 16px -6px oklch(from var(--pc2-shadow) l c h / .55));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-pc2__cta:not(:disabled):hover,.cf-pc2[data-state='hover'] .cf-pc2__cta{background:linear-gradient(oklch(from var(--pc2-btn) calc(l - .01) c h),oklch(from var(--pc2-btn-2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--pc2-btn) calc(l + .12) c h / .6),inset 0 -3px 0 oklch(from var(--pc2-btn) calc(l - .2) c h),0 1px 2px oklch(from var(--pc2-shadow) l c h / .5),0 12px 20px -8px oklch(from var(--pc2-shadow) l c h / .65)}
.cf-pc2__cta:not(:disabled):active,.cf-pc2[data-state='active'] .cf-pc2__cta{transform:translateY(1px);background:linear-gradient(oklch(from var(--pc2-btn) calc(l - .04) c h),oklch(from var(--pc2-btn-2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--pc2-btn) calc(l - .24) c h / .55),inset 0 -2px 0 oklch(from var(--pc2-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--pc2-shadow) l c h / .4)}
.cf-pc2__cta:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:3px}
.cf-pc2__cta:disabled{background:var(--button-2-bg,var(--secondary,#e6e9ef));color:var(--button-2-ink,var(--secondary-ink,#1a2233));box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--pc2-shadow) l c h / .3)));text-shadow:none;cursor:not-allowed;transform:none}
.cf-pc2__note{font-size:.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty;color:var(--pc2-soft)}
.cf-pc2__rowwrap{margin-top:clamp(40px,5vw,56px)}
.cf-pc2__row{list-style:none;padding:0;display:grid;gap:16px}
.cf-pc2__row:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:4px;border-radius:var(--card-radius,var(--radius,14px))}
.cf-pc2__card{position:relative;display:flex;flex-direction:column;min-width:0;padding:clamp(20px,2.4vw,28px);background:var(--card,#fff);color:var(--ink,#1a2233);border:1px solid var(--card-border,oklch(from var(--ink,#1a2233) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--pc2-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--pc2-shadow) l c h / .2)))}
.cf-pc2__cardtop{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.cf-pc2__cardnum{display:inline-flex;align-items:flex-start;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--accent,#2f5ad0)}
.cf-pc2__cardsuf{margin:.08em 0 0 .06em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:0}
.cf-pc2__cardtitle{margin-top:16px;font-family:var(--font-display,inherit);font-weight:800;letter-spacing:-.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink,#1a2233)}
.cf-pc2__cardvalue{margin-top:8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4;font-weight:800;font-variant-numeric:tabular-nums;color:var(--accent,#2f5ad0)}
.cf-pc2__carddetail{margin-top:8px;font-size:.9375rem;line-height:1.4;text-wrap:pretty;color:var(--muted,#4a5568)}
.cf-pc2__card > :nth-last-child(2){margin-bottom:16px}
.cf-pc2__cardwin{margin-top:auto;padding:12px 14px;border-radius:10px;background:color-mix(in oklch,var(--ink,#1a2233) 4%,var(--card,#fff));font-size:.9375rem;line-height:1.4;text-wrap:pretty;color:var(--ink,#1a2233)}
.cf-pc2__cardwin .cf-pc2__ico{color:var(--accent,#2f5ad0)}
.cf-pc2__hint{display:none;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--pc2-soft)}
.cf-pc2__foot{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 28px;margin-top:clamp(32px,4vw,40px);text-align:center;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--pc2-soft)}
.cf-pc2__rules{font-weight:700;color:var(--band-ink,#fff);text-decoration:underline;text-decoration-color:oklch(from var(--band-ink,#fff) l c h / .5);text-underline-offset:.18em}
.cf-pc2__rules:hover{text-decoration-color:var(--band-ink,#fff)}
.cf-pc2__rules:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:3px;border-radius:4px}
@keyframes cf-pc2-in{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-pc2__swap{animation:cf-pc2-in .45s cubic-bezier(.2,.7,.2,1) both}
@media (min-width:720px){.cf-pc2__row{grid-template-columns:repeat(min(2,var(--pc2-cols)),minmax(0,1fr))}}
@media (min-width:900px){.cf-pc2__stage{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.cf-pc2__stage--solo{grid-template-columns:minmax(0,46rem);justify-content:center}.cf-pc2__details{padding-top:clamp(8px,2vw,32px)}}
@media (min-width:1000px){.cf-pc2__row{grid-template-columns:repeat(var(--pc2-cols),minmax(0,1fr));gap:20px}}
@media (max-width:899.98px){.cf-pc2__details{max-width:40rem;margin-inline:auto;text-align:center}.cf-pc2__rank{justify-content:center}.cf-pc2__detail{margin-inline:auto}.cf-pc2__actions{align-items:center}.cf-pc2__figure{max-width:360px}}
@media (max-width:719.98px){.cf-pc2__toggle{display:flex;width:100%;max-width:420px}.cf-pc2__tab{flex:1 1 0;min-width:0;padding:0 12px}.cf-pc2__cta{width:100%;min-width:0}.cf-pc2__row{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;margin-inline:calc(var(--pc2-gutter) * -1);padding:4px var(--pc2-gutter) 20px;scroll-padding-inline:var(--pc2-gutter);scrollbar-width:none}.cf-pc2__row::-webkit-scrollbar{display:none}.cf-pc2__card{flex:0 0 min(80%,300px);scroll-snap-align:start}.cf-pc2__hint{display:block}}
@media (prefers-reduced-motion:reduce){.cf-pc2 *{animation:none!important;transition:none!important}.cf-pc2__row{scroll-behavior:auto}}
`
pieces/jv/prize-cards-2/specimen.tsx 86 lines
import __studioImage811d28ad from "../assets/614eca9eb7ae65ce.webp";
import __studioImage7af75510 from "../assets/27b0d3bf93f3a458.webp";
import * as React from 'react'
import { PrizeCards2, type ContestCategory } from '../prize-cards-2'
import { slot } from '../../slots'
import savings from '../../fx/spots/savings'
import gift from '../../fx/spots/gift'
import star from '../../fx/spots/star'
import community from '../../fx/spots/community'
import rocket from '../../fx/spots/rocket'
export const states = ['default', 'hover', 'active', 'disabled']
export default function PrizeCards2Specimen({
state = 'default',
}: {
state?: 'default' | 'hover' | 'active' | 'disabled'
}) {
const categories: ContestCategory[] = [
{
id: 'sales',
label: 'Top sales',
metric: 'Ranked by total sales',
grand: {
rank: '1',
suffix: 'st',
title: 'The Creator Studio Bundle',
value: 'Worth $6,500',
detail: 'A pro laptop, a mirrorless camera and a studio mic, shipped to your door after the launch.',
toWin: 'the most Pipeline Pro sales in launch week, with at least 50 sales.',
image: slot(
'item-1',
__studioImage811d28ad
),
imageAlt: 'Laptop, mirrorless camera and studio microphone bundle',
},
places: [
{ rank: '2', suffix: 'nd', title: '$2,500 cash bonus', detail: 'Paid on top of your commissions.', toWin: '2nd most sales, at least 30.', spot: savings },
{ rank: '3', suffix: 'rd', title: '$1,500 cash bonus', detail: 'Paid on top of your commissions.', toWin: '3rd most sales, at least 20.', spot: gift },
{ rank: '4', suffix: 'th', title: 'A weekend away for two', value: 'Worth $1,000', toWin: '4th most sales, at least 15.', spot: star },
{ rank: '5', suffix: 'th', title: 'A VIP Pipeline Pro mastermind seat', value: 'Worth $750', toWin: '5th most sales, at least 10.', spot: community },
],
},
{
id: 'leads',
label: 'Most leads',
metric: 'Ranked by new leads you send',
grand: {
rank: '1',
suffix: 'st',
title: 'The Remote Office E-Bike',
value: 'Worth $4,000',
detail: 'A premium electric bike with a rear rack for your laptop bag, for the partner who sends the most new leads.',
toWin: 'the most new opt-ins from your link in launch week, with at least 1,000 leads.',
image: slot(
'item-2',
__studioImage7af75510
),
imageAlt: 'Charcoal electric city bike with a tan leather saddle',
},
places: [
{ rank: '2', suffix: 'nd', title: '$1,500 cash bonus', detail: 'Paid on top of your commissions.', toWin: '2nd most leads, at least 600.', spot: savings },
{ rank: '3', suffix: 'rd', title: '$1,000 cash bonus', detail: 'Paid on top of your commissions.', toWin: '3rd most leads, at least 400.', spot: gift },
{ rank: '4', suffix: 'th', title: 'Studio headphones', value: 'Worth $400', toWin: '4th most leads, at least 250.', spot: star },
{ rank: '5', suffix: 'th', title: 'A free year of Pipeline Pro', value: 'Worth $588', toWin: '5th most leads, at least 150.', spot: rocket },
],
},
]
return (
<PrizeCards2
headline='Mail the Pipeline Pro launch and win a prize worth promoting for'
highlight='a prize worth promoting for'
lead='You are on our Dream 100 list. Pick the contest that fits your audience, earn your commission on every sale and race the other partners for the prizes below.'
categories={categories}
actionLabel='Get my affiliate link'
actionNote='Free to join. One link counts for both contests.'
onAction={() => {}}
dates='Contest runs open cart week: March 3–10, 2027.'
rulesLabel='Read the contest rules'
rulesHref='#contest-rules'
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalPrizeCards2 |
React.ReactNode |
Default 'Promote the launch and win a prize worth promoting for'
|
highlight OptionalPrizeCards2 |
string |
Default 'a prize worth promoting for'
|
lead OptionalPrizeCards2 |
React.ReactNode |
Default 'Pick the contest that fits your audience, earn your commission on every sale and compete with the other partners for the prizes below.'
|
categories OptionalPrizeCards2 |
ContestCategory[] |
Default DEFAULT_CATEGORIES
|
defaultCategory OptionalPrizeCards2 |
string |
|
actionLabel OptionalPrizeCards2 |
string |
Default 'Get my affiliate link'
|
actionNote OptionalPrizeCards2 |
string |
Default 'Free to join. Takes 30 seconds.'
|
href OptionalPrizeCards2 |
string |
|
onAction OptionalPrizeCards2 |
(event: React.MouseEvent<HTMLElement>) => void |
|
dates OptionalPrizeCards2 |
string |
|
rulesLabel OptionalPrizeCards2 |
string |
Default 'Read the contest rules'
|
rulesHref OptionalPrizeCards2 |
string |
|
copy OptionalPrizeCards2 |
Partial<PrizeCards2Copy> |
|
state OptionalPrizeCards2 |
'default' | 'hover' | 'active' | 'disabled' |
Default 'default'
|
className OptionalPrizeCards2 |
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.
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.
-
27b0d3bf93f3a458.webp
image/webp · 348 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
614eca9eb7ae65ce.webp
image/webp · 78.7 KB
-
63571cb07acc4626.webp
image/webp · 17.3 KB
-
87170e25e6a4d825.webp
image/webp · 18.7 KB
-
d7814fce240ddf0e.webp
image/webp · 17.6 KB
-
f6a8de367400456e.webp
image/webp · 14.6 KB