Listing Showcase 1
Listing showcase: an editorial listing spread (crossfade photo gallery, overlapping price plate, spec numerals, story, pull line, highlights) that closes on one agent booking card, turning a browser into a booked viewing or test drive.
Use it in a prompt
Use offer/listing-showcase 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/listing-showcase.tsx. - Import it and pass your copy and images (Props tab):
import { ListingShowcase } from "@/components/funneldna/offer/listing-showcase"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/listing-showcase/component.tsx 577 lines
// layout: magazine-spread
// Listing showcase: an editorial listing spread (crossfade photo gallery, overlapping price plate, spec numerals, story, pull line, highlights) that closes on one agent booking card, turning a browser into a booked viewing or test drive.
import * as React from 'react';
import { Camera, Check, ChevronLeft, ChevronRight, CircleAlert, MapPin, Phone } from 'lucide-react';
export type ListingPhoto = {
src: string;
alt: string;
/** Shown under the gallery while this photo is on screen. */
caption?: string;
};
export type ListingSpec = { value: string; label: string };
export type ListingOption = {
value: string;
label: string;
/** Short second line, e.g. a time window. */
hint?: string;
};
export type ListingShowcaseCopy = {
/** Gallery group label; {address} is replaced. */
galleryLabel: string;
prevPhoto: string;
nextPhoto: string;
/** Thumbnail label; {n} and {caption} are replaced. */
showPhoto: string;
/** Photo counter; {n} and {total} are replaced. */
photoCount: string;
/** Inline error when no time is chosen; {agent} is the agent's first name. */
error: string;
/** Accessible label on the phone link; {name} and {phone} are replaced. */
callLabel: string;
};
export type ListingShowcaseProps = {
/** Headline; a string headline can carry one emphasised phrase via emphasis. */
headline?: React.ReactNode;
/** Phrase inside a string headline, set in the accent colour. */
emphasis?: string;
address?: string;
/** Neighbourhood, dealership lot or rental area shown after the address. */
area?: string;
/** Gallery photos (slots: scene, item-1 … item-n). */
photos?: ListingPhoto[];
priceLabel?: string;
price?: string;
priceNote?: string;
/** Key specs: beds / baths / sq ft, or year / miles / engine. */
specs?: ListingSpec[];
/** Story paragraphs, set as plain running text. */
story?: string[];
/** One large pull line drawn from the supplied facts. */
pullLine?: string;
highlightsTitle?: string;
highlights?: string[];
cardTitle?: string;
/** Booking card lead; {agent} is replaced by the agent's first name. */
cardLead?: string;
agentName?: string;
agentRole?: string;
agentPhone?: string;
/** Agent or salesperson headshot (slot: presenter). */
presenterImage?: string;
presenterAlt?: string;
preferenceLegend?: string;
options?: ListingOption[];
/** Ask for a time before the action fires (shows the inline error). */
requirePreference?: boolean;
ctaLabel?: string;
psLabel?: string;
/** P.S. under the action restating the main benefit. */
ps?: React.ReactNode;
copy?: Partial<ListingShowcaseCopy>;
/** Booking page; the chosen time is sent as ?preference=… */
href?: string;
/** Called with the chosen time when the booking button is pressed. */
onAction?: (detail: { preference: string | null }) => void;
disabled?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
className?: string;
};
const DEFAULT_COPY: ListingShowcaseCopy = {
galleryLabel: 'Photos of {address}',
prevPhoto: 'Previous photo',
nextPhoto: 'Next photo',
showPhoto: 'Show photo {n}: {caption}',
photoCount: '{n} / {total}',
error: 'Choose a time that suits you so {agent} can book your viewing.',
callLabel: 'Call {name} at {phone}',
};
const DEFAULT_SPECS: ListingSpec[] = [
{ value: '4', label: 'Bedrooms' },
{ value: '3', label: 'Bathrooms' },
{ value: '2,480', label: 'Square feet' },
{ value: '0.31', label: 'Acre lot' },
];
const DEFAULT_STORY = [
'Morning sun pours through the south-facing windows and lands right on the kitchen island. It’s the room everyone ends up in: quartz counters, a walk-in pantry and sliding doors straight onto the deck.',
'Upstairs, the main suite has its own bath and a walk-in closet. Three more bedrooms give you a guest room, a nursery or a home office with a door that closes.',
];
const DEFAULT_HIGHLIGHTS = [
'Kitchen renovated in 2023 with a quartz island',
'Fenced backyard with a covered cedar deck',
'Two-car garage with built-in storage',
'New roof and HVAC, both installed in 2022',
];
const DEFAULT_OPTIONS: ListingOption[] = [
{ value: 'weekday-daytime', label: 'Weekday daytime', hint: '9am – 5pm' },
{ value: 'weekday-evening', label: 'Weekday evening', hint: '5pm – 8pm' },
{ value: 'weekend', label: 'Weekend', hint: 'Saturday or Sunday' },
];
export function ListingShowcase(props: ListingShowcaseProps) {
const {
headline = 'Room for everyone, and light in every room',
emphasis = 'light in every room',
address = '1418 Larkspur Lane',
area = 'Cedar Hollow',
photos = [],
priceLabel = 'Offered at',
price = '$685,000',
priceNote = 'Move-in ready and easy to show',
specs = DEFAULT_SPECS,
story = DEFAULT_STORY,
pullLine = 'Six minutes on foot to Larkspur Park.',
highlightsTitle = 'Move in and start living',
highlights = DEFAULT_HIGHLIGHTS,
cardTitle = 'Feel the morning light for yourself',
cardLead = 'Choose a time that suits you and {agent} will set up your private viewing.',
agentName = 'Dana Reyes',
agentRole = 'Listing agent · Cedar Hollow Realty',
agentPhone = '(512) 555-0148',
presenterImage,
presenterAlt,
preferenceLegend = 'When suits you best?',
options = DEFAULT_OPTIONS,
requirePreference = true,
ctaLabel = 'See this home in person',
psLabel = 'P.S.',
ps = 'Photos can’t show the morning light. A 30-minute private viewing can, with no obligation to make an offer.',
href,
onAction,
disabled = false,
state = 'default',
className,
} = props;
const copy: ListingShowcaseCopy = { ...DEFAULT_COPY, ...(props.copy || {}) };
const uid = React.useId();
const [index, setIndex] = React.useState(0);
const [choice, setChoice] = React.useState<string | null>(null);
const [triedEmpty, setTriedEmpty] = React.useState(false);
const firstRadio = React.useRef<HTMLInputElement>(null);
const thumbRefs = React.useRef<Array<HTMLButtonElement | null>>([]);
const count = photos.length;
const current = count ? Math.min(index, count - 1) : 0;
const isDisabled = disabled || state === 'disabled';
const invalid = !isDisabled && (state === 'error' || (triedEmpty && requirePreference && !choice));
const agentFirst = agentName.split(' ')[0] || agentName;
const titleId = uid + '-title';
const cardId = uid + '-card';
const errId = uid + '-err';
const go = (next: number, focusThumb = false) => {
if (!count) return;
const n = (next + count) % count;
setIndex(n);
if (focusThumb) {
const el = thumbRefs.current[n];
if (el) el.focus();
}
};
const onThumbKey = (e: React.KeyboardEvent<HTMLUListElement>) => {
if (e.key === 'ArrowRight') {
e.preventDefault();
go(current + 1, true);
} else if (e.key === 'ArrowLeft') {
e.preventDefault();
go(current - 1, true);
}
};
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
if (isDisabled) {
e.preventDefault();
return;
}
if (requirePreference && options.length > 0 && !choice) {
e.preventDefault();
setTriedEmpty(true);
if (firstRadio.current) firstRadio.current.focus();
return;
}
if (onAction || !href) {
e.preventDefault();
if (onAction) onAction({ preference: choice });
}
};
const specStyle = { ...rise(2), ['--n' as string]: String(specs.length) } as React.CSSProperties;
const caption = count > 0 ? photos[current].caption : undefined;
return (
<section className={cx('cf-listing-showcase', className)} aria-labelledby={titleId}>
<style>{CSS}</style>
<div className='ls-wrap'>
<header className='ls-head ls-reveal' style={rise(0)}>
<h2 id={titleId} className='ls-title'>
{renderHeadline(headline, emphasis)}
</h2>
{address || area ? (
<p className='ls-loc'>
<MapPin className='ls-inline-icon' size={20} strokeWidth={2.5} aria-hidden='true' />
{address ? <strong>{address}</strong> : null}
{address && area ? ' ' : null}
{area ? (
<span className='ls-area'>
{address ? '· ' : null}
{area}
</span>
) : null}
</p>
) : null}
</header>
<div className='ls-gallery ls-reveal' style={rise(1)}>
{count > 0 ? (
<div className='ls-frame' role='group' aria-roledescription='gallery' aria-label={fill(copy.galleryLabel, { address })}>
{photos.map((p, i) => (
<img
key={i}
className={cx('ls-photo', i === current && 'is-on')}
src={p.src}
alt={i === current ? p.alt : ''}
aria-hidden={i === current ? undefined : true}
loading={i === 0 ? 'eager' : 'lazy'}
decoding='async'
/>
))}
{count > 1 ? (
<React.Fragment>
<span className='ls-count' aria-hidden='true'>
<Camera size={16} strokeWidth={2.5} aria-hidden='true' />
{fill(copy.photoCount, { n: current + 1, total: count })}
</span>
<button type='button' className='ls-nav ls-nav--prev' aria-label={copy.prevPhoto} onClick={() => go(current - 1)}>
<ChevronLeft size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
<button type='button' className='ls-nav ls-nav--next' aria-label={copy.nextPhoto} onClick={() => go(current + 1)}>
<ChevronRight size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
</React.Fragment>
) : null}
</div>
) : null}
<div className={cx('ls-under', count === 0 && 'is-solo')}>
{price ? (
<div className='ls-plate'>
<p className='ls-plate-label'>{priceLabel}</p>
<p className='ls-price'>{price}</p>
{priceNote ? <p className='ls-plate-note'>{priceNote}</p> : null}
</div>
) : null}
{caption ? (
<p className='ls-caption' aria-live='polite'>
{caption}
</p>
) : null}
{count > 1 ? (
<ul className='ls-thumbs' onKeyDown={onThumbKey}>
{photos.map((p, i) => (
<li key={i}>
<button
ref={(el) => {
thumbRefs.current[i] = el;
}}
type='button'
className='ls-thumb'
aria-pressed={i === current}
aria-label={fill(copy.showPhoto, { n: i + 1, caption: p.caption || p.alt })}
onClick={() => go(i)}
>
<img src={p.src} alt='' width={96} height={64} loading='lazy' decoding='async' />
</button>
</li>
))}
</ul>
) : null}
</div>
</div>
{specs.length > 0 ? (
<ul className='ls-specs ls-reveal' style={specStyle}>
{specs.map((s, i) => (
<li key={i} className='ls-spec'>
<span className='ls-spec-value'>{s.value}</span>
<span className='ls-spec-label'>{s.label}</span>
</li>
))}
</ul>
) : null}
<div className='ls-body'>
<div className='ls-read ls-reveal' style={rise(3)}>
{story.length > 0 ? (
<div className='ls-story'>
{story.map((p, i) => (
<p key={i}>{p}</p>
))}
</div>
) : null}
{pullLine ? <p className='ls-pull'>{pullLine}</p> : null}
{highlights.length > 0 ? (
<React.Fragment>
<h3 className='ls-h3 ls-hl-title'>{highlightsTitle}</h3>
<ul className='ls-hl'>
{highlights.map((h, i) => (
<li key={i}>
<span className='ls-tick' aria-hidden='true'>
<Check size={14} strokeWidth={3} />
</span>
<span>{h}</span>
</li>
))}
</ul>
</React.Fragment>
) : null}
</div>
<aside className='ls-card ls-reveal' style={rise(4)} aria-labelledby={cardId}>
<h3 id={cardId} className='ls-h3'>
{cardTitle}
</h3>
{cardLead ? <p className='ls-lead'>{fill(cardLead, { agent: agentFirst })}</p> : null}
{agentName ? (
<div className={cx('ls-agent', presenterImage && 'has-photo')}>
{presenterImage ? (
<img className='ls-agent-photo' src={presenterImage} alt={presenterAlt || agentName} width={64} height={64} loading='lazy' decoding='async' />
) : null}
<div>
<p className='ls-agent-name'>{agentName}</p>
{agentRole ? <p className='ls-agent-role'>{agentRole}</p> : null}
{agentPhone ? (
<p className='ls-agent-phone'>
<a className='ls-link' href={telHref(agentPhone)} aria-label={fill(copy.callLabel, { name: agentName, phone: agentPhone })}>
<Phone className='ls-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{agentPhone}
</a>
</p>
) : null}
</div>
</div>
) : null}
<form className='ls-form' action={href} method='get' noValidate onSubmit={handleSubmit}>
{options.length > 0 ? (
<fieldset className={cx('ls-field', invalid && 'is-invalid')} aria-describedby={invalid ? errId : undefined} disabled={isDisabled}>
<legend className='ls-legend'>{preferenceLegend}</legend>
<div className='ls-opts'>
{options.map((o, i) => (
<label key={o.value} className='ls-opt'>
<input
ref={i === 0 ? firstRadio : undefined}
type='radio'
name='preference'
value={o.value}
checked={choice === o.value}
aria-invalid={invalid ? true : undefined}
onChange={() => {
setChoice(o.value);
setTriedEmpty(false);
}}
/>
<span className='ls-opt-box'>
<span className='ls-opt-text'>
<span className='ls-opt-label'>{o.label}</span>
{o.hint ? <span className='ls-opt-hint'>{o.hint}</span> : null}
</span>
<span className='ls-dot' aria-hidden='true'>
<Check size={14} strokeWidth={3} />
</span>
</span>
</label>
))}
</div>
{invalid ? (
<p id={errId} className='ls-err' role='alert'>
<CircleAlert className='ls-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{fill(copy.error, { agent: agentFirst })}
</p>
) : null}
</fieldset>
) : null}
<button
type='submit'
className={cx('ls-cta', state === 'hover' && 'is-hover', state === 'active' && 'is-active')}
disabled={isDisabled}
>
{ctaLabel}
</button>
</form>
{ps ? (
<p className='ls-ps'>
<b>{psLabel}</b> {ps}
</p>
) : null}
</aside>
</div>
</div>
</section>
);
}
export default ListingShowcase;
function cx(...parts: Array<string | false | null | undefined>) {
return parts.filter(Boolean).join(' ');
}
function rise(i: number): React.CSSProperties {
return { animationDelay: Math.min(i * 0.07, 0.28) + 's' };
}
function fill(template: string, values: Record<string, string | number>) {
let out = template;
for (const key of Object.keys(values)) out = out.split('{' + key + '}').join(String(values[key]));
return out;
}
function telHref(phone: string) {
return 'tel:' + phone.split('').filter((c) => (c >= '0' && c <= '9') || c === '+').join('');
}
function renderHeadline(headline: React.ReactNode, emphasis?: string) {
if (typeof headline !== 'string' || !emphasis) return headline;
const at = headline.indexOf(emphasis);
if (at < 0) return headline;
return (
<React.Fragment>
{headline.slice(0, at)}
<em className='ls-em'>{emphasis}</em>
{headline.slice(at + emphasis.length)}
</React.Fragment>
);
}
const CSS = `
.cf-listing-showcase{--ls-shadow:var(--shadow, oklch(0.22 0.03 256));position:relative;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);overflow-x:clip}
.cf-listing-showcase *,.cf-listing-showcase *::before,.cf-listing-showcase *::after{box-sizing:border-box}
.cf-listing-showcase .ls-wrap{max-width:1120px;margin:0 auto}
.cf-listing-showcase .ls-head{max-width:54rem}
.cf-listing-showcase .ls-title{margin:0;font-family:var(--font-display);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;color:var(--ink);text-wrap:balance}
.cf-listing-showcase .ls-em{font-style:normal;color:var(--accent)}
.cf-listing-showcase .ls-loc{margin:16px 0 0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-listing-showcase .ls-loc strong{color:var(--ink);font-weight:700}
.cf-listing-showcase .ls-area{display:inline-block}
.cf-listing-showcase .ls-inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-listing-showcase .ls-loc .ls-inline-icon{color:var(--accent)}
.cf-listing-showcase .ls-gallery{margin-top:clamp(24px,3vw,32px)}
.cf-listing-showcase .ls-frame{position:relative;aspect-ratio:2/1;border-radius:12px;overflow:hidden;background:color-mix(in oklch,var(--ink) 6%,var(--surface))}
.cf-listing-showcase .ls-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 60%;opacity:0;transform:scale(1.03);transition:opacity .5s cubic-bezier(.2,.7,.2,1),transform .9s cubic-bezier(.2,.7,.2,1)}
.cf-listing-showcase .ls-photo.is-on{opacity:1;transform:none}
.cf-listing-showcase .ls-count{position:absolute;top:16px;right:16px;display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border-radius:999px;background:var(--card);color:var(--ink);font-size:.875rem;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums;box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--ls-shadow) l c h / .25))}
.cf-listing-showcase .ls-nav{position:absolute;top:50%;margin-top:-22px;width:44px;height:44px;padding:0;border:0;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:var(--card);color:var(--ink);cursor:pointer;box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--ls-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--ls-shadow) l c h / .2));transition:transform .16s ease,background .16s ease}
.cf-listing-showcase .ls-nav--prev{left:16px}
.cf-listing-showcase .ls-nav--next{right:16px}
.cf-listing-showcase .ls-nav:hover{background:color-mix(in oklch,var(--ink) 6%,var(--card))}
.cf-listing-showcase .ls-nav:active{transform:scale(.94)}
.cf-listing-showcase .ls-nav:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-listing-showcase .ls-under{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:'plate caption thumbs';gap:16px 24px;align-items:start;margin-top:16px}
.cf-listing-showcase .ls-under.is-solo{margin-top:0}
.cf-listing-showcase .ls-plate{grid-area:plate;position:relative;z-index:2;max-width:340px;margin:-72px 0 0 24px;padding:16px 24px 20px;border-radius:var(--card-radius,var(--radius,14px));background:linear-gradient(oklch(from var(--accent-fill,var(--accent)) calc(l + 0.03) c h),oklch(from var(--accent-fill,var(--accent)) calc(l - 0.03) c h));color:var(--accent-fill-ink,var(--card));box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--accent)) calc(l + 0.12) c h / .6),var(--shadow-lg,0 2px 4px oklch(from var(--ls-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--ls-shadow) l c h / .32))}
.cf-listing-showcase .ls-under.is-solo .ls-plate{margin:0}
.cf-listing-showcase .ls-plate p{margin:0}
.cf-listing-showcase .ls-plate .ls-plate-label{font-size:.9375rem;line-height:1.4;font-weight:700}
.cf-listing-showcase .ls-plate .ls-price{margin-top:4px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-listing-showcase .ls-plate .ls-plate-note{margin-top:20px;font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-listing-showcase .ls-caption{grid-area:caption;margin:0;padding-top:4px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-listing-showcase .ls-thumbs{grid-area:thumbs;display:flex;gap:8px;list-style:none;margin:-4px;padding:4px}
.cf-listing-showcase .ls-thumbs li{flex:none}
.cf-listing-showcase .ls-thumb{display:block;padding:0;border:0;background:none;border-radius:8px;cursor:pointer;opacity:.7;transition:opacity .16s ease,transform .16s ease}
.cf-listing-showcase .ls-thumb img{display:block;width:96px;height:64px;object-fit:cover;border-radius:8px}
.cf-listing-showcase .ls-thumb:hover{opacity:1;transform:translateY(-1px)}
.cf-listing-showcase .ls-thumb[aria-pressed='true']{opacity:1;outline:2px solid var(--accent);outline-offset:2px}
.cf-listing-showcase .ls-thumb:focus-visible{opacity:1;outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-listing-showcase .ls-specs{list-style:none;margin:clamp(32px,4vw,48px) 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:color-mix(in oklab,var(--band-ink) 16%,var(--band));border-radius:var(--card-radius,var(--radius,14px));overflow:hidden;color:var(--band-ink)}
.cf-listing-showcase .ls-spec{min-width:0;display:flex;flex-direction:column;gap:20px;padding:clamp(20px,3vw,32px);background:var(--band)}
.cf-listing-showcase .ls-spec-value{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.cf-listing-showcase .ls-spec-label{font-size:.9375rem;line-height:1.4;font-weight:700;letter-spacing:.005em}
.cf-listing-showcase .ls-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,440px);gap:clamp(32px,5vw,72px);align-items:start;margin-top:clamp(48px,6vw,64px)}
.cf-listing-showcase .ls-story p{margin:0 0 16px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.6;max-width:64ch;text-wrap:pretty}
.cf-listing-showcase .ls-story p:last-child{margin-bottom:0}
.cf-listing-showcase .ls-pull{margin:48px 0 0;font-family:var(--font-display);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;color:var(--accent);text-wrap:balance}
.cf-listing-showcase .ls-h3{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink);text-wrap:balance}
.cf-listing-showcase .ls-hl-title{margin:32px 0 16px}
.cf-listing-showcase .ls-hl{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}
.cf-listing-showcase .ls-hl li{display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:start;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;text-wrap:pretty}
.cf-listing-showcase .ls-tick{width:24px;height:24px;margin-top:1px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:var(--success);color:var(--success-ink,#fff)}
.cf-listing-showcase .ls-card{position:sticky;top:24px;padding:clamp(20px,3vw,32px);background:var(--card);color:var(--ink);border:1px solid var(--card-border,color-mix(in oklch,var(--accent) 28%,var(--card)));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--ls-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--ls-shadow) l c h / .32)))}
.cf-listing-showcase .ls-lead{margin:12px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-listing-showcase .ls-agent{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start;margin-top:24px;padding:16px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-listing-showcase .ls-agent.has-photo{grid-template-columns:64px minmax(0,1fr)}
.cf-listing-showcase .ls-agent-photo{display:block;width:64px;height:64px;border-radius:12px;object-fit:cover;object-position:center 25%}
.cf-listing-showcase .ls-agent p{margin:0}
.cf-listing-showcase .ls-agent .ls-agent-name{font-size:1.0625rem;font-weight:800;line-height:1.3;color:var(--ink)}
.cf-listing-showcase .ls-agent .ls-agent-role{margin-top:2px;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-listing-showcase .ls-agent .ls-agent-phone{margin-top:8px;font-size:.9375rem;line-height:1.4}
.cf-listing-showcase .ls-link{color:var(--link,var(--accent));font-weight:700;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em;border-radius:4px}
.cf-listing-showcase .ls-link:hover{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-listing-showcase .ls-link:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-listing-showcase .ls-agent .ls-link{color:color-mix(in oklch,var(--link,var(--accent)) 82%,var(--ink));text-decoration-color:oklch(from color-mix(in oklch,var(--link,var(--accent)) 82%,var(--ink)) l c h / .45)}
.cf-listing-showcase .ls-agent .ls-link:hover{color:oklch(from color-mix(in oklch,var(--link,var(--accent)) 82%,var(--ink)) calc(l - 0.06) c h);text-decoration-color:currentColor}
.cf-listing-showcase .ls-form{margin:24px 0 0}
.cf-listing-showcase .ls-field{min-width:0;margin:0;padding:0;border:0}
.cf-listing-showcase .ls-legend{padding:0;margin:0 0 12px;font-size:1.0625rem;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-listing-showcase .ls-opts{display:grid;gap:8px}
.cf-listing-showcase .ls-opt{position:relative;display:block;cursor:pointer}
.cf-listing-showcase .ls-opt input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}
.cf-listing-showcase .ls-opt-box{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:56px;padding:10px 16px;border-radius:var(--field-radius,var(--radius,12px));background:color-mix(in oklch,var(--ink) 4%,var(--card));border:1px solid oklch(from var(--ink) l c h / .12);color:var(--ink);transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-listing-showcase .ls-opt:hover .ls-opt-box{border-color:oklch(from var(--ink) l c h / .32)}
.cf-listing-showcase .ls-opt input:checked + .ls-opt-box{background:color-mix(in oklch,var(--accent) 10%,var(--card));border-color:var(--accent);transform:translateY(-1px);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--ls-shadow) l c h / .25))}
.cf-listing-showcase .ls-opt input:focus-visible + .ls-opt-box{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .45);outline-offset:2px}
.cf-listing-showcase .ls-opt-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.cf-listing-showcase .ls-opt-label{font-size:1.0625rem;font-weight:700;line-height:1.3}
.cf-listing-showcase .ls-opt-hint{font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted)}
.cf-listing-showcase .ls-dot{width:24px;height:24px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;border:2px solid oklch(from var(--ink) l c h / .32);color:transparent;transition:background .16s ease,border-color .16s ease,color .16s ease}
.cf-listing-showcase .ls-opt input:checked + .ls-opt-box .ls-dot{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-listing-showcase .ls-field.is-invalid .ls-opt-box{border-color:var(--danger)}
.cf-listing-showcase .ls-field:disabled .ls-opt{cursor:not-allowed}
.cf-listing-showcase .ls-field:disabled .ls-opt-box{opacity:.6;transform:none}
.cf-listing-showcase .ls-err{margin:12px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
.cf-listing-showcase .ls-cta{width:100%;min-height:64px;margin-top:24px;padding:12px 20px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;cursor:pointer;font-family:var(--button-font,var(--font-display));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;letter-spacing:-0.005em;text-align:center;text-wrap:balance;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--ls-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--ls-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-listing-showcase .ls-cta:hover:not(:disabled),.cf-listing-showcase .ls-cta.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.12) c h / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.2) c h),0 1px 2px oklch(from var(--ls-shadow) l c h / .32),0 12px 20px -6px oklch(from var(--ls-shadow) l c h / .5)}
.cf-listing-showcase .ls-cta:active:not(:disabled),.cf-listing-showcase .ls-cta.is-active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - 0.2) c h / .45),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--ls-shadow) l c h / .3)}
.cf-listing-showcase .ls-cta:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-listing-showcase .ls-cta:disabled{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none;transform:none}
.cf-listing-showcase .ls-ps{margin:16px 0 0;font-size:.9375rem;line-height:1.45;color:var(--muted);text-wrap:pretty}
.cf-listing-showcase .ls-ps b{color:var(--ink);font-weight:800}
@keyframes cf-listing-showcase-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-listing-showcase .ls-reveal{animation:cf-listing-showcase-rise .45s cubic-bezier(.2,.7,.2,1) both}
@media (min-width:800px){.cf-listing-showcase .ls-specs{grid-template-columns:repeat(var(--n,4),minmax(0,1fr))}}
@media (max-width:799px){.cf-listing-showcase .ls-spec:last-child:nth-child(odd){grid-column:1/-1}}
@media (max-width:1023px){
.cf-listing-showcase .ls-frame{aspect-ratio:3/2}
.cf-listing-showcase .ls-body{grid-template-columns:minmax(0,1fr)}
.cf-listing-showcase .ls-card{position:static;max-width:560px}
}
@media (max-width:719px){
.cf-listing-showcase .ls-frame{aspect-ratio:4/3}
.cf-listing-showcase .ls-nav--prev{left:12px}
.cf-listing-showcase .ls-nav--next{right:12px}
.cf-listing-showcase .ls-count{top:12px;right:12px}
.cf-listing-showcase .ls-under{grid-template-columns:minmax(0,1fr);grid-template-areas:'plate' 'caption' 'thumbs';gap:12px}
.cf-listing-showcase .ls-plate{justify-self:start;max-width:calc(100% - 32px);margin:-56px 0 0 16px}
.cf-listing-showcase .ls-thumbs{overflow-x:auto;scroll-snap-type:x mandatory}
.cf-listing-showcase .ls-thumbs li{scroll-snap-align:start}
.cf-listing-showcase .ls-thumb img{width:76px;height:52px}
}
@media (max-width:599px){.cf-listing-showcase .ls-hl{grid-template-columns:minmax(0,1fr)}}
@media (max-width:479px){
.cf-listing-showcase .ls-cta{padding:12px 14px;font-size:1.0625rem;letter-spacing:-0.01em}
.cf-listing-showcase .ls-pull{margin-top:40px}
}
@media (prefers-reduced-motion: reduce){
.cf-listing-showcase .ls-reveal{animation:none}
.cf-listing-showcase *{transition:none !important}
.cf-listing-showcase .ls-photo{transform:none}
}
`;
pieces/offer/listing-showcase/specimen.tsx 35 lines
import __studioImage03bb6dbd from "../assets/ddf7446a254e2065.webp";
import __studioImage7e882208 from "../assets/7a54643cc5edc808.webp";
import __studioImage98f58477 from "../assets/2ece7096325a37d4.webp";
import * as React from 'react';
import { ListingShowcase } from '../listing-showcase';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export default function ListingShowcaseSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const frontImage = slot('scene', __studioImage03bb6dbd);
const kitchenImage = slot('item-1', __studioImage7e882208);
const agentImage = slot('presenter', __studioImage98f58477);
return (
<ListingShowcase
state={state}
photos={[
{
src: frontImage,
alt: 'Two-storey white brick home with an oak front door and a maple tree on the front lawn',
caption: 'Front elevation: oak door, new roof (2022), quiet tree-lined street',
},
{
src: kitchenImage,
alt: 'Sunlit kitchen with a white quartz island and sliding doors to a cedar deck',
caption: 'Kitchen: quartz island and sliding doors straight onto the cedar deck',
},
]}
presenterImage={agentImage}
presenterAlt='Dana Reyes, listing agent'
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalListingShowcase |
React.ReactNode |
|
emphasis OptionalListingShowcase |
string |
|
address OptionalListingShowcase |
string |
|
area OptionalListingShowcase |
string |
|
photos OptionalListingShowcase |
ListingPhoto[] |
|
priceLabel OptionalListingShowcase |
string |
|
price OptionalListingShowcase |
string |
|
priceNote OptionalListingShowcase |
string |
|
specs OptionalListingShowcase |
ListingSpec[] |
|
story OptionalListingShowcase |
string[] |
|
pullLine OptionalListingShowcase |
string |
|
highlightsTitle OptionalListingShowcase |
string |
|
highlights OptionalListingShowcase |
string[] |
|
cardTitle OptionalListingShowcase |
string |
|
cardLead OptionalListingShowcase |
string |
|
agentName OptionalListingShowcase |
string |
|
agentRole OptionalListingShowcase |
string |
|
agentPhone OptionalListingShowcase |
string |
|
presenterImage OptionalListingShowcase |
string |
|
presenterAlt OptionalListingShowcase |
string |
|
preferenceLegend OptionalListingShowcase |
string |
|
options OptionalListingShowcase |
ListingOption[] |
|
requirePreference OptionalListingShowcase |
boolean |
|
ctaLabel OptionalListingShowcase |
string |
|
psLabel OptionalListingShowcase |
string |
|
ps OptionalListingShowcase |
React.ReactNode |
|
copy OptionalListingShowcase |
Partial<ListingShowcaseCopy> |
|
href OptionalListingShowcase |
string |
|
onAction OptionalListingShowcase |
(detail: { preference: string | null }) => void |
|
disabled OptionalListingShowcase |
boolean |
|
state OptionalListingShowcase |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalListingShowcase |
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--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
presenter- A photo of the host, coach or founder.
scene- A wide atmosphere photo behind or beside the copy.
-
2ece7096325a37d4.webp
image/webp · 108 KB
-
7a54643cc5edc808.webp
image/webp · 103 KB
-
ddf7446a254e2065.webp
image/webp · 313 KB