Message Wall 1
Message wall: the messages customers actually send, typed in as neutral chat threads on a lit dark stage. The section then closes interview-style (what it costs, how to start) and ends on the first-person action.
Use it in a prompt
Use proof/message-wall 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/message-wall.tsx. - Import it and pass your copy and images (Props tab):
import { MessageWall } from "@/components/funneldna/proof/message-wall"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/message-wall/component.tsx 697 lines
// layout: interview-qa
// Message wall: the messages customers actually send, typed in as neutral chat threads on a lit dark stage. The section then closes interview-style (what it costs, how to start) and ends on the first-person action.
import React from 'react';
import { MessagesSquare, User } from 'lucide-react';
import { Mesh, Divider, FX_HOST } from '../fx/fx';
type DividerTone = React.ComponentProps<typeof Divider>['tone'];
export type MessageWallMessage = {
// who sent it: the customer (left, card bubble) or the business reply (right, primary bubble)
from: 'customer' | 'business';
text?: React.ReactNode;
// an attached photo (src), shown as its own rounded image above any text
image?: string;
imageAlt?: string;
};
export type MessageWallThread = {
// the customer's first name; empty shows no name
name?: string;
// show the name as an initial only, e.g. 'D.'
initialOnly?: boolean;
// optional time label, e.g. 'Tue 7:42 PM'
time?: string;
// spans two columns on desktop and leads on phones (the first featured thread only)
featured?: boolean;
messages?: MessageWallMessage[];
};
export type MessageWallCopy = {
// placeholders: {name}
conversation: string;
conversationFallback: string;
// placeholders: {name}
customerSpeaker: string;
customerFallback: string;
// placeholders: {business}
businessSpeaker: string;
businessFallback: string;
// placeholders: {name}
photoAlt: string;
photoAltFallback: string;
replyPhotoAlt: string;
};
export type MessageWallProps = {
// the section question, set large
headline?: React.ReactNode;
lead?: React.ReactNode;
// proof: the conversations, rendered only as supplied; empty renders nothing
threads?: MessageWallThread[];
// the business name, read to screen readers before each reply
businessName?: string;
// show every customer name as an initial (a thread can override)
initialNames?: boolean;
// small line under the wall, e.g. how the messages were shared
note?: React.ReactNode;
// interview close: first question and its answer (price + per-day breakdown); hidden without a price
costQuestion?: string;
price?: string;
priceTerm?: string;
priceNote?: React.ReactNode;
// interview close: last question, answered by the action
startQuestion?: string;
actionLabel?: string;
actionNote?: React.ReactNode;
href?: string;
onAction?: () => void;
// wave edge into the next section
showEdge?: boolean;
edgeTone?: DividerTone;
copy?: Partial<MessageWallCopy>;
state?: 'default' | 'hover' | 'active' | 'disabled';
className?: string;
};
export function MessageWall(props: MessageWallProps) {
const {
headline = 'What do customers say once they try it?',
lead = 'These are the messages they send.',
threads = [],
businessName = '',
initialNames = false,
note = '',
costQuestion = 'What does it cost?',
price = '',
priceTerm = '',
priceNote = '',
startQuestion = 'How do I start?',
actionLabel = 'Yes! I want to get started',
actionNote = '',
href,
onAction,
showEdge = true,
edgeTone = 'surface' as DividerTone,
copy: copyProp,
state = 'default',
className,
} = props;
const uid = React.useId();
const headId = uid + 'mw-title';
const copy: MessageWallCopy = { ...DEFAULT_COPY, ...copyProp };
const list = cleanThreads(threads);
if (list.length === 0) return null;
const featuredAt = list.findIndex((t) => t.featured);
const others = list.length - (featuredAt >= 0 ? 1 : 0);
const tall = featuredAt >= 0 && (others + 2) % 3 !== 0 && (others + 4) % 3 === 0;
let lastOther = -1;
list.forEach((_, i) => {
if (i !== featuredAt) lastOther = i;
});
const oddLast = others % 2 === 1 ? lastOther : -1;
const disabled = state === 'disabled';
const showCost = hasText(price);
const showStart = hasText(actionLabel);
const btnClass = 'mw-btn' + (state === 'hover' ? ' is-hover' : '') + (state === 'active' ? ' is-active' : '');
const handle = (e: React.MouseEvent) => {
if (disabled) {
e.preventDefault();
return;
}
onAction?.();
};
const button =
href && !disabled ? (
<a className={btnClass} href={href} onClick={handle}>
{actionLabel}
</a>
) : (
<button type='button' className={btnClass} disabled={disabled} onClick={handle}>
{actionLabel}
</button>
);
const hostStyle = { ...FX_HOST, ['--mw-edge' as string]: showEdge ? '56px' : '0px' } as React.CSSProperties;
return (
<section className={'cf-message-wall' + (className ? ' ' + className : '')} style={hostStyle} aria-labelledby={headId}>
<style>{CSS}</style>
<Mesh variant='dark' />
<div className='mw-inner'>
<header className='mw-head'>
<h2 id={headId} className='mw-title'>
{headline}
</h2>
{hasText(lead) && <p className='mw-lead'>{lead}</p>}
</header>
<div className='mw-grid'>
{list.map((t, i) => (
<Thread
key={i}
thread={t}
index={i}
featured={i === featuredAt}
tall={i === featuredAt && tall}
oddLast={i === oddLast}
copy={copy}
businessName={businessName}
initialNames={initialNames}
/>
))}
</div>
{hasText(note) && (
<p className='mw-note'>
<MessagesSquare className='mw-icon' size={18} strokeWidth={2.5} aria-hidden='true' />
{note}
</p>
)}
{(showCost || showStart) && (
<div className={'mw-close' + (showCost && showStart ? ' is-pair' : '')}>
{showCost && (
<div className='mw-qa'>
<h3 className='mw-q'>{costQuestion}</h3>
<div className='mw-price'>
<span className='mw-num'>{price}</span>
{hasText(priceTerm) && <span className='mw-term'>{priceTerm}</span>}
</div>
{hasText(priceNote) && <p className='mw-pnote'>{priceNote}</p>}
</div>
)}
{showStart && (
<div className='mw-qa'>
<h3 className='mw-q'>{startQuestion}</h3>
{button}
{hasText(actionNote) && <p className='mw-anote'>{actionNote}</p>}
</div>
)}
</div>
)}
</div>
{showEdge && <Divider shape='wave' tone={edgeTone} height={56} />}
</section>
);
}
export default MessageWall;
type CleanThread = MessageWallThread & { messages: MessageWallMessage[] };
type ThreadProps = {
thread: CleanThread;
index: number;
featured: boolean;
tall: boolean;
oddLast: boolean;
copy: MessageWallCopy;
businessName: string;
initialNames: boolean;
};
function Thread({ thread, index, featured, tall, oddLast, copy, businessName, initialNames }: ThreadProps) {
const ref = React.useRef<HTMLElement | null>(null);
const messages = thread.messages;
const total = messages.length;
const [shown, setShown] = React.useState(total);
const [typing, setTyping] = React.useState(false);
const [playing, setPlaying] = React.useState(false);
// Signature: on first view the thread types itself in, one bubble after a typing dot. Static under reduced motion.
useIsoLayoutEffect(() => {
const el = ref.current;
if (!el || typeof window === 'undefined' || typeof IntersectionObserver === 'undefined') return;
if (window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
let alive = true;
const timers: number[] = [];
const later = (ms: number, fn: () => void) => {
timers.push(
window.setTimeout(() => {
if (alive) fn();
}, ms),
);
};
const step = (i: number) => {
if (i >= total) return;
setTyping(true);
later(typingTime(messages[i]), () => {
setTyping(false);
setShown(i + 1);
later(260, () => step(i + 1));
});
};
setShown(0);
setPlaying(true);
const io = new IntersectionObserver(
(entries) => {
if (entries.some((e) => e.isIntersecting)) {
io.disconnect();
later((index % 3) * 220, () => step(0));
}
},
{ threshold: 0.15 },
);
io.observe(el);
return () => {
alive = false;
io.disconnect();
timers.forEach((t) => window.clearTimeout(t));
setShown(total);
setTyping(false);
setPlaying(false);
};
}, [total, index]);
const raw = (thread.name || '').trim();
const initialOnly = thread.initialOnly ?? initialNames;
const shownName = raw ? (initialOnly ? raw.charAt(0).toUpperCase() + '.' : raw) : '';
const letter = raw ? raw.charAt(0).toUpperCase() : '';
const label = shownName ? fill(copy.conversation, { name: shownName }) : copy.conversationFallback;
const customerSpeaker = shownName ? fill(copy.customerSpeaker, { name: shownName }) : copy.customerFallback;
const businessSpeaker = businessName ? fill(copy.businessSpeaker, { business: businessName }) : copy.businessFallback;
const cls = 'mw-tile' + (featured ? ' is-featured' : '') + (tall ? ' is-tall' : '') + (oddLast ? ' is-odd-last' : '');
return (
<article ref={ref} className={cls} aria-label={label} data-playing={playing ? 'true' : undefined}>
<div className='mw-who'>
<span className='mw-avatar' aria-hidden='true'>
{letter || <User size={20} strokeWidth={2.5} />}
</span>
{shownName && <span className='mw-name'>{shownName}</span>}
{hasText(thread.time) && <span className='mw-time'>{thread.time}</span>}
</div>
<ol className='mw-msgs'>
{messages.map((m, i) => {
const biz = m.from === 'business';
const prev = messages[i - 1];
const switched = i > 0 && (prev.from === 'business') !== biz;
const st = i < shown ? 'shown' : typing && i === shown ? 'typing' : 'hidden';
const alt =
m.imageAlt ||
(biz ? copy.replyPhotoAlt : shownName ? fill(copy.photoAlt, { name: shownName }) : copy.photoAltFallback);
return (
<li
key={i}
className={'mw-row ' + (biz ? 'is-business' : 'is-customer') + (switched ? ' is-switch' : '')}
data-state={st}
>
<div className={'mw-msg' + (m.image ? ' has-photo' : '')}>
<span className='mw-sr'>{(biz ? businessSpeaker : customerSpeaker) + ' '}</span>
{m.image && <img className='mw-photo' src={m.image} alt={alt} loading='lazy' decoding='async' />}
{hasText(m.text) && <p className='mw-bubble'>{m.text}</p>}
</div>
<span className='mw-typing' aria-hidden='true'>
<i />
<i />
<i />
</span>
</li>
);
})}
</ol>
</article>
);
}
const DEFAULT_COPY: MessageWallCopy = {
conversation: 'Conversation with {name}',
conversationFallback: 'Customer conversation',
customerSpeaker: '{name} wrote:',
customerFallback: 'Customer wrote:',
businessSpeaker: '{business} replied:',
businessFallback: 'Reply:',
photoAlt: 'Photo sent by {name}',
photoAltFallback: 'Photo sent by a customer',
replyPhotoAlt: 'Photo sent in reply',
};
const useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
function typingTime(m: MessageWallMessage): number {
if (typeof m.text === 'string') return Math.min(1100, 480 + m.text.length * 5);
return m.image ? 800 : 700;
}
function cleanThreads(threads: MessageWallThread[]): CleanThread[] {
const out: CleanThread[] = [];
let featuredSeen = false;
(threads || []).forEach((t) => {
if (!t) return;
const messages = (t.messages || []).filter(
(m) => !!m && (hasText(m.text) || (typeof m.image === 'string' && m.image.trim() !== '')),
);
if (messages.length === 0) return;
const featured = !!t.featured && !featuredSeen;
if (featured) featuredSeen = true;
out.push({ ...t, featured, messages });
});
return out;
}
function hasText(v: React.ReactNode): boolean {
if (v === null || v === undefined || v === false || v === true) return false;
if (typeof v === 'string') return v.trim() !== '';
return true;
}
function fill(template: string, values: Record<string, string>): string {
return Object.keys(values).reduce((s, k) => s.split('{' + k + '}').join(values[k]), template);
}
const CSS = `
.cf-message-wall{
--mw-subhead: var(--message-wall-subhead, oklch(from var(--cta) max(l, 0.72) c h));
--mw-soft: color-mix(in oklch, var(--band-ink) 84%, var(--band));
--mw-shadow: var(--shadow, oklch(0.22 0.03 260));
position: relative;
overflow: hidden;
background: var(--band);
color: var(--band-ink);
font-family: var(--font-body);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) calc(clamp(64px, 8.5vw, 120px) + var(--mw-edge, 0px));
}
.cf-message-wall *{ box-sizing: border-box; }
.cf-message-wall .mw-inner{ position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.cf-message-wall .mw-head{ max-width: 46rem; margin: 0 0 clamp(32px, 4vw, 48px); }
.cf-message-wall .mw-title{
margin: 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: clamp(2rem, 3.6vw, 3.25rem);
line-height: 1.06;
text-wrap: balance;
color: var(--band-ink);
}
.cf-message-wall .mw-lead{
margin: 22px 0 0;
max-width: 60ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--mw-soft);
text-wrap: pretty;
}
.cf-message-wall .mw-grid{
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-flow: row dense;
gap: clamp(16px, 2vw, 24px);
align-items: stretch;
}
.cf-message-wall .mw-tile{
position: relative;
min-width: 0;
display: flex;
flex-direction: column;
gap: 16px;
padding: clamp(18px, 2.2vw, 24px);
border-radius: var(--card-radius, var(--radius, 14px));
background: oklch(from var(--band-ink) l c h / 0.06);
border: 1px solid oklch(from var(--band-ink) l c h / 0.14);
transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
.cf-message-wall .mw-tile.is-featured{
grid-column: span 2;
background: oklch(from var(--band-ink) l c h / 0.09);
border-color: oklch(from var(--accent-fill, var(--accent)) l c h / 0.6);
}
.cf-message-wall .mw-tile.is-tall{ grid-row: span 2; }
@media (hover: hover){
.cf-message-wall .mw-tile:hover{
transform: translateY(-2px);
background: oklch(from var(--band-ink) l c h / 0.09);
border-color: oklch(from var(--band-ink) l c h / 0.26);
}
.cf-message-wall .mw-tile.is-featured:hover{
background: oklch(from var(--band-ink) l c h / 0.11);
border-color: oklch(from var(--accent-fill, var(--accent)) l c h / 0.85);
}
}
.cf-message-wall .mw-who{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.cf-message-wall .mw-avatar{
flex: none;
width: 40px;
height: 40px;
border-radius: 999px;
display: grid;
place-items: center;
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
font-family: var(--font-display);
font-weight: 800;
font-size: 17px;
line-height: 1;
}
.cf-message-wall .mw-name{
min-width: 0;
font-size: 17px;
font-weight: 700;
line-height: 1.2;
color: var(--band-ink);
overflow-wrap: anywhere;
}
.cf-message-wall .mw-time{
margin-left: auto;
flex: none;
font-size: 15px;
font-weight: 500;
line-height: 1.4;
color: var(--mw-soft);
white-space: nowrap;
}
.cf-message-wall .mw-msgs{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cf-message-wall .mw-row{ position: relative; display: flex; min-width: 0; }
.cf-message-wall .mw-row.is-business{ justify-content: flex-end; }
.cf-message-wall .mw-row.is-switch{ margin-top: 6px; }
.cf-message-wall .mw-msg{
position: relative;
max-width: 86%;
min-width: 0;
display: flex;
flex-direction: column;
gap: 6px;
align-items: flex-start;
transform-origin: bottom left;
}
.cf-message-wall .is-business .mw-msg{ align-items: flex-end; transform-origin: bottom right; }
.cf-message-wall .mw-msg.has-photo{ width: 78%; }
.cf-message-wall .mw-photo{
display: block;
width: 100%;
aspect-ratio: 4 / 3;
object-fit: cover;
object-position: center;
border-radius: 12px;
}
.cf-message-wall .mw-bubble{
margin: 0;
padding: 10px 14px;
border-radius: 18px;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.45;
text-wrap: pretty;
overflow-wrap: break-word;
box-shadow: var(--shadow-sm, 0 1px 2px oklch(from var(--mw-shadow) l c h / 0.25));
}
.cf-message-wall .is-customer .mw-bubble{
background: var(--card);
color: var(--ink);
border: 1px solid oklch(from var(--ink) l c h / 0.08);
border-bottom-left-radius: 6px;
}
.cf-message-wall .is-business .mw-bubble{
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
border-bottom-right-radius: 6px;
}
.cf-message-wall .is-featured .mw-bubble{ font-size: clamp(1.125rem, 1.5vw, 1.375rem); padding: 12px 16px; }
.cf-message-wall .is-featured .mw-msg{ max-width: 74%; }
.cf-message-wall .is-featured .mw-msg.has-photo{ width: 62%; }
.cf-message-wall .mw-sr{
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
white-space: nowrap;
}
.cf-message-wall .mw-typing{
position: absolute;
top: 0;
left: 0;
display: none;
align-items: center;
gap: 5px;
height: 38px;
padding: 0 15px;
border-radius: 18px;
border-bottom-left-radius: 6px;
background: var(--card);
color: oklch(from var(--ink) l c h / 0.5);
box-shadow: var(--shadow-sm, 0 1px 2px oklch(from var(--mw-shadow) l c h / 0.25));
}
.cf-message-wall .is-business .mw-typing{
left: auto;
right: 0;
border-bottom-left-radius: 18px;
border-bottom-right-radius: 6px;
background: var(--accent-fill, var(--accent));
color: oklch(from var(--accent-fill-ink, var(--card)) l c h / 0.8);
}
.cf-message-wall .mw-typing i{
display: block;
width: 7px;
height: 7px;
border-radius: 999px;
background: currentColor;
animation: mw-dot 1s ease-in-out infinite;
}
.cf-message-wall .mw-typing i:nth-child(2){ animation-delay: .15s; }
.cf-message-wall .mw-typing i:nth-child(3){ animation-delay: .3s; }
.cf-message-wall .mw-row[data-state='hidden'] .mw-msg,
.cf-message-wall .mw-row[data-state='typing'] .mw-msg{ opacity: 0; }
.cf-message-wall .mw-row[data-state='typing'] .mw-typing{ display: inline-flex; animation: mw-pop .24s cubic-bezier(.2,.7,.2,1) both; }
.cf-message-wall .mw-tile[data-playing] .mw-row[data-state='shown'] .mw-msg{ animation: mw-pop .32s cubic-bezier(.2,.7,.2,1) both; }
@keyframes mw-pop{ from{ opacity: 0; transform: translateY(6px) scale(.96); } to{ opacity: 1; transform: none; } }
@keyframes mw-dot{ 0%, 80%, 100%{ opacity: .35; transform: translateY(0); } 40%{ opacity: 1; transform: translateY(-3px); } }
.cf-message-wall .mw-note{
margin: 24px 0 0;
font-size: 15px;
font-weight: 500;
line-height: 1.4;
color: var(--mw-soft);
text-wrap: pretty;
}
.cf-message-wall .mw-icon{ display: inline-block; vertical-align: -0.2em; margin-inline-end: .4em; }
.cf-message-wall .mw-close{
margin-top: clamp(48px, 6vw, 72px);
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: clamp(32px, 5vw, 72px);
align-items: start;
max-width: 34rem;
}
.cf-message-wall .mw-close.is-pair{ grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); max-width: none; }
.cf-message-wall .mw-qa{ min-width: 0; }
.cf-message-wall .mw-q{
margin: 0 0 20px;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
text-wrap: balance;
color: var(--mw-subhead);
}
.cf-message-wall .mw-price{ display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 4px 0 2px; }
.cf-message-wall .mw-num{
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1.1;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--band-ink);
}
.cf-message-wall .mw-term{
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
font-weight: 500;
line-height: 1.4;
color: var(--band-ink);
}
.cf-message-wall .mw-pnote{
margin: 16px 0 0;
max-width: 44ch;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--mw-soft);
text-wrap: pretty;
}
.cf-message-wall .mw-btn{
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
width: 100%;
min-height: 72px;
padding: 12px 28px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
text-transform: var(--button-case, none);
text-align: center;
text-wrap: balance;
text-decoration: none;
color: var(--button-ink, var(--cta-ink));
text-shadow: var(--button-text-shadow, none);
cursor: pointer;
-webkit-tap-highlight-color: transparent;
background: linear-gradient(oklch(from var(--button-bg, var(--cta)) calc(l + 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.02) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--mw-shadow) l c h / 0.35), 0 8px 16px -6px oklch(from var(--mw-shadow) l c h / 0.5));
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-message-wall .mw-btn:hover:not(:disabled),
.cf-message-wall .mw-btn.is-hover{
background: linear-gradient(oklch(from var(--button-bg, var(--cta)) calc(l - 0.01) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.18) c h), 0 1px 2px oklch(from var(--mw-shadow) l c h / 0.4), 0 12px 20px -8px oklch(from var(--mw-shadow) l c h / 0.6);
}
.cf-message-wall .mw-btn:active:not(:disabled),
.cf-message-wall .mw-btn.is-active{
transform: translateY(1px);
background: linear-gradient(oklch(from var(--button-bg, var(--cta)) calc(l - 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.09) c h));
box-shadow: inset 0 -2px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.18) c h), inset 0 2px 5px oklch(from var(--mw-shadow) l c h / 0.3), 0 1px 1px oklch(from var(--mw-shadow) l c h / 0.3);
}
.cf-message-wall .mw-btn:focus-visible{ outline: 3px solid var(--band-ink); outline-offset: 3px; }
.cf-message-wall .mw-btn:disabled{
cursor: not-allowed;
transform: none;
background: color-mix(in oklch, var(--band-ink) 20%, var(--band));
color: var(--band-ink);
text-shadow: none;
box-shadow: none;
}
.cf-message-wall .mw-anote{
margin: 14px 0 0;
font-size: 15px;
font-weight: 500;
line-height: 1.4;
color: var(--mw-soft);
text-wrap: pretty;
}
@media (max-width: 1023px){
.cf-message-wall .mw-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf-message-wall .mw-tile.is-tall{ grid-row: auto; }
.cf-message-wall .mw-tile.is-odd-last{ grid-column: span 2; }
}
@media (max-width: 640px){
.cf-message-wall .mw-grid{ grid-template-columns: minmax(0, 1fr); }
.cf-message-wall .mw-tile.is-featured,
.cf-message-wall .mw-tile.is-odd-last{ grid-column: auto; }
.cf-message-wall .mw-tile.is-featured{ order: -1; }
.cf-message-wall .mw-close.is-pair{ grid-template-columns: minmax(0, 1fr); }
.cf-message-wall .mw-btn{ width: 100%; }
.cf-message-wall .is-featured .mw-msg{ max-width: 86%; }
.cf-message-wall .is-featured .mw-msg.has-photo{ width: 84%; }
}
@media (prefers-reduced-motion: reduce){
.cf-message-wall .mw-tile,
.cf-message-wall .mw-btn{ transition: none; }
.cf-message-wall .mw-tile:hover,
.cf-message-wall .mw-tile.is-featured:hover{ transform: none; }
.cf-message-wall .mw-btn:active,
.cf-message-wall .mw-btn.is-active{ transform: none; }
.cf-message-wall .mw-row[data-state] .mw-msg,
.cf-message-wall .mw-tile[data-playing] .mw-row[data-state] .mw-msg{ opacity: 1; animation: none; }
.cf-message-wall .mw-row[data-state] .mw-typing{ display: none; animation: none; }
}
`;
pieces/proof/message-wall/specimen.tsx 95 lines
import __studioImagebdc3bb25 from "../assets/4be5e5b00ec0536b.webp";
import __studioImagec221ebe5 from "../assets/abff496643c9445f.webp";
import React from 'react';
import { MessageWall, type MessageWallProps, type MessageWallThread } from '../message-wall';
import defaults from '../../studio-defaults.json';
export const states = ['default', 'hover', 'active', 'disabled'];
const threads: MessageWallThread[] = [
{
name: 'Priya',
time: 'Tue 7:42 PM',
featured: true,
messages: [
{ from: 'customer', text: 'Week two and nobody has asked ‘what’s for dinner?’ once. The grocery list alone gave me my Sunday back.' },
{
from: 'customer',
image: __studioImagebdc3bb25,
imageAlt: 'Two lemon chickpea bowls on a family dinner table',
text: 'Tonight’s lemon chickpea bowls. The kids had seconds.',
},
{ from: 'business', text: 'Seconds is the best review there is! Thursday’s tacos use the leftover chickpeas, so you’re already halfway there.' },
{ from: 'customer', text: 'Wait, it plans the leftovers too? Okay, I’m hooked.' },
],
},
{
name: 'Marcus',
time: 'Mon 6:15 PM',
messages: [
{ from: 'customer', text: 'Made the 20-minute sesame noodles after a ten-hour shift. It actually took 20 minutes.' },
{ from: 'business', text: 'That’s the whole idea. There’s a gluten-free swap in the recipe notes if you ever need it.' },
],
},
{
name: 'Hannah',
time: 'Sat 11:03 AM',
messages: [
{ from: 'customer', text: 'Do the plans work for one person? Cooking just for me usually means wasted food.' },
{ from: 'business', text: 'They do. Set servings to 1 in your profile and every list scales down.' },
{ from: 'customer', text: 'Just did it. Zero sad wilted spinach this week.' },
],
},
{
name: 'Elena',
time: 'Fri 8:30 PM',
messages: [
{ from: 'customer', text: 'Grocery bill this week: $86 for five dinners. Last month we ordered in three nights a week.' },
{ from: 'business', text: 'Love that. Each plan reuses ingredients across the week, which is where most of the saving comes from.' },
{ from: 'customer', text: 'My husband wants to know if he can get the coconut curry again.' },
{ from: 'business', text: 'Tap the heart on any recipe and it comes back next month.' },
],
},
{
name: 'Jordan',
initialOnly: true,
time: 'Wed 9:12 PM',
messages: [
{ from: 'customer', text: 'I picked the vegetarian plan and it still feels like a real dinner. My partner didn’t even notice the switch.' },
{ from: 'business', text: 'Ha! That’s our favourite kind of message.' },
],
},
{
name: 'Sam',
time: 'Sun 4:48 PM',
messages: [
{
from: 'customer',
image: __studioImagec221ebe5,
imageAlt: 'Fridge shelf stacked with prepped meal containers',
text: 'Sunday prep done in under an hour. The fridge has never looked this organised.',
},
{ from: 'business', text: 'Look at that fridge! Next week’s list drops Friday morning.' },
],
},
];
export default function MessageWallSpecimen({ state = 'default' }: { state?: MessageWallProps['state'] }) {
return (
<MessageWall
headline='What happens after the first week of Sprout Supper?'
lead='The messages that land in our inbox once dinner stops being a nightly puzzle.'
threads={threads}
businessName='Sprout Supper'
note='Shared with permission. First names only.'
costQuestion='So what does it cost?'
price={defaults.sample.price}
priceTerm='for your first month'
priceNote='About $1.57 a day for a month of dinners, planned with the grocery list done.'
startQuestion='How do I get my first week?'
actionLabel='Yes! I want Sprout Supper'
actionNote='Pick your dinners in about two minutes. Cancel anytime from your account.'
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalMessageWall |
React.ReactNode |
|
lead OptionalMessageWall |
React.ReactNode |
|
threads OptionalMessageWall |
MessageWallThread[] |
|
businessName OptionalMessageWall |
string |
|
initialNames OptionalMessageWall |
boolean |
|
note OptionalMessageWall |
React.ReactNode |
|
costQuestion OptionalMessageWall |
string |
|
price OptionalMessageWall |
string |
|
priceTerm OptionalMessageWall |
string |
|
priceNote OptionalMessageWall |
React.ReactNode |
|
startQuestion OptionalMessageWall |
string |
|
actionLabel OptionalMessageWall |
string |
|
actionNote OptionalMessageWall |
React.ReactNode |
|
href OptionalMessageWall |
string |
|
onAction OptionalMessageWall |
() => void |
|
showEdge OptionalMessageWall |
boolean |
|
edgeTone OptionalMessageWall |
DividerTone |
|
copy OptionalMessageWall |
Partial<MessageWallCopy> |
|
state OptionalMessageWall |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalMessageWall |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--card-radius- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
4be5e5b00ec0536b.webp
image/webp · 115 KB
-
abff496643c9445f.webp
image/webp · 91.4 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB