Join Community 5
Community invite band: a full-bleed photo of the group at work with a join card breaking its lower edge. The visitor promises to keep the house rules, and that promise unlocks the join button (future pacing plus commitment).
Use it in a prompt
Use checkout/join-community-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/checkout/join-community-5.tsx. - Import it and pass your copy and images (Props tab):
import { JoinCommunity5 } from "@/components/funneldna/checkout/join-community-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/join-community-5/component.tsx 464 lines
// layout: photo-overlap-card
// Community invite band: a full-bleed photo of the group at work with a join card breaking its lower edge. The visitor promises to keep the house rules, and that promise unlocks the join button (future pacing plus commitment).
import * as React from 'react'
import { AlertCircle, Check, Loader2, Lock, ShieldCheck } from 'lucide-react'
import { FX_HOST, Spot, Texture } from '../fx/fx'
import community from '../fx/spots/community'
import topo from '../fx/textures/topo'
export type JoinCommunity5Rule = {
/** The rule itself, one short line. */
title: React.ReactNode
/** Optional one-sentence reason or how-to under the rule. */
detail?: React.ReactNode
}
export type JoinCommunity5Props = {
/** Full-bleed photo of the group at work (slot: scene). Leave empty for the photo-free band. */
sceneImage?: string
sceneImageAlt?: string
/** Focal point of the photo as CSS object-position, e.g. '50% 35%'. */
scenePosition?: string
/** Clay illustration beside the group name (an imported fx spot); null hides it. */
spot?: string | null
/** Small line before the group name. */
joiningLabel?: string
/** The supplied group or community name. */
groupName?: string
/** Optional type line under the name, e.g. 'Coastal cleanup crew'. */
groupKind?: string
/** Headline before the highlighted phrase. */
headline?: React.ReactNode
/** Phrase that closes the headline, set on one marker stroke. */
headlineMark?: React.ReactNode
/** Future-pacing lead: picture the first day inside. */
lead?: React.ReactNode
/** Heading above the house rules. */
rulesTitle?: React.ReactNode
/** The house rules (three works best). */
rules?: JoinCommunity5Rule[]
/** Commitment checkbox label. */
commitLabel?: string
/** Short line under the checkbox label. */
commitDetail?: string
/** Inline error when the visitor tries to join before ticking the box. */
commitError?: string
/** Plain instruction right above the button. */
instruction?: string
label?: string
/** Line under the button while it is locked. */
lockedHint?: string
/** Reassurance line under the button once it is unlocked. */
sublabel?: string
/** Line under the button when joining is turned off (disabled). */
disabledHint?: string
loadingLabel?: string
/** Shown when onAction throws or its promise rejects. */
errorMessage?: string
/** Screen-reader note added when the invite opens in a new tab. */
newTabLabel?: string
/** Start with the promise already ticked. */
defaultCommitted?: boolean
onCommitChange?: (committed: boolean) => void
/** Invite link destination, used once the promise is ticked. */
href?: string
target?: '_self' | '_blank'
/** Join click handler; return a promise to show loading, reject it to show the error line. */
onAction?: () => void | PromiseLike<unknown>
disabled?: boolean
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error'
className?: string
}
const DEFAULT_RULES: JoinCommunity5Rule[] = [
{ title: 'Show up when you say you will.', detail: 'If plans change, tell the group early so no one is left short.' },
{ title: 'Help the newest person first.', detail: 'Everyone started on day one. Answer the question you once asked.' },
{ title: 'Leave every place better than you found it.', detail: 'Do the work, share the credit and keep the group a good place to be.' },
]
export function JoinCommunity5(props: JoinCommunity5Props) {
const {
sceneImage,
sceneImageAlt = '',
scenePosition,
spot = community,
joiningLabel = 'You’re joining',
groupName = 'The Members Group',
groupKind,
headline = 'Your place in the group is',
headlineMark = 'one promise away.',
lead = 'Picture your first week inside: a group that shows up, shares the work and helps the newest person first. Agree to three house rules and your spot is yours.',
rulesTitle = 'Keep these three and you’ll fit right in',
rules = DEFAULT_RULES,
commitLabel = 'I’ll follow the house rules',
commitDetail = 'Your word is all it takes to join.',
commitError = 'Tick the box to agree to the house rules first.',
instruction = 'Tick the promise, then click the button below to join the group.',
label = 'Join the Group',
lockedHint = 'Tick the promise to unlock your invite',
sublabel = 'Free to join · Opens your invite',
disabledHint = 'New members are paused for now.',
loadingLabel = 'Opening your invite…',
errorMessage = 'We couldn’t open your invite. Please try again.',
newTabLabel = '(opens in a new tab)',
defaultCommitted = false,
onCommitChange,
href,
target = '_self',
onAction,
disabled = false,
state = 'default',
className,
} = props
const uid = React.useId().replace(/:/g, '')
const titleId = `jc5-${uid}-title`
const commitId = `jc5-${uid}-commit`
const commitErrId = `jc5-${uid}-commit-err`
const hintId = `jc5-${uid}-hint`
const errId = `jc5-${uid}-err`
const forced = state === 'hover' || state === 'active'
const [committed, setCommitted] = React.useState(forced || defaultCommitted)
const [attempted, setAttempted] = React.useState(false)
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const boxRef = React.useRef<HTMLInputElement>(null)
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
setCommitted(state === 'hover' || state === 'active' ? true : defaultCommitted)
setAttempted(false)
setFailed(false)
}, [state, defaultCommitted])
const isDisabled = disabled || state === 'disabled'
const unlocked = committed && !isDisabled
const showCommitError = !committed && !isDisabled && (attempted || state === 'error')
const showError = !busy && failed
const hasPhoto = Boolean(sceneImage)
const handleCommit = (event: React.ChangeEvent<HTMLInputElement>) => {
const next = event.target.checked
setCommitted(next)
setFailed(false)
if (next) setAttempted(false)
onCommitChange?.(next)
}
const handleClick = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled || busy) {
event.preventDefault()
return
}
if (!committed) {
event.preventDefault()
setAttempted(true)
boxRef.current?.focus()
return
}
setFailed(false)
if (!onAction) return
let result: unknown
try {
result = onAction()
} catch {
event.preventDefault()
setFailed(true)
return
}
if (isThenable(result)) {
setBusy(true)
Promise.resolve(result).then(
() => {
if (alive.current) setBusy(false)
},
() => {
if (!alive.current) return
setBusy(false)
setFailed(true)
},
)
}
}
const describedBy = [hintId, showError ? errId : ''].filter(Boolean).join(' ')
const buttonClass = ['jc5-btn', state === 'hover' ? 'is-hover' : '', state === 'active' ? 'is-active' : ''].filter(Boolean).join(' ')
const inner = (
<>
{busy ? (
<Loader2 className='jc5-spin' aria-hidden='true' strokeWidth={2.5} />
) : !unlocked ? (
<Lock className='jc5-btn-icon' aria-hidden='true' strokeWidth={2.5} />
) : null}
<span>{busy ? loadingLabel : label}</span>
{href && target === '_blank' && !busy ? <span className='jc5-sr'>{newTabLabel}</span> : null}
</>
)
const action =
href && unlocked ? (
<a
className={buttonClass}
href={href}
target={target}
rel={target === '_blank' ? 'noopener noreferrer' : undefined}
onClick={handleClick}
aria-busy={busy || undefined}
aria-describedby={describedBy}
data-unlocked='true'
>
{inner}
</a>
) : (
<button
type='button'
className={buttonClass}
onClick={handleClick}
disabled={isDisabled}
aria-disabled={!isDisabled && !committed ? true : undefined}
aria-busy={busy || undefined}
aria-describedby={describedBy}
data-unlocked={unlocked ? 'true' : 'false'}
>
{inner}
</button>
)
const hint = isDisabled ? disabledHint : unlocked ? sublabel : lockedHint
return (
<section
className={['cf-join-community-5', className].filter(Boolean).join(' ')}
data-state={state}
aria-labelledby={titleId}
>
<style>{CSS}</style>
<div className='jc5-stage' data-photo={hasPhoto ? 'true' : 'false'} style={FX_HOST}>
{hasPhoto ? (
<img
className='jc5-photo'
src={sceneImage}
alt={sceneImageAlt}
style={scenePosition ? { objectPosition: scenePosition } : undefined}
loading='eager'
decoding='async'
/>
) : (
<Texture src={topo} tone='band-ink' />
)}
</div>
<div className='jc5-wrap'>
<div className='jc5-card'>
<div className='jc5-top'>
<div className='jc5-intro'>
<div className='jc5-group'>
{spot ? <Spot src={spot} size={56} /> : null}
<p className='jc5-group-text'>
<span className='jc5-joining'>{joiningLabel}</span>
<span className='jc5-name'>{groupName}</span>
{groupKind ? <span className='jc5-kind'>{groupKind}</span> : null}
</p>
</div>
<h2 id={titleId} className='jc5-h2'>
{headline}
{headlineMark ? (
<>
{' '}
<span className='jc5-mark'>{headlineMark}</span>
</>
) : null}
</h2>
{lead ? <p className='jc5-lead'>{lead}</p> : null}
</div>
<div className='jc5-rules'>
{rulesTitle ? <h3 className='jc5-h3'>{rulesTitle}</h3> : null}
<ol className='jc5-list'>
{rules.map((rule, i) => (
<li key={i} className='jc5-rule' style={{ '--jc5-i': i } as React.CSSProperties}>
<span className='jc5-num' aria-hidden='true'>
{i + 1}
</span>
<div className='jc5-rule-body'>
<span className='jc5-rule-title'>{rule.title}</span>
{rule.detail ? <p className='jc5-rule-detail'>{rule.detail}</p> : null}
</div>
</li>
))}
</ol>
</div>
</div>
<div className='jc5-commit-row'>
<div className='jc5-commit-col'>
<label
className='jc5-commit'
htmlFor={commitId}
data-committed={committed ? 'true' : 'false'}
data-invalid={showCommitError ? 'true' : undefined}
data-disabled={isDisabled ? 'true' : undefined}
>
<span className='jc5-box'>
<input
ref={boxRef}
id={commitId}
type='checkbox'
checked={committed}
onChange={handleCommit}
disabled={isDisabled}
aria-invalid={showCommitError || undefined}
aria-describedby={showCommitError ? commitErrId : undefined}
/>
<Check className='jc5-tick' aria-hidden='true' strokeWidth={3} />
</span>
<span className='jc5-commit-text'>
<span className='jc5-commit-label'>{commitLabel}</span>
{commitDetail ? <span className='jc5-commit-detail'>{commitDetail}</span> : null}
</span>
</label>
<div aria-live='polite'>
{showCommitError ? (
<p className='jc5-field-error' id={commitErrId}>
<AlertCircle className='jc5-inline-icon' aria-hidden='true' strokeWidth={2.5} />
{commitError}
</p>
) : null}
</div>
</div>
<div className='jc5-action'>
{instruction ? <p className='jc5-instruction'>{instruction}</p> : null}
{action}
<p className='jc5-hint' id={hintId} aria-live='polite' data-unlocked={unlocked ? 'true' : 'false'}>
{unlocked ? (
<ShieldCheck className='jc5-inline-icon' aria-hidden='true' strokeWidth={2.5} />
) : isDisabled ? (
<Lock className='jc5-inline-icon' aria-hidden='true' strokeWidth={2.5} />
) : null}
{hint}
</p>
<div className='jc5-err-slot' aria-live='polite'>
{showError ? (
<p className='jc5-error' id={errId}>
<AlertCircle className='jc5-inline-icon' aria-hidden='true' strokeWidth={2.5} />
{errorMessage}
</p>
) : null}
</div>
</div>
</div>
</div>
</div>
</section>
)
}
export default JoinCommunity5
function isThenable(value: unknown): value is PromiseLike<unknown> {
return typeof value === 'object' && value !== null && typeof (value as PromiseLike<unknown>).then === 'function'
}
const R = '.cf-join-community-5'
const CSS = `
${R}{--jc5-gutter:clamp(16px,5vw,48px);--jc5-overlap:clamp(120px,14vw,220px);position:relative;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding-bottom:clamp(64px,8.5vw,120px);overflow-x:clip}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} .jc5-stage{position:relative;height:clamp(320px,40vw,580px);background:var(--band);overflow:hidden}
${R} .jc5-stage[data-photo='false']{height:clamp(200px,22vw,300px)}
${R} .jc5-photo{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:50% 38%}
${R} .jc5-wrap{position:relative;z-index:1;width:min(1080px,calc(100% - 2 * var(--jc5-gutter)));margin:calc(-1 * var(--jc5-overlap)) auto 0}
${R} .jc5-stage[data-photo='false'] + .jc5-wrap{--jc5-overlap:clamp(96px,10vw,150px)}
${R} .jc5-card{position:relative;background:var(--card);color:var(--ink);border:1px solid var(--card-border,color-mix(in oklch,var(--ink) 12%,transparent));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32)));padding:clamp(20px,3.4vw,44px);animation:jc5-rise .45s cubic-bezier(.2,.7,.2,1) both}
${R} .jc5-top{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:clamp(32px,5vw,64px);align-items:start}
${R} .jc5-intro,${R} .jc5-rules,${R} .jc5-commit-col,${R} .jc5-action{min-width:0}
${R} .jc5-group{display:flex;align-items:center;gap:16px}
${R} .jc5-group-text{display:flex;flex-direction:column;gap:2px;margin:0;min-width:0}
${R} .jc5-joining{font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
${R} .jc5-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:-.01em;color:var(--ink);text-wrap:balance}
${R} .jc5-kind{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted)}
${R} .jc5-h2{margin:24px 0 0;font-family:var(--font-display);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);color:var(--ink);text-wrap:balance}
${R} .jc5-mark{background-image:linear-gradient(180deg,transparent 0 36%,color-mix(in oklab,var(--marker,#fae37c) 85%,transparent) 36% 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .12em;margin:0 -.06em;border-radius:.2em .34em .26em .4em}
${R} .jc5-lead{margin:16px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
${R} .jc5-h3{margin:0;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:-.01em;text-transform:var(--display-case,none);color:var(--ink);text-wrap:balance}
${R} .jc5-list{list-style:none;margin:12px 0 0;padding:0}
${R} .jc5-rule{display:grid;grid-template-columns:2rem minmax(0,1fr);gap:12px;padding:16px 0;animation:jc5-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--jc5-i,0),4) * .07s)}
${R} .jc5-rule + .jc5-rule{border-top:1px solid oklch(from var(--ink) l c h / .12)}
${R} .jc5-rule:last-child{padding-bottom:0}
${R} .jc5-rule-body{min-width:0;padding-top:2px}
${R} .jc5-num{font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:800;color:var(--accent);font-variant-numeric:tabular-nums}
${R} .jc5-rule-title{display:block;font-size:1.125rem;line-height:1.35;font-weight:800;color:var(--ink);text-wrap:pretty}
${R} .jc5-rule-detail{margin:4px 0 0;font-size:1rem;line-height:1.5;color:var(--muted);text-wrap:pretty}
${R} .jc5-commit-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,400px);grid-template-areas:". ins" "commit btn" ". hint" ". err";column-gap:clamp(24px,4vw,48px);row-gap:0;align-items:center;margin-top:clamp(24px,3vw,36px);padding-top:clamp(24px,3vw,36px);border-top:1px solid oklch(from var(--ink) l c h / .12)}
${R} .jc5-action{display:contents}
${R} .jc5-commit-col{grid-area:commit}
${R} .jc5-err-slot{grid-area:err}
${R} .jc5-commit{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:16px;min-height:72px;padding:16px 20px;background:var(--field);color:var(--field-ink);border:2px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));cursor:pointer;transition:border-color .16s ease,background-color .16s ease}
${R} .jc5-commit:not([data-disabled='true']):not([data-committed='true']):not([data-invalid='true']):hover{border-color:color-mix(in oklch,var(--field-ink) 45%,var(--field))}
${R} .jc5-commit[data-committed='true']{border-color:var(--accent-fill,var(--accent));background:color-mix(in oklch,var(--accent-fill,var(--accent)) 8%,var(--field))}
${R} .jc5-commit[data-invalid='true']{border-color:var(--danger)}
${R} .jc5-commit[data-disabled='true']{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink) 5%,var(--field));border-color:color-mix(in oklch,var(--field-ink) 18%,var(--field))}
${R} .jc5-box{position:relative;display:grid;place-items:center;width:30px;height:30px;flex:none}
${R} .jc5-box input{grid-area:1/1;-webkit-appearance:none;appearance:none;margin:0;width:30px;height:30px;border-radius:8px;border:2px solid color-mix(in oklch,var(--field-ink) 55%,var(--field));background:var(--field);cursor:inherit;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease}
${R} .jc5-box input:checked{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent))}
${R} .jc5-box input:focus-visible{outline:none;box-shadow:0 0 0 3px var(--field),0 0 0 6px oklch(from var(--field-focus,var(--accent)) l c h / .6)}
${R} .jc5-commit[data-invalid='true'] .jc5-box input{border-color:var(--danger)}
${R} .jc5-box input:disabled{border-color:color-mix(in oklch,var(--field-ink) 30%,var(--field))}
${R} .jc5-tick{grid-area:1/1;width:20px;height:20px;color:var(--accent-fill-ink,var(--card));opacity:0;transform:scale(.6);transition:opacity .18s ease,transform .3s cubic-bezier(.2,.7,.2,1);pointer-events:none}
${R} .jc5-box input:checked + .jc5-tick{opacity:1;transform:scale(1)}
${R} .jc5-commit-text{display:flex;flex-direction:column;gap:2px;min-width:0}
${R} .jc5-commit-label{font-size:1.125rem;line-height:1.3;font-weight:800;color:var(--field-ink);text-wrap:pretty}
${R} .jc5-commit-detail{font-size:.9375rem;line-height:1.4;font-weight:500;color:color-mix(in oklch,var(--field-ink) 72%,var(--field));text-wrap:pretty}
${R} .jc5-field-error,${R} .jc5-error{margin:10px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
${R} .jc5-error{text-align:center}
${R} .jc5-inline-icon{display:inline-block;width:16px;height:16px;vertical-align:-.15em;margin-inline-end:.4em}
${R} .jc5-instruction{grid-area:ins;margin:0 0 12px;font-size:1rem;line-height:1.4;font-weight:600;color:var(--ink);text-align:center;text-wrap:pretty}
${R} .jc5-btn{grid-area:btn;display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:72px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;font-weight:var(--button-weight,800);text-transform:var(--button-case,none);text-align:center;text-decoration:none;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .3),0 8px 16px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
${R} .jc5-btn-icon{width:20px;height:20px;flex:none}
${R} .jc5-btn[data-unlocked='true']{animation:jc5-unlock .3s cubic-bezier(.2,.7,.2,1)}
${R} .jc5-btn:not(:disabled):not([aria-disabled='true']):hover,${R} .jc5-btn.is-hover{background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .32),0 12px 20px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .5);transform:translateY(-1px)}
${R} .jc5-btn:not(:disabled):not([aria-disabled='true']):active,${R} .jc5-btn.is-active{background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) calc(l - .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .09) c h));box-shadow:inset 0 2px 3px oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .18) c h / .5),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .3);transform:translateY(1px)}
${R} .jc5-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
${R} .jc5-btn[aria-disabled='true'],${R} .jc5-btn:disabled{background:color-mix(in oklch,var(--ink) 7%,var(--card));color:var(--ink);text-shadow:none;box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .18);transform:none;animation:none}
${R} .jc5-btn[aria-disabled='true']{cursor:pointer}
${R} .jc5-btn[aria-disabled='true']:hover{background:color-mix(in oklch,var(--ink) 11%,var(--card))}
${R} .jc5-btn:disabled{color:var(--muted);cursor:not-allowed}
${R} .jc5-btn[aria-busy='true']{cursor:progress}
${R} .jc5-hint{grid-area:hint;margin:10px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
${R} .jc5-hint[data-unlocked='true'] .jc5-inline-icon{color:var(--success)}
${R} .jc5-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
${R} .jc5-spin{width:20px;height:20px;flex:none;animation:jc5-spin .8s linear infinite}
@keyframes jc5-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes jc5-spin{to{transform:rotate(360deg)}}
@keyframes jc5-unlock{from{transform:scale(.96)}to{transform:scale(1)}}
@media (max-width:860px){
${R} .jc5-top{grid-template-columns:minmax(0,1fr);gap:32px}
${R} .jc5-commit-row{grid-template-columns:minmax(0,1fr);grid-template-areas:"commit" "ins" "btn" "hint" "err"}
${R} .jc5-instruction{margin-top:20px}
}
@media (max-width:520px){
${R} .jc5-stage{height:200px}
${R} .jc5-stage[data-photo='false']{height:150px}
${R} .jc5-wrap,${R} .jc5-stage[data-photo='false'] + .jc5-wrap{--jc5-overlap:32px}
${R} .jc5-card{padding:20px}
${R} .jc5-group{gap:12px}
${R} .jc5-commit{padding:14px 16px;gap:14px}
${R} .jc5-rule{grid-template-columns:1.5rem minmax(0,1fr);gap:10px}
${R} .jc5-btn{min-height:64px;padding:0 20px}
}
@media (prefers-reduced-motion:reduce){
${R} .jc5-card,${R} .jc5-rule,${R} .jc5-btn,${R} .jc5-btn[data-unlocked='true'],${R} .jc5-spin{animation:none}
${R} .jc5-btn,${R} .jc5-tick,${R} .jc5-commit,${R} .jc5-box input{transition:none}
${R} .jc5-btn:not(:disabled):not([aria-disabled='true']):hover,${R} .jc5-btn.is-hover,${R} .jc5-btn:not(:disabled):not([aria-disabled='true']):active,${R} .jc5-btn.is-active,${R} .jc5-tick{transform:none}
}
`
pieces/checkout/join-community-5/specimen.tsx 41 lines
import __studioImagef3221fa2 from "../assets/2b8cac9ab89530ff.webp";
// Specimen: Tideline Volunteers invites new members into its coastal cleanup crew.
import * as React from 'react'
import { JoinCommunity5, type JoinCommunity5Props } from '../join-community-5'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function JoinCommunity5Specimen({ state = 'default' }: { state?: JoinCommunity5Props['state'] }) {
return (
<JoinCommunity5
state={state}
sceneImage={slot(
'scene',
__studioImagef3221fa2,
)}
sceneImageAlt='Volunteers in work gloves lifting rope and litter off a sandy beach together'
scenePosition='50% 34%'
groupName='Tideline Volunteers'
groupKind='Coastal cleanup crew'
headline='Your first Saturday on the shore is'
headlineMark='one promise away.'
lead='Picture it: gloves on, the tide heading out, and a crew beside you who came to work. Agree to three house rules and your spot on the beach is yours.'
rulesTitle='Keep these three and you’ll fit right in'
rules={[
{ title: 'Show up when you sign up.', detail: 'Plans change? Drop your spot by Friday so leaders can plan the shift.' },
{ title: 'Gloves and closed shoes, every time.', detail: 'Leaders bring the bags and grabbers. You bring your own safety.' },
{ title: 'Leave the beach cleaner than you found it.', detail: 'Every bag we fill goes home with us, our own trash included.' },
]}
commitLabel='I’ll follow the house rules'
commitDetail='Your word is all it takes to join the crew.'
commitError='Tick the box to agree to the house rules first.'
instruction='Tick the promise, then click the button below to join the crew.'
label='Join the Crew'
lockedHint='Tick the promise to unlock your invite'
sublabel='Free to join · Opens your crew invite'
errorMessage={defaults.sample.registration.error}
/>
)
}
| Name | Type | Details |
|---|---|---|
sceneImage OptionalJoinCommunity5 |
string |
|
sceneImageAlt OptionalJoinCommunity5 |
string |
|
scenePosition OptionalJoinCommunity5 |
string |
|
spot OptionalJoinCommunity5 |
string | null |
|
joiningLabel OptionalJoinCommunity5 |
string |
|
groupName OptionalJoinCommunity5 |
string |
|
groupKind OptionalJoinCommunity5 |
string |
|
headline OptionalJoinCommunity5 |
React.ReactNode |
|
headlineMark OptionalJoinCommunity5 |
React.ReactNode |
|
lead OptionalJoinCommunity5 |
React.ReactNode |
|
rulesTitle OptionalJoinCommunity5 |
React.ReactNode |
|
rules OptionalJoinCommunity5 |
JoinCommunity5Rule[] |
|
commitLabel OptionalJoinCommunity5 |
string |
|
commitDetail OptionalJoinCommunity5 |
string |
|
commitError OptionalJoinCommunity5 |
string |
|
instruction OptionalJoinCommunity5 |
string |
|
label OptionalJoinCommunity5 |
string |
|
lockedHint OptionalJoinCommunity5 |
string |
|
sublabel OptionalJoinCommunity5 |
string |
|
disabledHint OptionalJoinCommunity5 |
string |
|
loadingLabel OptionalJoinCommunity5 |
string |
|
errorMessage OptionalJoinCommunity5 |
string |
|
newTabLabel OptionalJoinCommunity5 |
string |
|
defaultCommitted OptionalJoinCommunity5 |
boolean |
|
onCommitChange OptionalJoinCommunity5 |
(committed: boolean) => void |
|
href OptionalJoinCommunity5 |
string |
|
target OptionalJoinCommunity5 |
'_self' | '_blank' |
|
onAction OptionalJoinCommunity5 |
() => void | PromiseLike<unknown> |
|
disabled OptionalJoinCommunity5 |
boolean |
|
state OptionalJoinCommunity5 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalJoinCommunity5 |
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.
--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.
scene- A wide atmosphere photo behind or beside the copy.
-
2b8cac9ab89530ff.webp
image/webp · 161 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
a57ca5c86a05001f.webp
image/webp · 108 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB