Strikethrough Price Tag 1
Strikethrough price tag: a hang tag that crosses out the regular price in red and sets today's price huge,
Use it in a prompt
Use offer/strikethrough-price-tag 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/strikethrough-price-tag.tsx. - Import it and pass your copy and images (Props tab):
import { StrikethroughPriceTag } from "@/components/funneldna/offer/strikethrough-price-tag"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/strikethrough-price-tag/component.tsx 357 lines
// layout: bento-grid
// Strikethrough price tag: a hang tag that crosses out the regular price in red and sets today's price huge,
// then closes with a guarantee commit line, one action and a P.S., so the price reads as the obvious deal.
import * as React from "react"
import { AlertCircle, Check, Clock, Lock } from "lucide-react"
export type StrikethroughPriceTagItem = {
name: string
detail?: string
/** Stand-alone value of the item, e.g. "$49" */
value?: string
/** item-n slot image (product photo) */
image?: string
imageAlt?: string
}
export type StrikethroughPriceTagState = "default" | "hover" | "active" | "disabled" | "error"
export type StrikethroughPriceTagProps = {
headline?: React.ReactNode
lead?: React.ReactNode
/** Small line printed at the top of the tag (product name or "Your price today") */
tagLabel?: string
/** A real urgency flag such as "Today only"; renders only when supplied */
todayOnly?: string
regularLabel?: string
/** The price crossed out in red; empty hides the line */
regularPrice?: string
/** Today's price, e.g. "$47"; the currency sign is set as a superscript */
price?: string
priceNote?: string
itemsHeadline?: React.ReactNode
/** Items valued beside the tag; an empty list hides the tile */
items?: StrikethroughPriceTagItem[]
/** "{value}" is replaced with each item's value */
valueTemplate?: string
actionHeadline?: React.ReactNode
/** Commit line above the button; empty hides it and the check */
commitLabel?: React.ReactNode
/** Whether the commit box starts ticked */
commitDefault?: boolean
commitError?: string
label?: string
reassurance?: string
psLabel?: string
ps?: React.ReactNode
/** Screen-reader price line; placeholders {todayOnly} {regularLabel} {regularPrice} {tagLabel} {price} {priceNote} */
priceSummary?: string
href?: string
onAction?: () => void
state?: StrikethroughPriceTagState
className?: string
}
const DEFAULT_ITEMS: StrikethroughPriceTagItem[] = [
{ name: "Funnel Planning Guide", detail: "Map your offer and the pages your funnel needs.", value: "$49" },
{ name: "Page Copy Workbook", detail: "Draft your headline, offer, and call to action.", value: "$29" },
{ name: "Launch Checklist", detail: "Review the links, forms, and next steps before launch.", value: "$19" },
]
export function StrikethroughPriceTag(props: StrikethroughPriceTagProps) {
const {
headline = "Everything in the kit for one simple payment",
lead = "Plan your funnel, write your page copy, and check every step before you launch.",
tagLabel = "Your price today",
todayOnly,
regularLabel = "Regular price",
regularPrice = "$97",
price = "$47",
priceNote = "One-time payment",
itemsHeadline = "Plan it, write it, check it",
items = DEFAULT_ITEMS,
valueTemplate = "{value} value",
actionHeadline = "Start planning your funnel today",
commitLabel = "I understand I’m covered by the 30-day money-back guarantee.",
commitDefault = true,
commitError = "Tick the box above to continue.",
label = "Send Me The Starter Kit",
reassurance = "Secure checkout · Instant download",
psLabel = "P.S.",
ps = "Use the whole kit for 30 days. If it doesn’t help you plan your first funnel, you get every cent back.",
priceSummary = "{todayOnly} {regularLabel} {regularPrice}. {tagLabel}: {price}, {priceNote}.",
href,
onAction,
state = "default",
className,
} = props
const uid = React.useId()
const commitId = `${uid}-commit`
const errorId = `${uid}-error`
const inputRef = React.useRef<HTMLInputElement>(null)
const disabled = state === "disabled"
const requireCommit = commitLabel !== undefined && commitLabel !== null && commitLabel !== ""
const [checked, setChecked] = React.useState(state === "error" ? false : commitDefault)
const [error, setError] = React.useState(state === "error")
React.useEffect(() => {
setChecked(state === "error" ? false : commitDefault)
setError(state === "error")
}, [state, commitDefault])
const parts = splitPrice(price)
const digits = parts.whole.split(",").join("").length
const hasItems = items.length > 0
const summary = fill(priceSummary, {
todayOnly: todayOnly ? `${todayOnly}.` : "",
regularLabel: regularPrice ? regularLabel : "",
regularPrice: regularPrice || "",
tagLabel,
price,
priceNote,
}).trim()
const handleAction = (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => {
if (disabled) {
event.preventDefault()
return
}
if (requireCommit && !checked) {
event.preventDefault()
setError(true)
inputRef.current?.focus()
return
}
onAction?.()
}
const rootClass = ["cf-spt", hasItems ? "" : "is-solo", error ? "is-error" : "", className || ""].filter(Boolean).join(" ")
const btnClass = ["cf-spt__btn", state === "hover" ? "is-hover" : "", state === "active" ? "is-active" : ""].filter(Boolean).join(" ")
return (
<div className={rootClass}>
<style>{css}</style>
<div className="cf-spt__tile cf-spt__stage" style={tileStyle(0)}>
<h2 className="cf-spt__headline">{headline}</h2>
{lead ? <p className="cf-spt__lead">{lead}</p> : null}
<div className="cf-spt__stagebody">
<div className="cf-spt__tagwrap">
<div className="cf-spt__tag">
<span className="cf-spt__hole" aria-hidden="true" />
<p className="cf-spt__sr">{summary}</p>
<div className="cf-spt__tagbody" aria-hidden="true">
{tagLabel || todayOnly ? (
<div className="cf-spt__tagtop">
{tagLabel ? <span className="cf-spt__taglabel">{tagLabel}</span> : null}
{todayOnly ? (
<span className="cf-spt__flag">
<Clock size={16} strokeWidth={2.5} aria-hidden="true" />
{todayOnly}
</span>
) : null}
</div>
) : null}
{regularPrice ? (
<p className="cf-spt__was">
{regularLabel ? <span className="cf-spt__waslabel">{regularLabel}</span> : null}
<del className="cf-spt__wasprice">{regularPrice}</del>
</p>
) : null}
<p className="cf-spt__now" data-len={digits >= 4 ? String(Math.min(digits, 6)) : undefined}>
{parts.symbol ? <span className="cf-spt__sup">{parts.symbol}</span> : null}
<span>{parts.whole}</span>
{parts.cents ? <span className="cf-spt__sup is-cents">{parts.cents}</span> : null}
{parts.rest ? <span className="cf-spt__rest">{parts.rest}</span> : null}
</p>
{priceNote ? <p className="cf-spt__note">{priceNote}</p> : null}
</div>
</div>
</div>
</div>
</div>
{hasItems ? (
<div className="cf-spt__tile cf-spt__card cf-spt__items" style={tileStyle(1)}>
{itemsHeadline ? <h3 className="cf-spt__h3">{itemsHeadline}</h3> : null}
<ul className="cf-spt__list">
{items.map((item, index) => (
<li key={`${item.name}-${index}`} className={item.image ? "cf-spt__item" : "cf-spt__item is-plain"}>
{item.image ? (
<img
className="cf-spt__thumb"
src={item.image}
alt={item.imageAlt || item.name}
width={56}
height={56}
loading="lazy"
decoding="async"
/>
) : null}
<div className="cf-spt__itemtext">
<p className="cf-spt__itemname">{item.name}</p>
{item.detail ? <p className="cf-spt__itemdetail">{item.detail}</p> : null}
</div>
{item.value ? <p className="cf-spt__itemvalue">{fill(valueTemplate, { value: item.value })}</p> : null}
</li>
))}
</ul>
</div>
) : null}
<div className="cf-spt__tile cf-spt__card cf-spt__action" style={tileStyle(hasItems ? 2 : 1)}>
{actionHeadline ? <h3 className="cf-spt__h3">{actionHeadline}</h3> : null}
{requireCommit ? (
<>
<label className="cf-spt__commit" htmlFor={commitId}>
<span className="cf-spt__box">
<input
ref={inputRef}
id={commitId}
type="checkbox"
checked={checked}
disabled={disabled}
aria-invalid={error ? true : undefined}
aria-describedby={error ? errorId : undefined}
onChange={(event) => {
setChecked(event.target.checked)
if (event.target.checked) setError(false)
}}
/>
<span className="cf-spt__boxface" aria-hidden="true">
<Check size={16} strokeWidth={3} />
</span>
</span>
<span className="cf-spt__committext">{commitLabel}</span>
</label>
<p id={errorId} className="cf-spt__error" aria-live="polite">
{error ? (
<>
<AlertCircle size={16} strokeWidth={2.5} aria-hidden="true" />
{commitError}
</>
) : null}
</p>
</>
) : null}
{href && !disabled ? (
<a className={btnClass} href={href} onClick={handleAction}>
{label}
</a>
) : (
<button type="button" className={btnClass} onClick={handleAction} disabled={disabled}>
{label}
</button>
)}
{reassurance ? (
<p className="cf-spt__reassure">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{reassurance}
</p>
) : null}
{ps ? (
<p className="cf-spt__ps">
{psLabel ? <strong>{psLabel}</strong> : null} {ps}
</p>
) : null}
</div>
</div>
)
}
export default StrikethroughPriceTag
function tileStyle(index: number): React.CSSProperties {
return { "--i": index } as unknown as React.CSSProperties
}
function fill(template: string, vars: Record<string, string>) {
return Object.keys(vars).reduce((text, key) => text.split(`{${key}}`).join(vars[key]), template)
}
function splitPrice(price: string) {
const match = price.trim().match(/^([^0-9]*)([0-9][0-9,]*)(?:[.]([0-9]{1,2}))?(.*)$/)
if (!match) return { symbol: "", whole: price, cents: "", rest: "" }
return { symbol: match[1].trim(), whole: match[2], cents: match[3] || "", rest: (match[4] || "").trim() }
}
const css = `
.cf-spt{--cf-spt-b:var(--button-bg,var(--cta));--cf-spt-b2:var(--button-bg-2,var(--cta-2));--cf-spt-sh:var(--shadow,oklch(0.22 0.03 260));display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-areas:'stage items' 'stage action';gap:16px;width:100%;max-width:1120px;margin-inline:auto;font-family:var(--font-body);color:var(--ink);text-align:left}
.cf-spt.is-solo{grid-template-areas:'stage action'}
.cf-spt *,.cf-spt *::before,.cf-spt *::after{box-sizing:border-box}
.cf-spt :where(h2,h3,p,ul,li){margin:0;padding:0}
.cf-spt ul{list-style:none}
.cf-spt__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-spt__tile{min-width:0;border-radius:var(--card-radius,var(--radius,14px));animation:cf-spt-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * .07s)}
.cf-spt__card{background:var(--card);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--cf-spt-sh) l c h / .22),0 4px 10px -2px oklch(from var(--cf-spt-sh) l c h / .2)));padding:clamp(20px,3vw,32px)}
.cf-spt__stage{grid-area:stage;position:relative;display:flex;flex-direction:column;background:var(--band);color:var(--band-ink);padding:clamp(24px,4vw,48px);box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--cf-spt-sh) l c h / .22),0 12px 24px -8px oklch(from var(--cf-spt-sh) l c h / .32))}
.cf-spt__headline{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-spt__lead{margin-top:16px;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:color-mix(in oklch,var(--band-ink) 84%,var(--band))}
.cf-spt__stagebody{flex:1;display:grid;align-items:center;justify-items:start;padding-top:40px}
.cf-spt__tagwrap{width:100%;max-width:600px;transform:rotate(-2.5deg);transform-origin:12% 50%;transition:transform .3s cubic-bezier(.2,.7,.2,1);filter:drop-shadow(0 2px 2px oklch(from var(--cf-spt-sh) calc(l - .08) c h / .5)) drop-shadow(0 14px 16px oklch(from var(--cf-spt-sh) calc(l - .08) c h / .4))}
@media (hover:hover) and (pointer:fine){.cf-spt__stage:hover .cf-spt__tagwrap{transform:rotate(0deg)}}
.cf-spt__tag{--ch:64px;position:relative;isolation:isolate;container-type:inline-size;padding:32px 40px 32px 96px;background:color-mix(in oklch,var(--ink) 18%,var(--card));clip-path:polygon(var(--ch) 0,100% 0,100% 100%,var(--ch) 100%,0 50%)}
.cf-spt__tag::before{content:'';position:absolute;inset:1px;z-index:-1;background:var(--card);clip-path:polygon(calc(var(--ch) - 1px) 0,100% 0,100% 100%,calc(var(--ch) - 1px) 100%,0 50%)}
.cf-spt__hole{position:absolute;left:26px;top:50%;width:22px;height:22px;margin-top:-11px;border-radius:50%;background:var(--band);border:3px solid color-mix(in oklch,var(--ink) 16%,var(--card));box-shadow:inset 0 2px 3px oklch(from var(--cf-spt-sh) calc(l - .1) c h / .55)}
.cf-spt__tagtop{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:12px}
.cf-spt__taglabel{font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-spt__flag{display:inline-block;padding:6px 12px;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.cf-spt__flag svg,.cf-spt__error svg,.cf-spt__reassure svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-spt__was{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.cf-spt__waslabel{font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
.cf-spt__wasprice{position:relative;display:inline-block;text-decoration:none;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;font-variant-numeric:lining-nums tabular-nums;color:var(--ink)}
.cf-spt__wasprice::after{content:'';position:absolute;left:-.12em;right:-.12em;top:calc(50% - .06em);height:.12em;min-height:2px;border-radius:999px;background:var(--danger);transform:rotate(-9deg);transform-origin:0 50%;animation:cf-spt-strike .42s cubic-bezier(.2,.7,.2,1) .3s both}
.cf-spt__now{display:flex;align-items:flex-start;margin-top:12px;font-family:var(--font-display);font-weight:800;font-size:clamp(4.25rem,30cqi,8.5rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:lining-nums tabular-nums;color:var(--ink)}
.cf-spt__now[data-len='4']{font-size:clamp(3.5rem,23cqi,6.5rem)}
.cf-spt__now[data-len='5'],.cf-spt__now[data-len='6']{font-size:clamp(2.75rem,18cqi,5rem)}
.cf-spt__sup{font-size:.42em;line-height:1;margin-top:.1em;margin-inline-end:.05em;letter-spacing:0}
.cf-spt__sup.is-cents{margin-inline:.04em 0}
.cf-spt__rest{align-self:flex-end;font-size:.24em;line-height:1.2;margin-inline-start:.25em;margin-bottom:.2em;letter-spacing:0;font-weight:700;color:var(--muted)}
.cf-spt__note{margin-top:16px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
.cf-spt__items{grid-area:items}
.cf-spt__action{grid-area:action;display:flex;flex-direction:column}
.cf-spt__h3{margin-bottom:16px;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;color:var(--ink)}
.cf-spt__list{display:grid}
.cf-spt__item{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:16px;align-items:start;padding-block:12px;border-top:1px solid oklch(from var(--ink) l c h / .1)}
.cf-spt__item:first-child{padding-top:0;border-top:0}
.cf-spt__item:last-child{padding-bottom:0}
.cf-spt__item.is-plain{grid-template-columns:minmax(0,1fr) auto}
.cf-spt__thumb{display:block;width:56px;height:56px;border-radius:8px;object-fit:cover;object-position:center}
.cf-spt__itemname{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:700;color:var(--ink);text-wrap:pretty}
.cf-spt__itemdetail{margin-top:4px;font-size:.9375rem;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-spt__itemvalue{padding-top:2px;font-size:.9375rem;line-height:1.3;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-spt__commit{display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:start;padding:14px 16px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card));cursor:pointer;transition:background .16s ease,box-shadow .16s ease}
.cf-spt.is-error .cf-spt__commit{background:var(--danger-soft,color-mix(in oklch,var(--danger) 14%,var(--card)));box-shadow:inset 0 0 0 1px var(--danger)}
.cf-spt__box{position:relative;width:24px;height:24px}
.cf-spt__box input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.cf-spt__box input:disabled{cursor:not-allowed}
.cf-spt__boxface{position:absolute;inset:0;display:grid;place-items:center;border-radius:6px;background:var(--field);border:2px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));color:var(--success-ink,#fff);transition:background .16s ease,border-color .16s ease}
.cf-spt__boxface svg{opacity:0;transform:scale(.8);transition:opacity .16s ease,transform .16s ease}
.cf-spt__box input:checked + .cf-spt__boxface{background:var(--success);border-color:var(--success)}
.cf-spt__box input:checked + .cf-spt__boxface svg{opacity:1;transform:none}
.cf-spt__commit:hover .cf-spt__box input:not(:checked):not(:disabled) + .cf-spt__boxface{border-color:color-mix(in oklch,var(--ink) 55%,var(--field))}
.cf-spt__box input:focus-visible + .cf-spt__boxface{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .45);outline-offset:2px}
.cf-spt.is-error .cf-spt__boxface{border-color:var(--danger)}
.cf-spt__committext{padding-top:1px;font-size:1rem;line-height:1.4;font-weight:600;color:var(--ink);text-wrap:pretty}
.cf-spt__error{margin-top:8px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
.cf-spt__error:empty{margin-top:0}
.cf-spt__btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin-top:16px;padding:12px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--cf-spt-b) calc(l + .04) c h),oklch(from var(--cf-spt-b2) 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;letter-spacing:-.005em;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cf-spt-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--cf-spt-b) calc(l - .16) c h),0 1px 2px oklch(from var(--cf-spt-sh) l c h / .3),0 8px 16px -6px oklch(from var(--cf-spt-sh) l c h / .45));transition:background .16s ease,box-shadow .16s ease,transform .16s ease;-webkit-tap-highlight-color:transparent}
.cf-spt__btn:hover,.cf-spt__btn.is-hover{background:linear-gradient(oklch(from var(--cf-spt-b) calc(l - .01) c h),oklch(from var(--cf-spt-b2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cf-spt-b) calc(l + .12) c h / .6),inset 0 -3px 0 oklch(from var(--cf-spt-b) calc(l - .2) c h),0 1px 2px oklch(from var(--cf-spt-sh) l c h / .32),0 10px 18px -6px oklch(from var(--cf-spt-sh) l c h / .55))}
.cf-spt__btn:active,.cf-spt__btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--cf-spt-b) calc(l - .06) c h),oklch(from var(--cf-spt-b2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--cf-spt-b) calc(l - .24) c h / .55),inset 0 -2px 0 oklch(from var(--cf-spt-b) calc(l - .18) c h),0 1px 1px oklch(from var(--cf-spt-sh) l c h / .3)}
.cf-spt__btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px}
.cf-spt__btn:disabled{cursor:not-allowed;transform:none;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
.cf-spt__reassure{margin-top:12px;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-spt__ps{margin-top:24px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-spt__ps strong{font-family:var(--font-display);font-weight:800}
@media (max-width:880px){.cf-spt{grid-template-columns:minmax(0,1fr);grid-template-areas:'stage' 'items' 'action'}.cf-spt.is-solo{grid-template-areas:'stage' 'action'}.cf-spt__tagwrap{transform:rotate(-1.5deg)}}
@media (max-width:480px){.cf-spt__tag{--ch:46px;padding:22px 20px 22px 70px}.cf-spt__hole{left:16px;width:20px;height:20px;margin-top:-10px}.cf-spt__stagebody{padding-top:24px}.cf-spt__item{grid-template-columns:56px minmax(0,1fr);grid-template-areas:'thumb text' 'thumb value';row-gap:8px}.cf-spt__item.is-plain{grid-template-columns:minmax(0,1fr);grid-template-areas:'text' 'value'}.cf-spt__thumb{grid-area:thumb}.cf-spt__itemtext{grid-area:text}.cf-spt__itemvalue{grid-area:value;justify-self:start;padding:4px 12px;border-radius:999px;font-size:.875rem;font-weight:800;color:var(--ink);background:color-mix(in oklch,var(--ink) 6%,var(--card))}}
@keyframes cf-spt-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-spt-strike{from{transform:rotate(-9deg) scaleX(0)}to{transform:rotate(-9deg) scaleX(1)}}
@media (prefers-reduced-motion:reduce){.cf-spt__tile,.cf-spt__wasprice::after{animation:none}.cf-spt__tagwrap,.cf-spt__btn,.cf-spt__commit,.cf-spt__boxface,.cf-spt__boxface svg{transition:none}}
`
pieces/offer/strikethrough-price-tag/specimen.tsx 37 lines
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { StrikethroughPriceTag } from "../strikethrough-price-tag"
type SpecimenState = "default" | "hover" | "active" | "disabled" | "error"
export const states: SpecimenState[] = ["default", "hover", "active", "disabled", "error"]
export default function StrikethroughPriceTagSpecimen({ state = "default" }: { state?: SpecimenState }) {
const sample = defaults.sample
return (
<StrikethroughPriceTag
state={state}
headline="Get all three tools for less than the guide alone"
lead={sample.lead}
tagLabel={sample.name}
regularLabel="Bought separately"
regularPrice={sample.regularPrice}
price={sample.price}
priceNote="One-time payment"
itemsHeadline="Plan it, write it, check it before launch"
items={sample.items.map((item, index) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot(`item-${index + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
actionHeadline="Start planning your funnel today"
commitLabel="I understand I’m covered by the 30-day money-back guarantee."
label="Send Me The Starter Kit"
reassurance={sample.sublabel}
ps="Use the guide, the workbook and the checklist for 30 days. If they don’t help you plan your first funnel, you get every cent back."
onAction={() => {}}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalStrikethroughPriceTag |
React.ReactNode |
|
lead OptionalStrikethroughPriceTag |
React.ReactNode |
|
tagLabel OptionalStrikethroughPriceTag |
string |
|
todayOnly OptionalStrikethroughPriceTag |
string |
|
regularLabel OptionalStrikethroughPriceTag |
string |
|
regularPrice OptionalStrikethroughPriceTag |
string |
|
price OptionalStrikethroughPriceTag |
string |
|
priceNote OptionalStrikethroughPriceTag |
string |
|
itemsHeadline OptionalStrikethroughPriceTag |
React.ReactNode |
|
items OptionalStrikethroughPriceTag |
StrikethroughPriceTagItem[] |
|
valueTemplate OptionalStrikethroughPriceTag |
string |
|
actionHeadline OptionalStrikethroughPriceTag |
React.ReactNode |
|
commitLabel OptionalStrikethroughPriceTag |
React.ReactNode |
|
commitDefault OptionalStrikethroughPriceTag |
boolean |
|
commitError OptionalStrikethroughPriceTag |
string |
|
label OptionalStrikethroughPriceTag |
string |
|
reassurance OptionalStrikethroughPriceTag |
string |
|
psLabel OptionalStrikethroughPriceTag |
string |
|
ps OptionalStrikethroughPriceTag |
React.ReactNode |
|
priceSummary OptionalStrikethroughPriceTag |
string |
|
href OptionalStrikethroughPriceTag |
string |
|
onAction OptionalStrikethroughPriceTag |
() => void |
|
state OptionalStrikethroughPriceTag |
StrikethroughPriceTagState |
|
className OptionalStrikethroughPriceTag |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB