Product Gallery 5
Sells the product on a dark stage: polished studio shots beside photos real buyers sent in, a full-screen lightbox, and the order note pinned right beside the photo.
Use it in a prompt
Use offer/product-gallery-5 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/product-gallery-5.tsx. - Import it and pass your copy and images (Props tab):
import { ProductGallery5 } from "@/components/funneldna/offer/product-gallery-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/product-gallery-5/component.tsx 879 lines
// layout: annotated-board
// Sells the product on a dark stage: polished studio shots beside photos real buyers sent in, a full-screen lightbox, and the order note pinned right beside the photo.
'use client'
import * as React from 'react'
import { ChevronLeft, ChevronRight, ImageOff, Maximize2, ShieldCheck, X } from 'lucide-react'
import { Backdrop, FX_HOST } from '../fx/fx'
import studioBackdrop from '../fx/backdrops/studio'
export type StudioShot = {
/** Polished product photo (generated or supplied). */
src: string
alt: string
/** Short name in the caption and lightbox, e.g. 'Hood and drawcords'. */
label?: string
/** 'cover' (default) for full-frame studio photos, 'contain' for transparent cut-outs on the lit sweep. */
fit?: 'contain' | 'cover'
/** Focal point for crops and detail zooms, as a CSS position, e.g. '50% 20%'. */
focus?: string
/** Detail zoom into the focal point, 1 to 3. */
zoom?: number
}
export type CustomerPhoto = {
/** A photo a real buyer sent in. Never invent these on a live page. */
src: string
alt: string
/** The buyer’s first name, exactly as supplied. */
name: string
/** Optional town or city, as supplied. */
place?: string
/** Optional words from the buyer, as supplied. */
quote?: string
/** Focal point for the square crop, e.g. '50% 30%'. */
focus?: string
}
export type ProductGallery5Letter = {
salutation?: string
/** Two to four short letter paragraphs. */
paragraphs?: React.ReactNode[]
/** Who signs it, e.g. the founder’s first name. */
signoff?: string
signoffRole?: string
}
const DEFAULT_COPY = {
studioTab: 'Studio shots',
customerTab: 'Customer photos',
setsLabel: 'Choose which photos to see',
stripLabel: '{set} thumbnails',
thumbLabel: 'Show photo {index} of {count}: {label}',
openLabel: '{alt}. Open full screen, photo {index} of {count}.',
expandHint: 'View full screen',
prev: 'Previous photo',
next: 'Next photo',
stageCount: '{index} / {count}',
status: '{label}, photo {index} of {count}',
dialogLabel: '{productName} photos, full screen',
count: 'Photo {index} of {count}',
close: 'Close full screen',
studioTag: 'Studio shot',
customerTag: 'Customer photo',
byline: '{name}, {place}',
quote: '“{quote}”',
sentIn: 'Photos sent in by {names}',
and: 'and',
more: '{count} more',
studioLabel: 'Photo {index}',
failed: 'This photo didn’t load.',
}
export type ProductGallery5Copy = typeof DEFAULT_COPY
const DEFAULT_LETTER = {
salutation: 'Dear friend,',
paragraphs: [
'Every photo here is the real thing: the fabric, the stitching, the fit.',
'Open any shot full screen and look as closely as you like.',
'When it looks right to you, tap the button and we’ll send it out.',
] as React.ReactNode[],
signoff: 'The team',
signoffRole: '',
}
export type ProductGallery5State = 'default' | 'hover' | 'active' | 'disabled'
export type ProductGallery5Props = {
/** Section headline; a plain string can carry one marker-highlighted phrase. */
headline?: React.ReactNode
/** The phrase inside a string headline that gets the marker stroke. */
highlight?: string
lead?: React.ReactNode
productName?: string
/** One or two lines under the product name in the order note. */
productDetail?: React.ReactNode
studioPhotos?: StudioShot[]
/** Real buyers’ photos, only from props. Empty hides the toggle and the sent-in row. */
customerPhotos?: CustomerPhoto[]
price?: string
/** Short line before the price, e.g. 'Yours for'. */
priceLabel?: string
/** Show the price as a flag over the photo’s corner. */
priceOnPhoto?: boolean
/** The pinned letter; null hides it. */
letter?: ProductGallery5Letter | null
/** Delivery verb on the button, e.g. 'Send me my hoodie'. */
actionLabel?: string
/** One reassurance line under the button, e.g. the guarantee. */
reassurance?: React.ReactNode
href?: string
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void
disabled?: boolean
/** Interface copy; {set}, {index}, {count}, {label}, {alt}, {productName}, {name}, {place}, {quote} and {names} are replaced as text. */
copy?: Partial<ProductGallery5Copy>
/** fx backdrop photo behind the stage; null for a flat band. */
backdrop?: string | null
initialIndex?: number
onChange?: (index: number) => void
/** Studio preview state. */
state?: ProductGallery5State
className?: string
style?: React.CSSProperties
}
type Kind = 'studio' | 'customer'
type Item = {
kind: Kind
src: string
alt: string
label: string
fit: 'contain' | 'cover'
focus: string
zoom: number
quote?: string
}
type Drag = { id: number; x: number; y: number }
export function ProductGallery5({
headline = 'See exactly what you’re getting',
highlight = 'exactly',
lead = 'Tap any photo to see it full screen, up close.',
productName = 'Product',
productDetail,
studioPhotos = [],
customerPhotos = [],
price,
priceLabel = 'Yours for',
priceOnPhoto = true,
letter,
actionLabel = 'Send it to me',
reassurance,
href,
onAction,
disabled = false,
copy: copyIn,
backdrop = studioBackdrop,
initialIndex = 0,
onChange,
state = 'default',
className = '',
style,
}: ProductGallery5Props) {
const copy: ProductGallery5Copy = { ...DEFAULT_COPY }
if (copyIn) for (const [k, v] of Object.entries(copyIn)) if (typeof v === 'string') (copy as Record<string, string>)[k] = v
const sN = studioPhotos.length
const cN = customerPhotos.length
const total = sN + cN
const items: Item[] = [
...studioPhotos.map((p, i): Item => ({
kind: 'studio',
src: p.src,
alt: p.alt,
label: p.label || fill(copy.studioLabel, { index: i + 1 }),
fit: p.fit ?? 'cover',
focus: p.focus ?? '50% 50%',
zoom: clampZoom(p.zoom),
})),
...customerPhotos.map((p): Item => ({
kind: 'customer',
src: p.src,
alt: p.alt,
label: p.place ? fill(copy.byline, { name: p.name, place: p.place }) : p.name,
fit: 'cover',
focus: p.focus ?? '50% 35%',
zoom: 1,
quote: p.quote,
})),
]
const previewLb = (s: ProductGallery5State) => (s === 'active' && total > 0 ? Math.min(2, total - 1) : null)
const headId = React.useId()
const [index, setIndex] = React.useState(() => clampIndex(initialIndex, total))
const [lb, setLb] = React.useState<number | null>(() => previewLb(state))
const [dx, setDx] = React.useState(0)
const [dragging, setDragging] = React.useState(false)
const [failed, setFailed] = React.useState<Record<string, boolean>>({})
const lastIn = React.useRef<Record<Kind, number>>({ studio: 0, customer: -1 })
const lbRef = React.useRef(lb)
lbRef.current = lb
const focusOnOpen = React.useRef(false)
const restoreFocus = React.useRef(false)
const dialogRef = React.useRef<HTMLDivElement>(null)
const closeRef = React.useRef<HTMLButtonElement>(null)
const mainRef = React.useRef<HTMLButtonElement>(null)
const stageRef = React.useRef<HTMLDivElement>(null)
const stripRef = React.useRef<HTMLUListElement>(null)
const thumbRefs = React.useRef<Array<HTMLButtonElement | null>>([])
const swipe = React.useRef<Drag | null>(null)
const swiped = React.useRef(false)
const lbDrag = React.useRef<Drag | null>(null)
const cur = clampIndex(index, total)
const kind: Kind = cur < sN ? 'studio' : 'customer'
const base = kind === 'studio' ? 0 : sN
const setCount = kind === 'studio' ? sN : cN
const local = cur - base
const open = lb !== null
const go = (i: number) => {
const n = clampIndex(i, total)
setIndex(n)
lastIn.current[n < sN ? 'studio' : 'customer'] = n
onChange?.(n)
}
const pickSet = (k: Kind) => {
if (k === kind) return
const last = lastIn.current[k]
go(k === 'studio' ? (last >= 0 && last < sN ? last : 0) : last >= sN && last < total ? last : sN)
}
const step = (d: number) => {
if (setCount > 1) go(base + wrap(local + d, setCount))
}
const openLb = (i: number) => {
focusOnOpen.current = true
setDx(0)
setLb(i)
}
const closeLb = () => {
const at = lbRef.current
if (at === null) return
restoreFocus.current = true
setLb(null)
setDx(0)
setDragging(false)
go(at)
}
const lbStep = (d: number) => {
setDx(0)
setLb((p) => (p === null ? p : wrap(p + d, total)))
}
const actions = React.useRef({ close: closeLb, step: lbStep })
actions.current = { close: closeLb, step: lbStep }
React.useEffect(() => {
setLb(previewLb(state))
setDx(0)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state, total])
React.useEffect(() => {
if (!open) return
const onKey = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
e.preventDefault()
actions.current.close()
} else if (e.key === 'ArrowRight') {
e.preventDefault()
actions.current.step(1)
} else if (e.key === 'ArrowLeft') {
e.preventDefault()
actions.current.step(-1)
} else if (e.key === 'Tab') trapFocus(e, dialogRef.current)
}
window.addEventListener('keydown', onKey)
const html = document.documentElement
const before = html.style.overflow
html.style.overflow = 'hidden'
return () => {
window.removeEventListener('keydown', onKey)
html.style.overflow = before
}
}, [open])
React.useEffect(() => {
if (open && focusOnOpen.current) {
focusOnOpen.current = false
closeRef.current?.focus()
}
if (!open && restoreFocus.current) {
restoreFocus.current = false
mainRef.current?.focus({ preventScroll: true })
}
}, [open])
React.useEffect(() => {
const strip = stripRef.current
const thumb = thumbRefs.current[local]
if (!strip || !thumb) return
const left = thumb.offsetLeft - (strip.clientWidth - thumb.offsetWidth) / 2
strip.scrollTo({ left: Math.max(0, left), behavior: reducedMotion() ? 'auto' : 'smooth' })
}, [local, kind])
if (!total) return null
const item = items[cur]
const lbAt = lb === null ? null : clampIndex(lb, total)
const lbItem = lbAt === null ? null : items[lbAt]
const setItems = items.slice(base, base + setCount)
thumbRefs.current.length = setCount
const showToggle = sN > 0 && cN > 0
const locked = disabled || state === 'disabled'
const markFailed = (src: string) => setFailed((f) => (f[src] ? f : { ...f, [src]: true }))
const L =
letter === null
? null
: {
salutation: letter?.salutation ?? DEFAULT_LETTER.salutation,
paragraphs: letter?.paragraphs ?? DEFAULT_LETTER.paragraphs,
signoff: letter?.signoff ?? DEFAULT_LETTER.signoff,
signoffRole: letter?.signoffRole ?? DEFAULT_LETTER.signoffRole,
}
const onMainDown = (e: React.PointerEvent<HTMLButtonElement>) => {
swiped.current = false
if (e.pointerType === 'mouse') return
swipe.current = { id: e.pointerId, x: e.clientX, y: e.clientY }
}
const onMainUp = (e: React.PointerEvent<HTMLButtonElement>) => {
const s = swipe.current
swipe.current = null
if (!s || s.id !== e.pointerId) return
const mx = e.clientX - s.x
const my = e.clientY - s.y
if (setCount > 1 && Math.abs(mx) > 48 && Math.abs(mx) > Math.abs(my) * 1.2) {
swiped.current = true
step(mx < 0 ? 1 : -1)
}
}
const onMainClick = () => {
if (swiped.current) {
swiped.current = false
return
}
openLb(cur)
}
const onLbDown = (e: React.PointerEvent<HTMLDivElement>) => {
if (e.button > 0) return
lbDrag.current = { id: e.pointerId, x: e.clientX, y: e.clientY }
e.currentTarget.setPointerCapture?.(e.pointerId)
}
const onLbMove = (e: React.PointerEvent<HTMLDivElement>) => {
const d = lbDrag.current
if (!d || d.id !== e.pointerId || total < 2) return
const mx = e.clientX - d.x
if (Math.abs(mx) > 6) {
if (!dragging) setDragging(true)
setDx(mx)
}
}
const onLbUp = (e: React.PointerEvent<HTMLDivElement>) => {
const d = lbDrag.current
lbDrag.current = null
setDragging(false)
if (!d || d.id !== e.pointerId) return
const mx = e.clientX - d.x
const my = e.clientY - d.y
setDx(0)
if (total > 1 && Math.abs(mx) > 56 && Math.abs(mx) > Math.abs(my)) lbStep(mx < 0 ? 1 : -1)
}
const onLbCancel = () => {
lbDrag.current = null
setDragging(false)
setDx(0)
}
const showBuyers = () => {
pickSet('customer')
if (typeof window !== 'undefined' && window.innerWidth < 1100) {
stageRef.current?.scrollIntoView({ block: 'center', behavior: reducedMotion() ? 'auto' : 'smooth' })
}
}
const buyerNames = customerPhotos.map((p) => p.name).filter(Boolean)
const setName = kind === 'studio' ? copy.studioTab : copy.customerTab
const cta =
href && !locked ? (
<a className='cf-pg5-btn' href={href} onClick={onAction}>
{actionLabel}
</a>
) : (
<button type='button' className='cf-pg5-btn' disabled={locked} onClick={onAction}>
{actionLabel}
</button>
)
return (
<section
className={'cf-pg5' + (state === 'hover' ? ' is-hover' : '') + (className ? ' ' + className : '')}
style={style}
aria-labelledby={headId}
>
<style>{CSS}</style>
<div className='cf-pg5-band' style={FX_HOST}>
{backdrop ? <Backdrop src={backdrop} /> : null}
<div className='cf-pg5-scrim' aria-hidden='true' />
<div className='cf-pg5-inner'>
<header className='cf-pg5-head cf-pg5-rise'>
<h2 id={headId} className='cf-pg5-h2'>
<Marked text={headline} phrase={highlight} />
</h2>
{lead ? <p className='cf-pg5-lead'>{lead}</p> : null}
</header>
<div
className={'cf-pg5-board' + (L ? '' : ' no-letter')}
style={{ '--pg5-lift': showToggle ? '80px' : '0px' } as React.CSSProperties}
>
<div className='cf-pg5-stagecol cf-pg5-rise' style={{ '--d': '.07s' } as React.CSSProperties}>
{showToggle ? (
<div className='cf-pg5-seg' role='group' aria-label={copy.setsLabel}>
{(['studio', 'customer'] as const).map((k) => (
<button key={k} type='button' aria-pressed={kind === k} onClick={() => pickSet(k)}>
<span className='cf-pg5-seg-label'>{k === 'studio' ? copy.studioTab : copy.customerTab}</span>
<span className='cf-pg5-seg-n'>{k === 'studio' ? sN : cN}</span>
</button>
))}
</div>
) : null}
<div className='cf-pg5-stage' ref={stageRef}>
<button
ref={mainRef}
type='button'
className={'cf-pg5-main cf-pg5-frame-' + item.kind}
aria-label={fill(copy.openLabel, { alt: item.alt, index: local + 1, count: setCount })}
onPointerDown={onMainDown}
onPointerUp={onMainUp}
onPointerCancel={() => {
swipe.current = null
}}
onClick={onMainClick}
>
<Shot
key={cur}
item={item}
alt=''
eager
failed={!!failed[item.src]}
failedText={copy.failed}
onFail={() => markFailed(item.src)}
className='cf-pg5-swap'
/>
</button>
{setCount > 1 ? (
<>
<button type='button' className='cf-pg5-nav is-prev' aria-label={copy.prev} onClick={() => step(-1)}>
<ChevronLeft size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
<button type='button' className='cf-pg5-nav is-next' aria-label={copy.next} onClick={() => step(1)}>
<ChevronRight size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
</>
) : null}
<span className='cf-pg5-chip' aria-hidden='true'>
<Maximize2 size={16} strokeWidth={2.5} />
{copy.expandHint}
</span>
{price && priceOnPhoto ? (
<p className='cf-pg5-flag' aria-hidden='true'>
{priceLabel ? <small>{priceLabel}</small> : null}
<b>{price}</b>
</p>
) : null}
</div>
<div className='cf-pg5-cap'>
<div className='cf-pg5-cap-row'>
<span className={'cf-pg5-tag is-' + item.kind}>{item.kind === 'customer' ? copy.customerTag : copy.studioTag}</span>
<span className='cf-pg5-cap-name'>{item.label}</span>
{setCount > 1 ? (
<span className='cf-pg5-cap-count'>{fill(copy.stageCount, { index: local + 1, count: setCount })}</span>
) : null}
</div>
{item.quote ? <p className='cf-pg5-quote'>{fill(copy.quote, { quote: item.quote })}</p> : null}
</div>
<p className='cf-pg5-sr' aria-live='polite'>
{fill(copy.status, { label: item.label, index: local + 1, count: setCount })}
</p>
{setCount > 1 ? (
<ul className='cf-pg5-strip' ref={stripRef} aria-label={fill(copy.stripLabel, { set: setName })}>
{setItems.map((it, i) => (
<li key={it.src + '-' + i}>
<button
type='button'
ref={(el) => {
thumbRefs.current[i] = el
}}
className={'cf-pg5-thumb cf-pg5-frame-' + it.kind}
aria-current={i === local ? 'true' : undefined}
aria-label={fill(copy.thumbLabel, { index: i + 1, count: setCount, label: it.label })}
onClick={() => go(base + i)}
>
<Shot item={it} alt='' failed={!!failed[it.src]} failedText='' onFail={() => markFailed(it.src)} />
</button>
</li>
))}
</ul>
) : null}
</div>
{L ? (
<div className='cf-pg5-note cf-pg5-letter cf-pg5-notecol cf-pg5-rise' style={{ '--d': '.14s' } as React.CSSProperties}>
{L.salutation ? <p className='cf-pg5-salute'>{L.salutation}</p> : null}
{L.paragraphs.map((p, i) => (
<p key={i} className='cf-pg5-para'>
{p}
</p>
))}
{L.signoff ? (
<p className='cf-pg5-sign'>
<span className='cf-pg5-sign-name'>{L.signoff}</span>
{L.signoffRole ? <span className='cf-pg5-sign-role'>{L.signoffRole}</span> : null}
</p>
) : null}
</div>
) : null}
<div className='cf-pg5-note cf-pg5-action cf-pg5-notecol cf-pg5-rise' style={{ '--d': '.21s' } as React.CSSProperties}>
<h3 className='cf-pg5-h3'>{productName}</h3>
{productDetail ? <p className='cf-pg5-detail'>{productDetail}</p> : null}
{cN > 0 && buyerNames.length > 0 ? (
<button type='button' className='cf-pg5-sent' onClick={showBuyers}>
<span className='cf-pg5-faces' aria-hidden='true'>
{customerPhotos.slice(0, 3).map((p, i) => (
<img key={p.src + '-' + i} src={p.src} alt='' loading='lazy' decoding='async' style={{ objectPosition: p.focus ?? '50% 35%' }} />
))}
</span>
<span className='cf-pg5-sent-text'>{fill(copy.sentIn, { names: joinNames(buyerNames, copy.and, copy.more) })}</span>
</button>
) : null}
{price ? (
<p className='cf-pg5-price'>
{priceLabel ? <span>{priceLabel}</span> : null}
<strong>{price}</strong>
</p>
) : null}
{cta}
{reassurance ? (
<p className='cf-pg5-reassure'>
<ShieldCheck size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</div>
</div>
</div>
{lbItem && lbAt !== null ? (
<div ref={dialogRef} className='cf-pg5-lb' role='dialog' aria-modal='true' aria-label={fill(copy.dialogLabel, { productName })}>
<div className='cf-pg5-lb-top'>
<p className='cf-pg5-lb-count' aria-live='polite'>
{fill(copy.count, { index: lbAt + 1, count: total })}
</p>
<span className={'cf-pg5-tag is-' + lbItem.kind}>{lbItem.kind === 'customer' ? copy.customerTag : copy.studioTag}</span>
<button ref={closeRef} type='button' className='cf-pg5-lb-btn cf-pg5-lb-close' aria-label={copy.close} onClick={closeLb}>
<X size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
</div>
<div className='cf-pg5-lb-stage'>
{total > 1 ? (
<button type='button' className='cf-pg5-lb-btn cf-pg5-lb-nav is-prev' aria-label={copy.prev} onClick={() => lbStep(-1)}>
<ChevronLeft size={28} strokeWidth={2.5} aria-hidden='true' />
</button>
) : null}
<div className='cf-pg5-lb-media' onPointerDown={onLbDown} onPointerMove={onLbMove} onPointerUp={onLbUp} onPointerCancel={onLbCancel}>
<div
key={lbAt}
className={'cf-pg5-lb-move' + (dragging ? ' is-drag' : '')}
style={{ transform: dx ? 'translateX(' + dx + 'px)' : undefined }}
>
{lbItem.kind === 'studio' ? (
<div className='cf-pg5-lb-frame cf-pg5-frame-studio'>
<Shot item={lbItem} alt={lbItem.alt} eager failed={!!failed[lbItem.src]} failedText={copy.failed} onFail={() => markFailed(lbItem.src)} />
</div>
) : (
<Shot
item={lbItem}
alt={lbItem.alt}
eager
failed={!!failed[lbItem.src]}
failedText={copy.failed}
onFail={() => markFailed(lbItem.src)}
className='cf-pg5-lb-photo'
/>
)}
</div>
</div>
{total > 1 ? (
<button type='button' className='cf-pg5-lb-btn cf-pg5-lb-nav is-next' aria-label={copy.next} onClick={() => lbStep(1)}>
<ChevronRight size={28} strokeWidth={2.5} aria-hidden='true' />
</button>
) : null}
</div>
<div className='cf-pg5-lb-cap'>
<p className='cf-pg5-lb-name'>{lbItem.label}</p>
{lbItem.quote ? <p className='cf-pg5-lb-quote'>{fill(copy.quote, { quote: lbItem.quote })}</p> : null}
</div>
</div>
) : null}
</section>
)
}
export default ProductGallery5
function Shot({
item,
alt,
failed,
failedText,
onFail,
eager = false,
className = '',
}: {
item: Item
alt: string
failed: boolean
failedText: string
onFail: () => void
eager?: boolean
className?: string
}) {
if (failed) {
return (
<span className='cf-pg5-fail'>
<ImageOff size={24} strokeWidth={2.5} aria-hidden='true' />
{failedText ? <span>{failedText}</span> : null}
</span>
)
}
return (
<img
className={'cf-pg5-img is-' + item.fit + (className ? ' ' + className : '')}
src={item.src}
alt={alt}
draggable={false}
loading={eager ? 'eager' : 'lazy'}
decoding='async'
onError={onFail}
style={{
objectPosition: item.focus,
transformOrigin: item.focus,
transform: item.zoom > 1 ? 'scale(' + item.zoom + ')' : undefined,
}}
/>
)
}
function Marked({ text, phrase }: { text: React.ReactNode; phrase?: string }) {
if (typeof text !== 'string' || !phrase) return <>{text}</>
const at = text.indexOf(phrase)
if (at < 0) return <>{text}</>
return (
<>
{text.slice(0, at)}
<span className='cf-pg5-mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
function trapFocus(e: KeyboardEvent, root: HTMLElement | null) {
if (!root) return
const nodes = Array.from(root.querySelectorAll<HTMLElement>(`button:not([disabled]), a[href], [tabindex]:not([tabindex='-1'])`))
if (!nodes.length) return
const first = nodes[0]
const last = nodes[nodes.length - 1]
const active = document.activeElement as HTMLElement | null
if (!active || !root.contains(active)) {
e.preventDefault()
;(e.shiftKey ? last : first).focus()
return
}
if (e.shiftKey && active === first) {
e.preventDefault()
last.focus()
} else if (!e.shiftKey && active === last) {
e.preventDefault()
first.focus()
}
}
function joinNames(names: string[], and: string, more: string) {
const shown = names.slice(0, 3)
const extra = names.length - shown.length
if (extra > 0) return shown.join(', ') + ' ' + and + ' ' + fill(more, { count: extra })
if (shown.length < 2) return shown.join('')
return shown.slice(0, -1).join(', ') + ' ' + and + ' ' + shown[shown.length - 1]
}
const wrap = (n: number, count: number) => (count > 0 ? ((n % count) + count) % count : 0)
const clampIndex = (n: number, count: number) => (count > 0 ? Math.min(count - 1, Math.max(0, Math.round(n))) : 0)
const clampZoom = (z?: number) => (typeof z === 'number' && isFinite(z) ? Math.min(3, Math.max(1, z)) : 1)
const fill = (t: string, vars: Record<string, string | number>) =>
Object.entries(vars).reduce((s, [k, v]) => s.split('{' + k + '}').join(String(v)), t)
const reducedMotion = () =>
typeof window !== 'undefined' && !!window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches
const CSS = `
.cf-pg5{position:relative;font-family:var(--font-body);color:var(--band-ink);--pg5-shadow:var(--shadow, oklch(0.22 0.03 260))}
.cf-pg5 *,.cf-pg5 *::before,.cf-pg5 *::after{box-sizing:border-box}
.cf-pg5 :where(h2,h3,p,ul){margin:0}
.cf-pg5-band{position:relative;overflow:hidden;background:var(--band);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-pg5-scrim{position:absolute;inset:0;z-index:0;pointer-events:none;background:oklch(from var(--band) l c h / .84)}
.cf-pg5-inner{position:relative;z-index:1;max-width:1280px;margin:0 auto}
.cf-pg5-head{max-width:46rem;margin:0 auto clamp(32px,4vw,48px);text-align:center}
.cf-pg5-h2{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;text-wrap:balance;color:var(--band-ink)}
.cf-pg5-mark{background:var(--marker,#fae37c);background:oklch(from var(--marker,#fae37c) max(l,0.86) c h / 1);color:var(--pg5-marker-ink,#1f2433);color:oklch(from var(--marker,#fae37c) 0.22 0.05 h);padding:0 .14em;margin:0 -.02em;border-radius:.1em .28em .14em .24em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-pg5-lead{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:color-mix(in oklab,var(--band-ink) 86%,var(--band));text-wrap:pretty}
.cf-pg5-board{display:grid;gap:clamp(24px,3vw,40px);grid-template-columns:minmax(260px,320px) minmax(0,1fr) minmax(260px,320px);grid-template-areas:'letter stage action';align-items:start}
.cf-pg5-board.no-letter{max-width:1040px;margin:0 auto;grid-template-columns:minmax(0,1fr) minmax(260px,320px);grid-template-areas:'stage action'}
.cf-pg5-stagecol{grid-area:stage;min-width:0}
.cf-pg5-letter{grid-area:letter}
.cf-pg5-action{grid-area:action}
.cf-pg5-seg{display:flex;width:max-content;max-width:100%;margin:0 auto 24px;padding:4px;gap:4px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .1);box-shadow:inset 0 0 0 1px oklch(from var(--band-ink) l c h / .18)}
.cf-pg5-seg button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:0 18px;border:0;border-radius:999px;background:transparent;color:var(--band-ink);font-family:var(--font-body);font-size:1rem;font-weight:700;line-height:1.15;text-align:center;cursor:pointer;transition:background .16s ease,color .16s ease,box-shadow .16s ease}
.cf-pg5-seg button:hover,.cf-pg5.is-hover .cf-pg5-seg button[aria-pressed=false]{background:oklch(from var(--band-ink) l c h / .14)}
.cf-pg5-seg button[aria-pressed=true]{background:var(--band-ink);color:var(--band);box-shadow:var(--shadow-sm,0 1px 3px oklch(from var(--pg5-shadow) l c h / .2))}
.cf-pg5-seg button[aria-pressed=true]:hover{background:oklch(from var(--band-ink) calc(l - .03) c h)}
.cf-pg5-seg button:focus-visible{outline:2px solid var(--band-ink);outline-offset:3px}
.cf-pg5-seg-n{display:inline-grid;place-items:center;min-width:28px;height:26px;padding:0 8px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .16);font-size:.875rem;font-weight:800;font-variant-numeric:tabular-nums}
.cf-pg5-seg button[aria-pressed=true] .cf-pg5-seg-n{background:oklch(from var(--band) l c h / .12);color:var(--band)}
.cf-pg5-stage{position:relative}
.cf-pg5-main{position:relative;display:block;width:100%;aspect-ratio:1/1;margin:0;padding:0;border:0;border-radius:12px;overflow:hidden;cursor:zoom-in;touch-action:pan-y;font:inherit}
.cf-pg5-main:focus-visible{outline:3px solid var(--band-ink);outline-offset:4px}
.cf-pg5-frame-studio{background:radial-gradient(110% 85% at 50% 28%,var(--card) 0%,color-mix(in oklch,var(--ink) 10%,var(--card)) 100%);color:var(--ink)}
.cf-pg5-frame-customer{background:color-mix(in oklab,var(--band-ink) 8%,var(--band));color:var(--band-ink)}
.cf-pg5-img{display:block;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none;transition:transform .32s cubic-bezier(.2,.7,.2,1)}
.cf-pg5-img.is-contain{object-fit:contain;padding:7%;filter:drop-shadow(0 2px 3px oklch(from var(--pg5-shadow) l c h / .25)) drop-shadow(0 14px 18px oklch(from var(--pg5-shadow) l c h / .22))}
.cf-pg5-swap{animation:cf-pg5-swap .32s cubic-bezier(.2,.7,.2,1) both}
.cf-pg5-fail{display:grid;place-items:center;align-content:center;gap:8px;width:100%;height:100%;padding:12px;text-align:center;font-size:.9375rem;font-weight:600;line-height:1.4}
.cf-pg5-nav{position:absolute;top:50%;z-index:2;display:grid;place-items:center;width:48px;height:48px;margin-top:-24px;padding:0;border:0;border-radius:999px;background:var(--card);color:var(--ink);box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--pg5-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--pg5-shadow) l c h / .2));cursor:pointer;transition:transform .16s ease,background .16s ease}
.cf-pg5-nav.is-prev{left:12px}
.cf-pg5-nav.is-next{right:12px}
.cf-pg5-nav:hover{background:color-mix(in oklch,var(--ink) 6%,var(--card));transform:scale(1.05)}
.cf-pg5-nav:active{transform:scale(.96)}
.cf-pg5-nav:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-pg5-chip{position:absolute;right:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 12px;border-radius:999px;background:oklch(from var(--band) calc(l - .04) c h / .9);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap;pointer-events:none;transition:background .16s ease,transform .16s ease}
.cf-pg5-stage:hover .cf-pg5-chip,.cf-pg5.is-hover .cf-pg5-chip{background:oklch(from var(--band) calc(l - .1) c h / .96);transform:translateY(-2px)}
.cf-pg5-flag{position:absolute;top:-14px;right:-14px;z-index:3;display:grid;justify-items:center;gap:4px;padding:12px 18px 14px;border-radius:14px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--accent)) calc(l + .14) c h / .6),var(--shadow-lg,0 2px 4px oklch(from var(--pg5-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--pg5-shadow) l c h / .32));pointer-events:none;animation:cf-pg5-pop .3s cubic-bezier(.2,.7,.2,1) .25s both}
.cf-pg5-flag small{font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.cf-pg5-flag b{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-pg5-cap{margin-top:16px;min-height:28px}
.cf-pg5-cap-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.cf-pg5-tag{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
.cf-pg5-tag.is-customer{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-pg5-cap-name{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3}
.cf-pg5-cap-count{margin-left:auto;font-size:.9375rem;font-weight:600;font-variant-numeric:tabular-nums;color:color-mix(in oklab,var(--band-ink) 84%,var(--band))}
.cf-pg5-quote{margin-top:8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty}
.cf-pg5-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cf-pg5-strip{position:relative;display:flex;gap:12px;margin:12px -10px 0;padding:10px;list-style:none;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:10px;scrollbar-width:thin;scrollbar-color:oklch(from var(--band-ink) l c h / .3) transparent}
.cf-pg5-strip li{flex:0 0 auto;scroll-snap-align:center}
.cf-pg5-thumb{position:relative;display:block;width:84px;aspect-ratio:1/1;padding:0;border:0;border-radius:8px;overflow:hidden;cursor:pointer;opacity:.7;transition:opacity .16s ease,transform .16s ease,box-shadow .16s ease}
.cf-pg5-thumb .cf-pg5-img.is-contain{padding:8%;filter:none}
.cf-pg5-thumb:hover{opacity:1;transform:translateY(-2px)}
.cf-pg5-thumb[aria-current=true]{opacity:1;box-shadow:0 0 0 3px var(--band),0 0 0 6px var(--band-ink)}
.cf-pg5-thumb:focus-visible{opacity:1;outline:2px solid var(--band-ink);outline-offset:7px}
.cf-pg5-note{position:relative;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) 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(--pg5-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--pg5-shadow) l c h / .2)));padding:clamp(20px,3vw,28px)}
.cf-pg5-action{border-color:color-mix(in oklch,var(--accent) 34%,var(--card));box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--pg5-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--pg5-shadow) l c h / .32))}
.cf-pg5-salute{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em}
.cf-pg5-para{margin-top:12px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.55;text-wrap:pretty}
.cf-pg5-sign{display:grid;gap:2px;margin-top:20px}
.cf-pg5-sign-name{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3}
.cf-pg5-sign-role{font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted)}
.cf-pg5-h3{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;text-wrap:balance}
.cf-pg5-detail{margin-top:8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-pg5-sent{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;margin-top:20px;padding:10px 12px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));font-family:var(--font-body);font-size:.9375rem;font-weight:700;line-height:1.4;text-align:left;cursor:pointer;transition:background .16s ease,transform .16s ease}
.cf-pg5-sent:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-pg5-sent:active{transform:scale(.985)}
.cf-pg5-sent:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:2px}
.cf-pg5-sent-text{min-width:0;text-wrap:pretty}
.cf-pg5-faces{display:flex;flex:none}
.cf-pg5-faces img{display:block;width:36px;height:36px;border-radius:8px;object-fit:cover;outline:2px solid var(--button-2-bg,var(--secondary))}
.cf-pg5-faces img+img{margin-left:-10px}
.cf-pg5-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin-top:24px}
.cf-pg5-price span{font-size:.9375rem;font-weight:600;color:var(--muted)}
.cf-pg5-price strong{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,2.8vw,2.5rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.cf-pg5-action .cf-pg5-btn{padding:0 18px;font-size:clamp(1.125rem,1.45vw,1.3125rem)}
.cf-pg5-btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin-top:16px;padding:0 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));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.125rem,1.55vw,1.375rem);line-height:1.15;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(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--pg5-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--pg5-shadow) l c h / .4));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-pg5-btn:hover:not(:disabled),.cf-pg5.is-hover .cf-pg5-btn:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--pg5-shadow) l c h / .32),0 10px 20px -6px oklch(from var(--pg5-shadow) l c h / .48);transform:translateY(-1px)}
.cf-pg5-btn:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h / .5),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--pg5-shadow) l c h / .3)}
.cf-pg5-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-pg5-btn:disabled{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));text-shadow:none;cursor:not-allowed}
.cf-pg5-reassure{margin-top:12px;font-size:.9375rem;font-weight:600;line-height:1.4;text-align:center;color:var(--muted);text-wrap:pretty}
.cf-pg5-reassure svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em;color:var(--success)}
.cf-pg5-lb{position:fixed;inset:0;z-index:2147483000;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px;padding:12px clamp(12px,3vw,32px) clamp(16px,3vw,28px);background:oklch(from var(--band) calc(l - .1) c h / .97);color:var(--band-ink);font-family:var(--font-body);animation:cf-pg5-fade .2s ease both}
.cf-pg5-lb-top{display:flex;align-items:center;gap:12px;min-height:48px}
.cf-pg5-lb-count{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-pg5-lb-btn{display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:999px;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);cursor:pointer;transition:background .16s ease,transform .16s ease}
.cf-pg5-lb-btn:hover{background:oklch(from var(--band-ink) l c h / .22)}
.cf-pg5-lb-btn:active{transform:scale(.96)}
.cf-pg5-lb-btn:focus-visible{outline:2px solid var(--band-ink);outline-offset:3px}
.cf-pg5-lb-close{margin-left:auto;flex:none}
.cf-pg5-lb-stage{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(8px,2vw,24px);min-height:0}
.cf-pg5-lb-nav.is-prev{grid-column:1}
.cf-pg5-lb-nav.is-next{grid-column:3}
.cf-pg5-lb-media{grid-column:2;grid-row:1;height:100%;min-height:0;display:grid;place-items:center;touch-action:none;user-select:none;cursor:grab}
.cf-pg5-lb-media:active{cursor:grabbing}
.cf-pg5-lb-move{display:grid;place-items:center;width:100%;height:100%;min-height:0;transition:transform .2s ease;animation:cf-pg5-swap .3s cubic-bezier(.2,.7,.2,1) both}
.cf-pg5-lb-move.is-drag{transition:none}
.cf-pg5-img.cf-pg5-lb-photo{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;border-radius:12px}
.cf-pg5-lb-frame{position:relative;width:min(100%,max(220px,calc(100dvh - 260px)));aspect-ratio:1/1;max-height:100%;border-radius:12px;overflow:hidden}
.cf-pg5-lb-cap{width:100%;max-width:42rem;min-height:52px;margin:0 auto;text-align:center}
.cf-pg5-lb-name{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3}
.cf-pg5-lb-quote{margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:color-mix(in oklab,var(--band-ink) 88%,var(--band));text-wrap:pretty}
.cf-pg5-rise{animation:cf-pg5-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--d,0s)}
@keyframes cf-pg5-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes cf-pg5-swap{from{opacity:.82}}
@keyframes cf-pg5-pop{from{opacity:.82;transform:scale(.9)}}
@keyframes cf-pg5-fade{from{opacity:0}}
@media (min-width:1100px){
.cf-pg5-notecol{margin-top:var(--pg5-lift,0px)}
.cf-pg5-letter{rotate:-1deg}
}
@media (max-width:1099px){
.cf-pg5-board{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'stage stage' 'letter action'}
.cf-pg5-stagecol{width:100%;max-width:640px;justify-self:center}
.cf-pg5-board.no-letter{grid-template-columns:minmax(0,1fr);grid-template-areas:'stage' 'action'}
.cf-pg5-board.no-letter .cf-pg5-action{width:100%;max-width:560px;justify-self:center}
}
@media (max-width:719px){
.cf-pg5-board{grid-template-columns:minmax(0,1fr);grid-template-areas:'stage' 'letter' 'action'}
.cf-pg5-seg{width:100%;margin-bottom:28px}
.cf-pg5-seg button{flex:1 1 0;min-width:0;padding:0 8px;gap:6px;font-size:.9375rem;text-wrap:balance}
.cf-pg5-flag{top:-12px;right:-6px;padding:10px 14px 12px}
.cf-pg5-nav{width:44px;height:44px;margin-top:-22px}
.cf-pg5-nav.is-prev{left:8px}
.cf-pg5-nav.is-next{right:8px}
.cf-pg5-strip{gap:8px}
.cf-pg5-strip li{flex:0 0 max(60px,calc((100% - 24px) / 4))}
.cf-pg5-thumb{width:100%}
.cf-pg5-lb-stage{grid-template-columns:minmax(0,1fr)}
.cf-pg5-lb-media{grid-column:1}
.cf-pg5-lb-nav{position:absolute;top:50%;z-index:2;width:44px;height:44px;margin-top:-22px;background:oklch(from var(--band) calc(l - .04) c h / .82)}
.cf-pg5-lb-nav.is-prev{left:4px}
.cf-pg5-lb-nav.is-next{right:4px}
}
@media (max-width:440px){
.cf-pg5-seg button{font-size:.875rem}
.cf-pg5-seg-n{min-width:24px;height:24px;padding:0 6px}
}
@media (prefers-reduced-motion:reduce){
.cf-pg5 *,.cf-pg5 *::before,.cf-pg5 *::after{animation:none !important;transition:none !important}
}
`
pieces/offer/product-gallery-5/specimen.tsx 69 lines
import __studioImagefb41cef8 from "../assets/b521081ddb85de08.webp";
import __studioImagec9853119 from "../assets/d2b2316a67cd4b06.webp";
import __studioImage0bf014af from "../assets/c441ac492350a4b4.webp";
import * as React from 'react'
import ProductGallery5 from '../product-gallery-5'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled'
export const states = ['default', 'hover', 'active', 'disabled']
export default function ProductGallery5Specimen({ state = 'default' }: { state?: SpecimenState }) {
const hoodie = slot(
'product',
__studioImagefb41cef8,
)
const lena = __studioImagec9853119
const theo = __studioImage0bf014af
return (
<ProductGallery5
state={state}
headline='See it on real buyers, not just in our studio'
highlight='real buyers'
lead='Our studio shots sit right next to photos customers sent in. Tap any photo to see it full screen.'
productName='Northfold merino hoodie'
productDetail='Midweight merino, a lined hood and a deep kangaroo pocket. Made to wear every day.'
studioPhotos={[
{ src: hoodie, alt: 'Northfold merino hoodie in charcoal, front view', label: 'Front view' },
{ src: hoodie, alt: 'Close-up of the lined hood and flat drawcords', label: 'Hood and drawcords', focus: '50% 22%', zoom: 2.1 },
{ src: hoodie, alt: 'Close-up of the deep kangaroo pocket', label: 'Kangaroo pocket', focus: '50% 70%', zoom: 2.2 },
{ src: hoodie, alt: 'The merino knit up close', label: 'Merino knit, up close', focus: '40% 48%', zoom: 2.8 },
]}
customerPhotos={[
{
src: lena,
alt: 'Lena wearing her charcoal Northfold hoodie by a train window',
name: 'Lena',
place: 'Portland',
quote: 'Wore it on a nine-hour train ride and straight into dinner.',
focus: '50% 30%',
},
{
src: theo,
alt: 'Theo wearing his charcoal Northfold hoodie on a misty trail',
name: 'Theo',
place: 'Leeds',
quote: 'Three weeks of hill walks. Still soft, still fresh.',
focus: '50% 30%',
},
]}
price='$128'
priceLabel='Yours for'
letter={{
salutation: 'Dear friend,',
paragraphs: [
'Our studio photos make this hoodie look perfect. That’s their job.',
'So we asked buyers to send their own: on trains, on trails, three days into a trip.',
'Flip to Customer photos and judge it in real light. If it’s right for you, I’ll send yours out.',
],
signoff: 'Mara',
signoffRole: 'Founder, Northfold',
}}
actionLabel='Send me my hoodie'
reassurance={defaults.sample.guarantee}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalProductGallery5 |
React.ReactNode |
Default 'See exactly what you’re getting'
|
highlight OptionalProductGallery5 |
string |
Default 'exactly'
|
lead OptionalProductGallery5 |
React.ReactNode |
Default 'Tap any photo to see it full screen, up close.'
|
productName OptionalProductGallery5 |
string |
Default 'Product'
|
productDetail OptionalProductGallery5 |
React.ReactNode |
|
studioPhotos OptionalProductGallery5 |
StudioShot[] |
Default []
|
customerPhotos OptionalProductGallery5 |
CustomerPhoto[] |
Default []
|
price OptionalProductGallery5 |
string |
|
priceLabel OptionalProductGallery5 |
string |
Default 'Yours for'
|
priceOnPhoto OptionalProductGallery5 |
boolean |
Default true
|
letter OptionalProductGallery5 |
ProductGallery5Letter | null |
|
actionLabel OptionalProductGallery5 |
string |
Default 'Send it to me'
|
reassurance OptionalProductGallery5 |
React.ReactNode |
|
href OptionalProductGallery5 |
string |
|
onAction OptionalProductGallery5 |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
disabled OptionalProductGallery5 |
boolean |
Default false
|
copy OptionalProductGallery5 |
Partial<ProductGallery5Copy> |
|
backdrop OptionalProductGallery5 |
string | null |
Default studioBackdrop
|
initialIndex OptionalProductGallery5 |
number |
Default 0
|
onChange OptionalProductGallery5 |
(index: number) => void |
|
state OptionalProductGallery5 |
ProductGallery5State |
Default 'default'
|
className OptionalProductGallery5 |
string |
Default ''
|
style OptionalProductGallery5 |
React.CSSProperties |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
b521081ddb85de08.webp
image/webp · 61.3 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
c18141ad9dda999d.webp
image/webp · 14.4 KB
-
c441ac492350a4b4.webp
image/webp · 63.3 KB
-
d2b2316a67cd4b06.webp
image/webp · 51.1 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB