Join Community 4
The room board: a bento invite where every community room is a tile and one dominant tile carries the join button, so belonging reads as the obvious next step.
Use it in a prompt
Use checkout/join-community-4 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-4.tsx. - Import it and pass your copy and images (Props tab):
import { JoinCommunity4 } from "@/components/funneldna/checkout/join-community-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/join-community-4/component.tsx 613 lines
// layout: bento-grid
// The room board: a bento invite where every community room is a tile and one dominant tile carries the join button, so belonging reads as the obvious next step.
import * as React from "react"
import { AlertCircle, Loader2, Lock } from "lucide-react"
import { FX_HOST, Pattern, Spot } from "../fx/fx"
import book from "../fx/spots/book"
import calendar from "../fx/spots/calendar"
import community from "../fx/spots/community"
import star from "../fx/spots/star"
export type JoinCommunity4Room = {
id: string
/** Channel or room name as members see it, e.g. "#wins". */
channel?: string
/** Selling title for the room. */
title: string
/** One line on why the room helps, in the members' voice. */
line: string
/** fx Spot illustration (an imported ../fx/spots/<name> asset). */
spot?: string
}
export type JoinCommunity4Call = {
title: string
line?: string
channel?: string
/** 0 = Sunday … 6 = Saturday, in the host's zone. */
weekday: number
/** 24-hour wall-clock time in the host's zone, e.g. "19:00". */
time: string
/** IANA zone the call is scheduled in, e.g. "America/Chicago". */
timeZone: string
/** Name for the host's zone on the toggle; defaults to the city in timeZone. */
hostCity?: string
spot?: string
}
export type JoinCommunity4Copy = {
/** Toggle label for the visitor's own zone. */
yourTime?: string
/** Toggle label for the host's zone; {city} is replaced. */
hostTime?: string
/** Line above the time; {weekday} is replaced. */
every?: string
/** Line under the time; {zone} and {city} are replaced. */
zoneLine?: string
/** Accessible name of the zone toggle. */
toggleGroup?: string
/** Shown instead of the toggle when the visitor shares the host's zone. */
sameZone?: string
/** Screen-reader note on each room tile. */
enterRoom?: string
newTab?: string
loading?: string
error?: string
psLabel?: string
}
export type JoinCommunity4Props = {
headline?: string
lead?: string
/** The question the join button answers. */
question?: string
label?: string
/** One reassurance line under the button. */
sublabel?: string
/** P.S. line under the action; empty hides it. */
ps?: string
/** Scene photo on the join tile (slot: scene). */
photoImage?: string
photoAlt?: string
rooms?: JoinCommunity4Room[]
/** The weekly live call; leave empty when the community has none. */
liveCall?: JoinCommunity4Call | null
copy?: JoinCommunity4Copy
/** Locale for the call time; defaults to the visitor's. */
locale?: string
/** Invite link destination (join button and room tiles). */
href?: string
target?: "_self" | "_blank"
/** Join handler; gets the room id when a room tile is used. Return a promise to show loading, reject it to show the error line. */
onAction?: (roomId?: string) => void | PromiseLike<unknown>
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
const DEFAULT_COPY: Required<JoinCommunity4Copy> = {
yourTime: "Your time",
hostTime: "{city} time",
every: "Every {weekday}",
zoneLine: "{zone} · {city}",
toggleGroup: "Show the call time in",
sameZone: "Same time zone as the host",
enterRoom: "Join the community to enter this room",
newTab: "(opens in a new tab)",
loading: "Opening your invite…",
error: "We couldn't open your invite. Please try again.",
psLabel: "P.S.",
}
const DEFAULT_ROOMS: JoinCommunity4Room[] = [
{ id: "wins", channel: "#wins", title: "Post your first win", line: "Small wins count here. Share yours and get a cheer back.", spot: star },
{ id: "questions", channel: "#questions", title: "Ask before you get stuck", line: "Drop your question in and get a second pair of eyes.", spot: community },
{ id: "resources", channel: "#resources", title: "Grab the tools in one place", line: "Templates and guides, pinned and easy to find.", spot: book },
]
export function JoinCommunity4(props: JoinCommunity4Props) {
const {
headline = "People like you post their wins here.",
lead = "Your seat in the community is open. Share what you're working on, ask your questions and grab the resources, all in one place.",
question = "Ready to step inside?",
label = "I'm in, open the community",
sublabel = "Opens your invite in one click",
ps = "The easiest way to feel at home: post one small win on your first day.",
photoImage,
photoAlt = "",
rooms = DEFAULT_ROOMS,
liveCall = null,
copy: copyProp,
locale,
href,
target = "_self",
onAction,
disabled = false,
state = "default",
className,
} = props
const copy = { ...DEFAULT_COPY, ...copyProp }
const uid = React.useId().replace(/:/g, "")
const titleId = `cfjc4-${uid}-title`
const subId = `cfjc4-${uid}-sub`
const errId = `cfjc4-${uid}-err`
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
const isDisabled = disabled || state === "disabled"
const showError = !busy && (failed || state === "error")
const run = (event: React.MouseEvent<HTMLElement>, roomId?: string) => {
if (isDisabled || busy) {
event.preventDefault()
return
}
setFailed(false)
if (!onAction) return
let result: unknown
try {
result = onAction(roomId)
} 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 call = liveCall ?? null
const host = React.useMemo(
() => (call ? hostView(call, locale) : null),
// eslint-disable-next-line react-hooks/exhaustive-deps
[call?.weekday, call?.time, call?.timeZone, call?.hostCity, locale],
)
const [local, setLocal] = React.useState<CallView | null>(null)
React.useEffect(() => {
if (!call) {
setLocal(null)
return
}
try {
const ms = nextCallInstant(call.weekday, call.time, call.timeZone)
if (ms === null) {
setLocal(null)
return
}
const visitorZone = Intl.DateTimeFormat().resolvedOptions().timeZone
setLocal({ ...formatCall(ms, undefined, locale), city: cityOf(visitorZone) })
} catch {
setLocal(null)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [call?.weekday, call?.time, call?.timeZone, locale])
const [view, setView] = React.useState<"local" | "host">("local")
const same = !!local && !!host && local.weekday === host.weekday && local.time === host.time && local.zone === host.zone
const canToggle = !!local && !!host && !same
const shown = (view === "local" || same) && local ? local : host
const describedBy = [sublabel ? subId : "", showError ? errId : ""].filter(Boolean).join(" ") || undefined
const interactive = !isDisabled
const wideLast = rooms.length % 2 === 1
const inner = (
<>
{busy ? <Loader2 className="cf-jc4__spin" size={20} strokeWidth={2.5} aria-hidden="true" /> : null}
<span>{busy ? copy.loading : label}</span>
{href && target === "_blank" && !busy ? <span className="cf-jc4__sr">{copy.newTab}</span> : null}
</>
)
const action =
href && !isDisabled ? (
<a
className="cf-jc4__btn"
href={href}
target={target}
rel={target === "_blank" ? "noopener noreferrer" : undefined}
onClick={(e) => run(e)}
aria-busy={busy || undefined}
aria-describedby={describedBy}
>
{inner}
</a>
) : (
<button
type="button"
className="cf-jc4__btn"
onClick={(e) => run(e)}
disabled={isDisabled}
aria-busy={busy || undefined}
aria-describedby={describedBy}
>
{inner}
</button>
)
const roomOffset = call ? 2 : 1
return (
<section
className={["cf-join-community-4", className].filter(Boolean).join(" ")}
data-state={state}
aria-labelledby={titleId}
style={FX_HOST}
>
<Pattern name="grid" fade="edges" />
<style>{CSS}</style>
<div className="cf-jc4__wrap">
<div className="cf-jc4__board">
<div className="cf-jc4__join cf-jc4__cell">
{photoImage ? (
<div className="cf-jc4__photo">
<img src={photoImage} alt={photoAlt} loading="lazy" decoding="async" />
</div>
) : null}
<h2 id={titleId} className="cf-jc4__h2">
{headline}
</h2>
{lead ? <p className="cf-jc4__lead">{lead}</p> : null}
<div className="cf-jc4__ask">
{question ? <p className="cf-jc4__q">{question}</p> : null}
{action}
{sublabel ? (
<p id={subId} className="cf-jc4__sub">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{sublabel}
</p>
) : null}
{showError ? (
<p id={errId} role="alert" className="cf-jc4__error">
<AlertCircle size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.error}
</p>
) : null}
</div>
{ps ? (
<p className="cf-jc4__ps">
<strong>{copy.psLabel}</strong> {ps}
</p>
) : null}
</div>
<div className="cf-jc4__rooms">
{call && shown ? (
<div className="cf-jc4__card cf-jc4__call cf-jc4__cell" style={delay(1)}>
<div className="cf-jc4__callhead">
<span className="cf-jc4__spot" aria-hidden="true">
<Spot src={call.spot ?? calendar} size={56} />
</span>
<div className="cf-jc4__tbody">
{call.channel ? <span className="cf-jc4__chip">{call.channel}</span> : null}
<h3 className="cf-jc4__h3">{call.title}</h3>
{call.line ? <p className="cf-jc4__line">{call.line}</p> : null}
</div>
</div>
<div className="cf-jc4__well">
<div className="cf-jc4__when" aria-live="polite">
{shown.weekday ? <p className="cf-jc4__every">{fill(copy.every, { weekday: shown.weekday })}</p> : null}
<p className="cf-jc4__time" key={`${view}-${shown.time}-${shown.zone}`}>
{shown.time}
</p>
<p className="cf-jc4__zone">
{shown.zone ? fill(copy.zoneLine, { zone: shown.zone, city: shown.city }) : shown.city}
</p>
</div>
{canToggle && host ? (
<div className="cf-jc4__toggle" role="group" aria-label={copy.toggleGroup}>
<button
type="button"
className="cf-jc4__tbtn"
aria-pressed={view === "local"}
onClick={() => setView("local")}
>
{copy.yourTime}
</button>
<button
type="button"
className="cf-jc4__tbtn"
aria-pressed={view === "host"}
onClick={() => setView("host")}
>
{fill(copy.hostTime, { city: host.city })}
</button>
</div>
) : same ? (
<p className="cf-jc4__same">{copy.sameZone}</p>
) : null}
</div>
</div>
) : null}
{rooms.map((room, i) => (
<RoomTile
key={room.id}
room={room}
wide={wideLast && i === rooms.length - 1}
interactive={interactive}
href={href}
target={target}
enterLabel={copy.enterRoom}
style={delay(i + roomOffset)}
onPick={(e) => run(e, room.id)}
/>
))}
</div>
</div>
</div>
</section>
)
}
export default JoinCommunity4
type CallView = { weekday: string; time: string; zone: string; city: string }
function RoomTile({
room,
wide,
interactive,
href,
target,
enterLabel,
style,
onPick,
}: {
room: JoinCommunity4Room
wide: boolean
interactive: boolean
href?: string
target: "_self" | "_blank"
enterLabel: string
style: React.CSSProperties
onPick: (event: React.MouseEvent<HTMLElement>) => void
}) {
const title = (
<>
{room.title}
<span className="cf-jc4__sr"> {enterLabel}</span>
</>
)
return (
<div className="cf-jc4__card cf-jc4__tile cf-jc4__cell" data-wide={wide} data-interactive={interactive} style={style}>
{room.spot ? (
<span className="cf-jc4__spot" aria-hidden="true">
<Spot src={room.spot} size={56} />
</span>
) : null}
<div className="cf-jc4__tbody">
{room.channel ? <span className="cf-jc4__chip">{room.channel}</span> : null}
<h3 className="cf-jc4__h3">
{!interactive ? (
room.title
) : href ? (
<a
className="cf-jc4__hit"
href={href}
target={target}
rel={target === "_blank" ? "noopener noreferrer" : undefined}
onClick={onPick}
>
{title}
</a>
) : (
<button type="button" className="cf-jc4__hit" onClick={onPick}>
{title}
</button>
)}
</h3>
<p className="cf-jc4__line">{room.line}</p>
</div>
</div>
)
}
function delay(index: number): React.CSSProperties {
return { "--jc4-d": `${Math.min(index * 0.07, 0.28).toFixed(2)}s` } as React.CSSProperties
}
function isThenable(value: unknown): value is PromiseLike<unknown> {
return !!value && typeof (value as PromiseLike<unknown>).then === "function"
}
function fill(template: string, vars: Record<string, string>) {
return Object.entries(vars).reduce((text, [key, value]) => text.split("{" + key + "}").join(value), template)
}
function cityOf(zone?: string) {
if (!zone) return ""
return (zone.split("/").pop() || zone).split("_").join(" ")
}
function partsIn(ms: number, timeZone: string) {
const format = new Intl.DateTimeFormat("en-US", {
timeZone,
hourCycle: "h23",
year: "numeric",
month: "numeric",
day: "numeric",
hour: "numeric",
minute: "numeric",
second: "numeric",
})
const out: Record<string, number> = {}
for (const part of format.formatToParts(new Date(ms))) {
if (part.type !== "literal") out[part.type] = Number(part.value)
}
return out
}
function offsetMinutes(ms: number, timeZone: string) {
const p = partsIn(ms, timeZone)
const asUtc = Date.UTC(p.year, p.month - 1, p.day, p.hour === 24 ? 0 : p.hour, p.minute, p.second)
return Math.round((asUtc - ms) / 60000)
}
/** The next occurrence of the weekly call as an instant, from the host's weekday and wall-clock time. */
function nextCallInstant(weekday: number, time: string, timeZone: string): number | null {
const [hs, ms] = time.trim().split(":")
const h = Number(hs)
const mi = Number(ms)
if (!hs || !ms || !Number.isInteger(h) || !Number.isInteger(mi) || h < 0 || h > 23 || mi < 0 || mi > 59) return null
const now = Date.now()
const today = partsIn(now, timeZone)
const dow = new Date(Date.UTC(today.year, today.month - 1, today.day)).getUTCDay()
const delta = (((weekday - dow) % 7) + 7) % 7
const guess = Date.UTC(today.year, today.month - 1, today.day + delta, h, mi)
const first = offsetMinutes(guess, timeZone)
let instant = guess - first * 60000
const second = offsetMinutes(instant, timeZone)
if (second !== first) instant = guess - second * 60000
return instant
}
function formatCall(ms: number, timeZone: string | undefined, locale: string | undefined) {
const parts = new Intl.DateTimeFormat(locale, {
weekday: "long",
hour: "numeric",
minute: "2-digit",
timeZoneName: "short",
timeZone,
}).formatToParts(new Date(ms))
const clock = parts
.map((part, i) => (part.type === "hour" || part.type === "minute" || part.type === "dayPeriod" ? i : -1))
.filter((i) => i >= 0)
const time = clock.length
? parts
.slice(clock[0], clock[clock.length - 1] + 1)
.map((part) => part.value)
.join("")
.trim()
: ""
return {
weekday: parts.find((part) => part.type === "weekday")?.value ?? "",
time,
zone: parts.find((part) => part.type === "timeZoneName")?.value ?? "",
}
}
function weekdayName(day: number, locale?: string) {
try {
return new Intl.DateTimeFormat(locale, { weekday: "long", timeZone: "UTC" }).format(
new Date(Date.UTC(2024, 0, 7 + (((day % 7) + 7) % 7))),
)
} catch {
return ""
}
}
function hostView(call: JoinCommunity4Call, locale?: string): CallView {
const city = call.hostCity || cityOf(call.timeZone)
try {
const ms = nextCallInstant(call.weekday, call.time, call.timeZone)
if (ms !== null) return { ...formatCall(ms, call.timeZone, locale), city }
} catch {
// An unknown zone falls back to the supplied wall-clock time.
}
return { weekday: weekdayName(call.weekday, locale), time: call.time, zone: "", city }
}
const CSS = `
.cf-join-community-4{position:relative;isolation:isolate;overflow:hidden;background:var(--surface,#ffffff);color:var(--ink,#1a2233);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-join-community-4 *,.cf-join-community-4 *::before,.cf-join-community-4 *::after{box-sizing:border-box}
.cf-join-community-4 .cf-jc4__wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-join-community-4 .cf-jc4__board{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:16px;align-items:stretch}
.cf-join-community-4 .cf-jc4__rooms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
.cf-join-community-4 .cf-jc4__join{position:relative;display:flex;flex-direction:column;min-width:0;padding:clamp(20px,3vw,32px);border-radius:var(--card-radius,var(--radius,14px));background:var(--band,#1c2a4a);color:var(--band-ink,#ffffff);border:1px solid oklch(from var(--band-ink,#ffffff) l c h / .1);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32))}
.cf-join-community-4 .cf-jc4__photo{flex:1 1 220px;min-height:220px;margin:0 0 24px;border-radius:12px;overflow:hidden;background:oklch(from var(--band-ink,#ffffff) l c h / .08)}
.cf-join-community-4 .cf-jc4__photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 45%}
.cf-join-community-4 .cf-jc4__h2{margin:0 0 16px;font-family:var(--font-display,inherit);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance;color:inherit}
.cf-join-community-4 .cf-jc4__lead{margin:0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-join-community-4 .cf-jc4__ask{margin-top:auto;padding-top:32px}
.cf-join-community-4 .cf-jc4__q{margin:0 0 16px;font-family:var(--font-display,inherit);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:balance}
.cf-join-community-4 .cf-jc4__btn{appearance:none;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:72px;padding:0 28px;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display,inherit));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;color:var(--button-ink,var(--cta-ink,#ffffff));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2,#b52d24)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .4),0 8px 16px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .5))}
.cf-join-community-4 .cf-jc4__btn:not(:disabled):hover,.cf-join-community-4[data-state='hover'] .cf-jc4__btn:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2,#b52d24)) calc(l - .07) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l - .2) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .45),0 12px 20px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .55)}
.cf-join-community-4 .cf-jc4__btn:not(:disabled):active,.cf-join-community-4[data-state='active'] .cf-jc4__btn:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l - .04) c h),oklch(from var(--button-bg-2,var(--cta-2,#b52d24)) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l - .24) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .35)}
.cf-join-community-4 .cf-jc4__btn:focus-visible{outline:3px solid var(--band-ink,#ffffff);outline-offset:3px}
.cf-join-community-4 .cf-jc4__btn:disabled{cursor:not-allowed;background:var(--button-2-bg,var(--secondary,#e8ebf1));color:var(--button-2-ink,var(--secondary-ink,#1a2233));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 1px oklch(0.22 0.03 260 / .18),0 1px 3px oklch(0.22 0.03 260 / .14)))}
.cf-join-community-4 .cf-jc4__btn[aria-busy='true']{cursor:progress}
.cf-join-community-4 .cf-jc4__sub{margin:12px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-join-community-4 .cf-jc4__sub svg,.cf-join-community-4 .cf-jc4__error svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-join-community-4 .cf-jc4__error{margin:12px 0 0;padding:10px 14px;border-radius:10px;background:var(--danger-soft,#fbe9e7);color:var(--danger,#b42318);font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-join-community-4 .cf-jc4__ps{margin:24px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty}
.cf-join-community-4 .cf-jc4__ps strong{font-weight:800}
.cf-join-community-4 .cf-jc4__card{position:relative;min-width:0;padding:clamp(20px,3vw,32px);border-radius:var(--card-radius,var(--radius,14px));background:var(--card,#ffffff);color:var(--ink,#1a2233);border:1px solid var(--card-border,oklch(from var(--ink,#1a2233) l c h / .12));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 260 / .22),0 4px 10px -2px oklch(0.22 0.03 260 / .2)))}
.cf-join-community-4 .cf-jc4__tile{display:flex;flex-direction:column;align-items:flex-start;gap:16px}
.cf-join-community-4 .cf-jc4__tile[data-wide='true']{grid-column:span 2;flex-direction:row;gap:20px}
.cf-join-community-4 .cf-jc4__tile[data-interactive='true']:hover{transform:translateY(-3px);border-color:color-mix(in oklch,var(--accent,#2f5fd0) 45%,var(--card,#ffffff));box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32))}
.cf-join-community-4 .cf-jc4__tile[data-interactive='true']:active{transform:translateY(0);box-shadow:var(--shadow-sm,0 1px 1px oklch(0.22 0.03 260 / .18),0 1px 3px oklch(0.22 0.03 260 / .14))}
.cf-join-community-4 .cf-jc4__spot{flex:none;display:block;line-height:0}
.cf-join-community-4 .cf-jc4__tbody{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.cf-join-community-4 .cf-jc4__chip{display:inline-flex;align-items:center;min-height:28px;max-width:100%;margin-bottom:4px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink,#1a2233) 6%,var(--card,#ffffff));color:var(--ink,#1a2233);font-size:.875rem;line-height:1.2;font-weight:800;overflow-wrap:anywhere}
.cf-join-community-4 .cf-jc4__h3{margin:0;font-family:var(--font-display,inherit);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink,#1a2233)}
.cf-join-community-4 .cf-jc4__line{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted,#4a5568);text-wrap:pretty}
.cf-join-community-4 .cf-jc4__hit{appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-align:inherit;text-decoration:none;cursor:pointer}
.cf-join-community-4 .cf-jc4__hit::after{content:'';position:absolute;inset:-1px;z-index:2;border-radius:var(--card-radius,var(--radius,14px))}
.cf-join-community-4 .cf-jc4__hit:focus-visible{outline:none}
.cf-join-community-4 .cf-jc4__hit:focus-visible::after{outline:3px solid oklch(from var(--field-focus,var(--accent,#2f5fd0)) l c h / .6);outline-offset:3px}
.cf-join-community-4 .cf-jc4__call{grid-column:span 2;display:flex;flex-direction:column;gap:20px}
.cf-join-community-4 .cf-jc4__callhead{display:flex;align-items:flex-start;gap:20px}
.cf-join-community-4 .cf-jc4__well{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px 24px;padding:16px 20px;border-radius:10px;background:color-mix(in oklch,var(--ink,#1a2233) 4%,var(--card,#ffffff))}
.cf-join-community-4 .cf-jc4__when{min-width:0}
.cf-join-community-4 .cf-jc4__every{margin:0 0 12px;font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--muted,#4a5568)}
.cf-join-community-4 .cf-jc4__time{margin:0;transform-origin:left bottom;font-family:var(--font-display,inherit);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;font-weight:var(--display-weight,800);letter-spacing:-0.03em;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink,#1a2233)}
.cf-join-community-4 .cf-jc4__zone{margin:20px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#4a5568)}
.cf-join-community-4 .cf-jc4__same{margin:0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#4a5568)}
.cf-join-community-4 .cf-jc4__toggle{display:inline-flex;gap:4px;padding:4px;border-radius:999px;background:color-mix(in oklch,var(--ink,#1a2233) 8%,var(--card,#ffffff))}
.cf-join-community-4 .cf-jc4__tbtn{appearance:none;border:0;cursor:pointer;min-height:44px;padding:0 16px;border-radius:999px;background:transparent;color:var(--muted,#4a5568);font-family:var(--font-body,inherit);font-size:.9375rem;line-height:1.2;font-weight:700;white-space:nowrap}
.cf-join-community-4 .cf-jc4__tbtn:not([aria-pressed='true']):hover{color:var(--ink,#1a2233);background:color-mix(in oklch,var(--ink,#1a2233) 6%,transparent)}
.cf-join-community-4 .cf-jc4__tbtn[aria-pressed='true']{background:var(--accent-fill,var(--accent,#2f5fd0));color:var(--accent-fill-ink,var(--card,#ffffff));box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--accent,#2f5fd0)) calc(l + .12) c h / .55),var(--shadow-sm,0 1px 1px oklch(0.22 0.03 260 / .18),0 1px 3px oklch(0.22 0.03 260 / .14))}
.cf-join-community-4 .cf-jc4__tbtn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2f5fd0)) l c h / .6);outline-offset:2px}
.cf-join-community-4 .cf-jc4__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:960px){
.cf-join-community-4 .cf-jc4__board{grid-template-columns:minmax(0,1fr)}
.cf-join-community-4 .cf-jc4__photo{flex:none;min-height:0;aspect-ratio:16/9}
}
@media (max-width:560px){
.cf-join-community-4 .cf-jc4__board,.cf-join-community-4 .cf-jc4__rooms{gap:12px}
.cf-join-community-4 .cf-jc4__rooms{grid-template-columns:minmax(0,1fr)}
.cf-join-community-4 .cf-jc4__call,.cf-join-community-4 .cf-jc4__tile[data-wide='true']{grid-column:auto}
.cf-join-community-4 .cf-jc4__join{padding:20px}
.cf-join-community-4 .cf-jc4__card{padding:20px}
.cf-join-community-4 .cf-jc4__photo{aspect-ratio:3/2;margin-bottom:20px}
.cf-join-community-4 .cf-jc4__tile,.cf-join-community-4 .cf-jc4__tile[data-wide='true']{flex-direction:row;gap:16px}
.cf-join-community-4 .cf-jc4__callhead{gap:16px}
.cf-join-community-4 .cf-jc4__btn{padding:0 16px}
.cf-join-community-4 .cf-jc4__well{padding:16px;align-items:flex-start}
}
@media (prefers-reduced-motion:no-preference){
.cf-join-community-4 .cf-jc4__cell{animation:cf-jc4-rise .45s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:var(--jc4-d,0s)}
.cf-join-community-4 .cf-jc4__time{animation:cf-jc4-pop .3s cubic-bezier(.2,.7,.2,1) backwards}
.cf-join-community-4 .cf-jc4__spin{animation:cf-jc4-spin .8s linear infinite}
.cf-join-community-4 .cf-jc4__btn,.cf-join-community-4 .cf-jc4__card,.cf-join-community-4 .cf-jc4__tbtn{transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease,color .16s ease}
}
@keyframes cf-jc4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-jc4-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@keyframes cf-jc4-spin{to{transform:rotate(360deg)}}
`
pieces/checkout/join-community-4/specimen.tsx 64 lines
import __studioImage50706c78 from "../assets/44e6380340838dc5.webp";
// Specimen: Seedline Collective, a fictional home-garden club, inviting new members onto its room board.
import * as React from "react"
import { JoinCommunity4, type JoinCommunity4Props } from "../join-community-4"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import book from "../../fx/spots/book"
import calendar from "../../fx/spots/calendar"
import community from "../../fx/spots/community"
import star from "../../fx/spots/star"
export const states = ["default", "hover", "active", "disabled", "error"]
export default function JoinCommunity4Specimen({ state = "default" }: { state?: JoinCommunity4Props["state"] }) {
return (
<JoinCommunity4
state={state}
headline="Gardeners like you swap every win here."
lead="Your seat in Seedline Collective is open. Post what’s sprouting, ask about the yellow leaves and plan next season with growers who get it."
question="Ready to meet your garden club?"
label="I’m in, open the rooms"
sublabel="Included with your membership · Opens the community"
ps={`Every Seedline membership comes with a ${defaults.sample.guarantee}, so your first season inside is risk free.`}
photoImage={slot(
"scene",
__studioImage50706c78,
)}
photoAlt="Two pairs of hands planting young seedlings into a backyard raised bed"
rooms={[
{
id: "wins",
channel: "#first-harvests",
title: "Post your first harvest",
line: "Every ripe tomato gets a cheer here, lopsided ones too.",
spot: star,
},
{
id: "questions",
channel: "#ask-the-patch",
title: "Ask before you pull it out",
line: "Snap the yellow leaves and get a second pair of eyes.",
spot: community,
},
{
id: "resources",
channel: "#seed-shelf",
title: "Plan next season tonight",
line: "Planting calendars and bed layouts you can print and pin up.",
spot: book,
},
]}
liveCall={{
title: "Thursday Dirt Talk",
channel: "#live-call",
line: "Bring one question about your beds. Leave with a plan for the weekend.",
weekday: 4,
time: "19:00",
timeZone: "America/Chicago",
hostCity: "Chicago",
spot: calendar,
}}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalJoinCommunity4 |
string |
|
lead OptionalJoinCommunity4 |
string |
|
question OptionalJoinCommunity4 |
string |
|
label OptionalJoinCommunity4 |
string |
|
sublabel OptionalJoinCommunity4 |
string |
|
ps OptionalJoinCommunity4 |
string |
|
photoImage OptionalJoinCommunity4 |
string |
|
photoAlt OptionalJoinCommunity4 |
string |
|
rooms OptionalJoinCommunity4 |
JoinCommunity4Room[] |
|
liveCall OptionalJoinCommunity4 |
JoinCommunity4Call | null |
|
copy OptionalJoinCommunity4 |
JoinCommunity4Copy |
|
locale OptionalJoinCommunity4 |
string |
|
href OptionalJoinCommunity4 |
string |
|
target OptionalJoinCommunity4 |
"_self" | "_blank" |
|
onAction OptionalJoinCommunity4 |
(roomId?: string) => void | PromiseLike<unknown> |
|
disabled OptionalJoinCommunity4 |
boolean |
|
state OptionalJoinCommunity4 |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalJoinCommunity4 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--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.
scene- A wide atmosphere photo behind or beside the copy.
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
44e6380340838dc5.webp
image/webp · 98.4 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
bc3d360c88eeac0e.webp
image/webp · 23.9 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f6a8de367400456e.webp
image/webp · 14.6 KB