Join Community 2
Thank-you page community invite: the host stands under a spotlight and says hi, hands the new member a ready-made intro post to copy, and one join button opens the group, so the first post is already written.
Use it in a prompt
Use checkout/join-community-2 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-2.tsx. - Import it and pass your copy and images (Props tab):
import { JoinCommunity2 } from "@/components/funneldna/checkout/join-community-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/join-community-2/component.tsx 668 lines
// layout: presenter-cutout
// Thank-you page community invite: the host stands under a spotlight and says hi, hands the new member a ready-made intro post to copy, and one join button opens the group, so the first post is already written.
import * as React from "react"
import { Check, Copy, Loader2, Lock, MessageSquareText, UsersRound, X } from "lucide-react"
import { FX_HOST, Spotlight } from "../fx/fx"
export type JoinCommunity2State = "default" | "hover" | "active" | "disabled" | "error"
export type JoinCommunity2Props = {
/** Host cut-out on a transparent background (slot: presenter-cutout). Without it the speech block centres alone. */
hostImage?: string
hostImageAlt?: string
/** Sign-off under the host's words. Empty hides the line. */
hostName?: string
hostRole?: string
/** Opening words of the host's speech headline. */
headline?: string
/** Phrase that closes the headline, set on one marker stroke. */
headlineMark?: string
message?: string
/** Title above the ready-made intro post. */
introTitle?: string
/** The intro post the member copies. Empty hides the whole copy row. */
introTemplate?: string
copyLabel?: string
/** Shown on the copy button for two seconds after copying. */
copiedLabel?: string
/** Shown when the browser blocks copying; the text is selected instead. */
copyFailLabel?: string
/** Screen-reader announcement after a copy. */
copiedAnnouncement?: string
/** Screen-reader announcement when copying was blocked. */
copyFailAnnouncement?: string
/** The supplied group or community name. */
groupName?: string
/** Platform or type line under the name. */
groupKind?: string
label?: string
/** One reassurance line under the button. */
sublabel?: string
loadingLabel?: string
errorMessage?: string
/** Screen-reader note added when the group opens in a new tab. */
newTabLabel?: string
/** Group invite destination. */
href?: string
target?: "_self" | "_blank"
/** Join click; return a promise to show loading, reject it to show the error line. */
onAction?: () => void | PromiseLike<unknown>
/** Called with the template after a successful copy. */
onCopy?: (text: string) => void
disabled?: boolean
state?: JoinCommunity2State
className?: string
}
export function JoinCommunity2(props: JoinCommunity2Props) {
const {
hostImage,
hostImageAlt = "",
hostName = "",
hostRole = "",
headline = "Come say hi.",
headlineMark = "I read every intro.",
message = "Join the group, paste the intro below and tell everyone what you are working on. I will see you inside.",
introTitle = "Your first post, ready to paste",
introTemplate = "Hi everyone! I just joined and I am getting started today. I would love to meet a few people working on the same steps. Who else is just starting?",
copyLabel = "Copy intro",
copiedLabel = "Copied",
copyFailLabel = "Text selected",
copiedAnnouncement = "Intro copied. Paste it as your first post.",
copyFailAnnouncement = "The intro is selected. Use your device's copy command.",
groupName = "The Member Community",
groupKind = "Private group",
label = "Join the Group",
sublabel = "Free for members · Opens the group",
loadingLabel = "Opening the group…",
errorMessage = "We couldn't open the group. Please try again.",
newTabLabel = "(opens in a new tab)",
href,
target = "_self",
onAction,
onCopy,
disabled = false,
state = "default",
className,
} = props
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "")
const titleId = `cfjc2-${uid}-title`
const tplId = `cfjc2-${uid}-tpl`
const subId = `cfjc2-${uid}-sub`
const errId = `cfjc2-${uid}-err`
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const [copyState, setCopyState] = React.useState<"idle" | "done" | "fail">("idle")
const alive = React.useRef(true)
const timer = React.useRef<number | undefined>(undefined)
const tplRef = React.useRef<HTMLParagraphElement>(null)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
if (timer.current !== undefined) window.clearTimeout(timer.current)
}
}, [])
const template = (introTemplate ?? "").trim()
const hasTemplate = template.length > 0
const hasHost = Boolean(hostImage)
const isDisabled = disabled || state === "disabled"
const showError = !busy && (failed || state === "error")
const handleCopy = async () => {
if (!hasTemplate) return
let ok = false
try {
if (typeof navigator !== "undefined" && navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(template)
ok = true
}
} catch {
ok = false
}
if (!ok) ok = legacyCopy(template)
if (!alive.current) return
if (ok) onCopy?.(template)
else selectText(tplRef.current)
setCopyState(ok ? "done" : "fail")
if (timer.current !== undefined) window.clearTimeout(timer.current)
timer.current = window.setTimeout(() => {
timer.current = undefined
if (alive.current) setCopyState("idle")
}, 2000)
}
const handleJoin = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled || busy) {
event.preventDefault()
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 = [sublabel ? subId : "", showError ? errId : ""].filter(Boolean).join(" ") || undefined
const inner = (
<>
{busy ? <Loader2 className="cf-jc2__spin" strokeWidth={2.5} aria-hidden="true" /> : null}
<span>{busy ? loadingLabel : label}</span>
{href && target === "_blank" && !busy ? <span className="cf-jc2__sr">{newTabLabel}</span> : null}
</>
)
const action =
href && !isDisabled ? (
<a
className="cf-jc2__btn"
href={href}
target={target}
rel={target === "_blank" ? "noopener noreferrer" : undefined}
onClick={handleJoin}
aria-busy={busy || undefined}
aria-describedby={describedBy}
>
{inner}
</a>
) : (
<button
type="button"
className="cf-jc2__btn"
onClick={handleJoin}
disabled={isDisabled}
aria-busy={busy || undefined}
aria-describedby={describedBy}
>
{inner}
</button>
)
const copyText = copyState === "done" ? copiedLabel : copyState === "fail" ? copyFailLabel : copyLabel
const announcement = copyState === "done" ? copiedAnnouncement : copyState === "fail" ? copyFailAnnouncement : ""
return (
<section
className={["cf-join-community-2", className].filter(Boolean).join(" ")}
data-state={state}
aria-labelledby={titleId}
style={FX_HOST}
>
<style>{CSS}</style>
<Spotlight />
<div className="cf-jc2__wrap" data-solo={hasHost ? undefined : ""}>
{hasHost ? (
<figure className="cf-jc2__host">
<img src={hostImage} alt={hostImageAlt} width={640} height={640} loading="lazy" decoding="async" />
</figure>
) : null}
<div className="cf-jc2__main">
<div className="cf-jc2__bubble">
{hasHost ? <span className="cf-jc2__tail" aria-hidden="true" /> : null}
<h2 id={titleId} className="cf-jc2__title">
{headlineMark ? <span className="cf-jc2__lede">{headline}</span> : headline}
{headlineMark ? (
<>
{" "}
<span className="cf-jc2__mark">{headlineMark}</span>
</>
) : null}
</h2>
{message ? <p className="cf-jc2__lead">{message}</p> : null}
{hostName ? (
<p className="cf-jc2__who">
<strong>{hostName}</strong>
{hostRole ? <span>{" · "}{hostRole}</span> : null}
</p>
) : null}
{hasTemplate ? (
<div className="cf-jc2__intro">
<h3 className="cf-jc2__intro-title">
<MessageSquareText className="cf-jc2__ico" strokeWidth={2.5} aria-hidden="true" />
{introTitle}
</h3>
<button
type="button"
className="cf-jc2__copy"
data-copied={copyState === "idle" ? undefined : copyState}
onClick={handleCopy}
aria-describedby={tplId}
>
{copyState === "done" ? (
<Check className="cf-jc2__copy-ico" strokeWidth={2.5} aria-hidden="true" />
) : (
<Copy className="cf-jc2__copy-ico" strokeWidth={2.5} aria-hidden="true" />
)}
<span>{copyText}</span>
</button>
<p id={tplId} ref={tplRef} className="cf-jc2__tpl">
{template}
</p>
<span className="cf-jc2__sr" aria-live="polite">
{announcement}
</span>
</div>
) : null}
</div>
<div className="cf-jc2__join">
{groupName ? (
<div className="cf-jc2__group">
<span className="cf-jc2__disc" aria-hidden="true">
<UsersRound strokeWidth={2.5} />
</span>
<div className="cf-jc2__group-copy">
<h3 className="cf-jc2__gname">{groupName}</h3>
{groupKind ? <p className="cf-jc2__gkind">{groupKind}</p> : null}
</div>
</div>
) : null}
{action}
{sublabel ? (
<p id={subId} className="cf-jc2__sub">
<Lock className="cf-jc2__inl" strokeWidth={2.5} aria-hidden="true" />
{sublabel}
</p>
) : null}
{showError ? (
<p id={errId} className="cf-jc2__err" role="alert">
<span className="cf-jc2__badge" aria-hidden="true">
<X strokeWidth={3} />
</span>
{errorMessage}
</p>
) : null}
</div>
</div>
</div>
</section>
)
}
export default JoinCommunity2
function isThenable(value: unknown): value is PromiseLike<unknown> {
return typeof value === "object" && value !== null && typeof (value as { then?: unknown }).then === "function"
}
function legacyCopy(text: string): boolean {
if (typeof document === "undefined") return false
const previous = document.activeElement as HTMLElement | null
const area = document.createElement("textarea")
area.value = text
area.setAttribute("readonly", "")
area.style.position = "fixed"
area.style.inset = "0"
area.style.opacity = "0"
area.style.pointerEvents = "none"
document.body.appendChild(area)
area.select()
let ok = false
try {
ok = document.execCommand("copy")
} catch {
ok = false
}
document.body.removeChild(area)
previous?.focus?.()
return ok
}
function selectText(node: HTMLElement | null) {
if (!node || typeof window === "undefined") return
const selection = window.getSelection()
if (!selection) return
const range = document.createRange()
range.selectNodeContents(node)
selection.removeAllRanges()
selection.addRange(range)
}
// The host fade is a mask: only its alpha counts, so it reads the opaque band token, never a fixed colour.
const CSS = `
.cf-join-community-2 {
--jc2-pt: clamp(56px, 8vw, 112px);
--jc2-pb: clamp(64px, 8.5vw, 120px);
--jc2-shadow: var(--shadow, oklch(0.22 0.03 256));
--jc2-marker: var(--marker, #fae37c);
--jc2-ink: var(--ink, oklch(0.21 0.034 263));
--jc2-card: var(--card, oklch(1 0 0));
--jc2-band: var(--band, oklch(0.27 0.067 256));
--jc2-band-ink: var(--band-ink, oklch(1 0 0));
--jc2-btn: var(--button-bg, var(--cta, oklch(0.58 0.21 29)));
--jc2-btn-2: var(--button-bg-2, var(--cta-2, oklch(0.51 0.21 29)));
--jc2-btn-ink: var(--button-ink, var(--cta-ink, oklch(1 0 0)));
--jc2-card-border: var(--card-border, oklch(from var(--jc2-ink) l c h / 0.12));
position: relative;
isolation: isolate;
overflow: hidden;
overflow: clip;
box-sizing: border-box;
width: 100%;
padding: var(--jc2-pt) clamp(16px, 5vw, 48px) var(--jc2-pb);
background: var(--jc2-band);
color: var(--jc2-band-ink);
font-family: var(--font-body);
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
}
.cf-join-community-2 *, .cf-join-community-2 *::before, .cf-join-community-2 *::after { box-sizing: border-box; }
.cf-join-community-2 .cf-jc2__wrap {
position: relative;
z-index: 1;
max-width: 1120px;
margin-inline: auto;
display: grid;
grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
gap: clamp(32px, 5vw, 72px);
align-items: start;
}
.cf-join-community-2 .cf-jc2__wrap[data-solo] { grid-template-columns: minmax(0, 46rem); justify-content: center; }
.cf-join-community-2 .cf-jc2__host {
position: sticky;
top: clamp(16px, 4vw, 40px);
z-index: 0;
margin: 0;
animation: cf-jc2-rise .45s cubic-bezier(.2,.7,.2,1) both;
}
.cf-join-community-2 .cf-jc2__host img {
display: block;
width: 100%;
height: auto;
aspect-ratio: 1 / 1;
object-fit: contain;
object-position: center bottom;
border-radius: 0;
filter: drop-shadow(0 2px 3px oklch(from var(--jc2-shadow) l c h / 0.45)) drop-shadow(0 16px 20px oklch(from var(--jc2-shadow) l c h / 0.4));
-webkit-mask-image: linear-gradient(to bottom, var(--jc2-band) 74%, transparent 99%);
mask-image: linear-gradient(to bottom, var(--jc2-band) 74%, transparent 99%);
}
.cf-join-community-2 .cf-jc2__main { min-width: 0; }
.cf-join-community-2 .cf-jc2__bubble {
position: relative;
z-index: 1;
background: var(--jc2-card);
color: var(--jc2-ink);
border: 1px solid var(--jc2-card-border);
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--jc2-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--jc2-shadow) l c h / 0.32)));
padding: clamp(20px, 3vw, 32px);
animation: cf-jc2-rise .45s cubic-bezier(.2,.7,.2,1) .07s both;
}
.cf-join-community-2 .cf-jc2__tail {
position: absolute;
left: -12px;
top: clamp(64px, 8vw, 104px);
width: 22px;
height: 22px;
background: var(--jc2-card);
border: 1px solid transparent;
border-left-color: var(--jc2-card-border);
border-bottom-color: var(--jc2-card-border);
border-bottom-left-radius: 4px;
transform: rotate(45deg);
pointer-events: none;
}
.cf-join-community-2 .cf-jc2__title {
margin: 0 0 16px;
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;
color: var(--jc2-ink);
text-wrap: balance;
}
.cf-join-community-2 .cf-jc2__lede { display: block; }
.cf-join-community-2 .cf-jc2__mark {
--jc2-swipe: color-mix(in oklch, var(--jc2-marker) 58%, transparent);
background-image: linear-gradient(to bottom, transparent 42%, var(--jc2-swipe) 42%, var(--jc2-swipe) 95%, transparent 95%);
padding: 0 0.12em;
margin-inline: -0.06em;
border-radius: 0.14em 0.32em 0.2em 0.36em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-join-community-2 .cf-jc2__lead {
margin: 0;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
.cf-join-community-2 .cf-jc2__who { margin: 16px 0 0; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; color: var(--muted, oklch(0.45 0.03 258)); text-wrap: pretty; }
.cf-join-community-2 .cf-jc2__who strong { color: var(--jc2-ink); font-weight: 800; }
.cf-join-community-2 .cf-jc2__intro {
margin-top: 24px;
padding: 16px clamp(16px, 2.4vw, 24px) 20px;
border-radius: 10px;
background: color-mix(in oklch, var(--jc2-ink) 4%, var(--jc2-card));
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
grid-template-areas: "head copy" "text text";
column-gap: 16px;
row-gap: 12px;
align-items: center;
}
.cf-join-community-2 .cf-jc2__intro-title {
grid-area: head;
margin: 0;
font-family: var(--font-display);
font-weight: 800;
font-size: 1.0625rem;
line-height: 1.3;
letter-spacing: -0.01em;
color: var(--jc2-ink);
text-wrap: balance;
}
.cf-join-community-2 .cf-jc2__ico { display: inline-block; width: 18px; height: 18px; vertical-align: -0.2em; margin-inline-end: 0.45em; color: var(--accent, oklch(0.5 0.17 257)); }
.cf-join-community-2 .cf-jc2__tpl {
grid-area: text;
margin: 0;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.55;
color: var(--jc2-ink);
white-space: pre-line;
overflow-wrap: anywhere;
text-wrap: pretty;
user-select: text;
}
.cf-join-community-2 .cf-jc2__copy {
grid-area: copy;
justify-self: end;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 44px;
min-width: 9.75rem;
padding: 0 18px;
border: 1px solid var(--button-2-border, transparent);
border-radius: var(--button-radius, var(--radius, 12px));
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)));
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: 0.9375rem;
line-height: 1.2;
white-space: nowrap;
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 1px oklch(from var(--jc2-shadow) l c h / 0.18), 0 1px 3px oklch(from var(--jc2-shadow) l c h / 0.14)));
cursor: pointer;
transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.cf-join-community-2 .cf-jc2__copy-ico { width: 18px; height: 18px; flex: 0 0 auto; }
.cf-join-community-2 .cf-jc2__copy[data-copied="done"] .cf-jc2__copy-ico { color: var(--success, oklch(0.5 0.14 150)); animation: cf-jc2-pop .3s ease both; }
.cf-join-community-2 .cf-jc2__copy:hover,
.cf-join-community-2[data-state="hover"] .cf-jc2__copy { background: oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))) calc(l - 0.04) c h); }
.cf-join-community-2 .cf-jc2__copy:active,
.cf-join-community-2[data-state="active"] .cf-jc2__copy {
transform: translateY(1px);
background: oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))) calc(l - 0.07) c h);
box-shadow: inset 0 1px 2px oklch(from var(--jc2-shadow) l c h / 0.25);
}
.cf-join-community-2 .cf-jc2__copy:focus-visible { outline: 3px solid oklch(from var(--field-focus, var(--accent, oklch(0.5 0.17 257))) l c h / 0.6); outline-offset: 2px; }
.cf-join-community-2 .cf-jc2__join { margin-top: clamp(24px, 3vw, 32px); animation: cf-jc2-rise .45s cubic-bezier(.2,.7,.2,1) .14s both; }
.cf-join-community-2 .cf-jc2__group { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.cf-join-community-2 .cf-jc2__group-copy { min-width: 0; }
.cf-join-community-2 .cf-jc2__disc {
flex: 0 0 auto;
display: grid;
place-items: center;
width: 40px;
height: 40px;
border-radius: 999px;
background: oklch(from var(--jc2-band-ink) l c h / 0.12);
color: var(--jc2-band-ink);
}
.cf-join-community-2 .cf-jc2__disc svg { width: 20px; height: 20px; }
.cf-join-community-2 .cf-jc2__gname {
margin: 0;
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: -0.01em;
color: var(--jc2-band-ink);
text-wrap: balance;
overflow-wrap: anywhere;
}
.cf-join-community-2 .cf-jc2__gkind { margin: 4px 0 0; font-size: 0.9375rem; line-height: 1.4; font-weight: 500; color: color-mix(in oklch, var(--jc2-band-ink) 84%, var(--jc2-band)); text-wrap: pretty; }
.cf-join-community-2 .cf-jc2__btn {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
gap: 10px;
min-height: 68px;
padding: 12px 28px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(oklch(from var(--jc2-btn) calc(l + 0.04) c h), oklch(from var(--jc2-btn-2) calc(l - 0.02) c h));
color: var(--jc2-btn-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;
text-align: center;
text-wrap: balance;
text-decoration: none;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--jc2-btn) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--jc2-btn) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--jc2-shadow) l c h / 0.45), 0 8px 16px -6px oklch(from var(--jc2-shadow) l c h / 0.55));
cursor: pointer;
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-join-community-2 .cf-jc2__btn:hover:not(:disabled),
.cf-join-community-2[data-state="hover"] .cf-jc2__btn:not(:disabled) {
background: linear-gradient(oklch(from var(--jc2-btn) calc(l - 0.01) c h), oklch(from var(--jc2-btn-2) calc(l - 0.07) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--jc2-btn) calc(l + 0.1) c h / 0.7), inset 0 -3px 0 oklch(from var(--jc2-btn) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--jc2-shadow) l c h / 0.5), 0 10px 18px -6px oklch(from var(--jc2-shadow) l c h / 0.65));
}
.cf-join-community-2 .cf-jc2__btn:active:not(:disabled),
.cf-join-community-2[data-state="active"] .cf-jc2__btn:not(:disabled) {
transform: translateY(1px);
background: linear-gradient(oklch(from var(--jc2-btn) calc(l - 0.04) c h), oklch(from var(--jc2-btn-2) calc(l - 0.08) c h));
box-shadow: inset 0 2px 4px oklch(from var(--jc2-shadow) l c h / 0.35), inset 0 -2px 0 oklch(from var(--jc2-btn) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--jc2-shadow) l c h / 0.4);
}
.cf-join-community-2 .cf-jc2__btn:focus-visible { outline: 3px solid var(--jc2-band-ink); outline-offset: 3px; }
.cf-join-community-2 .cf-jc2__btn[aria-busy="true"] { cursor: progress; }
.cf-join-community-2 .cf-jc2__btn:disabled {
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(--jc2-shadow) l c h / 0.18)));
text-shadow: none;
cursor: not-allowed;
}
.cf-join-community-2 .cf-jc2__spin { width: 20px; height: 20px; flex: 0 0 auto; animation: cf-jc2-spin .8s linear infinite; }
.cf-join-community-2 .cf-jc2__sub {
margin: 12px 0 0;
text-align: center;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
color: color-mix(in oklch, var(--jc2-band-ink) 86%, var(--jc2-band));
text-wrap: balance;
}
.cf-join-community-2 .cf-jc2__inl { display: inline-block; width: 16px; height: 16px; vertical-align: -0.15em; margin-inline-end: 0.4em; }
.cf-join-community-2 .cf-jc2__err {
margin: 12px 0 0;
text-align: center;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 700;
color: var(--jc2-band-ink);
text-wrap: pretty;
}
.cf-join-community-2 .cf-jc2__badge {
display: inline-grid;
place-items: center;
width: 20px;
height: 20px;
margin-inline-end: 0.45em;
vertical-align: -0.3em;
border-radius: 999px;
background: var(--danger, oklch(0.5 0.17 27));
color: oklch(from var(--danger, oklch(0.5 0.17 27)) 1 0 h);
}
.cf-join-community-2 .cf-jc2__badge svg { width: 12px; height: 12px; }
.cf-join-community-2 .cf-jc2__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes cf-jc2-rise { from { opacity: .82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cf-jc2-pop { from { transform: scale(.9); } to { transform: scale(1); } }
@keyframes cf-jc2-spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
.cf-join-community-2 .cf-jc2__wrap, .cf-join-community-2 .cf-jc2__wrap[data-solo] { grid-template-columns: minmax(0, 1fr); gap: 0; }
.cf-join-community-2 .cf-jc2__host { position: relative; top: auto; width: clamp(196px, 58vw, 300px); margin: 0 auto -48px; }
.cf-join-community-2 .cf-jc2__tail {
left: 50%;
top: -12px;
margin-left: -11px;
border-color: transparent;
border-top-color: var(--jc2-card-border);
border-left-color: var(--jc2-card-border);
border-radius: 4px 0 0 0;
}
}
@media (max-width: 560px) {
.cf-join-community-2 .cf-jc2__intro { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "text" "copy"; }
.cf-join-community-2 .cf-jc2__copy { justify-self: stretch; width: 100%; }
.cf-join-community-2 .cf-jc2__btn { min-height: 64px; padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) {
.cf-join-community-2 .cf-jc2__host,
.cf-join-community-2 .cf-jc2__bubble,
.cf-join-community-2 .cf-jc2__join,
.cf-join-community-2 .cf-jc2__copy-ico,
.cf-join-community-2 .cf-jc2__spin { animation: none !important; }
.cf-join-community-2 .cf-jc2__btn, .cf-join-community-2 .cf-jc2__copy { transition: none; }
.cf-join-community-2 .cf-jc2__btn:active:not(:disabled), .cf-join-community-2 .cf-jc2__copy:active { transform: none; }
}
`
pieces/checkout/join-community-2/specimen.tsx 33 lines
import __studioImagea5d7cae8 from "../assets/bce2b912bfff9b07.webp";
import * as React from "react"
import { JoinCommunity2 } from "../join-community-2"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"]
type SpecimenState = "default" | "hover" | "active" | "disabled" | "error"
export default function JoinCommunity2Specimen({ state = "default" }: { state?: SpecimenState }) {
return (
<JoinCommunity2
state={state}
hostImage={slot(
"presenter-cutout",
__studioImagea5d7cae8,
)}
hostImageAlt="Nora Pell, lead teacher at Inkwell Studio, holding her sketchbook"
hostName="Nora Pell"
hostRole="Lead teacher, Inkwell Studio"
headline="Come say hi."
headlineMark="I read every intro."
message="Your challenge starts with one small post. Join the group, paste the intro below and tell us what you want to draw in the next 21 days. I'll reply to you myself."
introTitle="Your first post, ready to paste"
introTemplate="Hi everyone! I just started the 21-Day Sketchbook Challenge. My goal is to fill one sketchbook page every day, even the messy ones. I'm most excited to draw people at my local coffee shop. Who else is starting this week?"
groupName="Inkwell Sketchbook Club"
groupKind="Private group for the 21-Day Sketchbook Challenge"
label="Join the Sketchbook Club"
sublabel="Free with your challenge · Opens the group"
onAction={() => undefined}
/>
)
}
| Name | Type | Details |
|---|---|---|
hostImage OptionalJoinCommunity2 |
string |
|
hostImageAlt OptionalJoinCommunity2 |
string |
|
hostName OptionalJoinCommunity2 |
string |
|
hostRole OptionalJoinCommunity2 |
string |
|
headline OptionalJoinCommunity2 |
string |
|
headlineMark OptionalJoinCommunity2 |
string |
|
message OptionalJoinCommunity2 |
string |
|
introTitle OptionalJoinCommunity2 |
string |
|
introTemplate OptionalJoinCommunity2 |
string |
|
copyLabel OptionalJoinCommunity2 |
string |
|
copiedLabel OptionalJoinCommunity2 |
string |
|
copyFailLabel OptionalJoinCommunity2 |
string |
|
copiedAnnouncement OptionalJoinCommunity2 |
string |
|
copyFailAnnouncement OptionalJoinCommunity2 |
string |
|
groupName OptionalJoinCommunity2 |
string |
|
groupKind OptionalJoinCommunity2 |
string |
|
label OptionalJoinCommunity2 |
string |
|
sublabel OptionalJoinCommunity2 |
string |
|
loadingLabel OptionalJoinCommunity2 |
string |
|
errorMessage OptionalJoinCommunity2 |
string |
|
newTabLabel OptionalJoinCommunity2 |
string |
|
href OptionalJoinCommunity2 |
string |
|
target OptionalJoinCommunity2 |
"_self" | "_blank" |
|
onAction OptionalJoinCommunity2 |
() => void | PromiseLike<unknown> |
|
onCopy OptionalJoinCommunity2 |
(text: string) => void |
|
disabled OptionalJoinCommunity2 |
boolean |
|
state OptionalJoinCommunity2 |
JoinCommunity2State |
|
className OptionalJoinCommunity2 |
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.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter-cutout- The presenter on a transparent background.
-
bce2b912bfff9b07.webp
image/webp · 239 KB