Collection Grid 2
Shop-the-look spread: a styled scene beside its numbered product list. Ticking pieces updates a live set total, and one "Add the set" action raises order value.
Use it in a prompt
Use offer/collection-grid-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/offer/collection-grid-2.tsx. - Import it and pass your copy and images (Props tab):
import { CollectionGrid2 } from "@/components/funneldna/offer/collection-grid-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/collection-grid-2/component.tsx 422 lines
// layout: magazine-spread
// Shop-the-look spread: a styled scene beside its numbered product list. Ticking pieces updates a live set total, and one "Add the set" action raises order value.
import * as React from "react";
import { Check, ShieldCheck, Sparkles } from "lucide-react";
export type CollectionGridItem = {
/** Stable key; defaults to the item's position. */
id?: string;
name: string;
/** Short spec line under the name (size, colour, finish). */
detail?: string;
/** Price in the major currency unit, e.g. 189 for $189. */
price: number;
/** Product photo (theme slot item-n). */
image?: string;
imageAlt?: string;
/** When the image is a product contact sheet, the cell to show (counted left to right, top to bottom). */
imageSheet?: { columns: number; rows: number; index: number };
/** Shown in the list but cannot be ticked. */
soldOut?: boolean;
/** In-stock items start ticked unless this is false. */
checked?: boolean;
};
export type CollectionGrid2Copy = {
/** Screen-reader legend for the checklist. */
legend: string;
soldOut: string;
/** {count} is replaced. */
pieceOne: string;
/** {count} is replaced. */
pieceMany: string;
/** {percent} is replaced. */
saving: string;
/** {more} and {percent} are replaced. */
nudge: string;
moreOne: string;
/** {count} is replaced. */
moreMany: string;
totalLabel: string;
/** {total} is replaced with the live total. */
addLabel: string;
/** Button label while nothing is ticked. */
emptyLabel: string;
};
export type CollectionGrid2Props = {
headline?: string;
/** Phrase inside the headline set in the accent colour. */
highlight?: string;
lead?: React.ReactNode;
/** Italic aside in the founder's voice under the lead. */
aside?: React.ReactNode;
/** Large pull line above the list. */
pullLine?: React.ReactNode;
/** Lifestyle photo of the products in use (theme slot scene). */
sceneImage?: string;
sceneAlt?: string;
/** CSS object-position for the scene photo. */
scenePosition?: string;
/** Plain caption under the photo. */
caption?: React.ReactNode;
items?: CollectionGridItem[];
currency?: string;
locale?: string;
/** Optional set saving once enough pieces are ticked. Only pass a real offer. */
bundle?: { minItems: number; percentOff: number };
/** Risk reversal that leads the action, set in bold. Only pass a real guarantee. */
riskLead?: React.ReactNode;
riskText?: React.ReactNode;
copy?: Partial<CollectionGrid2Copy>;
/** Called with the ticked items and the set total. */
onAdd?: (items: CollectionGridItem[], total: number) => void;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function CollectionGrid2({
headline = "Shop every piece in this shot",
highlight,
lead = "Tick the pieces you want. Your set total updates as you go.",
aside,
pullLine,
sceneImage,
sceneAlt = "",
scenePosition = "50% 55%",
caption,
items = [],
currency = "USD",
locale = "en-US",
bundle,
riskLead,
riskText,
copy,
onAdd,
state = "default",
className,
}: CollectionGrid2Props) {
const c = { ...DEFAULT_COPY, ...copy };
const riskId = React.useId();
const [picked, setPicked] = React.useState<string[]>(() => initialPicked(items, state));
const [bump, setBump] = React.useState(0);
const lastState = React.useRef(state);
React.useEffect(() => {
if (lastState.current === state) return;
lastState.current = state;
setPicked(initialPicked(items, state));
}, [state, items]);
const money = React.useMemo(() => moneyFormat(locale, currency), [locale, currency]);
const chosen = items.filter((it, i) => !it.soldOut && picked.includes(keyOf(it, i)));
const count = chosen.length;
const subtotal = chosen.reduce((sum, it) => sum + it.price, 0);
const qualifies = !!bundle && count >= bundle.minItems;
const saving = qualifies && bundle ? Math.round(subtotal * bundle.percentOff) / 100 : 0;
const total = Math.round((subtotal - saving) * 100) / 100;
const inStock = items.filter((it) => !it.soldOut).length;
const remaining = bundle ? bundle.minItems - count : 0;
const showNudge = !!bundle && !qualifies && bundle.minItems <= inStock;
const percent = bundle ? String(bundle.percentOff) : "";
const pieces = fill(count === 1 ? c.pieceOne : c.pieceMany, { count: String(count) });
const more = fill(remaining === 1 ? c.moreOne : c.moreMany, { count: String(remaining) });
const empty = count === 0;
const hasRisk = Boolean(riskLead || riskText);
const toggle = (key: string) => {
setPicked((p) => (p.includes(key) ? p.filter((k) => k !== key) : [...p, key]));
setBump((b) => b + 1);
};
const buttonClass = ["add", state === "hover" ? "is-hover" : "", state === "active" ? "is-active" : ""]
.filter(Boolean)
.join(" ");
return (
<section className={["cf-collection-grid-2", className].filter(Boolean).join(" ")}>
<style>{CSS}</style>
<div className="wrap">
<header className="head">
<h2 className="h">{withHighlight(headline, highlight)}</h2>
{(lead || aside) && (
<div className="intro">
{lead && <p className="lead">{lead}</p>}
{aside && <p className="aside">{aside}</p>}
</div>
)}
</header>
<div className={sceneImage ? "spread" : "spread solo"}>
{sceneImage && (
<figure className="media">
<img
className="photo"
src={sceneImage}
alt={sceneAlt}
width={800}
height={1000}
style={{ objectPosition: scenePosition }}
/>
{caption && <figcaption className="caption">{caption}</figcaption>}
</figure>
)}
<div className="shop">
{pullLine && <p className="pull">{pullLine}</p>}
<fieldset className="set">
<legend className="sr">{c.legend}</legend>
<ul className="list">
{items.map((it, i) => {
const key = keyOf(it, i);
const on = !it.soldOut && picked.includes(key);
return (
<li
key={key}
className="row"
data-on={on || undefined}
data-out={it.soldOut || undefined}
style={{ "--i": i } as React.CSSProperties}
>
<label className="hit">
<span className="box">
<input
type="checkbox"
checked={on}
disabled={it.soldOut}
onChange={() => toggle(key)}
/>
<Check size={18} strokeWidth={3} aria-hidden="true" />
</span>
<span className="no" aria-hidden="true">
{String(i + 1).padStart(2, "0")}
</span>
<span className="th">
{it.image && (
<img
src={it.image}
alt={it.imageAlt ?? ""}
loading="lazy"
style={sheetStyle(it.imageSheet)}
/>
)}
</span>
<span className="txt">
<span className="name">{it.name}</span>
{it.detail && <span className="detail">{it.detail}</span>}
{it.soldOut && <span className="chip">{c.soldOut}</span>}
</span>
<span className="price">{money(it.price)}</span>
</label>
</li>
);
})}
</ul>
</fieldset>
<div className="offer">
<dl className="ledger">
<div className="lr">
<dt>{pieces}</dt>
<dd>{money(subtotal)}</dd>
</div>
{qualifies && (
<div className="lr save">
<dt>{fill(c.saving, { percent })}</dt>
<dd>{"\u2212"}{money(saving)}</dd>
</div>
)}
</dl>
{showNudge && (
<p className="nudge">
<Sparkles size={16} strokeWidth={2.5} aria-hidden="true" />
{fill(c.nudge, { more, percent })}
</p>
)}
<div className="close">
<div className="tot" aria-live="polite">
<span className="tl">{c.totalLabel}</span>
<span className="tv">
<span key={bump} className={bump ? "val is-new" : "val"}>
{money(total)}
</span>
</span>
</div>
<button
type="button"
className={buttonClass}
disabled={empty}
aria-describedby={hasRisk ? riskId : undefined}
onClick={() => onAdd?.(chosen, total)}
>
{empty ? c.emptyLabel : fill(c.addLabel, { total: money(total) })}
</button>
{hasRisk && (
<p className="risk" id={riskId}>
<ShieldCheck size={18} strokeWidth={2.5} aria-hidden="true" />
{riskLead && <strong>{riskLead}</strong>}
{riskLead && riskText ? " " : null}
{riskText}
</p>
)}
</div>
</div>
</div>
</div>
</div>
</section>
);
}
export default CollectionGrid2;
const DEFAULT_COPY: CollectionGrid2Copy = {
legend: "Choose the pieces for your set",
soldOut: "Sold out",
pieceOne: "{count} piece",
pieceMany: "{count} pieces",
saving: "Set saving, {percent}% off",
nudge: "Tick {more} to take {percent}% off the set.",
moreOne: "1 more piece",
moreMany: "{count} more pieces",
totalLabel: "Your set today",
addLabel: "Add the set \u00b7 {total}",
emptyLabel: "Pick a piece to start",
};
function keyOf(it: CollectionGridItem, i: number) {
return it.id ?? `item-${i}`;
}
function initialPicked(items: CollectionGridItem[], state: string) {
if (state === "disabled") return [];
return items.flatMap((it, i) => (!it.soldOut && it.checked !== false ? [keyOf(it, i)] : []));
}
function fill(template: string, values: Record<string, string>) {
return template.replace(/\{(\w+)\}/g, (m, k: string) => (k in values ? values[k] : m));
}
function moneyFormat(locale: string, currency: string) {
const whole = new Intl.NumberFormat(locale, { style: "currency", currency, minimumFractionDigits: 0, maximumFractionDigits: 0 });
const cents = new Intl.NumberFormat(locale, { style: "currency", currency, minimumFractionDigits: 2, maximumFractionDigits: 2 });
return (n: number) => (Number.isInteger(n) ? whole : cents).format(n);
}
function withHighlight(text: string, phrase?: string) {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="hl">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
function sheetStyle(sheet?: CollectionGridItem["imageSheet"]): React.CSSProperties | undefined {
if (!sheet) return undefined;
const col = sheet.index % sheet.columns;
const row = Math.floor(sheet.index / sheet.columns);
return {
position: "absolute",
maxWidth: "none",
width: `${sheet.columns * 100}%`,
height: `${sheet.rows * 100}%`,
left: `${-col * 100}%`,
top: `${-row * 100}%`,
};
}
const R = ".cf-collection-grid-2";
const CSS = `
@keyframes cfcg2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
${R}{--cg-g:clamp(16px,5vw,48px);--cg-line:oklch(from var(--ink,#1a2233) l c h / .12);--cg-shadow:var(--shadow,oklch(.22 .03 260));position:relative;background:var(--surface,#fff);color:var(--ink,#1a2233);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) var(--cg-g) clamp(64px,8.5vw,120px);overflow-x:clip}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} .wrap{max-width:1120px;margin:0 auto}
${R} .head,${R} .spread{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);column-gap:clamp(32px,5vw,72px);align-items:start}
${R} .head{row-gap:16px;margin-bottom:clamp(32px,4.5vw,56px)}
${R} .h{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance}
${R} .hl{color:var(--accent,#2457c5)}
${R} .intro{padding-top:6px}
${R} .lead{margin:0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
${R} .aside{margin:12px 0 0;max-width:60ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-style:italic;color:var(--muted,#5b6577);text-wrap:pretty}
${R} .spread.solo{grid-template-columns:minmax(0,1fr);max-width:46rem;margin-inline:auto}
${R} .media{position:sticky;top:24px;margin:0}
${R} .photo{display:block;width:100%;height:auto;aspect-ratio:4/5;max-height:calc(100vh - 96px);object-fit:cover;border-radius:12px}
${R} .caption{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted,#5b6577);text-wrap:pretty}
${R} .shop{min-width:0}
${R} .pull{margin:0 0 8px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:-.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance}
${R} .set{margin:0;padding:0;border:0;min-width:0}
${R} .sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
${R} .list{list-style:none;margin:0;padding:0}
${R} .row{border-bottom:1px solid var(--cg-line);animation:cfcg2-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
${R} .hit{display:grid;grid-template-columns:26px 36px 72px minmax(0,1fr) auto;grid-template-areas:'box no th txt price';column-gap:16px;align-items:start;margin:0 -12px;padding:16px 12px;border-radius:12px;cursor:pointer;transition:background-color .16s ease}
${R} .row:not([data-out]) .hit:hover,${R} .hit:has(input:focus-visible){background:color-mix(in oklch,var(--ink,#1a2233) 4%,var(--surface,#fff))}
${R} .box{grid-area:box;position:relative;width:26px;height:26px;margin-top:1px}
${R} .box input{appearance:none;-webkit-appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;border-radius:8px;border:2px solid oklch(from var(--ink,#1a2233) l c h / .45);background:var(--field,#fff);cursor:pointer;transition:background-color .16s ease,border-color .16s ease}
${R} .box input:not(:disabled):hover{border-color:oklch(from var(--ink,#1a2233) l c h / .75)}
${R} .box input:checked,${R} .box input:checked:hover{background:var(--accent-fill,var(--accent,#2457c5));border-color:var(--accent-fill,var(--accent,#2457c5))}
${R} .box svg{position:absolute;inset:0;margin:auto;color:var(--accent-fill-ink,#fff);opacity:0;transform:scale(.9);transition:opacity .16s ease,transform .3s cubic-bezier(.2,.7,.2,1);pointer-events:none}
${R} .box input:checked+svg{opacity:1;transform:none}
${R} .box input:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2457c5)) l c h / .55);outline-offset:3px}
${R} .box input:disabled{background:color-mix(in oklch,var(--ink,#1a2233) 7%,var(--surface,#fff));border-color:oklch(from var(--ink,#1a2233) l c h / .18);cursor:not-allowed}
${R} .no{grid-area:no;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--muted,#5b6577);transition:color .16s ease}
${R} .row[data-on] .no{color:var(--accent,#2457c5)}
${R} .th{grid-area:th;position:relative;display:block;width:100%;aspect-ratio:1;border-radius:8px;overflow:hidden}
${R} .th img{display:block;width:100%;height:100%;object-fit:cover}
${R} .row[data-out] .th img{filter:grayscale(1);opacity:.55}
${R} .txt{grid-area:txt;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
${R} .name{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:700;text-wrap:pretty}
${R} .detail{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted,#5b6577);text-wrap:pretty}
${R} .chip{display:inline-flex;align-items:center;min-height:28px;margin-top:4px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink,#1a2233) 7%,var(--surface,#fff));color:var(--ink,#1a2233);font-size:.875rem;line-height:1.2;font-weight:800}
${R} .price{grid-area:price;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
${R} .row[data-out] .price{color:var(--muted,#5b6577)}
${R} .row[data-out] .hit{cursor:not-allowed}
${R} .offer{margin-top:24px;padding:clamp(20px,3vw,32px);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-lg,0 2px 4px oklch(from var(--cg-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--cg-shadow) l c h / .32)))}
${R} .risk{margin:16px 0 0;font-size:1rem;line-height:1.5;color:var(--ink,#1a2233);text-wrap:pretty}
${R} .risk strong{font-weight:800}
${R} .risk svg{display:inline-block;vertical-align:-.2em;margin-inline-end:.4em;color:var(--success,#1f7a43)}
${R} .ledger{margin:0;padding:0}
${R} .lr{display:flex;align-items:baseline;gap:8px;padding:4px 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4}
${R} .lr dt{display:flex;align-items:baseline;flex:1;gap:8px;min-width:0;margin:0;font-weight:500}
${R} .lr dt::after{content:'';flex:1;min-width:16px;border-bottom:1px solid oklch(from var(--ink,#1a2233) l c h / .22);transform:translateY(-.3em)}
${R} .lr dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
${R} .lr.save dt,${R} .lr.save dd{color:var(--success,#1f7a43)}
${R} .nudge{margin:4px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--accent,#2457c5);text-wrap:pretty}
${R} .nudge svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
${R} .close{margin-top:20px}
${R} .tot{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 16px}
${R} .tl{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:700}
${R} .tv{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;white-space:nowrap}
${R} .val{display:inline-block}
${R} .val.is-new{animation:cfcg2-rise .45s cubic-bezier(.2,.7,.2,1) both}
${R} .add{--cg-bg:var(--button-bg,var(--cta,#d23a24));--cg-bg2:var(--button-bg-2,var(--cta-2,#b52e1b));display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin:0;padding:0 28px;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;text-align:center;text-wrap:balance;color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--cg-bg) calc(l + .04) c h),oklch(from var(--cg-bg2) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cg-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--cg-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--cg-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--cg-shadow) l c h / .38));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
${R} .add:not(:disabled):hover,${R} .add.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--cg-bg) calc(l - .01) c h),oklch(from var(--cg-bg2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cg-bg) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--cg-bg) calc(l - .18) c h),0 1px 2px oklch(from var(--cg-shadow) l c h / .32),0 12px 20px -8px oklch(from var(--cg-shadow) l c h / .45))}
${R} .add:not(:disabled):active,${R} .add.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--cg-bg) calc(l - .04) c h),oklch(from var(--cg-bg2) calc(l - .08) c h));box-shadow:inset 0 2px 3px oklch(from var(--cg-bg) calc(l - .22) c h / .5),inset 0 -2px 0 oklch(from var(--cg-bg) calc(l - .16) c h),0 1px 1px oklch(from var(--cg-shadow) l c h / .25)}
${R} .add:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2457c5)) l c h / .55);outline-offset:3px}
${R} .add:disabled{background:var(--button-2-bg,var(--secondary,#e8ebf1));color:var(--button-2-ink,var(--secondary-ink,#1a2233));box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--cg-shadow) l c h / .18)));text-shadow:none;cursor:not-allowed;transform:none}
@media (max-width:1100px){${R} .hit{grid-template-columns:26px 32px 64px minmax(0,1fr) auto;column-gap:12px}}
@media (max-width:860px){
${R} .head,${R} .spread{grid-template-columns:minmax(0,1fr)}
${R} .head{margin-bottom:32px}
${R} .intro{padding-top:0}
${R} .spread{row-gap:24px}
${R} .media{position:static;margin-inline:calc(-1 * var(--cg-g))}
${R} .photo{aspect-ratio:4/3;height:auto;max-height:420px;border-radius:0}
${R} .caption{padding-inline:var(--cg-g)}
${R} .pull{margin-bottom:4px}
${R} .hit{grid-template-columns:26px 28px 60px minmax(0,1fr);grid-template-areas:'box no th txt' 'box no th price';column-gap:12px;row-gap:4px}
${R} .offer{margin-top:24px}
${R} .tot{align-items:center;margin-bottom:12px}
${R} .tv{font-size:clamp(2.25rem,10vw,2.75rem)}
${R} .add{min-height:60px;padding:0 20px}
}
@media (prefers-reduced-motion:reduce){
${R} .row,${R} .val.is-new{animation:none}
${R} .hit,${R} .box input,${R} .box svg,${R} .no,${R} .add{transition:none}
${R} .box svg{transform:none}
}
`;
pieces/offer/collection-grid-2/specimen.tsx 82 lines
import __studioImageda8df227 from "../assets/6d536acd8b2c1bb4.webp";
import __studioImagee634de02 from "../assets/b81f02992dadb5ac.webp";
import __studioImagec0e70bc4 from "../assets/d9c0c868e72b0b95.webp";
// Specimen: Fennel & Fig shop-the-look spread for the Sunday Kitchen set.
import { CollectionGrid2 } from "../collection-grid-2";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
const kitchen = __studioImageda8df227;
const sheet = __studioImagee634de02;
const towels = __studioImagec0e70bc4;
export const states = ["default", "hover", "active", "disabled"];
function fromSheet(name: string, index: number) {
const image = slot(name, sheet);
return { image, imageSheet: image === sheet ? { columns: 2, rows: 2, index } : undefined };
}
export default function CollectionGrid2Specimen({
state = "default",
}: {
state?: "default" | "hover" | "active" | "disabled";
}) {
return (
<CollectionGrid2
state={state}
headline="Cook Sunday dinner with every piece on this counter"
highlight="every piece on this counter"
lead="Tick the pieces you want and watch your set total update. Everything ships together in one box."
aside="(I sent the skillet back to our test kitchen three times. Now it never leaves my stove.)"
pullLine="Five pieces. One counter. One box."
sceneImage={slot("scene", kitchen)}
sceneAlt="A styled kitchen counter with a sage Dutch oven, copper saucier, carbon-steel skillet, olive-wood board and linen towels"
scenePosition="50% 60%"
caption="Fennel & Fig, the Sunday Kitchen set. Every piece in the shot is numbered in the list."
items={[
{
name: "Enamelled Dutch Oven",
detail: "5.5 qt \u00b7 Sage",
price: 189,
imageAlt: "Sage enamelled Dutch oven",
...fromSheet("item-1", 0),
},
{
name: "Copper Saucier",
detail: "3 qt \u00b7 Brass handle",
price: 149,
soldOut: true,
imageAlt: "Copper saucier with brass handle",
...fromSheet("item-2", 1),
},
{
name: "Carbon-Steel Skillet",
detail: "10 in \u00b7 Pre-seasoned",
price: 79,
imageAlt: "Black carbon-steel skillet",
...fromSheet("item-3", 2),
},
{
name: "Olive-Wood Board",
detail: "Hand-finished \u00b7 45 cm",
price: 64,
imageAlt: "Olive-wood cutting board",
...fromSheet("item-4", 3),
},
{
name: "Linen Kitchen Towels",
detail: "Set of 3 \u00b7 Oatmeal",
price: 28,
image: slot("item-5", towels),
imageAlt: "Stack of three oatmeal linen towels",
},
]}
bundle={{ minItems: 3, percentOff: 10 }}
riskLead="Cook with it for 30 days."
riskText={`Every piece carries a ${defaults.sample.guarantee}. If it doesn't earn its spot on your stove, send it back.`}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalCollectionGrid2 |
string |
Default "Shop every piece in this shot"
|
highlight OptionalCollectionGrid2 |
string |
|
lead OptionalCollectionGrid2 |
React.ReactNode |
Default "Tick the pieces you want. Your set total updates as you go."
|
aside OptionalCollectionGrid2 |
React.ReactNode |
|
pullLine OptionalCollectionGrid2 |
React.ReactNode |
|
sceneImage OptionalCollectionGrid2 |
string |
|
sceneAlt OptionalCollectionGrid2 |
string |
Default ""
|
scenePosition OptionalCollectionGrid2 |
string |
Default "50% 55%"
|
caption OptionalCollectionGrid2 |
React.ReactNode |
|
items OptionalCollectionGrid2 |
CollectionGridItem[] |
Default []
|
currency OptionalCollectionGrid2 |
string |
Default "USD"
|
locale OptionalCollectionGrid2 |
string |
Default "en-US"
|
bundle OptionalCollectionGrid2 |
{ minItems: number; percentOff: number } |
|
riskLead OptionalCollectionGrid2 |
React.ReactNode |
|
riskText OptionalCollectionGrid2 |
React.ReactNode |
|
copy OptionalCollectionGrid2 |
Partial<CollectionGrid2Copy> |
|
onAdd OptionalCollectionGrid2 |
(items: CollectionGridItem[], total: number) => void |
|
state OptionalCollectionGrid2 |
"default" | "hover" | "active" | "disabled" |
Default "default"
|
className OptionalCollectionGrid2 |
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-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-5- One image per offer item (item-1, item-2…), shown in stacks and lists.
scene- A wide atmosphere photo behind or beside the copy.
-
6d536acd8b2c1bb4.webp
image/webp · 60.8 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
b81f02992dadb5ac.webp
image/webp · 61.1 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d9c0c868e72b0b95.webp
image/webp · 145 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB