Community Feed 1
Community feed: shows a challenge or membership group as a living room (cover, members, posts, replies) beside an angled pitch field with the join action, so the visitor sees the conversation they step into and acts on it.
Use it in a prompt
Use proof/community-feed 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-feed.tsx. - Import it and pass your copy and images (Props tab):
import { CommunityFeed } from "@/components/funneldna/proof/community-feed"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/community-feed/component.tsx 664 lines
// layout: diagonal-split
// Community feed: shows a challenge or membership group as a living room (cover, members, posts, replies) beside an angled pitch field with the join action, so the visitor sees the conversation they step into and acts on it.
import * as React from 'react';
import { BadgeCheck, Bell, CalendarDays, Lock, MessageCircle, MessageCircleQuestion, MessagesSquare, Pin, ShieldCheck, Target, ThumbsUp, UserRound, UsersRound, type LucideIcon } from 'lucide-react';
import { Divider, FX_HOST, Pattern } from '../fx/fx';
export type CommunityComment = {
author: string;
/** Avatar photo; initials are drawn when missing (the host falls back to hostImage). */
avatar?: string;
body: React.ReactNode;
/** Marks the reply as the host's. */
host?: boolean;
};
export type CommunityPostMedia =
| { kind: 'photo'; src: string; alt: string }
| { kind: 'prompt'; text: React.ReactNode; note?: string }
| { kind: 'event'; when: string; title: string; note?: string; actionLabel?: string };
export type CommunityPost = {
author: string;
avatar?: string;
/** Small flag after the name, e.g. 'Host'. */
role?: string;
time: string;
/** Shows the pinned line above the post. */
pinned?: boolean;
body?: React.ReactNode[];
media?: CommunityPostMedia;
/** Supplied reaction count; hidden when not given. */
likes?: number;
/** Supplied comment count; hidden when not given. */
commentCount?: number;
comments?: CommunityComment[];
};
export type CommunityRule = {
icon?: 'lock' | 'calendar' | 'chat' | 'users' | 'bell' | 'target';
title: string;
body: string;
};
export type CommunityFeedCopy = {
pinned: string;
like: string;
comment: string;
remind: string;
host: string;
/** Accessible label for a locked tab; {tab} is replaced with the tab name. */
lockedTab: string;
visibility: string;
/** {count} is replaced with the number. */
commentCount: string;
commentCountOne: string;
moreText: string;
moreLabel: string;
emptyText: string;
};
export type CommunityFeedProps = {
headline?: React.ReactNode;
/** One-sentence punch lines under the headline; a one-word line is set large. */
lines?: string[];
/** What happens inside the group (the about / rules column). */
rules?: CommunityRule[];
label?: string;
/** Second line of the main button (the price, e.g. 'Free'). */
sublabel?: string;
reassurance?: string;
groupName?: string;
privacy?: string;
membersLabel?: string;
joinLabel?: string;
/** Slot 'scene': the group cover photo. */
coverImage?: string;
coverAlt?: string;
/** Slot 'presenter': the host's portrait. */
hostImage?: string;
hostName?: string;
tabs?: string[];
activeTab?: number;
composerPlaceholder?: string;
posts?: CommunityPost[];
copy?: Partial<CommunityFeedCopy>;
/** Colour of the angled bottom edge (the next section's token); null removes it. */
edgeTone?: 'band' | 'surface' | 'card' | null;
href?: string;
onAction?: () => void;
state?: 'default' | 'hover' | 'active' | 'disabled';
className?: string;
};
const DEFAULT_COPY: CommunityFeedCopy = {
pinned: 'Pinned by the host',
like: 'Like',
comment: 'Comment',
remind: 'Remind me',
host: 'Host',
lockedTab: 'Join to open {tab}',
visibility: 'Visible to members only',
commentCount: '{count} comments',
commentCountOne: '1 comment',
moreText: 'The rest of the conversation is inside.',
moreLabel: 'Join to read the rest',
emptyText: 'The room is open. Be the first to post.',
};
const DEFAULT_RULES: CommunityRule[] = [
{ icon: 'lock', title: 'Members only', body: 'Only people who join can read and post in the group.' },
{ icon: 'chat', title: 'Real answers', body: 'Ask your question and get a reply in the comments.' },
];
const RULE_ICONS: Record<NonNullable<CommunityRule['icon']>, LucideIcon> = {
lock: Lock,
calendar: CalendarDays,
chat: MessagesSquare,
users: UsersRound,
bell: Bell,
target: Target,
};
export function CommunityFeed(props: CommunityFeedProps) {
const {
headline = 'Don’t figure it out alone. Join the room.',
lines = ['Ask your question.', 'Share your progress.', 'Together.'],
rules = DEFAULT_RULES,
label = 'Yes! I want to join the group',
sublabel,
reassurance,
groupName = 'Members’ room',
privacy = 'Private group',
membersLabel,
joinLabel = 'Join group',
coverImage,
coverAlt = '',
hostImage,
hostName,
tabs = ['Discussion', 'Events', 'Members'],
activeTab = 0,
composerPlaceholder = 'Join to write a post…',
posts = [],
copy,
edgeTone = 'band',
href,
onAction,
state = 'default',
className,
} = props;
const c: CommunityFeedCopy = { ...DEFAULT_COPY, ...copy };
const headingId = React.useId();
const [liked, setLiked] = React.useState<Record<number, boolean>>({});
const disabled = state === 'disabled';
const join: JoinProps = { href, onAction, disabled };
const members = collectMembers(posts, hostName, hostImage);
const rootStyle = { '--cf-edge': edgeTone ? '56px' : '0px' } as React.CSSProperties;
const layerStyle = { ...FX_HOST, position: 'absolute' } as React.CSSProperties;
return (
<section
className={`cf-community-feed${className ? ` ${className}` : ''}`}
data-state={state}
aria-labelledby={headingId}
style={rootStyle}
>
<style>{CSS}</style>
<div className='cf-community-feed__field' aria-hidden='true' />
{edgeTone ? (
<div className='cf-community-feed__edge' style={layerStyle} aria-hidden='true'>
<Divider shape='angle' tone={edgeTone} height={56} />
</div>
) : null}
<div className='cf-community-feed__inner'>
<div className='cf-community-feed__pitch'>
<h2 id={headingId} className='cf-community-feed__headline'>{headline}</h2>
{lines.length ? (
<div className='cf-community-feed__lines'>
{lines.map((line, i) => (
<p key={i} className={isPunch(line) ? 'is-punch' : undefined}>{line}</p>
))}
</div>
) : null}
{rules.length ? (
<ul className='cf-community-feed__rules'>
{rules.map((rule, i) => {
const Icon = RULE_ICONS[rule.icon ?? 'chat'];
return (
<li key={i}>
<span className='cf-community-feed__rule-icon' aria-hidden='true'>
<Icon size={20} strokeWidth={2.5} />
</span>
<span>
<strong>{rule.title}</strong>
<span className='cf-community-feed__rule-body'>{rule.body}</span>
</span>
</li>
);
})}
</ul>
) : null}
<div className='cf-community-feed__action'>
<CtaButton label={label} sublabel={sublabel} {...join} />
{reassurance ? (
<p className='cf-community-feed__reassure'>
<ShieldCheck className='cf-community-feed__inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</div>
<div className='cf-community-feed__feed'>
<div className='cf-community-feed__group'>
<div className='cf-community-feed__pattern' style={layerStyle} aria-hidden='true'>
<Pattern name='rings' fade='corner' />
</div>
<div className='cf-community-feed__card cf-community-feed__head'>
{coverImage ? (
<img className='cf-community-feed__cover' src={coverImage} alt={coverAlt} width={1280} height={560} />
) : null}
<div className='cf-community-feed__identity'>
<div className='cf-community-feed__title'>
<h3>{groupName}</h3>
{privacy ? (
<p className='cf-community-feed__privacy'>
<Lock className='cf-community-feed__inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{privacy}
</p>
) : null}
</div>
<div className='cf-community-feed__meta'>
{members.length || membersLabel ? (
<div className='cf-community-feed__stack'>
{members.length ? (
<span className='cf-community-feed__faces'>
{members.map((m) => (
<Avatar key={m.name} name={m.name} src={m.src} size='sm' />
))}
</span>
) : null}
{membersLabel ? <span className='cf-community-feed__stack-label'>{membersLabel}</span> : null}
</div>
) : null}
<CtaButton label={joinLabel} compact {...join} />
</div>
</div>
{tabs.length ? (
<div className='cf-community-feed__tabs'>
{tabs.map((tab, i) =>
i === activeTab ? (
<span key={tab} className='cf-community-feed__tab is-active' aria-current='page'>{tab}</span>
) : (
<JoinControl key={tab} className='cf-community-feed__tab' ariaLabel={c.lockedTab.replace('{tab}', tab)} {...join}>
{tab}
<Lock size={16} strokeWidth={2.5} aria-hidden='true' />
</JoinControl>
),
)}
</div>
) : null}
<div className='cf-community-feed__composer'>
<span className='cf-community-feed__viewer' aria-hidden='true'>
<UserRound size={20} strokeWidth={2.5} />
</span>
<JoinControl className='cf-community-feed__write' {...join}>
<span>{composerPlaceholder}</span>
<Lock size={16} strokeWidth={2.5} aria-hidden='true' />
</JoinControl>
</div>
</div>
</div>
{posts.length === 0 ? (
<p className='cf-community-feed__card cf-community-feed__empty'>{c.emptyText}</p>
) : (
posts.map((post, i) => (
<Post
key={`${post.author}-${i}`}
post={post}
index={i}
liked={!!liked[i]}
onLike={() => setLiked((prev) => ({ ...prev, [i]: !prev[i] }))}
copy={c}
hostName={hostName}
hostImage={hostImage}
join={join}
/>
))
)}
{posts.length ? (
<div className='cf-community-feed__end'>
<p className='cf-community-feed__end-text'>
<Lock className='cf-community-feed__inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{c.moreText}
</p>
<JoinControl className='cf-community-feed__btn2 cf-community-feed__end-quiet' {...join}>{c.moreLabel}</JoinControl>
<div className='cf-community-feed__end-cta'>
<CtaButton label={label} sublabel={sublabel} {...join} />
{reassurance ? (
<p className='cf-community-feed__reassure'>
<ShieldCheck className='cf-community-feed__inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</div>
) : null}
</div>
</div>
</section>
);
}
export default CommunityFeed;
type JoinProps = { href?: string; onAction?: () => void; disabled?: boolean };
function JoinControl({ href, onAction, disabled, className, ariaLabel, children }: JoinProps & { className: string; ariaLabel?: string; children: React.ReactNode }) {
if (href && !disabled) {
return (
<a className={`cf-community-feed__join ${className}`} href={href} aria-label={ariaLabel} onClick={() => onAction?.()}>
{children}
</a>
);
}
return (
<button type='button' className={`cf-community-feed__join ${className}`} aria-label={ariaLabel} disabled={disabled} onClick={() => onAction?.()}>
{children}
</button>
);
}
function CtaButton({ label, sublabel, compact, ...join }: JoinProps & { label: string; sublabel?: string; compact?: boolean }) {
return (
<JoinControl className={`cf-community-feed__cta${compact ? ' is-compact' : ''}`} {...join}>
<span className='cf-community-feed__cta-label'>{label}</span>
{sublabel && !compact ? <span className='cf-community-feed__cta-sub'>{sublabel}</span> : null}
</JoinControl>
);
}
function Avatar({ name, src, size }: { name: string; src?: string; size: 'xs' | 'sm' | 'md' }) {
const cls = `cf-community-feed__avatar is-${size}`;
if (src) return <img className={cls} src={src} alt='' width={96} height={96} loading='lazy' />;
return (
<span className={`${cls} is-tone-${tone(name)}`} aria-hidden='true'>
{initials(name)}
</span>
);
}
function Post({ post, index, liked, onLike, copy, hostName, hostImage, join }: {
post: CommunityPost;
index: number;
liked: boolean;
onLike: () => void;
copy: CommunityFeedCopy;
hostName?: string;
hostImage?: string;
join: JoinProps;
}) {
const avatar = post.avatar ?? (hostName && post.author === hostName ? hostImage : undefined);
const likes = post.likes == null ? undefined : post.likes + (liked ? 1 : 0);
const count = post.commentCount;
return (
<article className='cf-community-feed__card cf-community-feed__post' style={{ animationDelay: `${Math.min(index * 0.07, 0.28)}s` }}>
{post.pinned ? (
<p className='cf-community-feed__pinned'>
<Pin className='cf-community-feed__inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.pinned}
</p>
) : null}
<header className='cf-community-feed__post-head'>
<Avatar name={post.author} src={avatar} size='md' />
<div>
<p className='cf-community-feed__author'>
<strong>{post.author}</strong>
{post.role ? (
<span className='cf-community-feed__flag'>
<BadgeCheck size={16} strokeWidth={2.5} aria-hidden='true' />
{post.role}
</span>
) : null}
</p>
<p className='cf-community-feed__time'>
{post.time}
<span aria-hidden='true'> · </span>
<Lock className='cf-community-feed__time-icon' size={16} strokeWidth={2.5} role='img' aria-label={copy.visibility} />
</p>
</div>
</header>
{post.body && post.body.length ? (
<div className='cf-community-feed__body'>
{post.body.map((p, i) => (
<p key={i}>{p}</p>
))}
</div>
) : null}
{post.media ? <Media media={post.media} copy={copy} join={join} /> : null}
{likes != null || count != null ? (
<div className='cf-community-feed__stats'>
{likes != null ? (
<span className='cf-community-feed__likes'>
<span className='cf-community-feed__like-disc' aria-hidden='true'>
<ThumbsUp size={16} strokeWidth={2.5} />
</span>
{likes}
</span>
) : (
<span />
)}
{count != null ? <span>{count === 1 ? copy.commentCountOne : copy.commentCount.replace('{count}', String(count))}</span> : null}
</div>
) : null}
<div className='cf-community-feed__actions'>
<button type='button' className={`cf-community-feed__act${liked ? ' is-liked' : ''}`} aria-pressed={liked} disabled={join.disabled} onClick={onLike}>
<ThumbsUp size={18} strokeWidth={2.5} aria-hidden='true' />
{copy.like}
</button>
<JoinControl className='cf-community-feed__act' {...join}>
<MessageCircle size={18} strokeWidth={2.5} aria-hidden='true' />
{copy.comment}
</JoinControl>
</div>
{post.comments && post.comments.length ? (
<div className='cf-community-feed__comments'>
{post.comments.map((cm, i) => {
const src = cm.avatar ?? (cm.host || (hostName && cm.author === hostName) ? hostImage : undefined);
return (
<div key={i} className='cf-community-feed__comment'>
<Avatar name={cm.author} src={src} size='xs' />
<div className='cf-community-feed__bubble'>
<p className='cf-community-feed__author is-small'>
<strong>{cm.author}</strong>
{cm.host ? <span className='cf-community-feed__flag is-small'>{copy.host}</span> : null}
</p>
<p className='cf-community-feed__reply'>{cm.body}</p>
</div>
</div>
);
})}
</div>
) : null}
</article>
);
}
function Media({ media, copy, join }: { media: CommunityPostMedia; copy: CommunityFeedCopy; join: JoinProps }) {
if (media.kind === 'photo') {
return <img className='cf-community-feed__photo' src={media.src} alt={media.alt} width={1200} height={900} loading='lazy' />;
}
if (media.kind === 'prompt') {
return (
<div className='cf-community-feed__prompt'>
<MessageCircleQuestion size={24} strokeWidth={2.5} aria-hidden='true' />
<p className='cf-community-feed__prompt-text'>{media.text}</p>
{media.note ? <p className='cf-community-feed__prompt-note'>{media.note}</p> : null}
</div>
);
}
return (
<div className='cf-community-feed__event'>
<span className='cf-community-feed__event-icon' aria-hidden='true'>
<CalendarDays size={20} strokeWidth={2.5} />
</span>
<div className='cf-community-feed__event-copy'>
<p className='cf-community-feed__event-when'>{media.when}</p>
<p className='cf-community-feed__event-title'>{media.title}</p>
{media.note ? <p className='cf-community-feed__event-note'>{media.note}</p> : null}
</div>
<JoinControl className='cf-community-feed__btn2 cf-community-feed__event-btn' {...join}>
<Bell size={18} strokeWidth={2.5} aria-hidden='true' />
{media.actionLabel ?? copy.remind}
</JoinControl>
</div>
);
}
function collectMembers(posts: CommunityPost[], hostName?: string, hostImage?: string) {
const seen = new Set<string>();
const out: { name: string; src?: string }[] = [];
const add = (name: string, src?: string) => {
if (!name || seen.has(name) || out.length >= 5) return;
seen.add(name);
out.push({ name, src: src ?? (hostName && name === hostName ? hostImage : undefined) });
};
if (hostName) add(hostName, hostImage);
posts.forEach((p) => {
add(p.author, p.avatar);
(p.comments ?? []).forEach((cm) => add(cm.author, cm.avatar));
});
return out;
}
function initials(name: string) {
return name
.trim()
.split(' ')
.filter(Boolean)
.slice(0, 2)
.map((w) => w.charAt(0))
.join('')
.toUpperCase();
}
function tone(name: string) {
let n = 0;
for (let i = 0; i < name.length; i += 1) n = (n + name.charCodeAt(i)) % 3;
return n;
}
function isPunch(line: string) {
return line.trim().split(' ').filter(Boolean).length === 1;
}
const CSS = `
.cf-community-feed{
--cf-gutter:clamp(16px,5vw,48px);
--cf-pad-top:clamp(56px,8vw,112px);
--cf-pad-bottom:clamp(64px,8.5vw,120px);
--cf-band-soft:color-mix(in oklch,var(--band-ink,#ffffff) 84%,var(--band,#1b2a4a));
--cf-well:color-mix(in oklch,var(--ink,#141b2d) 5%,var(--card,#ffffff));
--cf-line:oklch(from var(--ink,#141b2d) l c h / .14);
--cf-btn:var(--button-bg,var(--cta,#d4402e));
--cf-btn-2:var(--button-bg-2,var(--cta-2,#b5321f));
--cf-shadow:var(--shadow,oklch(0.22 0.03 256));
position:relative;isolation:isolate;box-sizing:border-box;
background:var(--surface,#ffffff);color:var(--ink,#141b2d);
font-family:var(--font-body,system-ui,sans-serif);
padding:var(--cf-pad-top) var(--cf-gutter) calc(var(--cf-pad-bottom) + var(--cf-edge,0px));
}
.cf-community-feed *,.cf-community-feed *::before,.cf-community-feed *::after{box-sizing:border-box}
.cf-community-feed :where(h2,h3,p,ul){margin:0}
.cf-community-feed__field{position:absolute;inset:0;z-index:-1;background:var(--band,#1b2a4a);clip-path:polygon(0 0,55% 0,41% 100%,0 100%)}
.cf-community-feed__edge{left:0;right:0;bottom:0;height:56px;z-index:0;pointer-events:none}
.cf-community-feed__inner{position:relative;z-index:1;max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(32px,5vw,72px);align-items:start}
.cf-community-feed__pitch{color:var(--band-ink,#ffffff);padding-inline-end:24px;background-color:var(--band,#1b2a4a);background-clip:content-box}
@media (min-width:900px) and (min-height:820px){.cf-community-feed__pitch{position:sticky;top:32px}}
.cf-community-feed__headline{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:var(--band-ink,#ffffff)}
.cf-community-feed__lines{display:grid;gap:8px;margin-top:24px}
.cf-community-feed__lines p{font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-community-feed__lines p.is-punch{margin-top:4px;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}
.cf-community-feed__rules{list-style:none;padding:0;margin-top:32px;display:grid;gap:16px}
.cf-community-feed__rules li{display:grid;grid-template-columns:40px minmax(0,1fr);gap:16px;align-items:start}
.cf-community-feed__rule-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:oklch(from var(--band-ink,#ffffff) l c h / .12);color:var(--band-ink,#ffffff)}
.cf-community-feed__rules strong{display:block;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:800}
.cf-community-feed__rule-body{display:block;margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--cf-band-soft);text-wrap:pretty}
.cf-community-feed__action{margin-top:32px;max-width:420px;text-align:center}
.cf-community-feed__cta{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;min-height:72px;padding:12px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--cf-btn) calc(l + .04) c h),oklch(from var(--cf-btn-2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);text-decoration:none;text-align:center;cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cf-btn) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--cf-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--cf-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--cf-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-community-feed__cta:hover:not(:disabled),.cf-community-feed[data-state='hover'] .cf-community-feed__cta:not(:disabled){background:linear-gradient(oklch(from var(--cf-btn) calc(l - .01) c h),oklch(from var(--cf-btn-2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--cf-btn) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--cf-btn) calc(l - .2) c h),0 1px 2px oklch(from var(--cf-shadow) l c h / .34),0 10px 18px -6px oklch(from var(--cf-shadow) l c h / .55)}
.cf-community-feed__cta:active:not(:disabled),.cf-community-feed[data-state='active'] .cf-community-feed__cta:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--cf-btn) calc(l - .04) c h),oklch(from var(--cf-btn-2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--cf-btn) calc(l - .24) c h / .45),inset 0 -2px 0 oklch(from var(--cf-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--cf-shadow) l c h / .3)}
.cf-community-feed__cta:disabled{background:var(--secondary,#e8ebf1);color:var(--secondary-ink,#141b2d);text-shadow:none;box-shadow:none;cursor:not-allowed}
.cf-community-feed__cta-label{font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-wrap:balance}
.cf-community-feed__cta-sub{font-family:var(--font-body,inherit);font-size:15px;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-community-feed__cta.is-compact{width:auto;min-height:48px;padding:0 20px;flex:0 0 auto;white-space:nowrap}
.cf-community-feed__reassure{margin-top:12px;font-size:15px;line-height:1.4;font-weight:500;color:var(--cf-band-soft);text-wrap:pretty}
.cf-community-feed__inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-community-feed__join{--cf-join-radius:var(--button-radius,var(--radius,12px));--cf-join-font:var(--button-font,var(--font-display,inherit))}
.cf-community-feed__feed{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0}
.cf-community-feed__feed > *{min-width:0;max-width:100%}
.cf-community-feed__group{position:relative;min-width:0}
.cf-community-feed__pattern{top:-36px;right:-36px;width:240px;height:240px;z-index:-1;pointer-events:none}
.cf-community-feed__card{background:var(--card,#ffffff);color:var(--ink,#141b2d);border:1px solid var(--card-border,oklch(from var(--ink,#141b2d) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 256 / .22),0 4px 10px -2px oklch(0.22 0.03 256 / .2)))}
.cf-community-feed__head{padding:12px;box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 256 / .22),0 12px 24px -8px oklch(0.22 0.03 256 / .32))}
.cf-community-feed__cover{display:block;width:100%;height:auto;aspect-ratio:16/7;object-fit:cover;object-position:center 40%;border-radius:12px}
.cf-community-feed__identity{display:grid;gap:16px;padding:20px 12px 16px}
.cf-community-feed__title h3{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-community-feed__privacy{margin-top:8px;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted,#4f5a6e)}
.cf-community-feed__meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px}
.cf-community-feed__stack{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;min-width:0}
.cf-community-feed__faces{display:flex;padding-left:2px}
.cf-community-feed__faces > * + *{margin-left:-10px}
.cf-community-feed__stack-label{font-size:15px;line-height:1.4;font-weight:600;color:var(--muted,#4f5a6e)}
.cf-community-feed__avatar{display:grid;place-items:center;flex:0 0 auto;border-radius:50%;object-fit:cover;font-family:var(--font-display,inherit);font-size:14px;font-weight:800;line-height:1;letter-spacing:.02em}
.cf-community-feed__avatar.is-md{width:44px;height:44px}
.cf-community-feed__avatar.is-sm{width:36px;height:36px;outline:2px solid var(--card,#ffffff)}
.cf-community-feed__avatar.is-xs{width:32px;height:32px}
.cf-community-feed__avatar.is-tone-0{background:var(--secondary,#e8ebf1);color:var(--secondary-ink,#141b2d)}
.cf-community-feed__avatar.is-tone-1{background:color-mix(in oklch,var(--accent,#2f6fe0) 18%,var(--card,#ffffff));color:var(--ink,#141b2d)}
.cf-community-feed__avatar.is-tone-2{background:color-mix(in oklch,var(--cta,#d4402e) 16%,var(--card,#ffffff));color:var(--ink,#141b2d)}
.cf-community-feed__tabs{display:flex;gap:4px;min-width:0;max-width:100%;padding:0 8px;border-bottom:1px solid var(--cf-line);overflow-x:auto;scrollbar-width:none}
.cf-community-feed__tab{display:inline-flex;align-items:center;gap:6px;min-height:48px;padding:0 14px;border:0;border-radius:10px 10px 0 0;background:transparent;color:var(--muted,#4f5a6e);font-family:inherit;font-size:15px;font-weight:700;line-height:1.2;white-space:nowrap;text-decoration:none;cursor:pointer;transition:background .16s ease,color .16s ease}
.cf-community-feed__tab:hover:not(:disabled):not(.is-active){background:var(--cf-well);color:var(--ink,#141b2d)}
.cf-community-feed__tab.is-active{color:var(--ink,#141b2d);cursor:default;box-shadow:inset 0 -3px 0 var(--accent,#2f6fe0)}
.cf-community-feed__composer{display:flex;align-items:center;gap:12px;padding:16px 4px 4px}
.cf-community-feed__viewer{display:grid;place-items:center;flex:0 0 auto;width:44px;height:44px;border-radius:50%;background:var(--secondary,#e8ebf1);color:var(--secondary-ink,#141b2d)}
.cf-community-feed__write{flex:1;min-width:0;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 18px;border:1px solid var(--cf-line);border-radius:999px;background:var(--cf-well);color:var(--muted,#4f5a6e);font-family:inherit;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:500;text-align:left;text-decoration:none;cursor:pointer;transition:background .16s ease}
.cf-community-feed__write:hover:not(:disabled){background:color-mix(in oklch,var(--ink,#141b2d) 8%,var(--card,#ffffff))}
.cf-community-feed__write svg{flex:0 0 auto}
.cf-community-feed__empty{padding:clamp(20px,3vw,32px);text-align:center;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:600}
.cf-community-feed__post{padding:clamp(20px,2.4vw,24px)}
@media (prefers-reduced-motion:no-preference){.cf-community-feed__post{animation:cf-community-feed-rise .45s cubic-bezier(.2,.7,.2,1) both}}
@keyframes cf-community-feed-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-community-feed__pinned{margin-bottom:12px;font-size:14px;line-height:1.2;font-weight:800;color:var(--muted,#4f5a6e)}
.cf-community-feed__post-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:center}
.cf-community-feed__author{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3}
.cf-community-feed__author strong{font-weight:800}
.cf-community-feed__author.is-small{font-size:15px}
.cf-community-feed__flag{display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:4px 12px;border-radius:999px;background:var(--accent-fill,var(--accent,#2f6fe0));color:var(--accent-fill-ink,var(--card,#ffffff));font-size:14px;font-weight:800;line-height:1.2}
.cf-community-feed__flag.is-small{min-height:24px;padding:2px 10px}
.cf-community-feed__time{margin-top:2px;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted,#4f5a6e)}
.cf-community-feed__time-icon{display:inline-block;vertical-align:-0.15em}
.cf-community-feed__body{margin-top:16px;display:grid;gap:8px}
.cf-community-feed__body p{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty}
.cf-community-feed__photo{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:12px;margin-top:16px}
.cf-community-feed__prompt{margin-top:16px;display:grid;justify-items:center;gap:12px;padding:clamp(32px,5vw,48px) 24px;border-radius:12px;text-align:center;background:var(--accent-fill,var(--accent,#2f6fe0));color:var(--accent-fill-ink,var(--card,#ffffff))}
.cf-community-feed__prompt-text{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-wrap:balance}
.cf-community-feed__prompt-note{font-size:15px;line-height:1.4;font-weight:600}
.cf-community-feed__event{margin-top:16px;display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:12px 16px;align-items:center;padding:16px;border-radius:10px;background:var(--cf-well)}
.cf-community-feed__event-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--accent-fill,var(--accent,#2f6fe0));color:var(--accent-fill-ink,var(--card,#ffffff))}
.cf-community-feed__event-when{font-size:14px;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.cf-community-feed__event-title{margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:800;text-wrap:balance}
.cf-community-feed__event-note{margin-top:4px;font-size:15px;line-height:1.4;color:var(--muted,#4f5a6e)}
.cf-community-feed__btn2{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary,#e8ebf1));color:var(--button-2-ink,var(--secondary-ink,#141b2d));box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 1px oklch(0.22 0.03 256 / .18),0 1px 3px oklch(0.22 0.03 256 / .14)));font-family:var(--button-font,var(--font-display,inherit));font-size:15px;font-weight:var(--button-weight,800);text-transform:var(--button-case,none);line-height:1.2;white-space:nowrap;text-decoration:none;cursor:pointer;transition:transform .16s ease,background .16s ease}
.cf-community-feed__btn2:hover:not(:disabled){background:oklch(from var(--button-2-bg,var(--secondary,#e8ebf1)) calc(l - .04) c h)}
.cf-community-feed__btn2:active:not(:disabled){transform:translateY(1px)}
.cf-community-feed__stats{margin-top:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;line-height:1.4;font-weight:600;color:var(--muted,#4f5a6e)}
.cf-community-feed__likes{display:inline-flex;align-items:center;gap:8px}
.cf-community-feed__like-disc{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent-fill,var(--accent,#2f6fe0));color:var(--accent-fill-ink,var(--card,#ffffff))}
.cf-community-feed__actions{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cf-community-feed__act{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 12px;border:0;border-radius:10px;background:var(--cf-well);color:var(--muted,#4f5a6e);font-family:inherit;font-size:15px;font-weight:700;line-height:1.2;text-decoration:none;cursor:pointer;transition:background .16s ease,color .16s ease,transform .16s ease}
.cf-community-feed__act:hover:not(:disabled){background:color-mix(in oklch,var(--ink,#141b2d) 9%,var(--card,#ffffff));color:var(--ink,#141b2d)}
.cf-community-feed__act:active:not(:disabled){transform:translateY(1px)}
.cf-community-feed__act.is-liked{color:var(--accent,#2f6fe0)}
@media (prefers-reduced-motion:no-preference){.cf-community-feed__act.is-liked svg{animation:cf-community-feed-pop .3s ease both}}
@keyframes cf-community-feed-pop{from{transform:scale(.9)}to{transform:scale(1)}}
.cf-community-feed__comments{margin-top:16px;display:grid;gap:12px}
.cf-community-feed__comment{display:flex;align-items:flex-start;gap:8px;min-width:0}
.cf-community-feed__bubble{min-width:0;padding:10px 14px;border-radius:14px;background:var(--cf-well)}
.cf-community-feed__reply{margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;text-wrap:pretty}
.cf-community-feed__end{display:grid;justify-items:center;gap:16px;padding-top:16px;text-align:center}
.cf-community-feed__end-text{font-size:15px;line-height:1.4;font-weight:600;color:var(--muted,#4f5a6e);text-wrap:pretty}
.cf-community-feed__end-cta{display:none;width:100%;max-width:420px}
.cf-community-feed__end-cta .cf-community-feed__reassure{color:var(--muted,#4f5a6e)}
.cf-community-feed button:disabled{cursor:not-allowed}
.cf-community-feed :is(.cf-community-feed__btn2,.cf-community-feed__write,.cf-community-feed__tab,.cf-community-feed__act):disabled{opacity:.6}
.cf-community-feed :where(a,button):focus-visible{outline:3px solid var(--field-focus,var(--accent,#2f6fe0));outline-offset:3px}
.cf-community-feed__pitch :where(a,button):focus-visible{outline-color:var(--band-ink,#ffffff)}
@media (max-width:899px){
.cf-community-feed{padding-top:0}
.cf-community-feed__field{display:none}
.cf-community-feed__inner{grid-template-columns:minmax(0,1fr);gap:0}
.cf-community-feed__pitch{position:relative;isolation:isolate;margin-inline:calc(var(--cf-gutter) * -1);padding:var(--cf-pad-top) var(--cf-gutter) calc(var(--cf-pad-bottom) + 40px)}
.cf-community-feed__pitch::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:var(--band,#1b2a4a);clip-path:polygon(0 0,100% 0,100% calc(100% - 48px),0 100%)}
.cf-community-feed__feed{position:relative;z-index:1;margin-top:-56px}
.cf-community-feed__action{max-width:none}
.cf-community-feed__pattern{top:-20px;right:-16px;width:160px;height:160px}
.cf-community-feed__end-cta{display:block}
.cf-community-feed__end-quiet{display:none}
}
@media (max-width:520px){
.cf-community-feed__head{padding:8px}
.cf-community-feed__identity{padding:16px 8px 16px}
.cf-community-feed__meta .cf-community-feed__cta.is-compact{flex:1 1 100%;width:100%}
.cf-community-feed__tab{padding:0 12px}
.cf-community-feed__composer{padding:16px 0 4px}
.cf-community-feed__event{grid-template-columns:40px minmax(0,1fr)}
.cf-community-feed__event-btn{grid-column:1 / -1;width:100%}
}
@media (prefers-reduced-motion:reduce){
.cf-community-feed *,.cf-community-feed *::before,.cf-community-feed *::after{animation:none !important;transition:none !important}
}
`;
pieces/proof/community-feed/specimen.tsx 84 lines
import __studioImage65a0bad6 from "../assets/6154f613f7701b16.webp";
import __studioImagebd93269a from "../assets/1e78442be927ecf6.webp";
import __studioImage67493c45 from "../assets/8f7dc60f9f5b268a.webp";
import CommunityFeed from '../community-feed';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled';
export default function CommunityFeedSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const workshop = defaults.sample.registration;
const host = 'Maya Ortiz';
return (
<CommunityFeed
state={state}
headline='Don’t map your first funnel alone.'
lines={['Watch the workshop.', 'Post your plan in the room.', 'Get a straight answer from the host.', 'Together.']}
rules={[
{ icon: 'lock', title: 'Registrants only', body: 'Only people who save a seat can read and post in the room.' },
{ icon: 'calendar', title: 'One prompt each morning', body: 'A short task keeps your funnel plan moving all week.' },
{ icon: 'chat', title: 'Answers in the comments', body: 'Ask anything about your offer, your pages or your call to action.' },
]}
label='Yes! I want my free seat'
sublabel={`${workshop.name} · Free`}
reassurance={workshop.privacy}
groupName={`${workshop.name} Room`}
privacy='Private group · Registrants only'
membersLabel={`Hosted by ${host}`}
joinLabel='Join the room'
coverImage={slot('scene', __studioImage65a0bad6)}
coverAlt='A small group planning their funnels together around a table'
hostImage={slot('presenter', __studioImagebd93269a)}
hostName={host}
tabs={['Discussion', 'Events', 'Members']}
composerPlaceholder='Save a seat to post here…'
copy={{ moreText: 'The rest of the conversation is inside.', moreLabel: 'Save a seat to read it' }}
posts={[
{
author: host,
role: 'Host',
time: 'Today at 8:30 AM',
pinned: true,
body: [
'Welcome in. This week you map one offer, three pages and one call to action.',
'Bring a single product idea. That’s all you need.',
],
media: { kind: 'event', when: 'Tomorrow · 10:00 AM', title: 'Live Q&A: map your first funnel', note: 'The replay goes up in the room' },
likes: 48,
commentCount: 12,
comments: [
{ author: 'Dana Reyes', body: 'Can I bring an idea I haven’t sold yet?' },
{ author: host, host: true, body: 'Yes. An unsold idea is the perfect place to start.' },
],
},
{
author: 'Leo Tran',
time: 'Yesterday at 9:20 PM',
media: { kind: 'prompt', text: 'What’s the one offer you want your first funnel to sell?', note: 'Answer in the comments' },
likes: 21,
commentCount: 16,
comments: [
{ author: 'Priya Shah', body: 'A $27 meal-prep guide for night-shift nurses.' },
{ author: 'Sam Keller', body: 'My bookkeeping checklist for new landscapers.' },
],
},
{
author: 'Dana Reyes',
time: 'Yesterday at 6:55 PM',
body: ['Sketched my pages over coffee this morning.', 'Three pages. One offer.', 'Clear.'],
media: {
kind: 'photo',
src: __studioImage67493c45,
alt: 'Notebook with a three-page funnel sketch beside a coffee mug',
},
likes: 33,
commentCount: 9,
comments: [{ author: host, host: true, body: 'That’s exactly the shape. Post your headline next.' }],
},
]}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalCommunityFeed |
React.ReactNode |
|
lines OptionalCommunityFeed |
string[] |
|
rules OptionalCommunityFeed |
CommunityRule[] |
|
label OptionalCommunityFeed |
string |
|
sublabel OptionalCommunityFeed |
string |
|
reassurance OptionalCommunityFeed |
string |
|
groupName OptionalCommunityFeed |
string |
|
privacy OptionalCommunityFeed |
string |
|
membersLabel OptionalCommunityFeed |
string |
|
joinLabel OptionalCommunityFeed |
string |
|
coverImage OptionalCommunityFeed |
string |
|
coverAlt OptionalCommunityFeed |
string |
|
hostImage OptionalCommunityFeed |
string |
|
hostName OptionalCommunityFeed |
string |
|
tabs OptionalCommunityFeed |
string[] |
|
activeTab OptionalCommunityFeed |
number |
|
composerPlaceholder OptionalCommunityFeed |
string |
|
posts OptionalCommunityFeed |
CommunityPost[] |
|
copy OptionalCommunityFeed |
Partial<CommunityFeedCopy> |
|
edgeTone OptionalCommunityFeed |
'band' | 'surface' | 'card' | null |
|
href OptionalCommunityFeed |
string |
|
onAction OptionalCommunityFeed |
() => void |
|
state OptionalCommunityFeed |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalCommunityFeed |
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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter- A photo of the host, coach or founder.
scene- A wide atmosphere photo behind or beside the copy.
-
1e78442be927ecf6.webp
image/webp · 57.2 KB
-
6154f613f7701b16.webp
image/webp · 108 KB
-
8f7dc60f9f5b268a.webp
image/webp · 156 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB