Feature Bento 1
Feature bento: the hero feature as a large spotlight tile, the offer receipt beside it and the supporting benefit tiles in a row beneath, so every feature leads to one order button.
Use it in a prompt
Use content/feature-bento 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/feature-bento.tsx. - Import it and pass your copy and images (Props tab):
import { FeatureBento } from "@/components/funneldna/content/feature-bento"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/feature-bento/component.tsx 347 lines
// layout: spotlight-row
// Feature bento: the hero feature as a large spotlight tile, the offer receipt beside it and the supporting benefit tiles in a row beneath, so every feature leads to one order button.
// Theme notes: every colour reads the theme tokens. The --marker default (#fae37c) and the dark --shadow recipe are the only literal colours, and both sit inside var() fallbacks. Band text blends use oklab because --band-ink and --band are different hues.
import * as React from 'react';
import { ShieldCheck } from 'lucide-react';
export type FeatureBentoTile = {
/** Short benefit headline. */
title: React.ReactNode;
/** One supporting line under the headline. */
detail?: React.ReactNode;
/** Image src from a slot (item-n, product). */
image?: string;
/** Alt text for the image; empty marks it decorative. */
imageAlt?: string;
/** Plain caption under the image. */
caption?: React.ReactNode;
/** 'cover' for photos, 'contain' for transparent cut-outs. */
fit?: 'cover' | 'contain';
};
export type FeatureBentoHero = FeatureBentoTile & {
/** Italic aside in the author's voice. */
aside?: React.ReactNode;
};
export type FeatureBentoReceiptLine = { label: React.ReactNode; value: string };
export type FeatureBentoOffer = {
/** Headline at the top of the offer tile. */
title: React.ReactNode;
/** Name printed at the top of the receipt. */
receiptTitle?: React.ReactNode;
/** One receipt row per item in the offer. */
items: FeatureBentoReceiptLine[];
subtotalLabel: React.ReactNode;
subtotal: string;
discountLabel?: React.ReactNode;
/** Discount amount, e.g. '−$50'. The row is hidden when empty. */
discount?: string;
totalLabel: React.ReactNode;
total: string;
/** Instruction above the button, centred. */
instruction: React.ReactNode;
/** Button label. */
label: React.ReactNode;
/** One short reassurance line under the button. */
reassurance?: React.ReactNode;
};
export type FeatureBentoProps = {
/** Headline above the grid. */
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
/** Supporting line under the headline. */
subhead?: React.ReactNode;
/** The spotlight feature. */
hero?: FeatureBentoHero;
/** Up to three supporting tiles; extras are ignored. */
tiles?: FeatureBentoTile[];
/** Receipt, total and order button copy. */
offer?: FeatureBentoOffer;
/** Checkout destination; the button renders as a link while enabled. */
href?: string;
/** Called when the order button is clicked. */
onAction?: () => void;
/** Blocks the order button. */
disabled?: boolean;
/** Preview state; 'disabled' behaves like the disabled prop. */
state?: 'default' | 'hover' | 'active' | 'disabled';
/** Root class for page-level placement. */
className?: string;
};
export function FeatureBento(props: FeatureBentoProps) {
const {
headline = 'Build your first funnel with a clear plan',
highlight = 'a clear plan',
subhead = 'The Funnel Starter Kit puts your guide, workbook, and checklist in one download.',
hero = DEFAULT_HERO,
tiles = DEFAULT_TILES,
offer = DEFAULT_OFFER,
href,
onAction,
disabled = false,
state = 'default',
className,
} = props;
const isDisabled = disabled || state === 'disabled';
const supporting = tiles.slice(0, 3);
const heroFit = hero.fit ?? 'contain';
const handleClick = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
event.preventDefault();
return;
}
onAction?.();
};
const button =
href && !isDisabled ? (
<a className='cf-fb-btn' href={href} onClick={handleClick}>
{offer.label}
</a>
) : (
<button type='button' className='cf-fb-btn' disabled={isDisabled} onClick={handleClick}>
{offer.label}
</button>
);
return (
<div
className={['cf-feature-bento', className].filter(Boolean).join(' ')}
data-state={state}
data-disabled={isDisabled ? 'true' : undefined}
data-tiles={supporting.length}
>
<style>{CSS}</style>
{headline || subhead ? (
<header className='cf-fb-head'>
{headline ? <h2 className='cf-fb-h2'>{markPhrase(headline, highlight)}</h2> : null}
{subhead ? <p className='cf-fb-sub'>{subhead}</p> : null}
</header>
) : null}
<div className='cf-fb-grid'>
<article className='cf-fb-tile cf-fb-hero' data-media={hero.image ? 'image' : 'none'} style={revealOrder(0)}>
<div className='cf-fb-hero-copy'>
<h3 className='cf-fb-hero-title'>{hero.title}</h3>
{hero.detail ? <p className='cf-fb-hero-detail'>{hero.detail}</p> : null}
{hero.aside ? <p className='cf-fb-aside'>{hero.aside}</p> : null}
</div>
{hero.image ? (
<figure className='cf-fb-hero-fig'>
<span className='cf-fb-stage' data-fit={heroFit}>
<img src={hero.image} alt={hero.imageAlt ?? ''} width={480} height={480} decoding='async' />
</span>
{hero.caption ? <figcaption className='cf-fb-hero-cap'>{hero.caption}</figcaption> : null}
</figure>
) : null}
</article>
{supporting.map((tile, index) => (
<article
key={index}
className={`cf-fb-tile cf-fb-card cf-fb-t${index + 1}`}
style={revealOrder(index + 1)}
>
<h3 className='cf-fb-title'>{tile.title}</h3>
{tile.detail ? <p className='cf-fb-detail'>{tile.detail}</p> : null}
{tile.image ? (
<figure className='cf-fb-fig'>
<span className='cf-fb-well' data-fit={tile.fit ?? 'cover'}>
<img src={tile.image} alt={tile.imageAlt ?? ''} width={640} height={480} loading='lazy' decoding='async' />
</span>
{tile.caption ? <figcaption className='cf-fb-cap'>{tile.caption}</figcaption> : null}
</figure>
) : null}
</article>
))}
<article className='cf-fb-tile cf-fb-card cf-fb-offer' style={revealOrder(supporting.length + 1)}>
<h3 className='cf-fb-title cf-fb-offer-title'>{offer.title}</h3>
<div className='cf-fb-receipt'>
{offer.receiptTitle ? <p className='cf-fb-rtitle'>{offer.receiptTitle}</p> : null}
<dl>
{offer.items.map((line, index) => (
<div className='cf-fb-row' key={index}>
<dt>{line.label}</dt>
<dd>{line.value}</dd>
</div>
))}
<div className='cf-fb-row cf-fb-subrow'>
<dt>{offer.subtotalLabel}</dt>
<dd>{offer.subtotal}</dd>
</div>
{offer.discount ? (
<div className='cf-fb-row cf-fb-disc'>
<dt>{offer.discountLabel}</dt>
<dd>{offer.discount}</dd>
</div>
) : null}
<div className='cf-fb-row cf-fb-total'>
<dt>{offer.totalLabel}</dt>
<dd>{offer.total}</dd>
</div>
</dl>
</div>
<div className='cf-fb-action'>
<div className='cf-fb-cue'>
<p>{offer.instruction}</p>
</div>
{button}
{offer.reassurance ? (
<p className='cf-fb-assure'>
<ShieldCheck aria-hidden='true' strokeWidth={2.25} />
<span>{offer.reassurance}</span>
</p>
) : null}
</div>
</article>
</div>
</div>
);
}
export default FeatureBento;
/** Wraps the first occurrence of `phrase` in the marker stroke. */
function markPhrase(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className='cf-fb-marker'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
/** Staggers the tile entrance animation (capped at the fifth tile). */
function revealOrder(index: number): React.CSSProperties {
return { ['--i' as string]: Math.min(index, 4) } as React.CSSProperties;
}
const DEFAULT_HERO: FeatureBentoHero = {
title: 'Plan the whole funnel before you build a page',
detail: 'Map your offer and the pages your funnel needs.',
aside: '(I know. Planning feels slow. It’s the step that saves you the rebuild.)',
caption: 'Funnel Planning Guide',
fit: 'contain',
};
const DEFAULT_TILES: FeatureBentoTile[] = [
{ title: 'Find the words for your offer', detail: 'Draft your headline, offer, and call to action.', caption: 'Page Copy Workbook', fit: 'cover' },
{ title: 'Check every step before you go live', detail: 'Review the links, forms, and next steps before launch.', caption: 'Launch Checklist', fit: 'cover' },
{ title: 'Get everything in one download', detail: 'The guide, workbook, and checklist arrive together.', caption: 'Instant digital access', fit: 'contain' },
];
const DEFAULT_OFFER: FeatureBentoOffer = {
title: 'One payment. Yours to keep.',
receiptTitle: 'The Funnel Starter Kit',
items: [
{ label: 'Funnel Planning Guide', value: '$49' },
{ label: 'Page Copy Workbook', value: '$29' },
{ label: 'Launch Checklist', value: '$19' },
],
subtotalLabel: 'Subtotal',
subtotal: '$97',
discountLabel: 'Kit discount',
discount: '−$50',
totalLabel: 'Total today',
total: '$47',
instruction: 'Click the button below to get all three.',
label: 'Order now',
reassurance: '30-day money-back guarantee',
};
// Scoped under .cf-feature-bento. Rules that were previously unscoped use :where(.cf-feature-bento) so the
// scope adds no specificity and the approved cascade (hover, active, reduced-motion overrides) is unchanged.
const CSS = `
.cf-feature-bento{container:cf-fb / inline-size;--fb-r:calc(var(--card-radius, var(--radius, 12px)) + 6px);--fb-well:color-mix(in oklch, var(--ink) 4%, var(--card));--fb-marker:oklch(from var(--marker, #fae37c) l c h / 0.9);width:100%;color:var(--ink);font-family:var(--font-body);line-height:1.5;hyphens:manual}
.cf-feature-bento *,.cf-feature-bento *::before,.cf-feature-bento *::after{box-sizing:border-box}
.cf-feature-bento :where(h2,h3,p,figure,dl,dd){margin:0}
:where(.cf-feature-bento) .cf-fb-head{max-width:60rem;margin-inline:auto;text-align:center}
:where(.cf-feature-bento) .cf-fb-h2{font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);letter-spacing:var(--display-tracking, -0.025em);font-size:clamp(2rem, 5cqi, 3.75rem);line-height:1.06;color:var(--ink);text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-marker{color:oklch(from var(--marker, #fae37c) 0.21 0.03 h / 1);background-image:linear-gradient(to bottom, transparent 30%, var(--fb-marker) 30%, var(--fb-marker) 94%, transparent 94%);padding-inline:0.14em;margin-inline:-0.06em;border-radius:0.35em 0.6em 0.45em 0.3em / 0.5em 0.4em 0.6em 0.45em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
:where(.cf-feature-bento) .cf-fb-sub{max-width:44rem;margin:clamp(1rem, 1.6cqi, 1.375rem) auto 0;font-size:clamp(1.0625rem, 1.6cqi, 1.3125rem);font-weight:500;line-height:1.5;color:var(--muted);text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-grid{display:grid;grid-template-columns:minmax(0, 1fr);gap:clamp(0.75rem, 1.4cqi, 1.125rem)}
:where(.cf-feature-bento) .cf-fb-head + .cf-fb-grid{margin-top:clamp(1.75rem, 3.6cqi, 2.75rem)}
:where(.cf-feature-bento) .cf-fb-tile{position:relative;display:flex;flex-direction:column;min-width:0;border-radius:var(--fb-r);padding:clamp(1.375rem, 2.6cqi, 2rem);animation:cf-fb-in 0.45s cubic-bezier(0.22, 0.68, 0.32, 1) backwards;animation-delay:calc(var(--i, 0) * 70ms);transition:transform 0.25s ease, box-shadow 0.25s ease}
:where(.cf-feature-bento) .cf-fb-card{background:var(--card);color:var(--ink);border:1px solid var(--card-border, color-mix(in oklch, var(--ink) 12%, transparent));box-shadow:var(--card-shadow, var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14)))}
:where(.cf-feature-bento) .cf-fb-hero{display:grid;gap:clamp(1.5rem, 3cqi, 2rem);padding:clamp(1.5rem, 4cqi, 3rem);background:var(--band);color:var(--band-ink);border:1px solid oklch(from var(--band-ink) l c h / 0.1);box-shadow:var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2))}
:where(.cf-feature-bento) .cf-fb-hero-copy{display:flex;flex-direction:column;min-width:0}
:where(.cf-feature-bento) .cf-fb-hero-title{font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);letter-spacing:var(--display-tracking, -0.025em);font-size:clamp(1.875rem, 3.6cqi, 3rem);line-height:1.07;color:var(--band-ink);text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-hero-detail{max-width:38ch;margin-top:clamp(0.875rem, 1.4cqi, 1.125rem);font-size:clamp(1.0625rem, 1.5cqi, 1.25rem);font-weight:500;line-height:1.5;color:color-mix(in oklab, var(--band-ink) 88%, var(--band));text-wrap:pretty}
:where(.cf-feature-bento) .cf-fb-aside{max-width:40ch;margin-top:clamp(1rem, 1.6cqi, 1.375rem);font-size:clamp(1.0625rem, 1.4cqi, 1.1875rem);font-style:italic;line-height:1.55;color:color-mix(in oklab, var(--band-ink) 82%, var(--band));text-wrap:pretty}
:where(.cf-feature-bento) .cf-fb-hero-fig{display:grid;justify-items:center;gap:0.75rem;align-self:center;min-width:0}
:where(.cf-feature-bento) .cf-fb-stage{position:relative;display:grid;place-items:center;width:100%;max-width:clamp(15rem, 34cqi, 24rem);aspect-ratio:1}
:where(.cf-feature-bento) .cf-fb-stage::before{content:'';position:absolute;inset:8%;border-radius:50%;background:oklch(from var(--band) calc(l + 0.06) c h)}
:where(.cf-feature-bento) .cf-fb-stage img{position:relative;display:block;width:94%;height:94%;object-fit:contain;transform:rotate(-4deg);filter:drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) calc(l - 0.08) c h / 0.5)) drop-shadow(0 14px 16px oklch(from var(--shadow, oklch(0.22 0.03 260)) calc(l - 0.08) c h / 0.38));transition:transform 0.5s cubic-bezier(0.22, 0.68, 0.32, 1)}
:where(.cf-feature-bento) .cf-fb-stage[data-fit='cover']::before{display:none}
:where(.cf-feature-bento) .cf-fb-stage[data-fit='cover'] img{width:100%;height:100%;object-fit:cover;object-position:center;border-radius:var(--radius, 12px);transform:none;filter:none}
:where(.cf-feature-bento) .cf-fb-hero-cap{font-size:0.9375rem;font-weight:600;line-height:1.4;color:color-mix(in oklab, var(--band-ink) 86%, var(--band));text-align:center;text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-title{font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);letter-spacing:var(--display-tracking, -0.02em);font-size:clamp(1.375rem, 2.3cqi, 1.75rem);line-height:1.15;color:var(--ink);text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-detail{margin-top:0.5rem;font-size:1.0625rem;line-height:1.55;color:var(--muted);text-wrap:pretty}
:where(.cf-feature-bento) .cf-fb-fig{display:grid;gap:0.625rem;margin-top:auto;padding-top:1.5rem}
:where(.cf-feature-bento) .cf-fb-well{display:grid;place-items:center;aspect-ratio:4 / 3;border-radius:var(--radius, 12px);background:var(--fb-well);overflow:hidden}
:where(.cf-feature-bento) .cf-fb-well img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transition:transform 0.5s cubic-bezier(0.22, 0.68, 0.32, 1)}
:where(.cf-feature-bento) .cf-fb-well[data-fit='contain'] img{width:88%;height:88%;object-fit:contain;filter:drop-shadow(0 2px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35)) drop-shadow(0 10px 12px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.25))}
:where(.cf-feature-bento) .cf-fb-cap{font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-align:center;text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-offer{box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-feature-bento) .cf-fb-offer-title{text-align:center}
:where(.cf-feature-bento) .cf-fb-receipt{margin-top:1.125rem;padding:1.125rem 1.25rem 1.25rem;border-radius:var(--radius, 12px);background:var(--fb-well);font-variant-numeric:tabular-nums}
:where(.cf-feature-bento) .cf-fb-rtitle{margin-bottom:0.625rem;font-size:1rem;font-weight:800;line-height:1.35;color:var(--ink);text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-row{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;padding-block:0.25rem;font-size:1rem;line-height:1.4}
:where(.cf-feature-bento) .cf-fb-row dt{flex:1 1 auto;min-width:0;color:var(--ink);text-wrap:pretty}
:where(.cf-feature-bento) .cf-fb-row dd{flex:none;font-weight:600;color:var(--ink);white-space:nowrap}
:where(.cf-feature-bento) .cf-fb-subrow{margin-top:0.5rem}
:where(.cf-feature-bento) .cf-fb-subrow dt,:where(.cf-feature-bento) .cf-fb-subrow dd{color:var(--muted)}
:where(.cf-feature-bento) .cf-fb-disc dt,:where(.cf-feature-bento) .cf-fb-disc dd{color:var(--success);font-weight:700}
:where(.cf-feature-bento) .cf-fb-total{margin-top:0.75rem;padding-block:0}
:where(.cf-feature-bento) .cf-fb-total dt{font-size:1.0625rem;font-weight:800}
:where(.cf-feature-bento) .cf-fb-total dd{font-family:var(--font-display);font-weight:var(--display-weight, 800);font-size:clamp(2.25rem, 3.6cqi, 2.75rem);line-height:1;letter-spacing:-0.02em}
:where(.cf-feature-bento) .cf-fb-action{display:grid;margin-top:auto;padding-top:1.5rem}
:where(.cf-feature-bento) .cf-fb-cue{display:grid;justify-items:center;margin-bottom:0.875rem;text-align:center}
:where(.cf-feature-bento) .cf-fb-cue p{max-width:24ch;font-size:1.0625rem;font-weight:700;line-height:1.35;color:var(--ink);text-wrap:balance}
:where(.cf-feature-bento) .cf-fb-btn{--fb-b:var(--button-bg, var(--cta));--fb-b2:var(--button-bg-2, var(--cta-2));appearance:none;display:flex;align-items:center;justify-content:center;width:100%;min-height:3.75rem;margin:0;padding:0.85rem 1.5rem;border:1px solid oklch(from var(--fb-b2) calc(l - 0.08) c h);border-radius:var(--button-radius, var(--radius, 12px));background:linear-gradient(oklch(from var(--fb-b) calc(l + 0.04) c h), var(--fb-b2));color:var(--button-ink, var(--cta-ink));font-family:var(--button-font, var(--font-display));font-weight:var(--button-weight, 800);text-transform:var(--button-case, none);font-size:clamp(1.25rem, 2cqi, 1.5rem);line-height:1.1;letter-spacing:-0.01em;text-align:center;text-decoration:none;text-wrap:balance;text-shadow:var(--button-text-shadow, none);box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--fb-b) calc(l + 0.14) c h / 0.6), inset 0 -3px 0 oklch(from var(--fb-b) calc(l - 0.16) c h), var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));cursor:pointer;transition:transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease}
:where(.cf-feature-bento) .cf-fb-btn:hover:not(:disabled),.cf-feature-bento[data-state='hover'] .cf-fb-btn:not(:disabled){transform:translateY(-1px);background:linear-gradient(oklch(from var(--fb-b) calc(l - 0.02) c h), oklch(from var(--fb-b2) calc(l - 0.06) c h));box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--fb-b) calc(l + 0.1) c h / 0.6), inset 0 -3px 0 oklch(from var(--fb-b) calc(l - 0.2) c h), var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / 0.22), 0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)))}
:where(.cf-feature-bento) .cf-fb-btn:active:not(:disabled),.cf-feature-bento[data-state='active'] .cf-fb-btn:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--fb-b) calc(l - 0.08) c h), oklch(from var(--fb-b2) calc(l - 0.08) c h));box-shadow:inset 0 2px 3px oklch(from var(--fb-b) calc(l - 0.24) c h / 0.55), var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14))}
:where(.cf-feature-bento) .cf-fb-btn:focus-visible{outline:3px solid var(--field-focus, var(--accent));outline-offset:3px}
:where(.cf-feature-bento) .cf-fb-btn:disabled{background:var(--secondary);color:var(--secondary-ink);border-color:color-mix(in oklch, var(--ink) 14%, transparent);text-shadow:none;box-shadow:none;cursor:not-allowed}
:where(.cf-feature-bento) .cf-fb-assure{display:flex;align-items:center;justify-content:center;gap:0.4rem;margin-top:0.875rem;font-size:0.875rem;font-weight:600;line-height:1.4;color:var(--muted);text-align:center;text-wrap:pretty}
:where(.cf-feature-bento) .cf-fb-assure svg{flex:none;width:1.05rem;height:1.05rem;color:var(--success)}
@container cf-fb (min-width: 620px){
.cf-feature-bento .cf-fb-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
.cf-feature-bento .cf-fb-hero{grid-column:1 / -1;grid-template-columns:minmax(0, 1.08fr) minmax(0, 0.92fr);align-items:start}
.cf-feature-bento .cf-fb-hero[data-media='none']{grid-template-columns:minmax(0, 1fr)}
.cf-feature-bento .cf-fb-hero-copy{padding-top:clamp(0.25rem, 1cqi, 0.75rem)}
.cf-feature-bento[data-tiles='0'] .cf-fb-offer,.cf-feature-bento[data-tiles='2'] .cf-fb-offer{grid-column:1 / -1}
}
@container cf-fb (min-width: 940px){
.cf-feature-bento .cf-fb-grid{grid-template-columns:repeat(3, minmax(0, 1fr))}
.cf-feature-bento .cf-fb-hero{grid-column:1 / span 2;grid-row:1}
.cf-feature-bento[data-tiles] .cf-fb-offer{grid-column:3;grid-row:1}
.cf-feature-bento[data-tiles='2'] .cf-fb-t2{grid-column:span 2}
.cf-feature-bento[data-tiles='1'] .cf-fb-t1{grid-column:1 / -1}
}
@media (hover: hover) and (pointer: fine){
:where(.cf-feature-bento) .cf-fb-card:not(.cf-fb-offer):hover{transform:translateY(-3px);background:var(--card);box-shadow:var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2))}
:where(.cf-feature-bento) .cf-fb-card:hover .cf-fb-well[data-fit='cover'] img{transform:scale(1.035)}
:where(.cf-feature-bento) .cf-fb-card:hover .cf-fb-well[data-fit='contain'] img{transform:translateY(-3px)}
:where(.cf-feature-bento) .cf-fb-hero:hover .cf-fb-stage:not([data-fit='cover']) img{transform:rotate(-1deg) translateY(-4px)}
}
@keyframes cf-fb-in{from{opacity:0.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){
.cf-feature-bento .cf-fb-tile{animation:none}
.cf-feature-bento .cf-fb-tile,.cf-feature-bento .cf-fb-btn,.cf-feature-bento .cf-fb-well img,.cf-feature-bento .cf-fb-stage img{transition:none}
.cf-feature-bento .cf-fb-card:hover{transform:none}
.cf-feature-bento .cf-fb-card:hover .cf-fb-well img{transform:none}
.cf-feature-bento .cf-fb-hero:hover .cf-fb-stage:not([data-fit='cover']) img{transform:rotate(-4deg)}
}
`;
pieces/content/feature-bento/specimen.tsx 70 lines
import __studioImage400c3bc0 from "../assets/791aff2601a9bc81.webp";
import __studioImage8cdedae9 from "../assets/7de6af6668c48585.webp";
import * as React from 'react';
import { FeatureBento, type FeatureBentoProps } from '../feature-bento';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
export default function FeatureBentoSpecimen({ state = 'default' }: { state?: FeatureBentoProps['state'] }) {
const s = defaults.sample;
const [guide, workbook, checklist] = s.items;
return (
<FeatureBento
state={state}
headline={s.headline}
highlight='a clear plan'
subhead={`${s.name} puts your guide, workbook, and checklist in one download.`}
hero={{
title: 'Plan the whole funnel before you build a page',
detail: guide.detail,
aside: '(I know. Planning feels slow. It’s the step that saves you the rebuild.)',
image: slot('item-1', __studioImage400c3bc0),
imageAlt: guide.imageAlt,
caption: `${guide.name} · ${guide.value} value`,
fit: 'contain',
}}
tiles={[
{
title: 'Find the words for your offer',
detail: workbook.detail,
image: slot('item-2', workbook.image),
imageAlt: workbook.imageAlt,
caption: workbook.name,
fit: 'cover',
},
{
title: 'Check every step before you go live',
detail: checklist.detail,
image: slot('item-3', checklist.image),
imageAlt: checklist.imageAlt,
caption: checklist.name,
fit: 'cover',
},
{
title: 'Get everything in one download',
detail: 'The guide, workbook, and checklist arrive together.',
image: slot('product', __studioImage8cdedae9),
imageAlt: 'The Funnel Starter Kit: planning guide, copy workbook, and launch checklist together',
caption: s.reassurance[0],
fit: 'contain',
},
]}
offer={{
title: 'One payment. Yours to keep.',
receiptTitle: s.name,
items: s.items.map((item) => ({ label: item.name, value: item.value })),
subtotalLabel: 'Subtotal',
subtotal: s.regularPrice,
discountLabel: 'Kit discount',
discount: '−$50',
totalLabel: 'Total today',
total: s.price,
instruction: 'Click the button below to get all three.',
label: 'Order now',
reassurance: s.guarantee,
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFeatureBento |
string |
|
highlight OptionalFeatureBento |
string |
|
subhead OptionalFeatureBento |
React.ReactNode |
|
hero OptionalFeatureBento |
FeatureBentoHero |
|
tiles OptionalFeatureBento |
FeatureBentoTile[] |
|
offer OptionalFeatureBento |
FeatureBentoOffer |
|
href OptionalFeatureBento |
string |
|
onAction OptionalFeatureBento |
() => void |
|
disabled OptionalFeatureBento |
boolean |
|
state OptionalFeatureBento |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalFeatureBento |
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.
--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.
--marker- The highlighter colour behind key phrases.
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.
product- The main product shot or cover (ebook, kit, bottle).
-
791aff2601a9bc81.webp
image/webp · 68.2 KB
-
7de6af6668c48585.webp
image/webp · 148 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB