Legal Page 4
Refund policy path: the return terms climb a staircase from “your order arrives” to “refund issued”, a live
Use it in a prompt
Use content/legal-page-4 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/legal-page-4.tsx. - Import it and pass your copy and images (Props tab):
import { LegalPage4 } from "@/components/funneldna/content/legal-page-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/legal-page-4/component.tsx 634 lines
// layout: price-staircase
// Refund policy path: the return terms climb a staircase from “your order arrives” to “refund issued”, a live
// “When did your order arrive?” check shows the visitor’s last day to ask, and the full policy sits underneath.
import * as React from 'react'
import { CalendarCheck, CalendarDays, Check, CircleAlert, Clock, Hourglass, Mail, Package, Phone } from 'lucide-react'
export type PathStop = {
/** Big numeral on the stop, e.g. '30' */
figure?: string
/** Short word before the numeral, e.g. 'Day' */
figurePrefix?: string
/** Short word after the numeral, e.g. 'nights' */
figureSuffix?: string
title: string
/** One line under the title */
text?: React.ReactNode
/** Shows the visitor’s computed last day once a date is entered */
deadline?: boolean
/** Small lucide icon shown on the stop’s step (desktop) */
icon?: React.ReactNode
}
export type PolicySection = { id?: string; title: string; paragraphs: React.ReactNode[] }
export type PolicyContact = { email?: string; phone?: string; hours?: string }
export type ActionDetail = { arrivalDate: string | null; lastDay: string | null }
export type LegalPage4Copy = {
arrivePrefix: string
arriveTitle: string
arriveText: string
trialSuffix: string
trialTitle: string
/** '{days}' is replaced with the trial window */
trialText: string
requestPrefix: string
requestTitle: string
/** '{days}' is replaced with the trial window */
requestText: string
/** Used when no trial window is supplied */
requestTextOpen: string
refundSuffix: string
refundTitle: string
refundText: string
/** Title on the deadline stop once a date is entered */
deadlineTitle: string
updatedLabel: string
calcLabel: string
/** '{days}' is replaced with the trial window */
calcHint: string
calcPrompt: string
/** '{date}' is replaced with the last day */
resultOpen: string
/** '{count}' is replaced with the days left */
daysLeft: string
dayLeftOne: string
lastDayToday: string
/** '{date}' is replaced with the last day */
resultClosed: string
closedNote: string
errorFuture: string
errorInvalid: string
policyHeading: string
closeHeading: string
actionLabel: string
}
export type LegalPage4Props = {
title?: string
/** Phrase inside the title that gets the marker swipe */
titleMark?: string
lead?: React.ReactNode
/** Date the policy last changed, shown after copy.updatedLabel */
updated?: string
/** 1 when this block is the page’s first heading */
headingLevel?: 1 | 2
/** Trial window in days, counted from delivery; leave empty to hide the date check */
windowDays?: number
/** Days to issue the refund once the return arrives */
refundDays?: number
/** Replaces the stops built from windowDays and refundDays */
stops?: PathStop[]
/** The full policy text under the path */
sections?: PolicySection[]
contact?: PolicyContact
/** Text under the closing heading */
closeText?: React.ReactNode
/** One short line under the closing button */
actionNote?: string
/** Slot 'product': transparent product photo standing on the first stop */
productImage?: string
productAlt?: string
/** Prefills the date check, YYYY-MM-DD */
defaultArrival?: string
/** Locale for the computed dates */
locale?: string
copy?: Partial<LegalPage4Copy>
href?: string
onAction?: (event: React.MouseEvent<HTMLElement>, detail: ActionDetail) => void
disabled?: boolean
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error'
className?: string
}
export function LegalPage4(props: LegalPage4Props) {
const {
title = 'Try it at home. If it isn’t right, send it back.',
titleMark = 'send it back',
lead = 'Here is how returns work, from the day your order arrives to the day your money is back.',
updated = '',
headingLevel = 2,
windowDays,
refundDays,
stops,
sections = DEFAULT_SECTIONS,
contact,
closeText,
actionNote = '',
productImage,
productAlt = '',
defaultArrival = '',
locale = 'en-US',
href,
onAction,
disabled = false,
state = 'default',
className,
} = props
const copy: LegalPage4Copy = { ...DEFAULT_COPY, ...props.copy }
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '')
const headId = `lp4-h-${uid}`
const fieldId = `lp4-f-${uid}`
const msgId = `lp4-m-${uid}`
const trialDays = typeof windowDays === 'number' && windowDays > 0 ? Math.round(windowDays) : 0
const today = React.useMemo(() => startOfDay(new Date()), [])
const [value, setValue] = React.useState<string>(() =>
state === 'error' ? toISO(addDays(startOfDay(new Date()), 3)) : defaultArrival,
)
const firstRun = React.useRef(true)
React.useEffect(() => {
if (firstRun.current) {
firstRun.current = false
return
}
setValue(state === 'error' ? toISO(addDays(today, 3)) : defaultArrival)
}, [state, defaultArrival, today])
const arrival = parseISO(value)
let error = ''
if (value && !arrival) error = copy.errorInvalid
else if (arrival && arrival.getTime() > today.getTime()) error = copy.errorFuture
const lastDay = arrival && !error && trialDays ? addDays(arrival, trialDays) : null
const left = lastDay ? daysBetween(today, lastDay) : 0
const fmt = React.useMemo(
() => ({
long: new Intl.DateTimeFormat(locale, { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' }),
month: new Intl.DateTimeFormat(locale, { month: 'short' }),
day: new Intl.DateTimeFormat(locale, { day: 'numeric' }),
}),
[locale],
)
const path: PathStop[] = stops ?? buildStops(copy, trialDays, refundDays)
const n = path.length
const isDisabled = disabled || state === 'disabled'
const detail: ActionDetail = {
arrivalDate: arrival && !error ? value : null,
lastDay: lastDay ? toISO(lastDay) : null,
}
const Heading = headingLevel === 1 ? 'h1' : 'h2'
const Sub = headingLevel === 1 ? 'h2' : 'h3'
const Sec = headingLevel === 1 ? 'h3' : 'h4'
const markAt = titleMark ? title.indexOf(titleMark) : -1
const renderButton = (large: boolean) => {
const cls = ['lp4-btn', large && 'lp4-btn-lg', state === 'hover' && 'is-hover', state === 'active' && 'is-active']
.filter(Boolean)
.join(' ')
const handle = (event: React.MouseEvent<HTMLElement>) => onAction?.(event, detail)
if (href && !isDisabled) {
return (
<a className={cls} href={href} onClick={handle}>
{copy.actionLabel}
</a>
)
}
return (
<button type='button' className={cls} disabled={isDisabled} onClick={handle}>
{copy.actionLabel}
</button>
)
}
let tone: 'prompt' | 'open' | 'closed' = 'prompt'
if (lastDay) tone = left >= 0 ? 'open' : 'closed'
let resultMain: React.ReactNode = copy.calcPrompt
let resultSub: React.ReactNode = null
if (lastDay && tone === 'open') {
resultMain = withDate(copy.resultOpen, <strong>{fmt.long.format(lastDay)}</strong>)
resultSub = left === 0 ? copy.lastDayToday : left === 1 ? copy.dayLeftOne : fill(copy.daysLeft, { count: left })
} else if (lastDay && tone === 'closed') {
resultMain = withDate(copy.resultClosed, <strong>{fmt.long.format(lastDay)}</strong>)
resultSub = copy.closedNote || null
}
const hasContact = Boolean(contact && (contact.email || contact.phone || contact.hours))
return (
<section className={['cf-legal-page-4', className].filter(Boolean).join(' ')} aria-labelledby={headId}>
<style>{CSS}</style>
<div className='lp4-wrap'>
<header className='lp4-head'>
<Heading id={headId} className='lp4-h'>
{markAt >= 0 ? (
<>
{title.slice(0, markAt)}
<mark className='lp4-mark'>{titleMark}</mark>
{title.slice(markAt + titleMark.length)}
</>
) : (
title
)}
</Heading>
{lead ? <p className='lp4-lead'>{lead}</p> : null}
{updated ? (
<p className='lp4-meta'>
<CalendarDays className='lp4-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.updatedLabel} {updated}
</p>
) : null}
</header>
<ol className='lp4-path' style={{ '--lp4-n': String(n) } as React.CSSProperties}>
{path.map((stop, i) => {
const isLast = i === n - 1
const isSet = Boolean(stop.deadline && lastDay)
const prefix = isSet && lastDay ? fmt.month.format(lastDay) : stop.figurePrefix
const figure = isSet && lastDay ? fmt.day.format(lastDay) : stop.figure
const suffix = isSet ? undefined : stop.figureSuffix
const frac = n > 1 ? i / (n - 1) : 1
const riserTone = isLast
? 'var(--accent-fill, var(--accent, oklch(0.5 0.17 257)))'
: `color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) ${5 + Math.round(frac * 8)}%, var(--surface, oklch(1 0 0)))`
const style = {
'--lp4-d': `${Math.min(i * 0.07, 0.28).toFixed(2)}s`,
'--lp4-rise': `calc(${frac.toFixed(3)} * clamp(64px, 9vw, 112px) + 72px)`,
'--lp4-tone': riserTone,
} as React.CSSProperties
return (
<li
key={`${i}-${stop.title}`}
className={['lp4-stop', isLast && 'is-last', isSet && 'is-set'].filter(Boolean).join(' ')}
style={style}
>
<span className='lp4-node' aria-hidden='true' />
<div className='lp4-body'>
{i === 0 && productImage ? (
<img className='lp4-photo' src={productImage} alt={productAlt} width={440} height={440} />
) : null}
{figure || prefix || suffix ? (
<p className='lp4-figure'>
{prefix ? <span className='lp4-affix'>{prefix}</span> : null}
{figure ? <span className='lp4-num'>{figure}</span> : null}
{suffix ? <span className='lp4-affix'>{suffix}</span> : null}
</p>
) : null}
<p className='lp4-title'>{isSet ? copy.deadlineTitle : stop.title}</p>
{stop.text ? <p className='lp4-text'>{stop.text}</p> : null}
</div>
<div className={['lp4-riser', isLast && 'is-top'].filter(Boolean).join(' ')} aria-hidden='true'>
{isLast ? (
<span className='lp4-badge'>
<Check size={20} strokeWidth={3} />
</span>
) : stop.icon ? (
<span className='lp4-riser-ico'>{stop.icon}</span>
) : null}
</div>
</li>
)
})}
</ol>
<div className='lp4-floor' aria-hidden='true' />
{trialDays ? (
<div className='lp4-calc'>
<div className='lp4-field-group'>
<label htmlFor={fieldId} className='lp4-label'>
{copy.calcLabel}
</label>
<input
id={fieldId}
type='date'
className={`lp4-field${error ? ' is-invalid' : ''}`}
value={value}
max={toISO(today)}
disabled={isDisabled}
onChange={(event) => setValue(event.target.value)}
aria-invalid={error ? true : undefined}
aria-describedby={msgId}
/>
{error ? (
<p id={msgId} className='lp4-error' role='alert'>
<CircleAlert className='lp4-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{error}
</p>
) : (
<p id={msgId} className='lp4-hint'>
{fill(copy.calcHint, { days: trialDays })}
</p>
)}
</div>
<div className={`lp4-result is-${tone}`} aria-live='polite'>
<span className='lp4-result-icon' aria-hidden='true'>
{tone === 'open' ? (
<Check size={18} strokeWidth={3} />
) : tone === 'closed' ? (
<Clock size={24} strokeWidth={2.5} />
) : (
<CalendarDays size={24} strokeWidth={2.5} />
)}
</span>
<p className='lp4-result-main'>{resultMain}</p>
{resultSub ? <p className='lp4-result-sub'>{resultSub}</p> : null}
</div>
<div className='lp4-calc-action'>{renderButton(false)}</div>
</div>
) : null}
{sections.length ? (
<div className='lp4-policy'>
<Sub className='lp4-sub lp4-policy-head'>{copy.policyHeading}</Sub>
<div className='lp4-sections'>
{sections.map((section, i) => (
<div key={section.id ?? `${i}-${section.title}`} id={section.id} className='lp4-section'>
<Sec className='lp4-sec-title'>{section.title}</Sec>
{section.paragraphs.map((paragraph, j) => (
<p key={j} className='lp4-p'>
{paragraph}
</p>
))}
</div>
))}
</div>
</div>
) : null}
<div className='lp4-close'>
<div className='lp4-close-copy'>
<Sub className='lp4-sub'>{copy.closeHeading}</Sub>
{closeText ? <p className='lp4-close-text'>{closeText}</p> : null}
{hasContact && contact ? (
<ul className='lp4-contact'>
{contact.email ? (
<li>
<Mail className='lp4-ico' size={18} strokeWidth={2.5} aria-hidden='true' />
<a className='lp4-link' href={`mailto:${contact.email}`}>
{contact.email}
</a>
</li>
) : null}
{contact.phone ? (
<li>
<Phone className='lp4-ico' size={18} strokeWidth={2.5} aria-hidden='true' />
<a className='lp4-link' href={`tel:${contact.phone.replace(/[^0-9+]/g, '')}`}>
{contact.phone}
</a>
</li>
) : null}
{contact.hours ? (
<li>
<Clock className='lp4-ico' size={18} strokeWidth={2.5} aria-hidden='true' />
<span>{contact.hours}</span>
</li>
) : null}
</ul>
) : null}
</div>
<div className='lp4-close-action'>
{renderButton(true)}
{actionNote ? <p className='lp4-note'>{actionNote}</p> : null}
</div>
</div>
</div>
</section>
)
}
export default LegalPage4
function buildStops(copy: LegalPage4Copy, trialDays: number, refundDays?: number): PathStop[] {
const list: PathStop[] = [
{
figurePrefix: copy.arrivePrefix,
figure: '0',
title: copy.arriveTitle,
text: copy.arriveText,
icon: <Package size={20} strokeWidth={2.5} />,
},
]
if (trialDays) {
list.push({
figure: String(trialDays),
figureSuffix: copy.trialSuffix,
title: copy.trialTitle,
text: fill(copy.trialText, { days: trialDays }),
icon: <Hourglass size={20} strokeWidth={2.5} />,
})
list.push({
figurePrefix: copy.requestPrefix,
figure: String(trialDays),
title: copy.requestTitle,
text: fill(copy.requestText, { days: trialDays }),
deadline: true,
icon: <CalendarCheck size={20} strokeWidth={2.5} />,
})
} else {
list.push({ title: copy.requestTitle, text: copy.requestTextOpen, icon: <CalendarCheck size={20} strokeWidth={2.5} /> })
}
const days = typeof refundDays === 'number' && refundDays > 0 ? Math.round(refundDays) : 0
list.push(
days
? { figure: String(days), figureSuffix: copy.refundSuffix, title: copy.refundTitle, text: copy.refundText }
: { title: copy.refundTitle, text: copy.refundText },
)
return list
}
function fill(template: string, vars: Record<string, string | number>) {
return Object.keys(vars).reduce((text, key) => text.split(`{${key}}`).join(String(vars[key])), template)
}
function withDate(template: string, node: React.ReactNode) {
const parts = template.split('{date}')
if (parts.length < 2) {
return (
<>
{template} {node}
</>
)
}
return (
<>
{parts[0]}
{node}
{parts.slice(1).join('')}
</>
)
}
function startOfDay(date: Date) {
return new Date(date.getFullYear(), date.getMonth(), date.getDate())
}
function addDays(date: Date, days: number) {
const next = new Date(date)
next.setDate(next.getDate() + days)
return next
}
function daysBetween(from: Date, to: Date) {
return Math.round((to.getTime() - from.getTime()) / 86400000)
}
function toISO(date: Date) {
const m = String(date.getMonth() + 1).padStart(2, '0')
const d = String(date.getDate()).padStart(2, '0')
return `${date.getFullYear()}-${m}-${d}`
}
function parseISO(value: string): Date | null {
const parts = value.split('-')
if (parts.length !== 3) return null
const [y, m, d] = parts.map(Number)
if (!y || !m || !d) return null
const date = new Date(y, m - 1, d)
return date.getFullYear() === y && date.getMonth() === m - 1 && date.getDate() === d ? date : null
}
const DEFAULT_COPY: LegalPage4Copy = {
arrivePrefix: 'Day',
arriveTitle: 'Your order arrives',
arriveText: 'Your trial starts the day it’s delivered.',
trialSuffix: 'days',
trialTitle: 'Try it at home',
trialText: 'Use it for the full {days} days.',
requestPrefix: 'Day',
requestTitle: 'Ask for a return',
requestText: 'Tell us by day {days} and you’re covered.',
requestTextOpen: 'Tell us you’d like to send it back.',
refundSuffix: 'days',
refundTitle: 'Refund issued',
refundText: 'Your money goes back the way you paid.',
deadlineTitle: 'Your last day to ask',
updatedLabel: 'Last updated',
calcLabel: 'When did your order arrive?',
calcHint: 'We count {days} days from the day it was delivered.',
calcPrompt: 'Pick the day it arrived and see your last day to ask for a return.',
resultOpen: 'Your last day to ask for a return is {date}.',
daysLeft: '{count} days left',
dayLeftOne: '1 day left',
lastDayToday: 'Today is your last day.',
resultClosed: 'Your return window closed on {date}.',
closedNote: 'Questions? Contact us below.',
errorFuture: 'That date hasn’t happened yet. Pick the day your order arrived.',
errorInvalid: 'Enter the full date your order arrived.',
policyHeading: 'Every term, in plain English',
closeHeading: 'Ready to send it back?',
actionLabel: 'Start a return',
}
const DEFAULT_SECTIONS: PolicySection[] = [
{
title: 'Who can return',
paragraphs: ['Any order can be returned within the trial window shown above, counted from the day it was delivered.'],
},
{
title: 'How to start',
paragraphs: ['Use the Start a return button and tell us your order number. We’ll send you the return steps.'],
},
{
title: 'When you’re refunded',
paragraphs: ['Your refund goes back to your original payment method once your return reaches us.'],
},
]
const CSS = `
.cf-legal-page-4{--lp4-bg:var(--button-bg,var(--cta,oklch(0.58 0.21 29)));--lp4-bg2:var(--button-bg-2,var(--cta-2,oklch(0.51 0.21 29)));--lp4-sh:var(--shadow,oklch(0.22 0.03 260));--lp4-accent:var(--accent,oklch(0.5 0.17 257));position:relative;background:var(--surface,oklch(1 0 0));color:var(--ink,oklch(0.21 0.034 263));font-family:var(--font-body,sans-serif);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);overflow-x:clip}
.cf-legal-page-4 *,.cf-legal-page-4 *::before,.cf-legal-page-4 *::after{box-sizing:border-box}
.cf-legal-page-4 :where(h1,h2,h3,h4,p,ol,ul,figure){margin:0}
.cf-legal-page-4 :where(ol,ul){padding:0;list-style:none}
.cf-legal-page-4 .lp4-wrap{max-width:1120px;margin:0 auto}
.cf-legal-page-4 .lp4-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em;flex:none}
.cf-legal-page-4 .lp4-head{max-width:46rem;margin-bottom:clamp(40px,5vw,64px)}
.cf-legal-page-4 .lp4-h{font-family:var(--font-display,sans-serif);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;margin-bottom:16px;color:var(--ink,oklch(0.21 0.034 263))}
.cf-legal-page-4 .lp4-mark{color:inherit;background:none;background-image:linear-gradient(transparent 0 42%,oklch(from var(--marker,#fae37c) l c h / 0.56) 42% 94%,transparent 94%);padding:0 0.12em;margin:0 -0.02em;border-radius:0.2em 0.45em 0.32em 0.24em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-legal-page-4 .lp4-lead{font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;max-width:60ch;text-wrap:pretty}
.cf-legal-page-4 .lp4-meta{margin-top:16px;font-size:0.9375rem;line-height:1.4;font-weight:600;color:var(--muted,oklch(0.45 0.03 258))}
.cf-legal-page-4 .lp4-path{display:grid;grid-template-columns:repeat(var(--lp4-n,4),minmax(0,1fr));column-gap:clamp(12px,2vw,24px);align-items:stretch}
.cf-legal-page-4 .lp4-stop{display:flex;flex-direction:column;justify-content:flex-end;min-width:0;animation:lp4-in 0.45s cubic-bezier(0.2,0.7,0.2,1) both;animation-delay:var(--lp4-d,0s)}
.cf-legal-page-4 .lp4-node{display:none}
.cf-legal-page-4 .lp4-body{min-width:0;padding-inline-end:8px}
.cf-legal-page-4 .lp4-photo{display:block;width:100%;max-width:220px;height:auto;aspect-ratio:1/1;object-fit:contain;object-position:left bottom;margin-bottom:16px;border-radius:0;filter:drop-shadow(0 2px 3px oklch(from var(--lp4-sh) l c h / 0.22)) drop-shadow(0 14px 16px oklch(from var(--lp4-sh) l c h / 0.16))}
.cf-legal-page-4 .lp4-figure{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;row-gap:4px;margin-bottom:20px;font-family:var(--font-display,sans-serif);font-weight:var(--display-weight,800);line-height:1}
.cf-legal-page-4 .lp4-num{font-size:clamp(2.5rem,4.2vw,3.75rem);letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink,oklch(0.21 0.034 263))}
.cf-legal-page-4 .lp4-affix{font-size:clamp(1.3125rem,1.8vw,1.625rem);letter-spacing:-0.01em;color:var(--lp4-accent)}
.cf-legal-page-4 .lp4-stop.is-set .lp4-num{color:var(--lp4-accent)}
.cf-legal-page-4 .lp4-title{font-family:var(--font-display,sans-serif);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;margin-bottom:8px}
.cf-legal-page-4 .lp4-text{color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-legal-page-4 .lp4-riser{position:relative;margin-top:24px;height:var(--lp4-rise,80px);border-radius:12px 12px 0 0;background:var(--lp4-tone);box-shadow:inset 0 1px 0 oklch(from var(--ink,oklch(0.21 0.034 263)) l c h / 0.06)}
.cf-legal-page-4 .lp4-riser.is-top{background:linear-gradient(oklch(from var(--lp4-tone) calc(l + 0.04) c h),oklch(from var(--lp4-tone) calc(l - 0.04) c h));box-shadow:inset 0 1px 0 oklch(from var(--lp4-tone) calc(l + 0.14) c h / 0.7)}
.cf-legal-page-4 .lp4-riser-ico{position:absolute;top:16px;left:16px;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--card,oklch(1 0 0));color:var(--accent,oklch(0.5 0.17 257));box-shadow:var(--shadow-sm,0 1px 1px oklch(0.22 0.03 260 / 0.18),0 1px 3px oklch(0.22 0.03 260 / 0.14))}
.cf-legal-page-4 .lp4-badge{position:absolute;top:16px;left:16px;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--success,oklch(0.5 0.138 150));color:var(--lp4-badge-ink,#fff)}
.cf-legal-page-4 .lp4-floor{height:2px;background:oklch(from var(--ink,oklch(0.21 0.034 263)) l c h / 0.16)}
.cf-legal-page-4 .lp4-calc{margin-top:clamp(32px,4vw,48px);display:grid;grid-template-columns:minmax(240px,1fr) minmax(0,1.3fr) auto;gap:20px 32px;align-items:center;padding:clamp(20px,3vw,32px);background:var(--card,oklch(1 0 0));color:var(--ink,oklch(0.21 0.034 263));border:1px solid color-mix(in oklab,var(--lp4-accent) 28%,var(--card,oklch(1 0 0)));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)))}
.cf-legal-page-4 .lp4-field-group{min-width:0}
.cf-legal-page-4 .lp4-label{display:block;margin-bottom:12px;font-family:var(--font-display,sans-serif);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;color:var(--label-ink,var(--ink,oklch(0.21 0.034 263)))}
.cf-legal-page-4 .lp4-field{display:block;width:100%;min-width:0;height:56px;padding:0 16px;font-family:var(--font-body,sans-serif);font-size:17px;font-weight:600;line-height:1.2;color:var(--field-ink,oklch(0.21 0.034 263));background:var(--field,oklch(1 0 0));border:1px solid var(--field-border,color-mix(in oklch,var(--ink,oklch(0.21 0.034 263)) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));-webkit-appearance:none;appearance:none;transition:border-color 0.16s ease,box-shadow 0.16s ease}
.cf-legal-page-4 .lp4-field:hover{border-color:color-mix(in oklch,var(--ink,oklch(0.21 0.034 263)) 40%,transparent)}
.cf-legal-page-4 .lp4-field:focus{outline:none;border-color:var(--field-focus,var(--lp4-accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--lp4-accent)) l c h / 0.35)}
.cf-legal-page-4 .lp4-field.is-invalid{border-color:var(--danger,oklch(0.5 0.17 27))}
.cf-legal-page-4 .lp4-field.is-invalid:focus{border-color:var(--danger,oklch(0.5 0.17 27));box-shadow:0 0 0 3px oklch(from var(--danger,oklch(0.5 0.17 27)) l c h / 0.3)}
.cf-legal-page-4 .lp4-field::-webkit-calendar-picker-indicator{cursor:pointer;opacity:0.75}
.cf-legal-page-4 .lp4-field:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink,oklch(0.21 0.034 263)) 6%,var(--field,oklch(1 0 0)));color:color-mix(in oklch,var(--field-ink,oklch(0.21 0.034 263)) 70%,var(--field,oklch(1 0 0)))}
.cf-legal-page-4 .lp4-hint{margin-top:8px;font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-legal-page-4 .lp4-error{margin-top:8px;font-size:0.9375rem;line-height:1.4;font-weight:700;color:var(--danger,oklch(0.5 0.17 27));text-wrap:pretty}
.cf-legal-page-4 .lp4-result{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:14px;row-gap:4px;align-items:start;padding:16px 20px;border-radius:10px;background:color-mix(in oklch,var(--ink,oklch(0.21 0.034 263)) 4%,var(--card,oklch(1 0 0)));color:var(--ink,oklch(0.21 0.034 263))}
.cf-legal-page-4 .lp4-result.is-open{background:var(--success-soft,oklch(0.93 0.019 150))}
.cf-legal-page-4 .lp4-result.is-closed{background:var(--warning-soft,oklch(0.93 0.014 85))}
.cf-legal-page-4 .lp4-result-icon{grid-row:1 / span 2;display:grid;place-items:center;width:32px;height:32px;color:var(--lp4-accent)}
.cf-legal-page-4 .lp4-result.is-open .lp4-result-icon{border-radius:999px;background:var(--success,oklch(0.5 0.138 150));color:var(--lp4-badge-ink,#fff)}
.cf-legal-page-4 .lp4-result.is-closed .lp4-result-icon{color:var(--warning,oklch(0.5 0.1 85))}
.cf-legal-page-4 .lp4-result-main{grid-column:2;font-weight:600;line-height:1.4;text-wrap:pretty}
.cf-legal-page-4 .lp4-result-main strong{font-weight:800}
.cf-legal-page-4 .lp4-result-sub{grid-column:2;font-size:0.9375rem;line-height:1.4;font-weight:800;color:var(--success,oklch(0.5 0.138 150))}
.cf-legal-page-4 .lp4-result.is-closed .lp4-result-sub{color:var(--ink,oklch(0.21 0.034 263));font-weight:600}
.cf-legal-page-4 .lp4-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:56px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display,sans-serif));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;white-space:nowrap;text-decoration:none;cursor:pointer;color:var(--button-ink,var(--cta-ink,oklch(1 0 0)));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--lp4-bg) calc(l + 0.04) c h),oklch(from var(--lp4-bg2) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--lp4-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--lp4-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--lp4-sh) l c h / 0.3),0 8px 16px -6px oklch(from var(--lp4-sh) l c h / 0.42));transition:transform 0.16s ease,box-shadow 0.16s ease,background 0.16s ease}
.cf-legal-page-4 .lp4-btn-lg{min-height:64px}
.cf-legal-page-4 .lp4-btn:hover:not(:disabled),.cf-legal-page-4 .lp4-btn.is-hover:not(:disabled){transform:translateY(-1px);background:linear-gradient(oklch(from var(--lp4-bg) calc(l - 0.01) c h),oklch(from var(--lp4-bg2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--lp4-bg) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--lp4-bg) calc(l - 0.2) c h),0 1px 2px oklch(from var(--lp4-sh) l c h / 0.32),0 10px 18px -6px oklch(from var(--lp4-sh) l c h / 0.5)}
.cf-legal-page-4 .lp4-btn:active:not(:disabled),.cf-legal-page-4 .lp4-btn.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--lp4-bg) calc(l - 0.05) c h),oklch(from var(--lp4-bg2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--lp4-bg2) calc(l - 0.22) c h / 0.55),inset 0 -2px 0 oklch(from var(--lp4-bg) calc(l - 0.16) c h),0 1px 1px oklch(from var(--lp4-sh) l c h / 0.25)}
.cf-legal-page-4 .lp4-btn:focus-visible{outline:3px solid var(--field-focus,var(--lp4-accent));outline-offset:3px}
.cf-legal-page-4 .lp4-btn:disabled{cursor:not-allowed;transform:none;background:var(--secondary,oklch(0.93 0.015 263));color:var(--secondary-ink,oklch(0.21 0.034 263));text-shadow:none;box-shadow:none}
.cf-legal-page-4 .lp4-policy{margin-top:clamp(56px,7vw,88px)}
.cf-legal-page-4 .lp4-sub{font-family:var(--font-display,sans-serif);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:-0.01em;text-wrap:balance}
.cf-legal-page-4 .lp4-policy-head{margin-bottom:clamp(24px,3vw,32px)}
.cf-legal-page-4 .lp4-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(28px,3.5vw,40px) clamp(32px,5vw,72px)}
.cf-legal-page-4 .lp4-section{min-width:0}
.cf-legal-page-4 .lp4-sec-title{font-family:var(--font-display,sans-serif);font-weight:800;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;margin-bottom:8px;text-wrap:balance}
.cf-legal-page-4 .lp4-p{line-height:1.6;max-width:64ch;text-wrap:pretty}
.cf-legal-page-4 .lp4-p+.lp4-p{margin-top:12px}
.cf-legal-page-4 .lp4-close{--lp4-link:color-mix(in oklab,var(--link,var(--lp4-accent)) 82%,var(--ink,oklch(0.21 0.034 263)));margin-top:clamp(48px,6vw,72px);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px 48px;align-items:center;padding:clamp(24px,3.5vw,40px);border-radius:var(--card-radius,var(--radius,14px));background:color-mix(in oklch,var(--ink,oklch(0.21 0.034 263)) 4%,var(--surface,oklch(1 0 0)))}
.cf-legal-page-4 .lp4-close-copy{min-width:0}
.cf-legal-page-4 .lp4-close-text{margin-top:8px;max-width:60ch;color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-legal-page-4 .lp4-contact{margin-top:16px;display:flex;flex-wrap:wrap;gap:8px 24px;font-weight:600}
.cf-legal-page-4 .lp4-contact li{min-width:0;overflow-wrap:anywhere}
.cf-legal-page-4 .lp4-close-action{display:flex;flex-direction:column;align-items:center;gap:12px}
.cf-legal-page-4 .lp4-note{font-size:0.9375rem;line-height:1.4;font-weight:600;color:var(--muted,oklch(0.45 0.03 258));text-align:center;text-wrap:pretty}
.cf-legal-page-4 .lp4-link{color:var(--lp4-link,var(--link,var(--lp4-accent)));font-weight:700;text-decoration:underline;text-decoration-color:oklch(from var(--lp4-link,var(--link,var(--lp4-accent))) l c h / 0.45);text-underline-offset:0.18em}
.cf-legal-page-4 .lp4-link:hover{color:oklch(from var(--lp4-link,var(--link,var(--lp4-accent))) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-legal-page-4 .lp4-link:focus-visible{outline:3px solid var(--field-focus,var(--lp4-accent));outline-offset:2px;border-radius:4px}
@media (max-width:1023px){
.cf-legal-page-4 .lp4-calc{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.cf-legal-page-4 .lp4-calc-action{grid-column:1 / -1}
}
@media (max-width:759px){
.cf-legal-page-4 .lp4-path{grid-template-columns:minmax(0,1fr)}
.cf-legal-page-4 .lp4-stop{display:grid;grid-template-columns:20px minmax(0,1fr);column-gap:16px;align-items:start;position:relative;padding-bottom:28px}
.cf-legal-page-4 .lp4-stop::before{content:'';position:absolute;left:9px;top:18px;bottom:0;width:2px;background:oklch(from var(--ink,oklch(0.21 0.034 263)) l c h / 0.16)}
.cf-legal-page-4 .lp4-stop.is-last{padding-bottom:0}
.cf-legal-page-4 .lp4-stop.is-last::before{display:none}
.cf-legal-page-4 .lp4-node{display:block;position:relative;z-index:1;width:20px;height:20px;margin-top:12px;border-radius:999px;background:var(--card,oklch(1 0 0));border:4px solid var(--accent-fill,var(--lp4-accent))}
.cf-legal-page-4 .lp4-stop.is-last .lp4-node{margin-top:28px;background:var(--success,oklch(0.5 0.138 150));border-color:var(--success,oklch(0.5 0.138 150))}
.cf-legal-page-4 .lp4-body{padding-inline-end:0}
.cf-legal-page-4 .lp4-photo{max-width:200px;margin-bottom:12px}
.cf-legal-page-4 .lp4-riser,.cf-legal-page-4 .lp4-floor{display:none}
.cf-legal-page-4 .lp4-stop.is-last .lp4-body{background:linear-gradient(oklch(from var(--accent-fill,var(--lp4-accent)) calc(l + 0.03) c h),oklch(from var(--accent-fill,var(--lp4-accent)) calc(l - 0.03) c h));color:var(--accent-fill-ink,var(--card,oklch(1 0 0)));border-radius:var(--card-radius,var(--radius,14px));padding:20px;box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--lp4-accent)) calc(l + 0.14) c h / 0.6),var(--shadow-md,0 1px 2px oklch(0.22 0.03 260 / 0.22),0 4px 10px -2px oklch(0.22 0.03 260 / 0.2))}
.cf-legal-page-4 .lp4-stop.is-last .lp4-num,.cf-legal-page-4 .lp4-stop.is-last .lp4-affix,.cf-legal-page-4 .lp4-stop.is-last .lp4-title,.cf-legal-page-4 .lp4-stop.is-last .lp4-text{color:var(--accent-fill-ink,var(--card,oklch(1 0 0)))}
.cf-legal-page-4 .lp4-figure{margin-bottom:16px}
.cf-legal-page-4 .lp4-calc{grid-template-columns:minmax(0,1fr)}
.cf-legal-page-4 .lp4-calc .lp4-btn,.cf-legal-page-4 .lp4-close .lp4-btn{width:100%}
.cf-legal-page-4 .lp4-sections{grid-template-columns:minmax(0,1fr)}
.cf-legal-page-4 .lp4-close{grid-template-columns:minmax(0,1fr)}
.cf-legal-page-4 .lp4-close-action{align-items:stretch}
}
@keyframes lp4-in{from{opacity:0.82;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){
.cf-legal-page-4 .lp4-stop{animation:none}
.cf-legal-page-4 .lp4-btn,.cf-legal-page-4 .lp4-field{transition:none}
.cf-legal-page-4 .lp4-btn:hover,.cf-legal-page-4 .lp4-btn.is-hover,.cf-legal-page-4 .lp4-btn:active,.cf-legal-page-4 .lp4-btn.is-active{transform:none}
}
`
pieces/content/legal-page-4/specimen.tsx 81 lines
import __studioImagecf7526f8 from "../assets/a3a9641aed5f0129.webp";
// Specimen: Oakhaven Bedding’s refund policy path, a 30-night trial with the arrival date prefilled nine days ago.
import * as React from 'react'
import { LegalPage4, type LegalPage4Props } from '../legal-page-4'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
function isoDaysAgo(days: number) {
const d = new Date()
d.setDate(d.getDate() - days)
const m = String(d.getMonth() + 1).padStart(2, '0')
const day = String(d.getDate()).padStart(2, '0')
return `${d.getFullYear()}-${m}-${day}`
}
export default function LegalPage4Specimen({ state = 'default' }: { state?: LegalPage4Props['state'] }) {
const arrival = React.useMemo(() => isoDaysAgo(9), [])
return (
<LegalPage4
state={state}
title='Sleep on it for 30 nights. Not right? Send it back.'
titleMark='Send it back.'
lead={`Every Oakhaven Bedding order comes with our ${defaults.sample.guarantee}. Here’s exactly how it works, from the day your bedding arrives to the day your money is back.`}
updated='November 2, 2026'
windowDays={30}
refundDays={5}
defaultArrival={arrival}
productImage={slot(
'product',
__studioImagecf7526f8,
)}
productAlt='A folded stack of white and pale grey Oakhaven linen bedding'
copy={{
trialSuffix: 'nights',
trialTitle: 'Sleep on it',
trialText: 'Use it, wash it, live with it for {days} nights.',
requestText: 'Tell us by day {days} and you’re covered.',
calcHint: 'We count {days} nights from the day it was delivered.',
refundSuffix: 'business days',
refundText: 'Back to the card you paid with, once your return reaches us.',
closedNote: 'Write to us anyway. We read every message.',
}}
sections={[
{
id: 'trial',
title: 'Every order gets the 30-night trial',
paragraphs: [
'Your trial starts the day your order is delivered, not the day you placed it. Sleep on your sheets, duvet or pillows for up to 30 nights and wash them as often as you like.',
],
},
{
id: 'what',
title: 'What you can send back',
paragraphs: [
'Any Oakhaven bedding bought from our store, washed or unwashed. Pack it in any bag or box; the original packaging isn’t needed.',
'Gift cards and monogrammed items can’t be returned.',
],
},
{
id: 'how',
title: 'How to start a return',
paragraphs: [
'Tap Start a return and enter your order number and email. We email a prepaid return label within one business day. Drop the parcel at any carrier location.',
],
},
{
id: 'refund',
title: 'How your refund is paid',
paragraphs: [
'Once your return reaches our warehouse, we refund the full item price to the card or account you paid with within 5 business days. Your bank may take a few extra days to show it.',
],
},
]}
closeText='Have your order number ready. Questions first? We’re here to help.'
contact={{ email: 'care@oakhavenbedding.com', phone: '(555) 014-2290', hours: 'Mon–Fri, 9am–6pm ET' }}
actionNote='Free prepaid label, sent by email'
/>
)
}
| Name | Type | Details |
|---|---|---|
title OptionalLegalPage4 |
string |
|
titleMark OptionalLegalPage4 |
string |
|
lead OptionalLegalPage4 |
React.ReactNode |
|
updated OptionalLegalPage4 |
string |
|
headingLevel OptionalLegalPage4 |
1 | 2 |
|
windowDays OptionalLegalPage4 |
number |
|
refundDays OptionalLegalPage4 |
number |
|
stops OptionalLegalPage4 |
PathStop[] |
|
sections OptionalLegalPage4 |
PolicySection[] |
|
contact OptionalLegalPage4 |
PolicyContact |
|
closeText OptionalLegalPage4 |
React.ReactNode |
|
actionNote OptionalLegalPage4 |
string |
|
productImage OptionalLegalPage4 |
string |
|
productAlt OptionalLegalPage4 |
string |
|
defaultArrival OptionalLegalPage4 |
string |
|
locale OptionalLegalPage4 |
string |
|
copy OptionalLegalPage4 |
Partial<LegalPage4Copy> |
|
href OptionalLegalPage4 |
string |
|
onAction OptionalLegalPage4 |
(event: React.MouseEvent<HTMLElement>, detail: ActionDetail) => void |
|
disabled OptionalLegalPage4 |
boolean |
|
state OptionalLegalPage4 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalLegalPage4 |
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-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- 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).
-
a3a9641aed5f0129.webp
image/webp · 177 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB