Community Proof 1
Community proof: member posts grouped by each step of the offer, so a visitor sees people like them moving through it, then a price anchor and the one action.
Use it in a prompt
Use proof/community-proof 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/proof/community-proof.tsx. - Import it and pass your copy and images (Props tab):
import { CommunityProof } from "@/components/funneldna/proof/community-proof"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/community-proof/component.tsx 914 lines
// layout: segmented-stepper
// Community proof: member posts grouped by each step of the offer, so a visitor sees people like them moving through it, then a price anchor and the one action.
import * as React from "react"
import { Tag, ThumbsUp, Trophy } from "lucide-react"
export type CommunityPost = {
/** Member display name, as supplied. */
name: string
/** Short line under the name, e.g. a city or "Question for the group". */
meta?: string
/** Avatar image src; initials are drawn when omitted. */
avatar?: string
/** The member's post text, as supplied. */
body: React.ReactNode
/** Supplied post screenshot or photo. */
image?: string
imageAlt?: string
/** Product or lesson the post is about. */
tag?: string
/** Supplied reaction count; omit to hide it. */
reactions?: number
/** Supplied comment count; omit to hide it. */
comments?: number
/** Marks the post as a member win. */
win?: boolean
}
export type CommunityStage = {
/** Short segment label, e.g. "Plan". */
label: string
/** Second line inside the segment (hidden on phones). */
subtitle?: string
/** Heading beside the feed for this step. */
title: string
/** Supporting line under the step heading. */
detail?: React.ReactNode
/** Stage image, e.g. the item members use at this step (slot item-n). */
image?: string
imageAlt?: string
/** Member posts shown for this step. */
posts: CommunityPost[]
}
export type CommunityProofCopy = {
/** Accessible label for the step tabs. */
tabsLabel: string
/** Placeholders: {step}, {total}. */
stepOf: string
/** Placeholder: {label} of the next step. */
next: string
/** Last-step button that brings the offer into view. */
last: string
back: string
like: string
/** Badge on a post marked as a win. */
win: string
/** Placeholder: {count}. */
comments: string
/** Singular comment count. */
commentOne: string
/** Screen-reader text. Placeholder: {count}. */
reactions: string
/** Divider between today's price and the alternative. */
vs: string
}
export type CommunityProofProps = {
headline?: string
/** Phrase inside the headline drawn with the marker highlighter. */
highlight?: string
/** Supporting line under the headline. */
lead?: React.ReactNode
/** Steps with their member posts. Proof is never invented: empty by default. */
stages?: CommunityStage[]
/** Italic aside in the author's voice above the price. */
note?: React.ReactNode
/** Today's price; the price block is hidden when empty. */
price?: string
/** Small label above today's price. */
priceLabel?: string
/** Small line under today's price. */
priceNote?: string
/** What the supplied alternative costs, shown beside today's price. */
alternativePrice?: string
/** Small label above the alternative price. */
alternativeLabel?: string
/** Small line under the alternative price. */
alternativeNote?: string
/** Main button label. */
label?: string
/** Reassurance line inside the button. */
sublabel?: string
/** One plain line under the button. */
secondaryLine?: React.ReactNode
/** Turns the secondary line into a quiet link. */
secondaryHref?: string
/** Main button destination; renders a link when set and not disabled. */
href?: string
/** Main button click handler. */
onAction?: (event: React.MouseEvent<HTMLElement>) => void
state?: "default" | "hover" | "active" | "disabled"
/** Interface words: step labels, navigation, reactions. */
copy?: Partial<CommunityProofCopy>
className?: string
}
const DEFAULT_COPY: CommunityProofCopy = {
tabsLabel: "Steps inside the community",
stepOf: "Step {step} of {total}",
next: "Next: {label}",
last: "See today’s price",
back: "Back",
like: "Like",
win: "Member win",
comments: "{count} comments",
commentOne: "1 comment",
reactions: "{count} reactions",
vs: "vs.",
}
export function CommunityProof(props: CommunityProofProps) {
const {
headline = "From inside the community",
highlight = "inside the community",
lead = "Questions, drafts and wins from members working through each step.",
stages = [],
note,
price,
priceLabel = "Today",
priceNote,
alternativePrice,
alternativeLabel = "On their own",
alternativeNote,
label = "Join Them Today",
sublabel,
secondaryLine,
secondaryHref,
href,
onAction,
state = "default",
copy: copyProp,
className,
} = props
const copy = { ...DEFAULT_COPY, ...copyProp }
const uid = React.useId()
const [step, setStep] = React.useState(0)
const [liked, setLiked] = React.useState<Record<string, boolean>>({})
const tabRefs = React.useRef<(HTMLButtonElement | null)[]>([])
const panelRef = React.useRef<HTMLDivElement | null>(null)
const closeRef = React.useRef<HTMLDivElement | null>(null)
const ctaRef = React.useRef<HTMLElement | null>(null)
const total = stages.length
const active = total ? Math.min(step, total - 1) : 0
const stage = total ? stages[active] : undefined
const isLast = active === total - 1
const disabled = state === "disabled"
const scrollBehavior = (): ScrollBehavior =>
typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth"
const advance = (index: number) => {
setStep(index)
requestAnimationFrame(() => {
const el = panelRef.current
if (el && el.getBoundingClientRect().top < 0) el.scrollIntoView({ block: "start", behavior: scrollBehavior() })
})
}
const showOffer = () => {
closeRef.current?.scrollIntoView({ block: "center", behavior: scrollBehavior() })
ctaRef.current?.focus({ preventScroll: true })
}
const onTabKey = (event: React.KeyboardEvent<HTMLDivElement>) => {
let next = -1
if (event.key === "ArrowRight") next = (active + 1) % total
else if (event.key === "ArrowLeft") next = (active - 1 + total) % total
else if (event.key === "Home") next = 0
else if (event.key === "End") next = total - 1
if (next < 0) return
event.preventDefault()
setStep(next)
tabRefs.current[next]?.focus()
}
const ctaInner = (
<>
<span className="cfcp-cta-label">{label}</span>
{sublabel ? <span className="cfcp-cta-sub">{sublabel}</span> : null}
</>
)
return (
<div
className={["cf-community-proof", className].filter(Boolean).join(" ")}
data-state={state}
role="region"
aria-labelledby={`${uid}-title`}
>
<style>{CSS}</style>
<header className="cfcp-head">
<h2 id={`${uid}-title`} className="cfcp-title">
{renderHeadline(headline, highlight)}
</h2>
{lead ? <p className="cfcp-lead">{lead}</p> : null}
</header>
{stage ? (
<>
<div
className="cfcp-seg"
role="tablist"
aria-label={copy.tabsLabel}
onKeyDown={onTabKey}
style={{ "--cfcp-n": total, "--cfcp-i": active } as React.CSSProperties}
>
<span className="cfcp-seg-ind" aria-hidden="true" />
{stages.map((s, i) => {
const selected = i === active
return (
<button
key={`${s.label}-${i}`}
ref={(el) => {
tabRefs.current[i] = el
}}
type="button"
role="tab"
id={`${uid}-tab-${i}`}
aria-selected={selected}
aria-controls={`${uid}-panel`}
tabIndex={selected ? 0 : -1}
className="cfcp-tab"
onClick={() => setStep(i)}
>
<span className="cfcp-tab-num" aria-hidden="true">
{i + 1}
</span>
<span className="cfcp-tab-text">
<span className="cfcp-tab-label">{s.label}</span>
{s.subtitle ? <span className="cfcp-tab-sub">{s.subtitle}</span> : null}
</span>
</button>
)
})}
</div>
<div
ref={panelRef}
className="cfcp-panel"
role="tabpanel"
id={`${uid}-panel`}
aria-labelledby={`${uid}-tab-${active}`}
tabIndex={0}
>
<div className="cfcp-stage" key={active}>
<div className={stage.image ? "cfcp-aside cfcp-anim" : "cfcp-aside cfcp-aside--plain cfcp-anim"}>
{stage.image ? (
<img
className="cfcp-aside-img"
src={stage.image}
alt={stage.imageAlt ?? ""}
width={600}
height={450}
loading="lazy"
decoding="async"
/>
) : null}
<div className="cfcp-aside-copy">
<p className="cfcp-aside-step">{fill(copy.stepOf, { step: active + 1, total })}</p>
<h3 className="cfcp-aside-title">{stage.title}</h3>
{stage.detail ? <p className="cfcp-aside-detail">{stage.detail}</p> : null}
</div>
</div>
<div className="cfcp-feed">
{stage.posts.map((post, i) => {
const key = `${active}-${i}`
const isLiked = !!liked[key]
const count =
post.reactions !== undefined ? post.reactions + (isLiked ? 1 : 0) : isLiked ? 1 : undefined
return (
<article
key={key}
className="cfcp-post cfcp-anim"
style={{ "--cfcp-d": `${90 + i * 70}ms` } as React.CSSProperties}
aria-label={post.name}
>
<div className="cfcp-post-head">
{post.avatar ? (
<img className="cfcp-avatar" src={post.avatar} alt="" width={46} height={46} />
) : (
<span className="cfcp-avatar" aria-hidden="true">
{initials(post.name)}
</span>
)}
<div className="cfcp-who">
<p className="cfcp-name">{post.name}</p>
{post.meta ? <p className="cfcp-meta">{post.meta}</p> : null}
</div>
{post.win ? (
<span className="cfcp-win">
<Trophy size={15} strokeWidth={2.4} aria-hidden="true" />
{copy.win}
</span>
) : null}
</div>
<p className="cfcp-body">{post.body}</p>
{post.image ? (
<img
className="cfcp-shot"
src={post.image}
alt={post.imageAlt ?? ""}
width={800}
height={450}
loading="lazy"
decoding="async"
/>
) : null}
{post.tag ? (
<p className="cfcp-tag">
<Tag size={16} strokeWidth={2.2} aria-hidden="true" />
{post.tag}
</p>
) : null}
<div className="cfcp-foot">
<button
type="button"
className="cfcp-like"
aria-pressed={isLiked}
onClick={() => setLiked((m) => ({ ...m, [key]: !m[key] }))}
>
<ThumbsUp size={19} strokeWidth={2.2} fill={isLiked ? "currentColor" : "none"} aria-hidden="true" />
{copy.like}
</button>
{count !== undefined || post.comments !== undefined ? (
<p className="cfcp-stats">
{count !== undefined ? (
<span className="cfcp-react">
<span className="cfcp-bubble" aria-hidden="true">
<ThumbsUp size={12} strokeWidth={2.6} fill="currentColor" />
</span>
<span aria-hidden="true">{count}</span>
<span className="cfcp-sr">{fill(copy.reactions, { count })}</span>
</span>
) : null}
{post.comments !== undefined ? (
<span>{post.comments === 1 ? copy.commentOne : fill(copy.comments, { count: post.comments })}</span>
) : null}
</p>
) : null}
</div>
</article>
)
})}
</div>
</div>
</div>
<div className="cfcp-nav">
<button type="button" className="cfcp-btn cfcp-back" onClick={() => advance(active - 1)} disabled={active === 0}>
{copy.back}
</button>
<div className="cfcp-progress" aria-hidden="true">
<span className="cfcp-dots">
{stages.map((s, i) => (
<span key={`${s.label}-dot-${i}`} className="cfcp-dot" data-on={i <= active} />
))}
</span>
<span className="cfcp-progress-text">{fill(copy.stepOf, { step: active + 1, total })}</span>
</div>
<button
type="button"
className="cfcp-btn cfcp-next"
onClick={isLast ? showOffer : () => advance(active + 1)}
>
{isLast ? copy.last : fill(copy.next, { label: stages[active + 1].label })}
</button>
</div>
</>
) : null}
<div ref={closeRef} className="cfcp-close" data-solo={!price}>
{note ? <p className="cfcp-note">{note}</p> : null}
{price ? (
<div className="cfcp-price" data-single={!alternativePrice}>
<div className="cfcp-price-col">
<span className="cfcp-price-lbl">{priceLabel}</span>
<strong className="cfcp-price-now">{price}</strong>
{priceNote ? <span className="cfcp-price-note">{priceNote}</span> : null}
</div>
{alternativePrice ? (
<>
<span className="cfcp-vs">{copy.vs}</span>
<div className="cfcp-price-col">
<span className="cfcp-price-lbl">{alternativeLabel}</span>
<strong className="cfcp-price-alt">{alternativePrice}</strong>
{alternativeNote ? <span className="cfcp-price-note">{alternativeNote}</span> : null}
</div>
</>
) : null}
</div>
) : null}
<div className="cfcp-act">
{href && !disabled ? (
<a
ref={(el) => {
ctaRef.current = el
}}
className="cfcp-cta"
href={href}
onClick={onAction}
>
{ctaInner}
</a>
) : (
<button
ref={(el) => {
ctaRef.current = el
}}
type="button"
className="cfcp-cta"
disabled={disabled}
onClick={onAction}
>
{ctaInner}
</button>
)}
{secondaryLine ? (
secondaryHref ? (
<a className="cfcp-quiet cfcp-quiet-link" href={secondaryHref}>
{secondaryLine}
</a>
) : (
<p className="cfcp-quiet">{secondaryLine}</p>
)
) : null}
</div>
</div>
</div>
)
}
export default CommunityProof
function renderHeadline(text: string, mark?: string) {
if (!mark) return text
const at = text.indexOf(mark)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="cfcp-mark">{mark}</span>
{text.slice(at + mark.length)}
</>
)
}
/** Replaces each named {placeholder} in a copy template with its value, as text. */
function fill(template: string, values: Record<string, string | number>) {
let out = template
for (const [key, value] of Object.entries(values)) out = out.split("{" + key + "}").join(String(value))
return out
}
function initials(name: string) {
return name
.split(" ")
.filter(Boolean)
.slice(0, 2)
.map((part) => part.charAt(0).toUpperCase())
.join("")
}
/* Theme notes: every colour, face, button, card and highlight reads the theme tokens; hex values appear only as
last fallbacks inside var(). Faces are read straight from --font-display / --font-body (and --button-font for
buttons). The segmented tabs take the button radius; the ghost Like button takes the secondary-button fill and ink
on hover. The marker keeps its documented yellow default (--marker). */
const CSS = `
.cf-community-proof {
--cfcp-ink: var(--ink, #16213a);
--cfcp-muted: var(--muted, #4a5568);
--cfcp-surface: var(--surface, #ffffff);
--cfcp-card: var(--card, #ffffff);
--cfcp-accent: var(--accent, #2b5fc4);
--cfcp-band: var(--band, #1b2c4f);
--cfcp-band-ink: var(--band-ink, #ffffff);
--cfcp-shadow: var(--shadow, oklch(0.22 0.03 260));
--cfcp-radius: var(--radius, 12px);
--cfcp-line: oklch(from var(--cfcp-ink) l c h / 0.12);
--cfcp-focus: var(--field-focus, var(--cfcp-accent));
--cfcp-sm: var(--shadow-sm, 0 1px 1px oklch(from var(--cfcp-shadow) l c h / 0.18), 0 1px 3px oklch(from var(--cfcp-shadow) l c h / 0.14));
--cfcp-md: var(--shadow-md, 0 1px 2px oklch(from var(--cfcp-shadow) l c h / 0.22), 0 4px 10px -2px oklch(from var(--cfcp-shadow) l c h / 0.2));
--cfcp-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
display: block;
width: 100%;
max-width: 1040px;
margin-inline: auto;
color: var(--cfcp-ink);
font-family: var(--font-body, system-ui, sans-serif);
-webkit-font-smoothing: antialiased;
}
.cf-community-proof *, .cf-community-proof *::before, .cf-community-proof *::after { box-sizing: border-box; }
.cf-community-proof :where(h2, h3, p) { margin: 0; }
.cf-community-proof :is(button, a, [tabindex="0"]):focus-visible { outline: 3px solid var(--cfcp-focus); outline-offset: 3px; }
.cf-community-proof .cfcp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cf-community-proof .cfcp-head { margin-bottom: clamp(24px, 3vw, 36px); text-align: center; }
.cf-community-proof .cfcp-title {
color: var(--cfcp-ink);
font-family: var(--font-display, system-ui, sans-serif);
font-size: clamp(2.125rem, 1.35rem + 3.2vw, 3.5rem);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
line-height: 1.05;
text-transform: var(--display-case, none);
text-wrap: balance;
}
.cf-community-proof .cfcp-mark {
margin: 0 -0.04em;
padding: 0 0.12em;
border-radius: 0.2em 0.34em 0.24em 0.4em;
background-image: linear-gradient(to bottom, transparent 12%, oklch(from var(--marker, #fae37c) l c h / 0.92) 12%, oklch(from var(--marker, #fae37c) l c h / 0.92) 97%, transparent 97%);
color: var(--field-ink, #16213a);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-community-proof .cfcp-lead {
max-width: 60ch;
margin: 16px auto 0;
color: var(--cfcp-muted);
font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
font-weight: 500;
line-height: 1.5;
text-wrap: pretty;
}
/* Tabs: a clearly grey track so the raised white active tab stands out on every theme */
.cf-community-proof .cfcp-seg {
position: relative;
display: grid;
grid-template-columns: repeat(var(--cfcp-n, 3), minmax(0, 1fr));
padding: 6px;
border: 1px solid oklch(from var(--cfcp-ink) l c h / 0.12);
border-radius: calc(var(--button-radius, var(--cfcp-radius)) + 8px);
background: color-mix(in oklch, var(--cfcp-ink) 11%, var(--cfcp-surface));
box-shadow: inset 0 1px 3px oklch(from var(--cfcp-shadow) l c h / 0.2);
}
.cf-community-proof .cfcp-seg-ind {
position: absolute;
top: 6px;
bottom: 6px;
left: 6px;
width: calc((100% - 12px) / var(--cfcp-n, 3));
border: 1px solid oklch(from var(--cfcp-ink) l c h / 0.16);
border-radius: calc(var(--button-radius, var(--cfcp-radius)) + 3px);
background: var(--cfcp-card);
box-shadow: var(--cfcp-md);
transform: translateX(calc(100% * var(--cfcp-i, 0)));
transition: transform 0.38s var(--cfcp-ease);
}
.cf-community-proof .cfcp-tab {
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 14px;
min-width: 0;
min-height: 68px;
padding: 12px 14px;
border: 0;
border-radius: calc(var(--button-radius, var(--cfcp-radius)) + 3px);
background: transparent;
color: var(--cfcp-ink);
font: inherit;
text-align: left;
cursor: pointer;
transition: background-color 0.2s ease;
}
.cf-community-proof .cfcp-tab[aria-selected="false"]:hover { background: color-mix(in oklch, var(--cfcp-card) 45%, transparent); }
.cf-community-proof .cfcp-tab:active { transform: translateY(1px); }
.cf-community-proof .cfcp-tab-num {
display: grid;
flex: none;
width: 40px;
height: 40px;
place-items: center;
border: 1px solid oklch(from var(--cfcp-ink) l c h / 0.16);
border-radius: 50%;
background: var(--cfcp-card);
color: var(--cfcp-ink);
font-size: 1.125rem;
font-weight: 800;
line-height: 1;
font-variant-numeric: tabular-nums;
transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.cf-community-proof .cfcp-tab[aria-selected="true"] .cfcp-tab-num { border-color: transparent; background: var(--accent-fill, var(--cfcp-accent)); color: var(--accent-fill-ink, var(--cfcp-card)); }
.cf-community-proof .cfcp-tab-text { display: grid; gap: 2px; min-width: 0; }
.cf-community-proof .cfcp-tab-label { font-family: var(--font-display, system-ui, sans-serif); font-size: 1.0625rem; font-weight: 800; line-height: 1.2; }
.cf-community-proof .cfcp-tab-sub {
overflow: hidden;
color: var(--cfcp-muted);
font-size: 0.875rem;
font-weight: 600;
line-height: 1.3;
text-overflow: ellipsis;
white-space: nowrap;
}
.cf-community-proof .cfcp-tab[aria-selected="false"] .cfcp-tab-sub { color: var(--cfcp-ink); opacity: 1; }
.cf-community-proof .cfcp-panel { margin-top: 28px; border-radius: var(--cfcp-radius); }
.cf-community-proof .cfcp-panel:focus-visible { outline-offset: 8px; }
.cf-community-proof .cfcp-stage { display: grid; gap: 22px; }
.cf-community-proof .cfcp-aside { display: grid; gap: 18px; align-content: start; }
.cf-community-proof .cfcp-aside-img {
display: block;
width: 100%;
height: auto;
aspect-ratio: 4 / 3;
border-radius: var(--cfcp-radius);
object-fit: cover;
object-position: center;
filter: drop-shadow(0 2px 3px oklch(from var(--cfcp-shadow) l c h / 0.22)) drop-shadow(0 8px 12px oklch(from var(--cfcp-shadow) l c h / 0.14));
}
.cf-community-proof .cfcp-aside-step { margin-bottom: 12px; color: var(--cfcp-accent); font-size: 0.875rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1.3; }
.cf-community-proof .cfcp-aside-title {
font-family: var(--font-display, system-ui, sans-serif);
font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.015em);
line-height: 1.12;
text-transform: var(--display-case, none);
text-wrap: balance;
}
.cf-community-proof .cfcp-aside-detail { margin-top: 10px; color: var(--cfcp-muted); font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
.cf-community-proof .cfcp-feed { display: grid; gap: 16px; min-width: 0; }
.cf-community-proof .cfcp-post {
padding: 20px 22px 12px;
border: 1px solid var(--card-border, color-mix(in oklch, var(--cfcp-ink) 12%, transparent));
border-radius: var(--card-radius, var(--cfcp-radius));
background: var(--cfcp-card);
box-shadow: var(--card-shadow, var(--cfcp-sm));
transition: transform 0.25s var(--cfcp-ease), box-shadow 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
.cf-community-proof .cfcp-post:hover { transform: translateY(-2px); box-shadow: var(--cfcp-md); }
}
.cf-community-proof .cfcp-post-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
.cf-community-proof .cfcp-avatar {
display: grid;
width: 46px;
height: 46px;
place-items: center;
border-radius: 50%;
background: linear-gradient(oklch(from var(--cfcp-band) calc(l + 0.09) c h), var(--cfcp-band));
color: var(--cfcp-band-ink);
font-family: var(--font-display, system-ui, sans-serif);
font-size: 1.0625rem;
font-weight: 800;
line-height: 1;
object-fit: cover;
}
.cf-community-proof .cfcp-who { display: grid; gap: 2px; min-width: 0; padding-top: 2px; }
.cf-community-proof .cfcp-name { font-size: 1.0625rem; font-weight: 800; line-height: 1.25; }
.cf-community-proof .cfcp-meta { color: var(--cfcp-muted); font-size: 0.875rem; line-height: 1.35; }
.cf-community-proof .cfcp-win {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 12px;
border-radius: 999px;
background: var(--success-soft, #e3f3e8);
color: var(--success, #1f7a3e);
font-size: 0.875rem;
font-weight: 800;
line-height: 1.2;
white-space: nowrap;
}
.cf-community-proof .cfcp-body { margin-top: 14px; font-size: 1.0625rem; line-height: 1.55; text-wrap: pretty; }
.cf-community-proof .cfcp-shot {
display: block;
width: 100%;
height: auto;
margin-top: 14px;
aspect-ratio: 16 / 9;
border-radius: calc(var(--cfcp-radius) - 2px);
object-fit: cover;
}
.cf-community-proof .cfcp-tag { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--cfcp-muted); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.cf-community-proof .cfcp-foot {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px 12px;
margin-top: 14px;
padding-top: 8px;
border-top: 1px solid var(--cfcp-line);
}
.cf-community-proof .cfcp-like {
--cfcp-like-hover-bg: var(--button-2-bg, color-mix(in oklch, var(--cfcp-ink) 6%, var(--cfcp-card)));
--cfcp-like-hover-ink: var(--button-2-ink, var(--cfcp-ink));
display: inline-flex;
align-items: center;
gap: 8px;
min-height: 44px;
margin-left: -12px;
padding: 0 14px;
border: 0;
border-radius: 999px;
background: transparent;
color: var(--cfcp-muted);
font: inherit;
font-size: 1rem;
font-weight: 700;
cursor: pointer;
transition: background-color 0.2s ease, color 0.2s ease;
}
.cf-community-proof .cfcp-like:hover { background: var(--cfcp-like-hover-bg); color: var(--cfcp-like-hover-ink); }
.cf-community-proof .cfcp-like:active { transform: translateY(1px); }
.cf-community-proof .cfcp-like[aria-pressed="true"] { color: var(--cfcp-accent); }
.cf-community-proof .cfcp-stats { display: inline-flex; align-items: center; gap: 12px; color: var(--cfcp-muted); font-size: 0.9375rem; line-height: 1.3; }
.cf-community-proof .cfcp-react { display: inline-flex; align-items: center; gap: 6px; color: var(--cfcp-ink); font-weight: 700; }
.cf-community-proof .cfcp-bubble { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--accent-fill, var(--cfcp-accent)); color: var(--accent-fill-ink, var(--cfcp-card)); }
.cf-community-proof .cfcp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.cf-community-proof .cfcp-btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 50px;
padding: 0 22px;
border: 1px solid transparent;
border-radius: var(--button-radius, var(--cfcp-radius));
font-family: var(--button-font, var(--font-display, system-ui, sans-serif));
font-size: 1rem;
font-weight: var(--button-weight, 800);
line-height: 1.2;
text-transform: var(--button-case, none);
white-space: nowrap;
cursor: pointer;
transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cf-community-proof .cfcp-btn:active:not(:disabled) { transform: translateY(1px); }
.cf-community-proof .cfcp-back {
border-color: var(--button-2-border, transparent);
background: var(--button-2-bg, var(--secondary, #e8ebf1));
box-shadow: var(--button-2-shadow, var(--shadow-sm));
color: var(--button-2-ink, var(--secondary-ink, #16213a));
}
.cf-community-proof .cfcp-back:hover:not(:disabled) { background: oklch(from var(--button-2-bg, var(--secondary, #e8ebf1)) calc(l - 0.035) c h); }
.cf-community-proof .cfcp-back:disabled { box-shadow: none; cursor: not-allowed; opacity: 0.5; }
.cf-community-proof .cfcp-next {
background: linear-gradient(oklch(from var(--cfcp-band) calc(l + 0.05) c h), var(--cfcp-band));
box-shadow: inset 0 1px 0 oklch(from var(--cfcp-band) calc(l + 0.15) c h / 0.6), inset 0 -3px 0 oklch(from var(--cfcp-band) calc(l - 0.1) c h), 0 1px 2px oklch(from var(--cfcp-shadow) l c h / 0.3), 0 4px 10px -2px oklch(from var(--cfcp-shadow) l c h / 0.3);
color: var(--cfcp-band-ink);
}
.cf-community-proof .cfcp-next:hover { background: linear-gradient(oklch(from var(--cfcp-band) calc(l + 0.09) c h), oklch(from var(--cfcp-band) calc(l + 0.03) c h)); transform: translateY(-1px); }
.cf-community-proof .cfcp-progress { display: flex; align-items: center; gap: 12px; color: var(--cfcp-muted); font-size: 0.9375rem; font-weight: 600; }
.cf-community-proof .cfcp-dots { display: flex; gap: 6px; }
.cf-community-proof .cfcp-dot { width: 26px; height: 6px; border-radius: 99px; background: color-mix(in oklch, var(--cfcp-ink) 14%, var(--cfcp-surface)); transition: background-color 0.3s ease; }
.cf-community-proof .cfcp-dot[data-on="true"] { background: var(--accent-fill, var(--cfcp-accent)); }
.cf-community-proof .cfcp-close {
display: grid;
gap: 22px;
margin-top: 32px;
padding: clamp(20px, 3vw, 32px);
border: 1px solid var(--card-border, color-mix(in oklch, var(--cfcp-ink) 12%, transparent));
border-radius: calc(var(--card-radius, var(--cfcp-radius)) + 6px);
background: var(--cfcp-card);
box-shadow: var(--card-shadow, var(--cfcp-md));
scroll-margin: 24px;
}
.cf-community-proof .cfcp-note { color: var(--cfcp-ink); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); font-style: italic; line-height: 1.5; text-wrap: pretty; }
.cf-community-proof .cfcp-price {
display: grid;
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
align-items: center;
gap: 14px;
padding: 18px 20px;
border-radius: var(--cfcp-radius);
background: color-mix(in oklch, var(--cfcp-ink) 4%, var(--cfcp-card));
}
.cf-community-proof .cfcp-price[data-single="true"] { grid-template-columns: minmax(0, 1fr); }
.cf-community-proof .cfcp-price-col { display: grid; gap: 4px; min-width: 0; }
.cf-community-proof .cfcp-price-lbl { color: var(--cfcp-muted); font-size: 0.875rem; font-weight: 800; line-height: 1.3; }
.cf-community-proof .cfcp-price-now {
margin-bottom: 8px;
color: var(--cfcp-ink);
font-family: var(--font-display, system-ui, sans-serif);
font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
font-variant-numeric: tabular-nums;
font-weight: var(--display-weight, 800);
letter-spacing: -0.02em;
line-height: 1.05;
}
.cf-community-proof .cfcp-price-alt {
margin-bottom: 8px;
color: var(--cfcp-muted);
font-family: var(--font-display, system-ui, sans-serif);
font-size: clamp(1.625rem, 1.4rem + 0.8vw, 2rem);
font-variant-numeric: tabular-nums;
font-weight: 800;
line-height: 1.1;
}
.cf-community-proof .cfcp-price-note { color: var(--cfcp-muted); font-size: 0.875rem; line-height: 1.4; text-wrap: pretty; }
.cf-community-proof .cfcp-vs {
display: grid;
width: 40px;
height: 40px;
place-items: center;
border: 1px solid var(--cfcp-line);
border-radius: 50%;
background: var(--cfcp-card);
color: var(--cfcp-muted);
font-size: 0.875rem;
font-weight: 800;
}
.cf-community-proof .cfcp-act { display: grid; gap: 12px; justify-items: stretch; text-align: center; }
.cf-community-proof .cfcp-cta {
--cfcp-b: var(--button-bg, var(--cta, #d63a2f));
--cfcp-b2: var(--button-bg-2, var(--cta-2, #b82c22));
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
width: 100%;
min-height: 70px;
padding: 14px 24px 16px;
border: 0;
border-radius: var(--button-radius, var(--cfcp-radius));
background: linear-gradient(oklch(from var(--cfcp-b) calc(l + 0.04) c h), var(--cfcp-b2));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--cfcp-b) calc(l + 0.14) c h / 0.55), inset 0 -3px 0 oklch(from var(--cfcp-b) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--cfcp-shadow) l c h / 0.32), 0 6px 14px -4px oklch(from var(--cfcp-shadow) l c h / 0.4));
color: var(--button-ink, var(--cta-ink, #ffffff));
font-family: var(--button-font, var(--font-display, system-ui, sans-serif));
text-align: center;
text-decoration: none;
text-shadow: var(--button-text-shadow, none);
text-transform: var(--button-case, none);
cursor: pointer;
transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cf-community-proof .cfcp-cta-label { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); font-weight: var(--button-weight, 800); line-height: 1.15; text-wrap: balance; }
.cf-community-proof .cfcp-cta-sub { font-family: var(--font-body, system-ui, sans-serif); font-size: 0.875rem; font-weight: 600; line-height: 1.3; text-transform: none; text-wrap: pretty; }
.cf-community-proof .cfcp-cta:hover:not(:disabled),
.cf-community-proof[data-state="hover"] .cfcp-cta {
background: linear-gradient(var(--cfcp-b), oklch(from var(--cfcp-b2) calc(l - 0.04) c h));
transform: translateY(-1px);
}
.cf-community-proof .cfcp-cta:active:not(:disabled),
.cf-community-proof[data-state="active"] .cfcp-cta {
background: linear-gradient(oklch(from var(--cfcp-b) calc(l - 0.06) c h), oklch(from var(--cfcp-b2) calc(l - 0.08) c h));
box-shadow: inset 0 2px 3px oklch(from var(--cfcp-b) calc(l - 0.2) c h / 0.45), inset 0 -1px 0 oklch(from var(--cfcp-b) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--cfcp-shadow) l c h / 0.3);
transform: translateY(1px);
}
.cf-community-proof .cfcp-cta:disabled { box-shadow: none; cursor: not-allowed; opacity: 0.55; transform: none; }
.cf-community-proof .cfcp-quiet { color: var(--cfcp-muted); font-size: 0.9375rem; line-height: 1.4; text-wrap: pretty; }
.cf-community-proof .cfcp-quiet-link { text-decoration: underline; text-decoration-color: oklch(from var(--cfcp-muted) l c h / 0.45); text-underline-offset: 0.18em; }
.cf-community-proof .cfcp-quiet-link:hover { color: var(--cfcp-ink); text-decoration-color: currentColor; }
@media (min-width: 760px) {
.cf-community-proof .cfcp-close { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; column-gap: 32px; }
.cf-community-proof .cfcp-note { grid-column: 1 / -1; }
.cf-community-proof .cfcp-close[data-solo="true"] .cfcp-act { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 460px; }
}
@media (min-width: 860px) {
.cf-community-proof .cfcp-stage { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; gap: 40px; }
.cf-community-proof .cfcp-aside { position: sticky; top: 24px; }
}
@media (max-width: 859px) {
.cf-community-proof .cfcp-aside { grid-template-columns: 104px minmax(0, 1fr); align-items: start; gap: 16px; }
.cf-community-proof .cfcp-aside--plain { grid-template-columns: minmax(0, 1fr); }
.cf-community-proof .cfcp-aside-img { aspect-ratio: 1 / 1; }
.cf-community-proof .cfcp-aside-title { font-size: 1.3125rem; }
}
@media (max-width: 760px) {
.cf-community-proof .cfcp-tab { gap: 10px; padding: 10px 10px; }
.cf-community-proof .cfcp-tab-num { width: 34px; height: 34px; font-size: 1rem; }
}
@media (max-width: 560px) {
.cf-community-proof .cfcp-tab { min-height: 56px; padding: 8px 6px; text-align: center; }
.cf-community-proof .cfcp-tab-num, .cf-community-proof .cfcp-tab-sub, .cf-community-proof .cfcp-progress-text { display: none; }
.cf-community-proof .cfcp-btn { padding: 0 18px; }
.cf-community-proof .cfcp-price { gap: 10px; padding: 16px 14px; }
.cf-community-proof .cfcp-vs { width: 34px; height: 34px; }
}
@media (max-width: 480px) {
.cf-community-proof .cfcp-post { padding: 16px 16px 10px; }
.cf-community-proof .cfcp-post-head { grid-template-columns: auto minmax(0, 1fr); }
.cf-community-proof .cfcp-win { grid-column: 2; justify-self: start; margin-top: 6px; }
.cf-community-proof .cfcp-body { font-size: 1rem; }
}
@keyframes cfcp-in { from { opacity: 0.7; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cfcp-pop { 0% { transform: scale(1); } 45% { transform: scale(1.28) rotate(-8deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
.cf-community-proof .cfcp-anim { animation: cfcp-in 0.42s var(--cfcp-ease) both; animation-delay: var(--cfcp-d, 0ms); }
.cf-community-proof .cfcp-like[aria-pressed="true"] svg { animation: cfcp-pop 0.32s var(--cfcp-ease); }
}
/* !important is retained: the universal reset (0,1,0) must beat the higher-specificity class selectors that set
transitions, and the CTA override must beat .cf-community-proof[data-state="hover"|"active"] .cfcp-cta (0,3,0).
No equal-precedence selector would keep this cascade without duplicating every rule. */
@media (prefers-reduced-motion: reduce) {
.cf-community-proof *, .cf-community-proof *::before, .cf-community-proof *::after { animation: none !important; transition: none !important; }
.cf-community-proof .cfcp-post:hover, .cf-community-proof .cfcp-cta, .cf-community-proof .cfcp-next:hover { transform: none !important; }
}
`
pieces/proof/community-proof/specimen.tsx 112 lines
import * as React from "react"
import { CommunityProof, type CommunityProofProps } from "../community-proof"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled"]
export default function CommunityProofSpecimen({ state = "default" }: { state?: CommunityProofProps["state"] }) {
const sample = defaults.sample
const [guide, workbook, checklist] = sample.items
return (
<CommunityProof
state={state}
headline="From inside the community"
highlight="inside the community"
lead={`Questions, drafts and wins from members working through ${sample.name}, one step at a time.`}
stages={[
{
label: "Plan",
subtitle: guide.name,
title: "Map the pages your offer needs",
detail: guide.detail,
image: slot("item-1", guide.image),
imageAlt: guide.imageAlt,
posts: [
{
name: "Dana R.",
meta: "Austin, TX",
body: "Finally drew my whole funnel on one page. Opt-in, sales page, thank-you page. Seeing it laid out made the next step obvious.",
tag: guide.name,
reactions: 18,
comments: 4,
},
{
name: "Marcus T.",
meta: "Question for the group",
body: "Do I need an order bump on my first funnel, or keep it to one offer until it’s live?",
tag: guide.name,
reactions: 7,
comments: 11,
},
],
},
{
label: "Write",
subtitle: workbook.name,
title: "Draft the words that sell it",
detail: workbook.detail,
image: slot("item-2", workbook.image),
imageAlt: workbook.imageAlt,
posts: [
{
name: "Priya S.",
meta: "Leeds, UK",
body: "Wrote three headlines with the workbook prompts and kept the one that names the problem. Draft one of my sales page is done.",
tag: workbook.name,
reactions: 32,
comments: 9,
win: true,
},
{
name: "Jo K.",
meta: "Tip for anyone on this step",
body: "Fill in the offer page before the headline. The headline got so much easier once I knew exactly what I was selling.",
tag: workbook.name,
reactions: 21,
comments: 5,
},
],
},
{
label: "Launch",
subtitle: checklist.name,
title: "Check every step, then go live",
detail: checklist.detail,
image: slot("item-3", checklist.image),
imageAlt: checklist.imageAlt,
posts: [
{
name: "Sam O.",
meta: "Denver, CO",
body: "Ran the launch checklist last night. Caught a broken link on my thank-you page before a single visitor did.",
tag: checklist.name,
reactions: 26,
comments: 7,
win: true,
},
{
name: "Elena V.",
meta: "Going live this week",
body: "Last pass on my forms today, then I hit publish on Friday. Thanks for every answer in here.",
tag: checklist.name,
reactions: 40,
comments: 15,
},
],
},
]}
note="(I know. Posting your first draft where other people can see it feels scary. It’s also the fastest way to finish it.)"
price={sample.price}
priceLabel="Today"
priceNote="The whole kit, one payment"
alternativePrice={sample.regularPrice}
alternativeLabel="Bought one by one"
alternativeNote="Guide + workbook + checklist"
label="Get The Funnel Starter Kit"
sublabel={sample.sublabel}
secondaryLine="or keep scrolling to see what’s inside the kit"
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalCommunityProof |
string |
|
highlight OptionalCommunityProof |
string |
|
lead OptionalCommunityProof |
React.ReactNode |
|
stages OptionalCommunityProof |
CommunityStage[] |
|
note OptionalCommunityProof |
React.ReactNode |
|
price OptionalCommunityProof |
string |
|
priceLabel OptionalCommunityProof |
string |
|
priceNote OptionalCommunityProof |
string |
|
alternativePrice OptionalCommunityProof |
string |
|
alternativeLabel OptionalCommunityProof |
string |
|
alternativeNote OptionalCommunityProof |
string |
|
label OptionalCommunityProof |
string |
|
sublabel OptionalCommunityProof |
string |
|
secondaryLine OptionalCommunityProof |
React.ReactNode |
|
secondaryHref OptionalCommunityProof |
string |
|
href OptionalCommunityProof |
string |
|
onAction OptionalCommunityProof |
(event: React.MouseEvent<HTMLElement>) => void |
|
state OptionalCommunityProof |
"default" | "hover" | "active" | "disabled" |
|
copy OptionalCommunityProof |
Partial<CommunityProofCopy> |
|
className OptionalCommunityProof |
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--field-ink- 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.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB