Instant Access Button 1
Instant-access close set as a scoreboard: the offer's facts fill the board and light up when the visitor reaches for the two-line action, which is the final tile.
Use it in a prompt
Use offer/instant-access-button 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/instant-access-button.tsx. - Import it and pass your copy and images (Props tab):
import { InstantAccessButton } from "@/components/funneldna/offer/instant-access-button"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/instant-access-button/component.tsx 394 lines
// layout: fact-scoreboard
// Instant-access close set as a scoreboard: the offer's facts fill the board and light up when the visitor reaches for the two-line action, which is the final tile.
import * as React from "react"
export type InstantAccessFact = {
value: string
label: string
}
export type InstantAccessImage = {
src: string
alt: string
}
export type InstantAccessButtonProps = {
/** Offer name on the price tile. */
productName?: string
/** Word set before the price on the same bold line, e.g. "Just". */
pricePrefix?: string
price?: string
/** The value said in words under the price. */
priceNote?: React.ReactNode
/** Item images (item-1 to item-n slots) stacked on the price tile. */
itemImages?: InstantAccessImage[]
/** Scoreboard tiles: one big value and a short label each. */
facts?: InstantAccessFact[]
/** The question the button answers. */
question?: React.ReactNode
label?: string
sublabel?: string
psLabel?: string
ps?: React.ReactNode
href?: string
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
export function InstantAccessButton({
productName = "The Funnel Starter Kit",
pricePrefix = "Just",
price = "$47",
priceNote = "One payment for the guide, workbook and checklist. Yours to keep.",
itemImages = [],
facts = [
{ value: "3", label: "tools in one download" },
{ value: "30", label: "day money-back guarantee" },
],
question = "Ready to map your first funnel?",
label = "Yes! Give Me Instant Access",
sublabel = "Download in the next 60 seconds",
psLabel = "P.S.",
ps = "Use the whole kit for 30 days. If it doesn't help you plan your funnel, ask for a full refund.",
href,
onAction,
disabled = false,
state = "default",
className,
}: InstantAccessButtonProps) {
const uid = React.useId()
const questionId = `${uid}-question`
const isDisabled = disabled || state === "disabled"
const shownState = state === "hover" || state === "active" ? state : undefined
const hasFacts = facts.length > 0
const thumbs = itemImages.slice(0, 4)
const rows = { "--iab-rows": Math.max(1, facts.length) } as React.CSSProperties
const body = (
<>
<span className="cf-iab-label">{label}</span>
{sublabel ? <span className="cf-iab-sub">{sublabel}</span> : null}
</>
)
return (
<div className={`cf-iab${className ? ` ${className}` : ""}`} data-state={shownState}>
<style>{css}</style>
<div className={`cf-iab-board${hasFacts ? "" : " cf-iab-board--solo"}`}>
<div className="cf-iab-tile cf-iab-price" style={rows}>
{thumbs.length > 0 ? (
<div className="cf-iab-thumbs">
{thumbs.map((image, index) => (
<img
key={`${image.src.slice(-24)}-${index}`}
src={image.src}
alt={image.alt}
width={64}
height={64}
loading="lazy"
decoding="async"
/>
))}
</div>
) : null}
<p className="cf-iab-name">{productName}</p>
<p className="cf-iab-amount">
{pricePrefix ? <span>{pricePrefix} </span> : null}
<span>{price}</span>
</p>
{priceNote ? <p className="cf-iab-note">{priceNote}</p> : null}
</div>
{facts.map((fact, index) => (
<div className="cf-iab-tile cf-iab-fact" key={`${fact.value}-${index}`}>
<span className="cf-iab-num">{fact.value}</span>
<span className="cf-iab-fact-label">{fact.label}</span>
</div>
))}
<div className="cf-iab-tile cf-iab-action">
{question ? (
<h3 className="cf-iab-q" id={questionId}>
{question}
</h3>
) : null}
{isDisabled ? (
<button className="cf-iab-btn" type="button" disabled>
{body}
</button>
) : href ? (
<a
className="cf-iab-btn"
href={href}
data-state={shownState}
onClick={onAction}
>
{body}
</a>
) : (
<button
className="cf-iab-btn"
type="button"
data-state={shownState}
onClick={onAction}
>
{body}
</button>
)}
{ps ? (
<p className="cf-iab-ps">
{psLabel ? <strong>{psLabel} </strong> : null}
{ps}
</p>
) : null}
</div>
</div>
</div>
)
}
export default InstantAccessButton
const css = String.raw`
.cf-iab {
--iab-shadow: var(--shadow, oklch(0.22 0.03 260));
--iab-btn: var(--button-bg, var(--cta));
--iab-btn-2: var(--button-bg-2, var(--cta-2));
box-sizing: border-box;
width: 100%;
max-width: 46rem;
margin-inline: auto;
padding: clamp(12px, 1.6vw, 16px);
background: var(--card);
color: var(--ink);
font-family: var(--font-body);
border: 1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));
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-iab *, .cf-iab *::before, .cf-iab *::after { box-sizing: border-box; }
.cf-iab p, .cf-iab h3 { margin: 0; }
.cf-iab-board {
display: grid;
grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
gap: 12px;
}
.cf-iab-board--solo { grid-template-columns: minmax(0, 1fr); }
.cf-iab-tile {
min-width: 0;
border-radius: 10px;
padding: clamp(16px, 2.4vw, 24px);
background: color-mix(in oklch, var(--ink) 4%, var(--card));
animation: cf-iab-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-iab-tile:nth-child(2) { animation-delay: 0.07s; }
.cf-iab-tile:nth-child(3) { animation-delay: 0.14s; }
.cf-iab-tile:nth-child(n + 4) { animation-delay: 0.21s; }
.cf-iab-price {
grid-row: span var(--iab-rows, 1);
display: flex;
flex-direction: column;
align-items: flex-start;
background: color-mix(in oklch, var(--accent) 10%, var(--card));
}
.cf-iab-thumbs { display: flex; margin-bottom: 16px; }
.cf-iab-thumbs img {
display: block;
width: 56px;
height: 56px;
object-fit: cover;
object-position: center;
border-radius: 8px;
filter: drop-shadow(0 2px 3px oklch(from var(--iab-shadow) l c h / 0.3)) drop-shadow(0 6px 8px oklch(from var(--iab-shadow) l c h / 0.18));
}
.cf-iab-thumbs img + img { margin-left: -12px; }
.cf-iab-name {
font-family: var(--font-display);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
text-wrap: balance;
color: var(--ink);
}
.cf-iab-amount {
margin-top: 8px !important;
font-family: var(--font-display);
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1;
font-weight: var(--display-weight, 800);
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--ink);
white-space: nowrap;
}
.cf-iab-note {
margin-top: 12px !important;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted);
text-wrap: pretty;
}
.cf-iab-fact {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: 16px;
}
.cf-iab-num {
font-family: var(--font-display);
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1;
font-weight: var(--display-weight, 800);
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--ink);
transition: color 0.16s ease;
}
.cf-iab-fact-label {
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.3;
font-weight: 700;
color: var(--ink);
text-wrap: pretty;
}
.cf-iab:has(.cf-iab-btn:not(:disabled):hover) .cf-iab-num,
.cf-iab:has(.cf-iab-btn:focus-visible) .cf-iab-num,
.cf-iab[data-state=hover] .cf-iab-num,
.cf-iab[data-state=active] .cf-iab-num { color: var(--accent); }
.cf-iab-action {
grid-column: 1 / -1;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: clamp(20px, 3vw, 32px);
background: var(--band);
color: var(--band-ink);
}
.cf-iab-q {
margin-bottom: 16px !important;
font-family: var(--font-display);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.01em);
text-transform: var(--display-case, none);
text-wrap: balance;
color: var(--band-ink);
}
.cf-iab-btn {
appearance: none;
border: 0;
margin: 0;
cursor: pointer;
text-decoration: none;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
width: 100%;
max-width: 34rem;
min-height: 72px;
padding: 12px 28px;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display));
text-transform: var(--button-case, none);
color: var(--button-ink, var(--cta-ink));
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--iab-btn) calc(l + 0.04) c h), oklch(from var(--iab-btn-2) calc(l - 0.02) c h));
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--iab-btn) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--iab-btn) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--iab-shadow) l c h / 0.32),
0 8px 16px -6px oklch(from var(--iab-shadow) l c h / 0.5));
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-iab-label {
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
font-weight: var(--button-weight, 800);
text-wrap: balance;
}
.cf-iab-sub {
font-family: var(--font-body);
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 600;
text-wrap: pretty;
}
.cf-iab-btn:not(:disabled):hover,
.cf-iab-btn[data-state=hover] {
transform: translateY(-1px);
background: linear-gradient(oklch(from var(--iab-btn) calc(l - 0.01) c h), oklch(from var(--iab-btn-2) calc(l - 0.07) c h));
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--iab-btn) calc(l + 0.12) c h / 0.7),
inset 0 -3px 0 oklch(from var(--iab-btn) calc(l - 0.2) c h),
0 1px 2px oklch(from var(--iab-shadow) l c h / 0.36),
0 10px 18px -6px oklch(from var(--iab-shadow) l c h / 0.58));
}
.cf-iab-btn:not(:disabled):active,
.cf-iab-btn[data-state=active] {
transform: translateY(1px);
background: linear-gradient(oklch(from var(--iab-btn) calc(l - 0.06) c h), oklch(from var(--iab-btn-2) calc(l - 0.08) c h));
box-shadow:
inset 0 2px 4px oklch(from var(--iab-btn) calc(l - 0.22) c h / 0.55),
inset 0 -2px 0 oklch(from var(--iab-btn) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--iab-shadow) l c h / 0.3);
}
.cf-iab-btn:focus-visible {
outline: 3px solid var(--band-ink);
outline-offset: 3px;
}
.cf-iab-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: none;
}
.cf-iab-ps {
margin-top: 16px !important;
max-width: 52ch;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--band-ink);
text-wrap: pretty;
}
.cf-iab-ps strong { font-weight: 800; }
@keyframes cf-iab-rise {
from { opacity: 0.82; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
.cf-iab-board { grid-template-columns: minmax(0, 1fr); }
.cf-iab-price { grid-row: auto; }
.cf-iab-action { padding: 20px 16px; }
.cf-iab-btn { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
.cf-iab-tile { animation: none; }
.cf-iab-btn, .cf-iab-num { transition: none; }
.cf-iab-btn:not(:disabled):hover,
.cf-iab-btn[data-state=hover],
.cf-iab-btn:not(:disabled):active,
.cf-iab-btn[data-state=active] { transform: none; }
}
`
pieces/offer/instant-access-button/specimen.tsx 38 lines
import * as React from "react"
import { InstantAccessButton } from "../instant-access-button"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled"]
type SpecimenState = "default" | "hover" | "active" | "disabled"
export default function InstantAccessButtonSpecimen({ state = "default" }: { state?: SpecimenState }) {
const sample = defaults.sample
const itemImages = sample.items.map((item, index) => ({
src: slot(`item-${index + 1}`, item.image),
alt: item.imageAlt,
}))
return (
<InstantAccessButton
productName={sample.name}
pricePrefix="Just"
price={sample.price}
priceNote="One payment for the guide, workbook and checklist. Yours to keep."
itemImages={itemImages}
facts={[
{ value: String(sample.items.length), label: "tools in one download" },
{ value: "30", label: "day money-back guarantee" },
]}
question="Ready to map your first funnel?"
label={sample.label}
sublabel="Download in the next 60 seconds"
psLabel="P.S."
ps="Use the whole kit for 30 days. If it doesn't help you plan your funnel, ask for a full refund."
href="#checkout"
onAction={(event) => event.preventDefault()}
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
productName OptionalInstantAccessButton |
string |
Default "The Funnel Starter Kit"
|
pricePrefix OptionalInstantAccessButton |
string |
Default "Just"
|
price OptionalInstantAccessButton |
string |
Default "$47"
|
priceNote OptionalInstantAccessButton |
React.ReactNode |
Default "One payment for the guide, workbook and checklist. Yours to keep."
|
itemImages OptionalInstantAccessButton |
InstantAccessImage[] |
Default []
|
facts OptionalInstantAccessButton |
InstantAccessFact[] |
Default [
{ value: "3", label: "tools in one download" },
{ value: "30", label: "day money-back guarantee" },
]
|
question OptionalInstantAccessButton |
React.ReactNode |
Default "Ready to map your first funnel?"
|
label OptionalInstantAccessButton |
string |
Default "Yes! Give Me Instant Access"
|
sublabel OptionalInstantAccessButton |
string |
Default "Download in the next 60 seconds"
|
psLabel OptionalInstantAccessButton |
string |
Default "P.S."
|
ps OptionalInstantAccessButton |
React.ReactNode |
Default "Use the whole kit for 30 days. If it doesn't help you plan your funnel, ask for a full refund."
|
href OptionalInstantAccessButton |
string |
|
onAction OptionalInstantAccessButton |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
disabled OptionalInstantAccessButton |
boolean |
Default false
|
state OptionalInstantAccessButton |
"default" | "hover" | "active" | "disabled" |
Default "default"
|
className OptionalInstantAccessButton |
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- 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.
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