Free Plus Shipping 1
Free + shipping offer: the book, a giant FREE, what shipping costs and where it ships, then a two-step address form that hands the visitor to checkout.
Use it in a prompt
Use offer/free-plus-shipping 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/free-plus-shipping.tsx. - Import it and pass your copy and images (Props tab):
import { FreePlusShipping } from "@/components/funneldna/offer/free-plus-shipping"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/free-plus-shipping/component.tsx 805 lines
// layout: segmented-stepper
// Free + shipping offer: the book, a giant FREE, what shipping costs and where it ships, then a two-step address form that hands the visitor to checkout.
import * as React from 'react'
import { AnimatePresence, motion, useReducedMotion, type Variants } from 'motion/react'
import { AlertCircle, Check, Lock, MapPin, Tag, Truck } from 'lucide-react'
export type FreePlusShippingField = {
name: string
label: string
type?: 'text' | 'email' | 'tel'
autoComplete?: string
/** Realistic example answer shown in the empty field */
placeholder?: string
/** Defaults to true */
required?: boolean
/** Shares a row with its neighbour when the slot is wide enough */
half?: boolean
}
export type FreePlusShippingPoint = { lead: string; text: string }
export type FreePlusShippingCopy = {
/** Accessible name of the step header */
stepsLabel: string
/** Screen-reader note added to a finished step */
stepDone: string
shippingHeading: string
valueLabel: string
shippingLabel: string
/** Shown when no shipping amount is supplied */
shippingPending: string
shipsToLabel: string
freeTag: string
/** {label} is replaced with the field label */
required: string
invalidEmail: string
errorSummary: string
}
export type FreePlusShippingProps = {
headline?: React.ReactNode
/** Phrase inside a string headline that gets the marker stroke */
headlineMark?: string
productName?: string
/** Slot: product. Transparent cut-out of the book or product */
productImage?: string
productImageAlt?: string
/** Supplied regular value of the item, e.g. '$49' (omit to hide the row) */
value?: string
freeLabel?: string
freeNote?: string
/** Supplied shipping amount, e.g. '$7.95'; when omitted copy.shippingPending shows */
shipping?: string
/** Where it ships */
shipsTo?: string
/** Short paragraphs, each opened by a bold lead-in */
points?: FreePlusShippingPoint[]
/** The two step names in the header */
steps?: [string, string]
label?: string
sublabel?: string
submitLabel?: string
submitSublabel?: string
backLabel?: string
secureNote?: string
fields?: FreePlusShippingField[]
copy?: Partial<FreePlusShippingCopy>
initialStep?: 1 | 2
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error'
/** Called when the visitor moves to the shipping step */
onNext?: () => void
/** Validated, trimmed shipping details */
onSubmit?: (values: Record<string, string>) => void
/** Checkout hand-off after a valid submit */
onAction?: () => void
className?: string
}
export function FreePlusShipping(props: FreePlusShippingProps) {
const {
headline = 'Build your first funnel with a clear plan',
headlineMark = 'a clear plan',
productName = 'Funnel Planning Guide',
productImage,
productImageAlt = 'Funnel Planning Guide softcover book',
value,
freeLabel = 'FREE',
freeNote = 'You just cover shipping',
shipping,
shipsTo = 'The address you enter next',
points = DEFAULT_POINTS,
steps = ['Your free guide', 'Shipping'],
label = 'Start planning my funnel',
sublabel = 'Free guide · You only pay shipping',
submitLabel = 'Ship my free guide',
submitSublabel = 'Shipping is the only cost',
backLabel = 'Back',
secureNote = 'Secure checkout',
fields = DEFAULT_FIELDS,
copy: copyProp,
initialStep = 1,
state = 'default',
onNext,
onSubmit,
onAction,
className,
} = props
const copy: FreePlusShippingCopy = { ...DEFAULT_COPY, ...copyProp }
const disabled = state === 'disabled'
const forced = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : ''
const reduce = useReducedMotion()
const uid = React.useId()
const [step, setStep] = React.useState<1 | 2>(state === 'error' ? 2 : initialStep)
const [dir, setDir] = React.useState(1)
const [values, setValues] = React.useState<Record<string, string>>({})
const [touched, setTouched] = React.useState<Record<string, boolean>>({})
const [showAll, setShowAll] = React.useState(state === 'error')
const moved = React.useRef(false)
React.useEffect(() => {
setShowAll(state === 'error')
setStep(state === 'error' ? 2 : initialStep)
}, [state, initialStep])
const errorFor = (field: FreePlusShippingField) => {
const entry = (values[field.name] ?? '').trim()
if (field.required !== false && !entry) return copy.required.replace('{label}', field.label)
if (field.type === 'email' && entry && !EMAIL.test(entry)) return copy.invalidEmail
return ''
}
const errors = fields.map((field) => ({ field, message: errorFor(field) }))
const hasErrors = errors.some((item) => item.message)
const focusHeading = (el: HTMLHeadingElement | null) => {
if (el && moved.current) {
moved.current = false
el.focus({ preventScroll: true })
}
}
const goTo = (next: 1 | 2) => {
if (disabled || next === step) return
setDir(next > step ? 1 : -1)
moved.current = true
setStep(next)
if (next === 2) onNext?.()
}
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault()
if (disabled) return
if (hasErrors) {
setShowAll(true)
const first = errors.find((item) => item.message)
if (first) document.getElementById(`${uid}-${first.field.name}`)?.focus()
return
}
onSubmit?.(Object.fromEntries(fields.map((field) => [field.name, (values[field.name] ?? '').trim()])))
onAction?.()
}
const variants: Variants = {
enter: (d: number) => ({ opacity: 0, x: reduce ? 0 : d * 28 }),
center: { opacity: 1, x: 0 },
exit: (d: number) => ({ opacity: 0, x: reduce ? 0 : d * -28 }),
}
const transition = { duration: reduce ? 0 : 0.24, ease: [0.2, 0.8, 0.2, 1] as [number, number, number, number] }
const hasImage = Boolean(productImage)
return (
<div className={['cf-free-plus-shipping', className].filter(Boolean).join(' ')}>
<style>{CSS}</style>
{headline ? <h2 className='fps-headline'>{renderMarked(headline, headlineMark)}</h2> : null}
<div className='fps-card'>
<ol className='fps-steps' aria-label={copy.stepsLabel}>
{steps.map((name, index) => {
const n = (index + 1) as 1 | 2
const current = n === step
const done = n < step
return (
<li key={name}>
<button
type='button'
className={`fps-step${current ? ' is-current' : ''}${done ? ' is-done' : ''}`}
aria-current={current ? 'step' : undefined}
onClick={() => goTo(n)}
>
{current ? (
<motion.span
layoutId={`${uid}-tile`}
className='fps-step-tile'
aria-hidden='true'
transition={reduce ? { duration: 0 } : { type: 'spring', stiffness: 460, damping: 38 }}
/>
) : null}
<span className='fps-step-num' aria-hidden='true'>
{done ? <Check size={15} strokeWidth={3} /> : n}
</span>
<span className='fps-step-text'>
{name}
{done ? <span className='fps-sr'> {copy.stepDone}</span> : null}
</span>
</button>
</li>
)
})}
</ol>
<div className='fps-stage'>
<AnimatePresence mode='wait' initial={false} custom={dir}>
{step === 1 ? (
<motion.div
key='offer'
className='fps-panel'
custom={dir}
variants={variants}
initial='enter'
animate='center'
exit='exit'
transition={transition}
>
<div className={`fps-offer-grid${hasImage ? ' has-image' : ''}`}>
{hasImage ? (
<figure className='fps-book'>
<span className='fps-floor' aria-hidden='true' />
<img src={productImage} alt={productImageAlt} width={640} height={640} />
</figure>
) : null}
<div className='fps-offer'>
<h3 className='fps-name' tabIndex={-1} ref={focusHeading}>
{productName}
</h3>
<p className='fps-free'>{freeLabel}</p>
<p className='fps-free-note'>{freeNote}</p>
<dl className='fps-facts'>
{value ? (
<div>
<dt>
<Tag aria-hidden='true' />
{copy.valueLabel}
</dt>
<dd>
<Price amount={value} />
</dd>
</div>
) : null}
<div>
<dt>
<Truck aria-hidden='true' />
{copy.shippingLabel}
</dt>
<dd>{shipping ? <Price amount={shipping} /> : copy.shippingPending}</dd>
</div>
<div>
<dt>
<MapPin aria-hidden='true' />
{copy.shipsToLabel}
</dt>
<dd>{shipsTo}</dd>
</div>
</dl>
{points.length ? (
<div className='fps-points'>
{points.map((point) => (
<p key={point.lead}>
<strong>{point.lead}</strong> {point.text}
</p>
))}
</div>
) : null}
<button type='button' className={`fps-cta${forced}`} disabled={disabled} onClick={() => goTo(2)}>
<span className='fps-cta-main'>{label}</span>
{sublabel ? <span className='fps-cta-sub'>{sublabel}</span> : null}
</button>
{secureNote ? (
<p className='fps-secure'>
<Lock aria-hidden='true' />
{secureNote}
</p>
) : null}
</div>
</div>
</motion.div>
) : (
<motion.form
key='ship'
className='fps-panel fps-form'
noValidate
onSubmit={handleSubmit}
custom={dir}
variants={variants}
initial='enter'
animate='center'
exit='exit'
transition={transition}
>
<h3 className='fps-form-title' tabIndex={-1} ref={focusHeading}>
{copy.shippingHeading}
</h3>
<div className='fps-summary'>
{hasImage ? <img src={productImage} alt='' width={64} height={64} /> : null}
<div className='fps-summary-text'>
<p className='fps-summary-name'>{productName}</p>
<p className='fps-summary-ship'>
{copy.shippingLabel}: {shipping ?? copy.shippingPending}
</p>
</div>
<span className='fps-tag'>{copy.freeTag}</span>
</div>
{showAll && hasErrors ? (
<p className='fps-alert' role='alert'>
<AlertCircle aria-hidden='true' />
{copy.errorSummary}
</p>
) : null}
<div className='fps-fields'>
{errors.map(({ field, message }) => {
const id = `${uid}-${field.name}`
const shown = message && (showAll || touched[field.name]) ? message : ''
return (
<div
key={field.name}
className={`fps-field${field.half ? ' is-half' : ''}${shown ? ' has-error' : ''}`}
>
<label htmlFor={id}>{field.label}</label>
<input
id={id}
name={field.name}
type={field.type ?? 'text'}
autoComplete={field.autoComplete}
placeholder={field.placeholder ?? placeholderFor(field)}
required={field.required !== false}
disabled={disabled}
value={values[field.name] ?? ''}
aria-invalid={shown ? true : undefined}
aria-describedby={shown ? `${id}-error` : undefined}
onChange={(event) => {
const next = event.target.value
setValues((prev) => ({ ...prev, [field.name]: next }))
}}
onBlur={() => setTouched((prev) => ({ ...prev, [field.name]: true }))}
/>
{shown ? (
<p className='fps-error' id={`${id}-error`}>
<AlertCircle aria-hidden='true' />
{shown}
</p>
) : null}
</div>
)
})}
</div>
<div className='fps-actions'>
<button type='submit' className='fps-cta' disabled={disabled}>
<span className='fps-cta-main'>{submitLabel}</span>
{submitSublabel ? <span className='fps-cta-sub'>{submitSublabel}</span> : null}
</button>
<button type='button' className='fps-back' onClick={() => goTo(1)}>
{backLabel}
</button>
</div>
{secureNote ? (
<p className='fps-secure'>
<Lock aria-hidden='true' />
{secureNote}
</p>
) : null}
</motion.form>
)}
</AnimatePresence>
</div>
</div>
</div>
)
}
export default FreePlusShipping
function Price({ amount }: { amount: string }) {
const match = amount.match(/^([^0-9]*)(.*)$/)
const symbol = match ? match[1].trim() : ''
const figure = match ? match[2] : amount
return (
<span className='fps-price'>
{symbol ? <span className='fps-sup'>{symbol}</span> : null}
{figure}
</span>
)
}
function renderMarked(headline: React.ReactNode, mark?: string) {
if (typeof headline !== 'string' || !mark) return headline
const at = headline.indexOf(mark)
if (at < 0) return headline
return (
<>
{headline.slice(0, at)}
<span className='fps-mark'>{mark}</span>
{headline.slice(at + mark.length)}
</>
)
}
function placeholderFor(field: FreePlusShippingField) {
if (field.type === 'email') return 'you@example.com'
if (field.type === 'tel') return '(555) 123-4567'
return 'Type your answer'
}
const EMAIL = /^[^ @]+@[^ @]+[.][^ @]{2,}$/
const DEFAULT_POINTS: FreePlusShippingPoint[] = [
{ lead: 'It’s yours free.', text: 'The guide costs nothing. You only cover shipping.' },
{ lead: 'Plan before you build.', text: 'Map your offer and the pages your funnel needs.' },
]
const DEFAULT_FIELDS: FreePlusShippingField[] = [
{ name: 'fullName', label: 'Full name', autoComplete: 'name', placeholder: 'Jane Smith' },
{ name: 'email', label: 'Email address', type: 'email', autoComplete: 'email', placeholder: 'you@example.com' },
{ name: 'address', label: 'Street address', autoComplete: 'address-line1', placeholder: '123 Main Street, Apt 4' },
{ name: 'city', label: 'City', autoComplete: 'address-level2', placeholder: 'Austin', half: true },
{ name: 'region', label: 'State / region', autoComplete: 'address-level1', placeholder: 'Texas', half: true },
{ name: 'postalCode', label: 'ZIP / postal code', autoComplete: 'postal-code', placeholder: '78701', half: true },
{ name: 'country', label: 'Country', autoComplete: 'country-name', placeholder: 'United States', half: true },
]
const DEFAULT_COPY: FreePlusShippingCopy = {
stepsLabel: 'Order steps',
stepDone: '(done)',
shippingHeading: 'Where should we send your free guide?',
valueLabel: 'Guide value',
shippingLabel: 'Shipping',
shippingPending: 'Added at checkout',
shipsToLabel: 'Ships to',
freeTag: 'FREE',
required: '{label} is required.',
invalidEmail: 'Enter a valid email, like you@example.com.',
errorSummary: 'Check the highlighted fields to continue.',
}
const CSS = `
.cf-free-plus-shipping {
--fps-shadow: var(--shadow, oklch(0.22 0.03 256));
--fps-radius: var(--radius, 12px);
--fps-marker: color-mix(in oklch, var(--marker, #fae37c) 55%, transparent);
--fps-well: color-mix(in oklch, var(--ink, #1b2333) 4%, var(--card, #ffffff));
--fps-track: color-mix(in oklch, var(--ink, #1b2333) 6%, var(--card, #ffffff));
--fps-quiet: color-mix(in oklch, var(--ink, #1b2333) 74%, var(--card, #ffffff));
--fps-focus: var(--field-focus, var(--accent, #2f6fd6));
--fps-cta: var(--button-bg, var(--cta, #d23b2c));
--fps-cta-2: var(--button-bg-2, var(--cta-2, #b02a1e));
container: fps / inline-size;
width: 100%;
max-width: 880px;
margin-inline: auto;
color: var(--ink, #1b2333);
font-family: var(--font-body, system-ui, sans-serif);
-webkit-font-smoothing: antialiased;
}
.cf-free-plus-shipping *, .cf-free-plus-shipping *::before, .cf-free-plus-shipping *::after { box-sizing: border-box; }
.cf-free-plus-shipping .fps-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cf-free-plus-shipping .fps-headline {
margin: 0 0 clamp(1.1rem, 3cqi, 1.75rem);
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.02em);
text-transform: var(--display-case, none);
font-size: clamp(2rem, 6cqi, 3.375rem);
line-height: 1.05;
text-align: center;
text-wrap: balance;
color: var(--ink, #1b2333);
}
.cf-free-plus-shipping .fps-mark {
padding: 0 0.14em;
margin: 0 -0.04em;
background-image: linear-gradient(100deg, transparent 0.1em, var(--fps-marker) 0.1em, var(--fps-marker) calc(100% - 0.08em), transparent calc(100% - 0.08em));
background-repeat: no-repeat;
background-size: 100% 0.62em;
background-position: 0 90%;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-free-plus-shipping .fps-card {
position: relative;
padding: clamp(14px, 3.2cqi, 28px);
background: var(--card, #ffffff);
border: 1px solid var(--card-border, color-mix(in oklch, var(--ink, #1b2333) 12%, transparent));
border-radius: var(--card-radius, calc(var(--fps-radius) + 6px));
box-shadow: var(--card-shadow, inset 0 1px 0 oklch(from var(--card, #ffffff) calc(l + 0.04) c h / 0.6), var(--shadow-lg, 0 2px 4px oklch(from var(--fps-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--fps-shadow) l c h / 0.32)));
}
.cf-free-plus-shipping .fps-steps {
list-style: none;
margin: 0;
padding: 5px;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 4px;
background: var(--fps-track);
border-radius: calc(var(--fps-radius) + 3px);
box-shadow: inset 0 1px 2px oklch(from var(--fps-shadow) l c h / 0.12);
}
.cf-free-plus-shipping .fps-steps li { display: flex; min-width: 0; }
/* Step tabs are buttons: face and radius follow the button role tokens; colours stay the neutral track/tile. */
.cf-free-plus-shipping .fps-step {
position: relative;
isolation: isolate;
flex: 1;
min-width: 0;
min-height: 52px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.6rem;
padding: 0.5rem 0.85rem;
border: 0;
border-radius: var(--button-radius, var(--fps-radius));
background: transparent;
color: var(--fps-quiet);
font: inherit;
font-family: var(--button-font, var(--font-display, inherit));
font-weight: 700;
font-size: 1.0625rem;
cursor: pointer;
transition: color 0.18s ease, background-color 0.18s ease;
}
.cf-free-plus-shipping .fps-step.is-current { color: var(--ink, #1b2333); cursor: default; }
.cf-free-plus-shipping .fps-step:focus-visible { outline: 3px solid var(--fps-focus); outline-offset: 2px; }
.cf-free-plus-shipping .fps-step-tile {
position: absolute;
inset: 0;
z-index: -1;
border-radius: inherit;
background: var(--card, #ffffff);
box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--ink, #1b2333) 10%, transparent), var(--shadow-sm, 0 1px 2px oklch(from var(--fps-shadow) l c h / 0.2), 0 1px 3px oklch(from var(--fps-shadow) l c h / 0.14));
}
.cf-free-plus-shipping .fps-step-num {
flex: none;
width: 1.75rem;
height: 1.75rem;
display: inline-grid;
place-items: center;
border: 1.5px solid currentColor;
border-radius: 999px;
font-size: 0.875rem;
font-weight: 800;
font-variant-numeric: tabular-nums;
}
.cf-free-plus-shipping .fps-step.is-current .fps-step-num { background: var(--ink, #1b2333); border-color: var(--ink, #1b2333); color: var(--card, #ffffff); }
/* Solid status badge (theme contract): --success fill, white glyph on every theme, never the card colour. */
.cf-free-plus-shipping .fps-step.is-done .fps-step-num { background: var(--success, #1f7a3f); border-color: var(--success, #1f7a3f); color: var(--fps-badge-glyph, #fff); }
.cf-free-plus-shipping .fps-step-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-free-plus-shipping .fps-stage { margin-top: clamp(16px, 3cqi, 26px); overflow: clip; overflow-clip-margin: 14px; }
.cf-free-plus-shipping .fps-panel { min-width: 0; }
.cf-free-plus-shipping .fps-offer-grid { display: grid; gap: 1.25rem; align-items: start; }
.cf-free-plus-shipping .fps-book { position: relative; margin: 0; padding: 0 0 18px; display: grid; justify-items: center; }
.cf-free-plus-shipping .fps-book img {
position: relative;
z-index: 1;
display: block;
width: 100%;
max-width: 230px;
height: auto;
aspect-ratio: 1;
object-fit: contain;
transform: rotate(-3deg);
filter: drop-shadow(0 2px 2px oklch(from var(--fps-shadow) l c h / 0.35)) drop-shadow(0 12px 12px oklch(from var(--fps-shadow) l c h / 0.24));
transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
animation: cf-fps-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cf-free-plus-shipping .fps-floor {
position: absolute;
left: 50%;
bottom: 8px;
width: min(62%, 220px);
height: 22px;
transform: translateX(-50%);
background: radial-gradient(closest-side, oklch(from var(--fps-shadow) l c h / 0.26), transparent);
}
@keyframes cf-fps-rise { from { opacity: 0.35; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
.cf-free-plus-shipping .fps-offer { container: fpsoffer / inline-size; min-width: 0; text-align: center; }
.cf-free-plus-shipping .fps-name {
margin: 0 0 0.85rem;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: clamp(1.25rem, 6cqi, 1.625rem);
line-height: 1.15;
text-wrap: balance;
color: var(--ink, #1b2333);
outline: none;
}
.cf-free-plus-shipping .fps-free {
margin: 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
font-size: clamp(4.25rem, 28cqi, 8.75rem);
line-height: 0.84;
letter-spacing: -0.035em;
color: var(--ink, #1b2333);
}
.cf-free-plus-shipping .fps-free-note {
margin: 0.9rem 0 0;
font-family: var(--font-display, inherit);
font-weight: 800;
font-size: 1.25rem;
line-height: 1.2;
color: var(--ink, #1b2333);
text-wrap: balance;
}
.cf-free-plus-shipping .fps-facts { margin: 1.25rem 0 0; padding: 0.25rem 1rem; background: var(--fps-well); border-radius: var(--fps-radius); text-align: left; }
.cf-free-plus-shipping .fps-facts > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.7rem 0; }
.cf-free-plus-shipping .fps-facts > div + div { border-top: 1px solid oklch(from var(--ink, #1b2333) l c h / 0.1); }
.cf-free-plus-shipping .fps-facts dt { margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 600; color: var(--muted, #4b5565); }
.cf-free-plus-shipping .fps-facts dt svg { width: 18px; height: 18px; flex: none; color: var(--accent, #2f6fd6); }
.cf-free-plus-shipping .fps-facts dd { margin: 0 0 0 auto; text-align: right; font-size: 1rem; font-weight: 700; color: var(--ink, #1b2333); text-wrap: pretty; }
.cf-free-plus-shipping .fps-price { font-family: var(--font-display, inherit); font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.cf-free-plus-shipping .fps-sup { display: inline-block; margin-right: 0.06em; font-size: 0.55em; transform: translateY(-0.55em); }
.cf-free-plus-shipping .fps-points { margin-top: 1.1rem; display: grid; gap: 0.5rem; }
.cf-free-plus-shipping .fps-points p { margin: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--ink, #1b2333); text-wrap: pretty; }
.cf-free-plus-shipping .fps-points strong { font-weight: 800; }
.cf-free-plus-shipping .fps-cta {
position: relative;
width: 100%;
min-height: 68px;
margin-top: 1.25rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.2rem;
padding: 0.8rem 1.25rem;
border: 1px solid oklch(from var(--fps-cta-2) calc(l - 0.05) c h);
border-radius: var(--button-radius, var(--fps-radius));
background: linear-gradient(180deg, oklch(from var(--fps-cta) calc(l + 0.045) c h), var(--fps-cta-2));
color: var(--button-ink, var(--cta-ink, #ffffff));
text-shadow: var(--button-text-shadow, none);
font-family: var(--button-font, var(--font-display, inherit));
text-transform: var(--button-case, none);
text-align: center;
cursor: pointer;
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--fps-cta) calc(l + 0.16) c h / 0.7), inset 0 -3px 0 oklch(from var(--fps-cta-2) calc(l - 0.12) c h), 0 1px 2px oklch(from var(--fps-shadow) l c h / 0.32), 0 6px 14px -4px oklch(from var(--fps-shadow) l c h / 0.42));
transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
-webkit-tap-highlight-color: transparent;
}
.cf-free-plus-shipping .fps-cta-main { font-weight: var(--button-weight, 800); font-size: clamp(1.25rem, 5.6cqi, 1.5rem); line-height: 1.12; text-wrap: balance; }
.cf-free-plus-shipping .fps-cta-sub { font-family: var(--font-body, inherit); font-weight: 600; font-size: 0.9375rem; line-height: 1.25; text-transform: none; text-wrap: pretty; }
.cf-free-plus-shipping .fps-cta.is-hover:not(:disabled) {
background: linear-gradient(180deg, oklch(from var(--fps-cta) calc(l - 0.02) c h), oklch(from var(--fps-cta-2) calc(l - 0.06) c h));
transform: translateY(-1px);
}
@media (hover: hover) {
.cf-free-plus-shipping .fps-cta:hover:not(:disabled) {
background: linear-gradient(180deg, oklch(from var(--fps-cta) calc(l - 0.02) c h), oklch(from var(--fps-cta-2) calc(l - 0.06) c h));
transform: translateY(-1px);
}
.cf-free-plus-shipping .fps-step:not(.is-current):hover { color: var(--ink, #1b2333); background: color-mix(in oklch, var(--ink, #1b2333) 5%, transparent); }
.cf-free-plus-shipping .fps-book:hover img { transform: rotate(-1deg) translateY(-6px); }
.cf-free-plus-shipping .fps-back:hover { background: oklch(from var(--button-2-bg, var(--secondary, #e6e8ee)) calc(l - 0.03) c h); }
}
.cf-free-plus-shipping .fps-cta:active:not(:disabled), .cf-free-plus-shipping .fps-cta.is-active:not(:disabled) {
background: linear-gradient(180deg, oklch(from var(--fps-cta) calc(l - 0.06) c h), oklch(from var(--fps-cta-2) calc(l - 0.08) c h));
transform: translateY(1px);
box-shadow: inset 0 2px 3px oklch(from var(--fps-cta-2) calc(l - 0.18) c h / 0.5), inset 0 -1px 0 oklch(from var(--fps-cta-2) calc(l - 0.12) c h), 0 1px 1px oklch(from var(--fps-shadow) l c h / 0.3);
}
.cf-free-plus-shipping .fps-cta:focus-visible { outline: 3px solid var(--fps-focus); outline-offset: 3px; }
.cf-free-plus-shipping .fps-cta:disabled {
cursor: not-allowed;
border-color: transparent;
background: var(--secondary, #e6e8ee);
color: var(--secondary-ink, #1b2333);
text-shadow: none;
transform: none;
box-shadow: var(--button-2-shadow, var(--shadow-sm));
}
.cf-free-plus-shipping .fps-secure { margin: 0.75rem 0 0; display: flex; align-items: center; justify-content: center; gap: 0.4rem; font-size: 0.9375rem; font-weight: 600; color: var(--muted, #4b5565); }
.cf-free-plus-shipping .fps-secure svg { width: 16px; height: 16px; flex: none; }
.cf-free-plus-shipping .fps-form-title {
margin: 0 0 1rem;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: clamp(1.375rem, 4.2cqi, 1.875rem);
line-height: 1.12;
text-wrap: balance;
color: var(--ink, #1b2333);
outline: none;
}
.cf-free-plus-shipping .fps-summary { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.85rem 1rem; background: var(--fps-well); border-radius: var(--fps-radius); }
.cf-free-plus-shipping .fps-summary img { flex: none; width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 2px 3px oklch(from var(--fps-shadow) l c h / 0.3)); }
.cf-free-plus-shipping .fps-summary-text { flex: 1; min-width: 0; }
.cf-free-plus-shipping .fps-summary-name { margin: 0; font-weight: 800; font-size: 1.0625rem; line-height: 1.3; color: var(--ink, #1b2333); }
.cf-free-plus-shipping .fps-summary-ship { margin: 0.2rem 0 0; font-size: 0.9375rem; color: var(--muted, #4b5565); }
.cf-free-plus-shipping .fps-tag {
flex: none;
padding: 0.35rem 0.8rem;
border-radius: 999px;
background: var(--success-soft, #e2f0e6);
color: var(--success, #1f7a3f);
font-family: var(--font-display, inherit);
font-weight: 800;
font-size: 0.9375rem;
letter-spacing: 0.04em;
}
.cf-free-plus-shipping .fps-alert {
margin: 1rem 0 0;
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 0.75rem 1rem;
border-radius: var(--fps-radius);
background: var(--danger-soft, #f8e3e1);
color: var(--danger, #b42318);
font-weight: 700;
font-size: 0.9375rem;
}
.cf-free-plus-shipping .fps-alert svg { width: 18px; height: 18px; flex: none; margin-top: 0.1em; }
.cf-free-plus-shipping .fps-fields { margin-top: 1.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.cf-free-plus-shipping .fps-field { display: grid; gap: 0.45rem; min-width: 0; }
.cf-free-plus-shipping .fps-field label { font-weight: 700; font-size: 1rem; color: var(--label-ink, var(--ink, #1b2333)); }
.cf-free-plus-shipping .fps-field input {
width: 100%;
min-width: 0;
min-height: 54px;
padding: 0.8rem 1rem;
font: inherit;
font-size: 1.0625rem;
font-weight: 500;
color: var(--field-ink, #1b2333);
background: var(--field, #ffffff);
border: 1.5px solid var(--field-border, color-mix(in oklch, var(--ink, #1b2333) 22%, transparent));
border-radius: var(--field-radius, var(--fps-radius));
box-shadow: inset 0 1px 2px oklch(from var(--fps-shadow) l c h / 0.08);
transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cf-free-plus-shipping .fps-field input::placeholder { color: color-mix(in oklch, var(--field-ink, #1b2333) 65%, var(--field, #ffffff)); opacity: 1; }
.cf-free-plus-shipping .fps-field input:hover:not(:disabled):not(:focus) { border-color: color-mix(in oklch, var(--ink, #1b2333) 38%, transparent); }
.cf-free-plus-shipping .fps-field input:focus { outline: none; border-color: var(--fps-focus); box-shadow: 0 0 0 3px oklch(from var(--fps-focus) l c h / 0.22); }
.cf-free-plus-shipping .fps-field input:disabled { cursor: not-allowed; background: var(--fps-well); }
.cf-free-plus-shipping .fps-field.has-error input { border-color: var(--danger, #b42318); }
.cf-free-plus-shipping .fps-field.has-error input:focus { box-shadow: 0 0 0 3px oklch(from var(--danger, #b42318) l c h / 0.2); }
.cf-free-plus-shipping .fps-error { margin: 0; display: flex; align-items: center; gap: 0.35rem; font-size: 0.9375rem; font-weight: 600; color: var(--danger, #b42318); }
.cf-free-plus-shipping .fps-error svg { width: 16px; height: 16px; flex: none; }
.cf-free-plus-shipping .fps-actions { margin-top: 1.4rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cf-free-plus-shipping .fps-actions .fps-cta { margin-top: 0; }
.cf-free-plus-shipping .fps-back {
min-height: 54px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1.25rem;
border: 1px solid var(--button-2-border, transparent);
border-radius: var(--button-radius, var(--fps-radius));
background: var(--button-2-bg, var(--secondary, #e6e8ee));
color: var(--button-2-ink, var(--secondary-ink, #1b2333));
font-family: var(--button-font, var(--font-display, inherit));
font-weight: var(--button-weight, 800);
font-size: 1.0625rem;
text-transform: var(--button-case, none);
cursor: pointer;
box-shadow: var(--button-2-shadow, var(--shadow-sm));
transition: background 0.14s ease, transform 0.14s ease;
}
.cf-free-plus-shipping .fps-back:active { transform: translateY(1px); }
.cf-free-plus-shipping .fps-back:focus-visible { outline: 3px solid var(--fps-focus); outline-offset: 3px; }
@container fps (max-width: 479px) {
.cf-free-plus-shipping .fps-step-num { display: none; }
.cf-free-plus-shipping .fps-step { font-size: 1rem; padding-inline: 0.5rem; }
}
@container fps (min-width: 560px) {
.cf-free-plus-shipping .fps-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf-free-plus-shipping .fps-field { grid-column: 1 / -1; }
.cf-free-plus-shipping .fps-field.is-half { grid-column: auto; }
.cf-free-plus-shipping .fps-actions { flex-direction: row; align-items: stretch; }
.cf-free-plus-shipping .fps-actions .fps-cta { flex: 1; }
.cf-free-plus-shipping .fps-actions .fps-back { order: -1; flex: none; min-width: 9rem; }
}
@container fps (min-width: 640px) {
.cf-free-plus-shipping .fps-offer-grid.has-image { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4cqi, 44px); }
.cf-free-plus-shipping .fps-offer { text-align: left; }
.cf-free-plus-shipping .fps-book { padding-top: 12px; }
.cf-free-plus-shipping .fps-book img { max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
.cf-free-plus-shipping .fps-book img { animation: none; transition: none; }
.cf-free-plus-shipping .fps-book:hover img { transform: rotate(-3deg); }
.cf-free-plus-shipping .fps-cta, .cf-free-plus-shipping .fps-back, .cf-free-plus-shipping .fps-step, .cf-free-plus-shipping .fps-field input { transition: none; }
.cf-free-plus-shipping .fps-cta:hover:not(:disabled), .cf-free-plus-shipping .fps-cta.is-hover:not(:disabled), .cf-free-plus-shipping .fps-cta:active:not(:disabled), .cf-free-plus-shipping .fps-cta.is-active:not(:disabled), .cf-free-plus-shipping .fps-back:active { transform: none; }
}
`
pieces/offer/free-plus-shipping/specimen.tsx 29 lines
import __studioImage4fef5a85 from "../assets/63f24e1e525332d3.webp";
import * as React from 'react'
import { FreePlusShipping } from '../free-plus-shipping'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export default function FreePlusShippingSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample
const guide = sample.items[0]
return (
<FreePlusShipping
state={state}
headline={sample.headline}
headlineMark='a clear plan'
productName={guide.name}
productImage={slot(
'product',
__studioImage4fef5a85
)}
productImageAlt={guide.imageAlt}
value={guide.value}
secureNote='Secure checkout'
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalFreePlusShipping |
React.ReactNode |
|
headlineMark OptionalFreePlusShipping |
string |
|
productName OptionalFreePlusShipping |
string |
|
productImage OptionalFreePlusShipping |
string |
|
productImageAlt OptionalFreePlusShipping |
string |
|
value OptionalFreePlusShipping |
string |
|
freeLabel OptionalFreePlusShipping |
string |
|
freeNote OptionalFreePlusShipping |
string |
|
shipping OptionalFreePlusShipping |
string |
|
shipsTo OptionalFreePlusShipping |
string |
|
points OptionalFreePlusShipping |
FreePlusShippingPoint[] |
|
steps OptionalFreePlusShipping |
[string, string] |
|
label OptionalFreePlusShipping |
string |
|
sublabel OptionalFreePlusShipping |
string |
|
submitLabel OptionalFreePlusShipping |
string |
|
submitSublabel OptionalFreePlusShipping |
string |
|
backLabel OptionalFreePlusShipping |
string |
|
secureNote OptionalFreePlusShipping |
string |
|
fields OptionalFreePlusShipping |
FreePlusShippingField[] |
|
copy OptionalFreePlusShipping |
Partial<FreePlusShippingCopy> |
|
initialStep OptionalFreePlusShipping |
1 | 2 |
|
state OptionalFreePlusShipping |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
onNext OptionalFreePlusShipping |
() => void |
|
onSubmit OptionalFreePlusShipping |
(values: Record<string, string>) => void |
|
onAction OptionalFreePlusShipping |
() => void |
|
className OptionalFreePlusShipping |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-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--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).
-
63f24e1e525332d3.webp
image/webp · 65.4 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB