Quote River 1
Quote river: short praise drifting in three typographic lanes (the biggest, middle lane against the flow) across a
Use it in a prompt
Use proof/quote-river 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/quote-river.tsx. - Import it and pass your copy and images (Props tab):
import { QuoteRiver } from "@/components/funneldna/proof/quote-river"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/quote-river/component.tsx 636 lines
// layout: comparison-columns
// Quote river: short praise drifting in three typographic lanes (the biggest, middle lane against the flow) across a
// full-width dark band, so the visitor feels many voices agree right before the action. Hover or focus pauses a lane.
import * as React from 'react';
import { Pause, Play, Star } from 'lucide-react';
import { Mesh, Divider, FX_HOST } from '../fx/fx';
export type QuoteRiverQuote = {
quote: string;
// first name only, exactly as supplied
name?: string;
city?: string;
};
export type QuoteRiverProps = {
// supplied praise only; an empty list renders nothing
quotes?: QuoteRiverQuote[];
headline?: React.ReactNode;
// optional line under the headline; '{count}' becomes the number of supplied quotes
lead?: string;
// the mark set between quotes
separator?: 'star' | 'dot';
// empty hides the button and the line under it
actionLabel?: string;
href?: string;
onAction?: () => void;
// the plain line under the button
secondaryText?: string;
secondaryHref?: string;
// stepped hand-off into the next (surface) section
edge?: 'step' | 'chevron' | 'none';
copy?: { pause?: string; play?: string; riverLabel?: string };
state?: 'default' | 'hover' | 'active' | 'disabled';
className?: string;
};
type LaneSize = 'lg' | 'md' | 'sm';
type LaneConf = { size: LaneSize; dir: 1 | -1; speed: number };
type LaneItem = { text: string; caption: string };
// px per second; the middle lane is the biggest, the slowest and runs against the other two
const LANES: Record<number, LaneConf[]> = {
1: [{ size: 'lg', dir: 1, speed: 26 }],
2: [
{ size: 'lg', dir: 1, speed: 26 },
{ size: 'sm', dir: -1, speed: 40 },
],
3: [
{ size: 'md', dir: 1, speed: 34 },
{ size: 'lg', dir: -1, speed: 22 },
{ size: 'sm', dir: 1, speed: 50 },
],
};
const DEFAULT_COPY = { pause: 'Pause quotes', play: 'Play quotes', riverLabel: 'What people are saying' };
export function QuoteRiver(props: QuoteRiverProps) {
const {
quotes = [],
headline = 'Don’t take our word for it',
lead = '',
separator = 'star',
actionLabel = '',
href,
onAction,
secondaryText = 'or keep reading to see what’s inside',
secondaryHref,
edge = 'step',
copy,
state = 'default',
className = '',
} = props;
const text = { ...DEFAULT_COPY, ...copy };
const headId = React.useId();
const riverId = React.useId();
const sectionRef = React.useRef<HTMLElement>(null);
const reduced = useMedia('(prefers-reduced-motion: reduce)');
const phone = useMedia('(max-width: 640px)');
const [userPlaying, setUserPlaying] = React.useState(true);
const [inView, setInView] = React.useState(true);
const list = React.useMemo<LaneItem[]>(
() =>
(quotes ?? [])
.filter((q) => q && typeof q.quote === 'string')
.map((q) => ({
text: q.quote.trim().replace(/^[“”']+|[“”']+$/g, '').trim(),
caption: [q.name, q.city]
.map((s) => (s ?? '').trim())
.filter(Boolean)
.join(', '),
}))
.filter((q) => q.text !== ''),
[quotes],
);
const count = Math.min(phone ? 2 : 3, list.length);
const lanes = React.useMemo(() => {
const out: LaneItem[][] = Array.from({ length: count }, () => []);
list.forEach((q, i) => out[i % count].push(q));
return out;
}, [list, count]);
const has = list.length > 0;
// off-screen the lanes stop their animation loop entirely (no frames are produced)
React.useEffect(() => {
const el = sectionRef.current;
if (!el || typeof IntersectionObserver === 'undefined') return;
const io = new IntersectionObserver((entries) => setInView(entries.some((e) => e.isIntersecting)), {
rootMargin: '160px 0px',
});
io.observe(el);
return () => io.disconnect();
}, [has]);
if (!has) return null;
const isStatic = reduced;
const playing = userPlaying && inView;
const confs = LANES[count];
const liftLane = state === 'hover' ? Math.min(1, count - 1) : -1;
const leadText = lead.split('{count}').join(String(list.length));
const btnState = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : '';
const disabled = state === 'disabled';
const rootClass = ['cf-quote-river', edge !== 'none' ? 'has-edge' : '', className].filter(Boolean).join(' ');
return (
<section
ref={sectionRef}
className={rootClass}
style={FX_HOST}
aria-labelledby={headline ? headId : undefined}
aria-label={headline ? undefined : text.riverLabel}
>
<Mesh variant='dark' />
<div className='qr-wrap'>
{headline || leadText ? (
<header className='qr-head'>
{headline ? (
<h2 id={headId} className='qr-h'>
{headline}
</h2>
) : null}
{leadText ? <p className='qr-lead'>{leadText}</p> : null}
</header>
) : null}
<div
id={riverId}
className={`qr-river${isStatic ? ' is-static' : ''}`}
role='group'
aria-label={text.riverLabel}
>
{lanes.map((items, i) => (
<Lane
key={`${count}-${i}-${isStatic ? 's' : 'm'}`}
items={items}
conf={confs[i]}
playing={playing}
isStatic={isStatic}
separator={separator}
forceLift={i === liftLane ? 0 : undefined}
/>
))}
</div>
{!isStatic ? (
<div className='qr-controls'>
<button
type='button'
className='qr-toggle'
aria-controls={riverId}
onClick={() => setUserPlaying((p) => !p)}
>
{userPlaying ? (
<Pause size={16} strokeWidth={2.5} aria-hidden='true' />
) : (
<Play size={16} strokeWidth={2.5} aria-hidden='true' />
)}
{userPlaying ? text.pause : text.play}
</button>
</div>
) : null}
{actionLabel ? (
<div className='qr-action'>
{href && !disabled ? (
<a className={`qr-btn${btnState}`} href={href} onClick={onAction ? () => onAction() : undefined}>
{actionLabel}
</a>
) : (
<button
type='button'
className={`qr-btn${btnState}`}
disabled={disabled}
onClick={() => onAction?.()}
>
{actionLabel}
</button>
)}
{secondaryText ? (
<p className='qr-more'>{secondaryHref ? <a href={secondaryHref}>{secondaryText}</a> : secondaryText}</p>
) : null}
</div>
) : null}
</div>
{edge !== 'none' ? <Divider shape={edge} tone='surface' height={56} /> : null}
<style>{CSS}</style>
</section>
);
}
export default QuoteRiver;
// One lane: the quote set is repeated only as often as a seamless loop needs (a lead copy so a focused quote can be
// centred, the live copy, and enough tail copies to cover the lane). Only the live copy is focusable and read by
// assistive tech. Motion is a transform-only requestAnimationFrame offset that runs only while the lane is playing,
// on screen and not held, so a paused, hovered, focused or off-screen lane produces no frames.
function Lane({
items,
conf,
playing,
isStatic,
separator,
forceLift,
}: {
items: LaneItem[];
conf: LaneConf;
playing: boolean;
isStatic: boolean;
separator: 'star' | 'dot';
forceLift?: number;
}) {
const laneRef = React.useRef<HTMLDivElement>(null);
const trackRef = React.useRef<HTMLDivElement>(null);
const pos = React.useRef(0);
const setW = React.useRef(0);
const leadRef = React.useRef(1);
const [dup, setDup] = React.useState({ lead: 1, tail: 1 });
const hovered = React.useRef(false);
const focused = React.useRef(false);
const forceRef = React.useRef(forceLift);
const [held, setHeld] = React.useState(false);
forceRef.current = forceLift;
const sync = React.useCallback(() => {
setHeld(forceRef.current !== undefined || hovered.current || focused.current);
}, []);
const apply = React.useCallback(() => {
const tr = trackRef.current;
if (tr) tr.style.transform = `translate3d(${-(leadRef.current * setW.current + pos.current)}px, 0, 0)`;
}, []);
const centerOn = React.useCallback(
(el: HTMLElement, smooth: boolean) => {
const lane = laneRef.current;
const tr = trackRef.current;
if (!lane || !tr || !setW.current) return;
const cw = lane.clientWidth;
const left = el.getBoundingClientRect().left - tr.getBoundingClientRect().left;
const w = el.offsetWidth;
const inset = w > cw - 48 ? 24 : (cw - w) / 2;
pos.current = left - inset - leadRef.current * setW.current;
tr.style.transition = smooth ? 'transform .4s cubic-bezier(.2,.7,.2,1)' : 'none';
lane.scrollLeft = 0;
apply();
},
[apply],
);
const liftForced = React.useCallback(() => {
const i = forceRef.current;
if (i === undefined) return;
const el = trackRef.current?.querySelector<HTMLElement>(`[data-live][data-i='${i}']`);
if (el) centerOn(el, false);
}, [centerOn]);
useIsoLayoutEffect(() => {
if (isStatic) return;
const lane = laneRef.current;
const tr = trackRef.current;
const first = tr?.firstElementChild as HTMLElement | null | undefined;
if (!lane || !tr || !first) return;
let alive = true;
const measure = () => {
if (!alive) return;
const w = first.getBoundingClientRect().width;
if (!w) return;
setW.current = w;
const cw = lane.clientWidth;
// lead covers a focused quote centred up to half a lane back; tail covers the lane ahead of the live copy
const lead = Math.max(1, Math.ceil(cw / 2 / w));
const tail = Math.max(1, Math.ceil(cw / w));
leadRef.current = lead;
setDup((d) => (d.lead === lead && d.tail === tail ? d : { lead, tail }));
pos.current = ((pos.current % w) + w) % w;
apply();
liftForced();
};
measure();
let ro: ResizeObserver | undefined;
if (typeof ResizeObserver !== 'undefined') {
ro = new ResizeObserver(measure);
ro.observe(lane);
ro.observe(first);
}
document.fonts?.ready.then(measure).catch(() => undefined);
return () => {
alive = false;
ro?.disconnect();
};
}, [isStatic, items, dup.lead, dup.tail, apply, liftForced]);
const running = !isStatic && playing && !held;
React.useEffect(() => {
if (!running) return;
let raf = 0;
let last = 0;
const tick = (t: number) => {
const dt = last ? Math.min(0.05, (t - last) / 1000) : 0;
last = t;
const w = setW.current;
if (w > 0 && dt > 0) {
pos.current = (((pos.current + conf.dir * conf.speed * dt) % w) + w) % w;
const tr = trackRef.current;
if (tr && tr.style.transition !== 'none') tr.style.transition = 'none';
apply();
}
raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
return () => cancelAnimationFrame(raf);
}, [running, conf.dir, conf.speed, apply]);
React.useEffect(() => {
sync();
liftForced();
}, [forceLift, sync, liftForced]);
const onFocus = (e: React.FocusEvent<HTMLDivElement>) => {
focused.current = true;
sync();
const el = (e.target as HTMLElement).closest<HTMLElement>('[data-live]');
if (el && !isStatic) centerOn(el, true);
};
const onBlur = (e: React.FocusEvent<HTMLDivElement>) => {
if (e.currentTarget.contains(e.relatedTarget as Node | null)) return;
focused.current = false;
sync();
};
const sets = isStatic ? 1 : dup.lead + 1 + dup.tail;
const live = isStatic ? 0 : dup.lead;
const cls = ['qr-lane', conf.size, isStatic ? 'is-static' : '', held ? 'is-held' : ''].filter(Boolean).join(' ');
return (
<div
ref={laneRef}
className={cls}
onMouseEnter={() => {
hovered.current = true;
sync();
}}
onMouseLeave={() => {
hovered.current = false;
sync();
}}
onFocus={onFocus}
onBlur={onBlur}
>
<div ref={trackRef} className='qr-track'>
{Array.from({ length: sets }, (_, s) => (
<div className='qr-set' key={s} aria-hidden={s === live ? undefined : true}>
{items.map((item, i) => (
<div className='qr-item' key={i}>
<figure
className={`qr-q${s === live && forceLift === i ? ' is-lit' : ''}`}
tabIndex={s === live ? 0 : undefined}
data-i={i}
data-live={s === live ? '' : undefined}
>
<blockquote className='qr-text'>
<p>“{item.text}”</p>
</blockquote>
{item.caption ? <figcaption className='qr-cap'>{item.caption}</figcaption> : null}
</figure>
{isStatic && i === items.length - 1 ? null : (
<span className='qr-sep' aria-hidden='true'>
{separator === 'star' ? (
<Star size={conf.size === 'sm' ? 16 : 20} strokeWidth={2.5} fill='currentColor' />
) : (
<span className='qr-dot' />
)}
</span>
)}
</div>
))}
</div>
))}
</div>
</div>
);
}
function useMedia(query: string) {
const read = () => typeof window !== 'undefined' && typeof window.matchMedia === 'function' && window.matchMedia(query).matches;
const [match, setMatch] = React.useState<boolean>(read);
React.useEffect(() => {
if (typeof window.matchMedia !== 'function') return;
const mq = window.matchMedia(query);
const on = () => setMatch(mq.matches);
on();
mq.addEventListener('change', on);
return () => mq.removeEventListener('change', on);
}, [query]);
return match;
}
const useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
// One edge fade for the whole river (a single mask on the container, not one per lane); the mask reads only alpha,
// so the opaque stop is the band token (never painted). No will-change, blur or backdrop-filter on anything that moves.
// Quote-to-name spacing lives on the quote itself (margin in its own em, clamped 16-24px), so every lane size, width,
// theme and layout (drifting row, phone column, reduced-motion wrap) keeps at least 16px between quote and caption.
const CSS = `
.cf-quote-river {
--qr-gutter: clamp(16px, 5vw, 48px);
--qr-rest: color-mix(in oklch, var(--band-ink) 82%, var(--band));
--qr-dim: color-mix(in oklch, var(--band-ink) 64%, var(--band));
--qr-soft: color-mix(in oklch, var(--band-ink) 80%, var(--band));
--qr-sep: color-mix(in oklch, var(--accent-fill, var(--accent)) 60%, var(--band-ink));
--qr-ring: oklch(from var(--band-ink) l c h / .85);
--qr-btn: var(--button-bg, var(--cta));
--qr-btn-2: var(--button-bg-2, var(--cta-2));
--qr-sh: var(--shadow, oklch(0.22 0.03 260));
--qr-fade: linear-gradient(90deg, transparent 0, var(--band) 9%, var(--band) 91%, transparent 100%);
position: relative;
isolation: isolate;
overflow: hidden;
background: var(--band);
color: var(--band-ink);
padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 8.5vw, 120px);
font-family: var(--font-body);
}
.cf-quote-river.has-edge { padding-bottom: calc(clamp(64px, 8.5vw, 120px) + 56px); }
.cf-quote-river .qr-wrap { position: relative; z-index: 1; }
.cf-quote-river .qr-head { max-width: 46rem; margin: 0 auto; padding: 0 var(--qr-gutter); text-align: center; }
.cf-quote-river .qr-h {
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-quote-river .qr-lead {
margin: 24px auto 0;
max-width: 60ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--qr-soft);
text-wrap: pretty;
}
.cf-quote-river .qr-river {
margin-top: clamp(32px, 4.5vw, 56px);
display: grid;
gap: clamp(4px, 1vw, 12px);
-webkit-mask-image: var(--qr-fade);
mask-image: var(--qr-fade);
}
.cf-quote-river .qr-river.is-static { gap: clamp(32px, 4vw, 48px); -webkit-mask-image: none; mask-image: none; }
.cf-quote-river .qr-lane {
overflow: hidden;
overflow: clip;
contain: paint;
padding-block: 10px;
}
.cf-quote-river .qr-track { display: flex; width: max-content; }
.cf-quote-river .qr-set { display: flex; flex: none; align-items: center; }
.cf-quote-river .qr-item { display: flex; align-items: center; flex: none; }
.cf-quote-river .qr-q {
margin: 0;
display: flex;
align-items: baseline;
gap: 0;
padding: 6px 10px;
border-radius: 10px;
color: var(--qr-rest);
white-space: nowrap;
outline: 0;
cursor: default;
transition: color .2s ease, transform .2s cubic-bezier(.2,.7,.2,1);
}
.cf-quote-river .qr-text { margin: 0; font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; }
.cf-quote-river .qr-text p { margin: 0; }
.cf-quote-river .qr-text:not(:last-child) { margin: 0 clamp(16px, 1.2em, 24px) 0 0; }
.cf-quote-river .qr-lane.lg .qr-text { font-size: clamp(2.5rem, 4.2vw, 3.75rem); font-weight: var(--display-weight, 800); letter-spacing: -0.03em; }
.cf-quote-river .qr-lane.md .qr-text { font-size: clamp(2rem, 3.6vw, 3.25rem); font-weight: 700; }
.cf-quote-river .qr-lane.sm .qr-text { font-size: clamp(1.3125rem, 1.8vw, 1.625rem); font-weight: 700; }
.cf-quote-river .qr-cap { font-size: .9375rem; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--qr-soft); transition: color .2s ease; }
.cf-quote-river .qr-sep { display: inline-flex; align-items: center; justify-content: center; margin-inline: clamp(20px, 3vw, 44px); color: var(--qr-sep); }
.cf-quote-river .qr-lane.sm .qr-sep { margin-inline: clamp(16px, 2.4vw, 32px); }
.cf-quote-river .qr-dot { display: block; width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.cf-quote-river .qr-lane.is-held .qr-q { color: var(--qr-dim); }
.cf-quote-river .qr-lane .qr-q:hover,
.cf-quote-river .qr-lane .qr-q:focus-visible,
.cf-quote-river .qr-lane .qr-q.is-lit { color: var(--band-ink); transform: translateY(-3px); }
.cf-quote-river .qr-lane .qr-q:hover .qr-cap,
.cf-quote-river .qr-lane .qr-q:focus-visible .qr-cap,
.cf-quote-river .qr-lane .qr-q.is-lit .qr-cap { color: var(--band-ink); }
.cf-quote-river .qr-lane .qr-q:focus-visible { outline: 3px solid var(--qr-ring); outline-offset: 2px; }
.cf-quote-river .qr-lane.is-static { overflow: visible; contain: none; padding-inline: var(--qr-gutter); }
.cf-quote-river .qr-lane.is-static .qr-track { width: auto; max-width: 1120px; margin-inline: auto; }
.cf-quote-river .qr-lane.is-static .qr-set {
flex: 1 1 auto;
min-width: 0;
flex-wrap: wrap;
justify-content: center;
align-items: flex-start;
gap: clamp(20px, 2.4vw, 28px) clamp(32px, 4vw, 56px);
}
.cf-quote-river .qr-lane.is-static .qr-item { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.cf-quote-river .qr-lane.is-static .qr-q {
white-space: normal;
flex-direction: column;
align-items: center;
gap: 0;
text-align: center;
}
.cf-quote-river .qr-lane.is-static .qr-text { text-wrap: balance; }
.cf-quote-river .qr-lane.is-static .qr-text:not(:last-child) { margin: 0 0 clamp(16px, 1.2em, 24px); }
.cf-quote-river .qr-lane.is-static .qr-sep { display: none; }
.cf-quote-river .qr-controls { max-width: 1120px; margin: 16px auto 0; padding: 0 var(--qr-gutter); display: flex; justify-content: flex-end; }
.cf-quote-river .qr-toggle {
appearance: none;
border: 0;
min-height: 44px;
padding: 0 16px;
border-radius: 999px;
background: oklch(from var(--band-ink) l c h / .12);
color: var(--band-ink);
font-family: var(--button-font, var(--font-body));
font-size: .9375rem;
font-weight: 700;
line-height: 1.2;
cursor: pointer;
transition: background .16s ease, transform .16s ease;
}
.cf-quote-river .qr-toggle:hover { background: oklch(from var(--band-ink) l c h / .2); }
.cf-quote-river .qr-toggle:active { transform: translateY(1px); }
.cf-quote-river .qr-toggle:focus-visible { outline: 3px solid var(--qr-ring); outline-offset: 3px; }
.cf-quote-river .qr-toggle svg { display: inline-block; vertical-align: -0.15em; margin-inline-end: .4em; }
.cf-quote-river .qr-action { max-width: 46rem; margin: clamp(40px, 5vw, 64px) auto 0; padding: 0 var(--qr-gutter); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.cf-quote-river .qr-btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 72px;
padding: 0 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);
text-transform: var(--button-case, none);
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
white-space: nowrap;
color: var(--button-ink, var(--cta-ink));
text-shadow: var(--button-text-shadow, none);
text-decoration: none;
cursor: pointer;
background: linear-gradient(oklch(from var(--qr-btn) calc(l + .04) c h), oklch(from var(--qr-btn-2) calc(l - .02) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--qr-btn) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--qr-btn) calc(l - .16) c h), 0 1px 2px oklch(from var(--qr-sh) l c h / .45), 0 8px 16px -6px oklch(from var(--qr-sh) l c h / .6));
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-quote-river .qr-btn:hover,
.cf-quote-river .qr-btn.is-hover {
background: linear-gradient(oklch(from var(--qr-btn) calc(l - .01) c h), oklch(from var(--qr-btn-2) calc(l - .07) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--qr-btn) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--qr-btn) calc(l - .2) c h), 0 1px 2px oklch(from var(--qr-sh) l c h / .5), 0 10px 18px -6px oklch(from var(--qr-sh) l c h / .7));
}
.cf-quote-river .qr-btn:active,
.cf-quote-river .qr-btn.is-active {
transform: translateY(1px);
background: linear-gradient(oklch(from var(--qr-btn) calc(l - .05) c h), oklch(from var(--qr-btn-2) calc(l - .08) c h));
box-shadow: inset 0 2px 4px oklch(from var(--qr-btn) calc(l - .22) c h / .6), inset 0 -2px 0 oklch(from var(--qr-btn) calc(l - .16) c h), 0 1px 2px oklch(from var(--qr-sh) l c h / .45);
}
.cf-quote-river .qr-btn:focus-visible { outline: 3px solid var(--band-ink); outline-offset: 3px; }
.cf-quote-river .qr-btn:disabled {
cursor: not-allowed;
transform: none;
background: var(--button-2-bg, var(--secondary));
color: var(--button-2-ink, var(--secondary-ink));
text-shadow: none;
box-shadow: var(--button-2-shadow, var(--shadow-sm));
}
.cf-quote-river .qr-more { margin: 0; font-size: .9375rem; font-weight: 500; line-height: 1.4; color: var(--qr-soft); text-wrap: pretty; }
.cf-quote-river .qr-more a {
color: var(--band-ink);
text-decoration: underline;
text-decoration-color: oklch(from var(--band-ink) l c h / .5);
text-underline-offset: .18em;
}
.cf-quote-river .qr-more a:hover { text-decoration-color: currentColor; }
.cf-quote-river .qr-more a:focus-visible { outline: 3px solid var(--qr-ring); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 640px) {
.cf-quote-river { --qr-fade: linear-gradient(90deg, transparent 0, var(--band) 6%, var(--band) 94%, transparent 100%); }
.cf-quote-river .qr-lane.lg .qr-text { font-size: 2rem; }
.cf-quote-river .qr-lane.sm .qr-text { font-size: 1.3125rem; }
.cf-quote-river .qr-q { flex-direction: column; align-items: flex-start; gap: 0; white-space: normal; }
.cf-quote-river .qr-text { max-inline-size: min(76vw, 300px); text-wrap: balance; }
.cf-quote-river .qr-text:not(:last-child) { margin: 0 0 clamp(16px, 1.2em, 24px); }
.cf-quote-river .qr-lane .qr-sep { margin-inline: 20px; }
.cf-quote-river .qr-lane.is-static .qr-q { align-items: center; }
.cf-quote-river .qr-controls { justify-content: center; }
.cf-quote-river .qr-btn { width: 100%; max-width: 420px; white-space: normal; text-wrap: balance; }
}
@media (prefers-reduced-motion: no-preference) {
.cf-quote-river .qr-head { animation: qr-rise .45s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes qr-rise { from { opacity: .82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
.cf-quote-river .qr-q, .cf-quote-river .qr-cap, .cf-quote-river .qr-btn, .cf-quote-river .qr-toggle { transition: none; }
.cf-quote-river .qr-lane .qr-q:hover,
.cf-quote-river .qr-lane .qr-q:focus-visible,
.cf-quote-river .qr-lane .qr-q.is-lit { transform: none; }
}
`;
pieces/proof/quote-river/specimen.tsx 37 lines
// Specimen: Northpaw, a fictional dog training app, with 15 short, clearly fictional owner quotes.
import { QuoteRiver, type QuoteRiverProps, type QuoteRiverQuote } from '../quote-river';
const quotes: QuoteRiverQuote[] = [
{ quote: 'Leash pulling stopped in week two.', name: 'Maya', city: 'Portland' },
{ quote: 'Ten minutes a day. That’s it.', name: 'Theo', city: 'Denver' },
{ quote: 'Biscuit finally comes when called.', name: 'Priya', city: 'Austin' },
{ quote: 'The recall drills are pure gold.', name: 'Jonah', city: 'Leeds' },
{ quote: 'Our walks are calm now.', name: 'Elena', city: 'Tucson' },
{ quote: 'No more jumping on guests.', name: 'Marcus', city: 'Raleigh' },
{ quote: 'I trust her off-leash at the park.', name: 'Sofia', city: 'Boise' },
{ quote: 'Training finally fits my lunch break.', name: 'Hannah', city: 'Omaha' },
{ quote: 'The puppy plan saved my sanity.', name: 'Luis', city: 'San Diego' },
{ quote: 'He sits before every door now.', name: 'Ava', city: 'Madison' },
{ quote: 'Short lessons, real progress.', name: 'Daniel', city: 'Halifax' },
{ quote: 'Crate training without the crying.', name: 'Nora', city: 'Columbus' },
{ quote: 'My rescue finally relaxed.', name: 'Sam', city: 'Tulsa' },
{ quote: 'Barking at the window? Gone.', name: 'Grace', city: 'Richmond' },
{ quote: 'Best app on my phone, honestly.', name: 'Owen', city: 'Spokane' },
];
export const states = ['default', 'hover', 'active', 'disabled'];
export default function QuoteRiverSpecimen({ state = 'default' }: { state?: QuoteRiverProps['state'] }) {
return (
<QuoteRiver
quotes={quotes}
headline='Calmer walks, told by the people taking them'
lead='{count} Northpaw owners on the first thing that changed.'
separator='star'
actionLabel='Start Training With Northpaw'
onAction={() => undefined}
secondaryText='or keep reading to see how the daily sessions work'
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
quotes OptionalQuoteRiver |
QuoteRiverQuote[] |
|
headline OptionalQuoteRiver |
React.ReactNode |
|
lead OptionalQuoteRiver |
string |
|
separator OptionalQuoteRiver |
'star' | 'dot' |
|
actionLabel OptionalQuoteRiver |
string |
|
href OptionalQuoteRiver |
string |
|
onAction OptionalQuoteRiver |
() => void |
|
secondaryText OptionalQuoteRiver |
string |
|
secondaryHref OptionalQuoteRiver |
string |
|
edge OptionalQuoteRiver |
'step' | 'chevron' | 'none' |
|
copy OptionalQuoteRiver |
{ pause?: string; play?: string; riverLabel?: string } |
|
state OptionalQuoteRiver |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalQuoteRiver |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--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.