Action Ladder 1
Confirmation action ladder: a spotlit sheet of numbered next steps, each with its own button, that tick off as the visitor works down it, so a dead thank-you page becomes engagement.
Use it in a prompt
Use checkout/action-ladder 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/checkout/action-ladder.tsx. - Import it and pass your copy and images (Props tab):
import { ActionLadder } from "@/components/funneldna/checkout/action-ladder"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/action-ladder/component.tsx 327 lines
// layout: clipboard-checklist
// Confirmation action ladder: a spotlit sheet of numbered next steps, each with its own button, that tick off as the visitor works down it, so a dead thank-you page becomes engagement.
import * as React from "react"
import { Check, Mail } from "lucide-react"
import { Spotlight, Divider, Spot, FX_HOST } from "../fx/fx"
export type ActionLadderStep = {
/** Short step title, written as the outcome */
title: React.ReactNode
/** One line of why this step matters */
detail?: React.ReactNode
/** Button label: the action as an outcome verb */
label: string
/** Navigation destination for this step's button */
href?: string
/** Click handler for this step; takes precedence over the block's onAction */
onAction?: () => void
/** Optional fx Spot illustration (imported asset URL) shown beside the step on wide screens */
spot?: string
}
export type ActionLadderProps = {
headline?: React.ReactNode
lead?: React.ReactNode
steps?: ActionLadderStep[]
/** Indexes of steps already done when the block mounts */
completed?: number[]
/** Optional short line under the sheet (e.g. where their access link went) */
footnote?: React.ReactNode
copy?: {
/** Template with {done} and {total} */
progress?: string
/** Screen-reader name for the progress bar */
progressName?: string
/** Chip and screen-reader word on finished steps */
done?: string
/** Screen-reader step prefix, template with {n} */
step?: string
/** Accessible name for the list of steps */
list?: string
}
/** Show the curved section edge at the bottom of the band */
edge?: boolean
state?: "default" | "hover" | "active" | "disabled"
/** Called when a step's button is used (unless the step has its own onAction) */
onAction?: (step: ActionLadderStep, index: number) => void
className?: string
}
const DEFAULT_STEPS: ActionLadderStep[] = [
{
title: "Bring a friend along",
detail: "Building alongside someone you know keeps you both on track.",
label: "Invite a friend",
},
{
title: "Join the community group",
detail: "Ask questions, meet other builders and catch updates first.",
label: "Join the group",
},
{
title: "Turn on reminders",
detail: "Get a quick nudge before it starts so your seat never goes to waste.",
label: "Remind me",
},
{
title: "Tell us what you\u2019re building",
detail: "Leave a comment with your goal so the session speaks to it.",
label: "Post my goal",
},
]
export function ActionLadder(props: ActionLadderProps) {
const {
headline = "You\u2019re in. Now make it count.",
lead = "Four quick steps get you ready before it starts. Tick them off in order.",
steps = DEFAULT_STEPS,
completed = [],
footnote,
copy = {},
edge = true,
state = "default",
onAction,
className,
} = props
const progressTemplate = copy.progress ?? "{done} of {total} done"
const progressName = copy.progressName ?? "Your progress"
const doneWord = copy.done ?? "Done"
const stepTemplate = copy.step ?? "Step {n}"
const listName = copy.list ?? "Your next steps"
const completedKey = completed.join(",")
const [done, setDone] = React.useState<Set<number>>(() => new Set(completed))
React.useEffect(() => {
setDone(new Set(completed))
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [completedKey])
const uid = React.useId()
const titleId = `${uid}-title`
const disabled = state === "disabled"
const total = steps.length
const doneCount = steps.reduce((n, _s, i) => n + (done.has(i) ? 1 : 0), 0)
const current = steps.findIndex((_s, i) => !done.has(i))
const pct = total ? Math.round((doneCount / total) * 100) : 0
const progressText = progressTemplate.replace("{done}", String(doneCount)).replace("{total}", String(total))
const handle = (step: ActionLadderStep, index: number, event: React.MouseEvent) => {
if (disabled) {
event.preventDefault()
return
}
setDone((prev) => {
const next = new Set(prev)
next.add(index)
return next
})
if (step.onAction) step.onAction()
else onAction?.(step, index)
}
return (
<section
className={`cf-action-ladder${edge ? " has-edge" : ""}${className ? ` ${className}` : ""}`}
style={FX_HOST}
aria-labelledby={titleId}
>
<style>{CSS}</style>
<Spotlight />
<div className="al-inner">
<header className="al-head">
<h2 className="al-title" id={titleId}>
{headline}
</h2>
{lead ? <p className="al-lead">{lead}</p> : null}
</header>
<div className="al-stage">
<div className="al-sheet">
<div className="al-progress">
<span className="al-count" aria-live="polite">
{progressText}
</span>
<span
className="al-track"
role="progressbar"
aria-label={progressName}
aria-valuemin={0}
aria-valuemax={total}
aria-valuenow={doneCount}
aria-valuetext={progressText}
>
<span className="al-fill" style={{ width: `${pct}%` }} />
</span>
</div>
<ol className="al-list" aria-label={listName}>
{steps.map((step, i) => {
const isDone = done.has(i)
const isCurrent = i === current
const forced = isCurrent && state === "hover" ? " is-hover" : isCurrent && state === "active" ? " is-active" : ""
const btnClass = `al-btn ${isCurrent ? "al-btn--primary" : "al-btn--secondary"}${forced}`
const detailId = `${uid}-d${i}`
const delay = { ["--al-delay" as string]: `${Math.min(i * 0.07, 0.28)}s` } as React.CSSProperties
return (
<li
key={i}
className={`al-step${isDone ? " is-done" : ""}${isCurrent ? " is-current" : ""}${step.spot ? " has-spot" : ""}`}
aria-current={isCurrent ? "step" : undefined}
style={delay}
>
<span className="al-mark" aria-hidden="true">
{isDone ? (
<span className="al-tick">
<Check size={20} strokeWidth={3} />
</span>
) : (
<span className="al-num">{String(i + 1).padStart(2, "0")}</span>
)}
</span>
{step.spot ? (
<span className="al-spot" aria-hidden="true">
<Spot src={step.spot} size={72} />
</span>
) : null}
<h3 className="al-step-title">
<span className="al-sr">
{isDone ? `${doneWord}: ` : `${stepTemplate.replace("{n}", String(i + 1))}: `}
</span>
{step.title}
{isDone ? (
<span className="al-chip" aria-hidden="true">
{doneWord}
</span>
) : null}
</h3>
{step.detail ? (
<p className="al-detail" id={detailId}>
{step.detail}
</p>
) : null}
<div className="al-action">
{step.href ? (
<a
className={btnClass}
href={disabled ? undefined : step.href}
aria-disabled={disabled || undefined}
tabIndex={disabled ? -1 : undefined}
aria-describedby={step.detail ? detailId : undefined}
onClick={(e) => handle(step, i, e)}
>
{step.label}
</a>
) : (
<button
type="button"
className={btnClass}
disabled={disabled}
aria-describedby={step.detail ? detailId : undefined}
onClick={(e) => handle(step, i, e)}
>
{step.label}
</button>
)}
</div>
</li>
)
})}
</ol>
</div>
</div>
{footnote ? (
<p className="al-note">
<Mail className="al-note-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{footnote}
</p>
) : null}
</div>
{edge ? <Divider shape="curve" tone="surface" height={48} /> : null}
</section>
)
}
export default ActionLadder
const CSS = `
.cf-action-ladder{--al-edge-h:0px;--al-shadow:var(--shadow,oklch(0.22 0.03 256));--al-btn:var(--button-bg,var(--cta));--al-btn-2:var(--button-bg-2,var(--cta-2,var(--cta)));--al-btn-quiet:var(--button-2-bg,var(--secondary));position:relative;overflow:hidden;box-sizing:border-box;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) calc(clamp(64px,8.5vw,120px) + var(--al-edge-h))}
.cf-action-ladder.has-edge{--al-edge-h:48px}
.cf-action-ladder *,.cf-action-ladder *::before,.cf-action-ladder *::after{box-sizing:border-box}
.cf-action-ladder .al-inner{position:relative;z-index:1;max-width:46rem;margin:0 auto}
.cf-action-ladder .al-head{text-align:center;margin-bottom:clamp(32px,4vw,48px)}
.cf-action-ladder .al-title{margin:0;color:var(--band-ink);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}
.cf-action-ladder .al-lead{margin:16px auto 0;max-width:60ch;color:color-mix(in oklch,var(--band-ink) 86%,var(--band));font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-action-ladder .al-stage{position:relative}
.cf-action-ladder .al-sheet{position:relative;background:var(--card);color:var(--ink);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(from var(--al-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--al-shadow) l c h / 0.32)));padding:clamp(20px,3vw,32px)}
.cf-action-ladder .al-progress{display:flex;align-items:center;gap:16px;padding:4px 16px 20px}
.cf-action-ladder .al-count{color:var(--ink);font-size:15px;line-height:1.4;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.cf-action-ladder .al-track{position:relative;flex:1;height:8px;border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink) 8%,var(--card))}
.cf-action-ladder .al-fill{display:block;height:100%;border-radius:inherit;background:var(--success);transition:width .45s cubic-bezier(.2,.7,.2,1)}
.cf-action-ladder .al-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.cf-action-ladder .al-step{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:16px;align-items:start;padding:20px 16px;border-radius:10px;animation:cf-al-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--al-delay,0s)}
.cf-action-ladder .al-step.has-spot{grid-template-columns:40px minmax(0,1fr) 72px}
.cf-action-ladder .al-step.is-current{background:color-mix(in oklch,var(--accent) 8%,var(--card))}
.cf-action-ladder .al-spot{grid-column:3;grid-row:1 / span 3;align-self:start;display:block;width:72px;height:72px;margin-left:16px;transition:opacity .3s ease}
.cf-action-ladder .al-step.is-done .al-spot{opacity:.6}
.cf-action-ladder .al-step:not(:last-child)::before{content:"";position:absolute;z-index:1;left:35px;top:66px;bottom:-22px;width:2px;border-radius:2px;background:oklch(from var(--ink) l c h / 0.14);transition:background .3s ease}
.cf-action-ladder .al-step.is-done:not(:last-child)::before{background:var(--success)}
.cf-action-ladder .al-mark{grid-column:1;grid-row:1 / span 3;width:40px;height:40px;display:grid;place-items:center}
.cf-action-ladder .al-num{font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:-0.03em;color:var(--accent);font-variant-numeric:tabular-nums}
.cf-action-ladder .al-tick{width:40px;height:40px;border-radius:999px;display:grid;place-items:center;background:var(--success);color:var(--al-tick-ink,#fff);animation:cf-al-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-action-ladder .al-step-title{grid-column:2;margin:0;padding-top:5px;color:var(--ink);font-family:var(--font-display);font-weight:800;letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance}
.cf-action-ladder .al-chip{display:inline-flex;align-items:center;min-height:28px;margin-left:10px;padding:4px 12px;vertical-align:.15em;border-radius:999px;background:var(--success-soft);color:var(--success);font-family:var(--font-body);font-size:14px;line-height:1.2;font-weight:800;letter-spacing:0;text-transform:none}
.cf-action-ladder .al-detail{grid-column:2;margin:8px 0 0;color:var(--muted);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty}
.cf-action-ladder .al-action{grid-column:2;justify-self:start;margin-top:16px}
.cf-action-ladder .al-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;min-width:15rem;max-width:100%;padding:10px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-action-ladder .al-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.55);outline-offset:3px}
.cf-action-ladder .al-btn--primary{color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--al-btn) calc(l + 0.04) c h),oklch(from var(--al-btn-2) calc(l - 0.02) c h));box-shadow:inset 0 1px 0 oklch(from var(--al-btn) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--al-btn) calc(l - 0.16) c h),var(--button-shadow,0 1px 2px oklch(from var(--al-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--al-shadow) l c h / 0.45))}
.cf-action-ladder .al-btn--primary.is-hover{background:linear-gradient(oklch(from var(--al-btn) calc(l - 0.01) c h),oklch(from var(--al-btn-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--al-btn) calc(l + 0.14) c h / 0.6),inset 0 -3px 0 oklch(from var(--al-btn) calc(l - 0.18) c h),0 1px 2px oklch(from var(--al-shadow) l c h / 0.32),0 10px 18px -6px oklch(from var(--al-shadow) l c h / 0.55)}
.cf-action-ladder .al-btn--primary.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--al-btn) calc(l - 0.04) c h),oklch(from var(--al-btn-2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--al-btn) calc(l - 0.22) c h / 0.5),inset 0 -2px 0 oklch(from var(--al-btn) calc(l - 0.16) c h),0 1px 2px oklch(from var(--al-shadow) l c h / 0.3)}
.cf-action-ladder .al-btn--secondary{background:var(--al-btn-quiet);color:var(--button-2-ink,var(--secondary-ink));border:1px solid var(--button-2-border,transparent);box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--al-shadow) l c h / 0.2)))}
@media (hover:hover){
.cf-action-ladder .al-btn--primary:not(:disabled):not([aria-disabled=true]):hover{background:linear-gradient(oklch(from var(--al-btn) calc(l - 0.01) c h),oklch(from var(--al-btn-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--al-btn) calc(l + 0.14) c h / 0.6),inset 0 -3px 0 oklch(from var(--al-btn) calc(l - 0.18) c h),0 1px 2px oklch(from var(--al-shadow) l c h / 0.32),0 10px 18px -6px oklch(from var(--al-shadow) l c h / 0.55)}
.cf-action-ladder .al-btn--secondary:not(:disabled):not([aria-disabled=true]):hover{background:color-mix(in oklch,var(--al-btn-quiet) 92%,var(--ink))}
}
.cf-action-ladder .al-btn--primary:not(:disabled):not([aria-disabled=true]):active{transform:translateY(1px);background:linear-gradient(oklch(from var(--al-btn) calc(l - 0.04) c h),oklch(from var(--al-btn-2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--al-btn) calc(l - 0.22) c h / 0.5),inset 0 -2px 0 oklch(from var(--al-btn) calc(l - 0.16) c h),0 1px 2px oklch(from var(--al-shadow) l c h / 0.3)}
.cf-action-ladder .al-btn--secondary:not(:disabled):not([aria-disabled=true]):active{transform:translateY(1px);background:color-mix(in oklch,var(--al-btn-quiet) 86%,var(--ink))}
.cf-action-ladder .al-btn:disabled,.cf-action-ladder .al-btn[aria-disabled=true]{cursor:not-allowed;background:color-mix(in oklch,var(--ink) 7%,var(--card));color:var(--muted);border-color:transparent;box-shadow:none;text-shadow:none;transform:none}
.cf-action-ladder .al-note{margin:48px auto 0;max-width:60ch;text-align:center;color:color-mix(in oklch,var(--band-ink) 86%,var(--band));font-size:15px;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-action-ladder .al-note-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-action-ladder .al-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@media (max-width:560px){
.cf-action-ladder .al-progress{padding:0 12px 16px}
.cf-action-ladder .al-step{padding:16px 12px;column-gap:14px}
.cf-action-ladder .al-step:not(:last-child)::before{left:31px;top:62px;bottom:-18px}
.cf-action-ladder .al-step.has-spot{grid-template-columns:40px minmax(0,1fr)}
.cf-action-ladder .al-spot{display:none}
.cf-action-ladder .al-action{grid-column:1 / -1;justify-self:stretch}
.cf-action-ladder .al-btn{width:100%;min-width:0;padding:10px 20px}
.cf-action-ladder .al-chip{margin-left:8px}
}
@keyframes cf-al-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-al-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){
.cf-action-ladder .al-step,.cf-action-ladder .al-tick{animation:none}
.cf-action-ladder .al-fill,.cf-action-ladder .al-btn,.cf-action-ladder .al-step::before,.cf-action-ladder .al-spot{transition:none}
.cf-action-ladder .al-btn:active,.cf-action-ladder .al-btn.is-active{transform:none}
}
`
pieces/checkout/action-ladder/specimen.tsx 48 lines
import * as React from "react"
import { ActionLadder, type ActionLadderProps } from "../action-ladder"
import defaults from "../../studio-defaults.json"
import community from "../../fx/spots/community"
import phone from "../../fx/spots/phone"
import clock from "../../fx/spots/clock"
import rocket from "../../fx/spots/rocket"
export const states = ["default", "hover", "active", "disabled"]
export default function ActionLadderSpecimen({ state }: { state?: ActionLadderProps["state"] }) {
const workshop = defaults.sample.registration.name
return (
<ActionLadder
state={state}
headline={"You\u2019re in. Now make the workshop count."}
lead={`Four quick steps get you ready for the ${workshop}. Tick them off in order.`}
completed={[0]}
steps={[
{
title: "Bring a friend to the workshop",
detail: "Plan your funnels side by side and keep each other on track.",
label: "Invite a friend",
spot: community,
},
{
title: "Join the builders\u2019 group",
detail: "Ask questions, share your offer and get feedback before the session.",
label: "Join the builders",
spot: phone,
},
{
title: "Turn on workshop reminders",
detail: "A quick nudge before it starts, so your seat never goes to waste.",
label: "Turn on reminders",
spot: clock,
},
{
title: "Post your funnel goal",
detail: "Tell us what you\u2019re building so the walkthrough speaks to your offer.",
label: "Post my goal",
spot: rocket,
},
]}
footnote={`Your ${workshop} link is also waiting in your inbox.`}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalActionLadder |
React.ReactNode |
|
lead OptionalActionLadder |
React.ReactNode |
|
steps OptionalActionLadder |
ActionLadderStep[] |
|
completed OptionalActionLadder |
number[] |
|
footnote OptionalActionLadder |
React.ReactNode |
|
copy OptionalActionLadder |
{
/** Template with {done} and {total} */
progress?: string
/** Screen-reader name for the progress bar */
progressName?: string
/** Chip and screen-reader word on finished steps */
done?: string
/** Screen-reader step prefix, template with {n} */
step?: string
/** Accessible name for the list of steps */
list?: string
} |
|
edge OptionalActionLadder |
boolean |
|
state OptionalActionLadder |
"default" | "hover" | "active" | "disabled" |
|
onAction OptionalActionLadder |
(step: ActionLadderStep, index: number) => void |
|
className OptionalActionLadder |
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-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
09bc3d4486616844.webp
image/webp · 23.2 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
7c36d7f4dd4ae594.webp
image/webp · 26.5 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d7814fce240ddf0e.webp
image/webp · 17.6 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB