Commitment Pledge 5
Turns a challenge sign-up into a real commitment: the pledge line in big type, the promises in plain words, then one press-and-hold button that fills to send it.
Use it in a prompt
Use forms/commitment-pledge-5 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/forms/commitment-pledge-5.tsx. - Import it and pass your copy and images (Props tab):
import { CommitmentPledge5 } from "@/components/funneldna/forms/commitment-pledge-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/commitment-pledge-5/component.tsx 590 lines
// layout: classic-centred-stack
// Turns a challenge sign-up into a real commitment: the pledge line in big type, the promises in plain words, then one press-and-hold button that fills to send it.
'use client'
import * as React from 'react'
import { AlertCircle, Fingerprint, Loader2, Lock, Timer } from 'lucide-react'
import { FX_HOST, Spotlight, Texture } from '../fx/fx'
import topo from '../fx/textures/topo'
export type CommitmentPledge5State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type CommitmentPledge5Item = {
/** Bold lead-in phrase that opens the line. */
lead: string
text: string
}
export type CommitmentPledge5Copy = typeof defaultCopy
export type CommitmentPledge5Props = {
/** Every visible word except the items. */
copy?: Partial<CommitmentPledge5Copy>
/** Replaces copy.headline when the pledge line needs rich text. */
headline?: React.ReactNode
/** What the visitor agrees to do, one bold lead-in per line. */
items?: CommitmentPledge5Item[]
/** product slot: a transparent cut-out shown above the pledge line. */
productImage?: string
productImageAlt?: string
/** How long the button must be held, in milliseconds. */
holdMs?: number
disabled?: boolean
/** 'active' shows the fill mid-hold; 'error' shows the released-early note. */
state?: CommitmentPledge5State
/** Called when the hold completes, or straight away from Enter or Space. Return a promise to show the loading label. */
onSubmit?: (pledge: { method: 'hold' | 'keyboard' }) => void | Promise<void>
className?: string
style?: React.CSSProperties
}
export function CommitmentPledge5({
copy: copyOverrides,
headline,
items = DEFAULT_ITEMS,
productImage,
productImageAlt = '',
holdMs = 1000,
disabled = false,
state = 'default',
onSubmit,
className,
style,
}: CommitmentPledge5Props) {
const copy = { ...defaultCopy, ...copyOverrides }
const uid = React.useId().replace(/:/g, '')
const isDisabled = disabled || state === 'disabled'
const force = state === 'hover' || state === 'active' ? state : undefined
const [pressing, setPressing] = React.useState(state === 'active')
const [early, setEarly] = React.useState(state === 'error')
const [loading, setLoading] = React.useState(false)
const buttonRef = React.useRef<HTMLButtonElement>(null)
const frame = React.useRef<number | null>(null)
const startedAt = React.useRef(0)
const holding = React.useRef(false)
const mounted = React.useRef(true)
const setProgress = React.useCallback((p: number) => {
buttonRef.current?.style.setProperty('--p', String(p))
}, [])
const stopFrame = React.useCallback(() => {
if (frame.current !== null) cancelAnimationFrame(frame.current)
frame.current = null
}, [])
const endHold = React.useCallback(() => {
if (buttonRef.current) delete buttonRef.current.dataset.holding
}, [])
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
stopFrame()
}
}, [stopFrame])
React.useEffect(() => {
holding.current = false
stopFrame()
endHold()
setPressing(state === 'active')
setEarly(state === 'error')
setLoading(false)
setProgress(state === 'active' ? 0.62 : 0)
}, [state, stopFrame, endHold, setProgress])
async function commit(method: 'hold' | 'keyboard') {
if (isDisabled || loading) return
holding.current = false
stopFrame()
setPressing(false)
setEarly(false)
setProgress(1)
const result = onSubmit?.({ method }) as Promise<void> | undefined
if (!result || typeof result.then !== 'function') {
endHold()
setProgress(0)
return
}
setLoading(true)
try {
await result
} catch {
// The caller reports failures; this piece only resets its button.
} finally {
if (mounted.current) {
setLoading(false)
endHold()
setProgress(0)
}
}
}
function onPointerDown(event: React.PointerEvent<HTMLButtonElement>) {
if (isDisabled || loading || !event.isPrimary || event.button !== 0) return
const button = event.currentTarget
try {
button.setPointerCapture(event.pointerId)
} catch {
// Capture is optional; release still ends the hold.
}
holding.current = true
button.dataset.holding = ''
setPressing(true)
setEarly(false)
startedAt.current = performance.now()
const duration = Math.max(holdMs, 300)
const tick = (now: number) => {
if (!holding.current) return
const p = Math.min((now - startedAt.current) / duration, 1)
setProgress(p)
if (p >= 1) {
frame.current = null
void commit('hold')
return
}
frame.current = requestAnimationFrame(tick)
}
stopFrame()
frame.current = requestAnimationFrame(tick)
}
function release() {
if (!holding.current) return
holding.current = false
stopFrame()
setPressing(false)
setEarly(true)
endHold()
setProgress(0)
}
const labelText = isDisabled
? copy.disabledLabel
: loading
? copy.loadingLabel
: pressing
? copy.holdingLabel
: copy.label
const noteKind = isDisabled ? 'disabled' : early ? 'early' : 'hint'
const noteText = noteKind === 'disabled' ? copy.disabledNote : noteKind === 'early' ? copy.earlyNote : copy.hint
const NoteIcon = noteKind === 'disabled' ? Lock : noteKind === 'early' ? AlertCircle : Timer
let order = 0
const rise = () => ({ '--i': order++ }) as React.CSSProperties
return (
<section
className={['cf-commitment-pledge-5', className].filter(Boolean).join(' ')}
data-force={force}
data-loading={loading || undefined}
style={{ ...FX_HOST, ...style }}
aria-labelledby={uid + '-h'}
>
<style dangerouslySetInnerHTML={{ __html: CSS }} />
<Texture src={topo} tone='band-ink' />
<Spotlight />
<div className='cp5-inner'>
{productImage ? (
<img
className='cp5-emblem cp5-rise'
style={rise()}
src={productImage}
alt={productImageAlt}
width={160}
height={160}
decoding='async'
/>
) : null}
<h2 id={uid + '-h'} className='cp5-h cp5-rise' style={rise()}>
{headline ?? keepWhole(copy.headline)}
</h2>
{copy.lead ? (
<p className='cp5-lead cp5-rise' style={rise()}>
{keepWhole(copy.lead)}
</p>
) : null}
{items.length > 0 ? (
<div className='cp5-card cp5-rise' style={rise()}>
{copy.listTitle ? <h3 className='cp5-card-h'>{copy.listTitle}</h3> : null}
<ol className='cp5-list' role='list'>
{items.map((item, i) => (
<li key={item.lead + i}>
<span className='cp5-num' aria-hidden='true'>
{i + 1}
</span>
<p>
<strong>{item.lead}</strong> {item.text}
</p>
</li>
))}
</ol>
</div>
) : null}
<div className='cp5-action cp5-rise' style={rise()}>
<button
ref={buttonRef}
type='button'
className='cp5-hold'
disabled={isDisabled}
aria-busy={loading || undefined}
aria-describedby={uid + '-sr'}
onPointerDown={onPointerDown}
onPointerUp={release}
onPointerCancel={release}
onPointerLeave={release}
onLostPointerCapture={release}
onContextMenu={(event) => event.preventDefault()}
onKeyDown={(event) => {
if (event.repeat && (event.key === 'Enter' || event.key === ' ')) event.preventDefault()
}}
onClick={(event) => {
if (event.detail === 0) void commit('keyboard')
}}
>
<span className='cp5-fill' aria-hidden='true' />
<span className='cp5-label'>
{loading ? (
<Loader2 className='cp5-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
) : (
<Fingerprint size={20} strokeWidth={2.5} aria-hidden='true' />
)}
<span>{labelText}</span>
</span>
<span className='cp5-track' aria-hidden='true'>
<span className='cp5-bar' />
</span>
</button>
<span id={uid + '-sr'} className='cp5-sr'>
{copy.srHint}
</span>
<p className='cp5-note' data-kind={noteKind} aria-live='polite'>
<NoteIcon size={16} strokeWidth={2.5} aria-hidden='true' />
{noteText}
</p>
{copy.finePrint ? <p className='cp5-fine'>{copy.finePrint}</p> : null}
</div>
</div>
</section>
)
}
export default CommitmentPledge5
/** Keeps hyphenated words ("single-use", "Plastic-Free") on one line so a headline never breaks mid-word. */
function keepWhole(text: string): React.ReactNode {
const parts = text.split(/(\S+-\S+)/g)
if (parts.length === 1) return text
return parts.map((part, i) =>
i % 2 === 1 ? (
<span key={i} className='cp5-nobr'>
{part}
</span>
) : (
part
),
)
}
const defaultCopy = {
headline: 'I’m in. I’ll see this challenge through to the last day.',
lead: 'Hold the button for one second to make it official. Here’s exactly what you’re promising to do.',
listTitle: 'Three promises you’ll keep every day',
label: 'Hold to send my pledge',
holdingLabel: 'Keep holding…',
loadingLabel: 'Sending your pledge…',
disabledLabel: 'Pledging opens soon',
hint: 'Hold for about a second. Enter works too.',
srHint: 'Press Enter or Space to send your pledge right away.',
earlyNote: 'Almost there. Keep holding until the bar fills.',
disabledNote: 'Pledges open as soon as sign-ups do.',
finePrint: '',
}
const DEFAULT_ITEMS: CommitmentPledge5Item[] = [
{ lead: 'Show up every day.', text: 'Do the day’s action, even on the busy ones.' },
{ lead: 'Keep it small.', text: 'One honest step beats a perfect plan you never start.' },
{ lead: 'Tell one person.', text: 'Saying it out loud makes it far easier to keep.' },
]
const CSS = `
.cf-commitment-pledge-5{
--cp5-bg: var(--button-bg, var(--cta, oklch(0.58 0.21 29)));
--cp5-bg2: var(--button-bg-2, var(--cta-2, oklch(0.51 0.21 29)));
--cp5-ink: var(--button-ink, var(--cta-ink, #ffffff));
--cp5-sh: var(--shadow, oklch(0.22 0.03 260));
width: 100%;
box-sizing: border-box;
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
background: var(--band, oklch(0.27 0.07 256));
color: var(--band-ink, #ffffff);
font-family: var(--font-body, system-ui, sans-serif);
-webkit-font-smoothing: antialiased;
}
.cf-commitment-pledge-5 *, .cf-commitment-pledge-5 *::before, .cf-commitment-pledge-5 *::after{ box-sizing: border-box }
.cf-commitment-pledge-5 :where(h2, h3, p, ol, li){ margin: 0 }
.cf-commitment-pledge-5 .cp5-inner{
position: relative;
z-index: 1;
max-width: 46rem;
margin-inline: auto;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.cf-commitment-pledge-5 .cp5-nobr{ white-space: nowrap }
.cf-commitment-pledge-5 .cp5-emblem{
display: block;
width: clamp(112px, 12vw, 152px);
height: auto;
aspect-ratio: 1;
object-fit: contain;
margin-bottom: 24px;
filter: drop-shadow(0 2px 3px oklch(from var(--cp5-sh) calc(l - 0.06) c h / 0.55)) drop-shadow(0 12px 16px oklch(from var(--cp5-sh) l c h / 0.45));
}
.cf-commitment-pledge-5 .cp5-h{
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: clamp(2.5rem, 5.4vw, 4.875rem);
line-height: 1.04;
text-wrap: balance;
hyphens: manual;
color: var(--band-ink, #ffffff);
}
.cf-commitment-pledge-5 .cp5-lead{
margin-top: 24px;
max-width: 38rem;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
text-wrap: pretty;
color: var(--band-ink, #ffffff);
}
.cf-commitment-pledge-5 .cp5-card{
margin-top: clamp(32px, 4vw, 48px);
width: 100%;
max-width: 40rem;
text-align: left;
padding: clamp(20px, 3vw, 32px);
background: var(--card, #ffffff);
color: var(--ink, #1a2233);
border: 1px solid var(--card-border, oklch(from var(--ink, #1a2233) 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(--cp5-sh) l c h / 0.22), 0 12px 24px -8px oklch(from var(--cp5-sh) l c h / 0.32)));
}
.cf-commitment-pledge-5 .cp5-card-h{
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
text-wrap: balance;
color: var(--ink, #1a2233);
}
.cf-commitment-pledge-5 .cp5-list{ list-style: none; padding: 0; margin-top: 8px }
.cf-commitment-pledge-5 .cp5-list li{
display: grid;
grid-template-columns: 2.25rem minmax(0, 1fr);
gap: 12px;
align-items: start;
padding-block: 16px;
}
.cf-commitment-pledge-5 .cp5-list li + li{ border-top: 1px solid oklch(from var(--ink, #1a2233) l c h / 0.12) }
.cf-commitment-pledge-5 .cp5-list li:last-child{ padding-bottom: 0 }
.cf-commitment-pledge-5 .cp5-num{
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
font-weight: 800;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.1;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--accent, oklch(0.5 0.17 257));
}
.cf-commitment-pledge-5 .cp5-list p{
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
text-wrap: pretty;
color: var(--ink, #1a2233);
}
.cf-commitment-pledge-5 .cp5-list strong{ font-weight: 800 }
.cf-commitment-pledge-5 .cp5-action{
margin-top: clamp(32px, 4vw, 48px);
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.cf-commitment-pledge-5 .cp5-hold{
position: relative;
isolation: isolate;
overflow: hidden;
display: inline-flex;
align-items: center;
justify-content: center;
width: min(100%, 34rem);
min-height: 76px;
margin: 0;
padding: 12px 28px 20px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display, var(--font-body, system-ui, sans-serif)));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
color: var(--cp5-ink);
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--cp5-bg) calc(l + 0.04) c h), oklch(from var(--cp5-bg2) calc(l - 0.02) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--cp5-bg) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--cp5-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--cp5-sh) l c h / 0.4), 0 8px 16px -6px oklch(from var(--cp5-sh) l c h / 0.5));
cursor: pointer;
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
@media (hover: hover){
.cf-commitment-pledge-5 .cp5-hold:not(:disabled):hover{
background: linear-gradient(oklch(from var(--cp5-bg) calc(l - 0.01) c h), oklch(from var(--cp5-bg2) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--cp5-bg) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--cp5-bg) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--cp5-sh) l c h / 0.45), 0 10px 20px -6px oklch(from var(--cp5-sh) l c h / 0.6);
}
}
.cf-commitment-pledge-5[data-force='hover'] .cp5-hold:not(:disabled){
background: linear-gradient(oklch(from var(--cp5-bg) calc(l - 0.01) c h), oklch(from var(--cp5-bg2) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--cp5-bg) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--cp5-bg) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--cp5-sh) l c h / 0.45), 0 10px 20px -6px oklch(from var(--cp5-sh) l c h / 0.6);
}
.cf-commitment-pledge-5 .cp5-hold[data-holding]:not(:disabled),
.cf-commitment-pledge-5 .cp5-hold:not(:disabled):active,
.cf-commitment-pledge-5[data-force='active'] .cp5-hold:not(:disabled){
transform: translateY(1px) scale(0.992);
box-shadow: inset 0 2px 3px oklch(from var(--cp5-bg) calc(l - 0.22) c h / 0.45), inset 0 -2px 0 oklch(from var(--cp5-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--cp5-sh) l c h / 0.4);
}
.cf-commitment-pledge-5 .cp5-hold:focus-visible{
outline: 3px solid var(--band-ink, #ffffff);
outline-offset: 4px;
}
.cf-commitment-pledge-5 .cp5-fill{
position: absolute;
inset: 0;
z-index: 0;
border-radius: inherit;
background: linear-gradient(oklch(from var(--cp5-bg2) calc(l - 0.03) c h), oklch(from var(--cp5-bg2) calc(l - 0.1) c h));
transform: scaleX(var(--p, 0));
transform-origin: left center;
transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.cf-commitment-pledge-5 .cp5-label{
position: relative;
z-index: 1;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
text-wrap: balance;
}
.cf-commitment-pledge-5 .cp5-label svg{ flex: none }
.cf-commitment-pledge-5 .cp5-track{
position: absolute;
z-index: 1;
left: 28px;
right: 28px;
bottom: 13px;
height: 4px;
overflow: hidden;
border-radius: 999px;
background: oklch(from var(--cp5-bg2) calc(l - 0.14) c h / 0.32);
}
.cf-commitment-pledge-5 .cp5-bar{
display: block;
height: 100%;
border-radius: inherit;
background: var(--cp5-ink);
transform: scaleX(var(--p, 0));
transform-origin: left center;
transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.cf-commitment-pledge-5 .cp5-hold[data-holding] .cp5-fill,
.cf-commitment-pledge-5 .cp5-hold[data-holding] .cp5-bar{ transition: none }
.cf-commitment-pledge-5[data-loading] .cp5-hold{ cursor: progress }
.cf-commitment-pledge-5 .cp5-hold:disabled{
cursor: not-allowed;
transform: none;
text-shadow: none;
background: var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263)));
color: var(--button-2-ink, var(--secondary-ink, oklch(0.21 0.034 263)));
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 1px oklch(from var(--cp5-sh) l c h / 0.18), 0 1px 3px oklch(from var(--cp5-sh) l c h / 0.14)));
}
.cf-commitment-pledge-5 .cp5-hold:disabled .cp5-fill,
.cf-commitment-pledge-5 .cp5-hold:disabled .cp5-track{ display: none }
.cf-commitment-pledge-5 .cp5-spin{ animation: cp5-spin .8s linear infinite }
@keyframes cp5-spin{ to { transform: rotate(360deg) } }
.cf-commitment-pledge-5 .cp5-note{
margin-top: 16px;
max-width: 34rem;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
text-wrap: pretty;
color: var(--band-ink, #ffffff);
}
.cf-commitment-pledge-5 .cp5-note[data-kind='early']{
padding: 4px 12px;
border-radius: 999px;
font-weight: 700;
background: oklch(from var(--band-ink, #ffffff) l c h / 0.12);
}
.cf-commitment-pledge-5 .cp5-note svg{
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: .4em;
}
.cf-commitment-pledge-5 .cp5-fine{
margin-top: 8px;
max-width: 34rem;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
text-wrap: pretty;
color: var(--band-ink, #ffffff);
}
.cf-commitment-pledge-5 .cp5-sr{
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
}
@keyframes cp5-rise{ from { opacity: .82; transform: translateY(8px) } }
@media (prefers-reduced-motion: no-preference){
.cf-commitment-pledge-5 .cp5-rise{
animation: cp5-rise .45s cubic-bezier(.2, .7, .2, 1) both;
animation-delay: min(calc(var(--i, 0) * .07s), .28s);
}
}
@media (prefers-reduced-motion: reduce){
.cf-commitment-pledge-5 .cp5-hold,
.cf-commitment-pledge-5 .cp5-fill,
.cf-commitment-pledge-5 .cp5-bar{ transition: none }
.cf-commitment-pledge-5 .cp5-hold[data-holding]:not(:disabled),
.cf-commitment-pledge-5 .cp5-hold:not(:disabled):active,
.cf-commitment-pledge-5[data-force='active'] .cp5-hold:not(:disabled){ transform: none }
.cf-commitment-pledge-5 .cp5-spin{ animation: none }
}
@media (max-width: 640px){
.cf-commitment-pledge-5 .cp5-hold{ width: 100%; min-height: 72px; padding-inline: 20px }
.cf-commitment-pledge-5 .cp5-track{ left: 20px; right: 20px; bottom: 12px }
.cf-commitment-pledge-5 .cp5-list li{ grid-template-columns: 2rem minmax(0, 1fr) }
}
`
pieces/forms/commitment-pledge-5/specimen.tsx 33 lines
import __studioImage38054b26 from "../assets/d141c32605780ad5.webp";
import { slot } from '../../slots'
import { CommitmentPledge5 } from '../commitment-pledge-5'
import type { CommitmentPledge5State } from '../commitment-pledge-5'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function CommitmentPledge5Specimen({ state = 'default' }: { state?: CommitmentPledge5State }) {
return (
<CommitmentPledge5
state={state}
productImage={slot(
'product',
__studioImage38054b26,
)}
productImageAlt='A refillable steel water bottle and a folded canvas tote bag'
copy={{
headline: 'I’ll go 30 days without single-use plastic.',
lead: 'Hold the button for one second and your 30-Day Plastic-Free Pledge is official. Here’s exactly what you’re promising to do.',
listTitle: 'Four swaps you’ll make every day',
disabledNote: 'Pledges open when the 30-Day Plastic-Free Pledge starts sign-ups.',
finePrint: 'Free to take part. You can step out of the challenge anytime.',
}}
items={[
{ lead: 'Carry your own bottle.', text: 'Refill it instead of buying water in plastic.' },
{ lead: 'Bring the bag.', text: 'Keep a tote by the door so you never need a store bag.' },
{ lead: 'Skip the straw and lid.', text: 'Ask for your drink without them, every time.' },
{ lead: 'Shop loose.', text: 'Pick unwrapped fruit and veg over plastic trays.' },
]}
onSubmit={() => undefined}
/>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalCommitmentPledge5 |
Partial<CommitmentPledge5Copy> |
|
headline OptionalCommitmentPledge5 |
React.ReactNode |
|
items OptionalCommitmentPledge5 |
CommitmentPledge5Item[] |
Default DEFAULT_ITEMS
|
productImage OptionalCommitmentPledge5 |
string |
|
productImageAlt OptionalCommitmentPledge5 |
string |
Default ''
|
holdMs OptionalCommitmentPledge5 |
number |
Default 1000
|
disabled OptionalCommitmentPledge5 |
boolean |
Default false
|
state OptionalCommitmentPledge5 |
CommitmentPledge5State |
Default 'default'
|
onSubmit OptionalCommitmentPledge5 |
(pledge: { method: 'hold' | 'keyboard' }) => void | Promise<void> |
|
className OptionalCommitmentPledge5 |
string |
|
style OptionalCommitmentPledge5 |
React.CSSProperties |
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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
a57ca5c86a05001f.webp
image/webp · 108 KB
-
d141c32605780ad5.webp
image/webp · 166 KB