Results Ticker 1
Results ticker: a slim proof strip that slowly scrolls customers' own short wins beside the price and one
Use it in a prompt
Use proof/results-ticker 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/results-ticker.tsx. - Import it and pass your copy and images (Props tab):
import { ResultsTicker } from "@/components/funneldna/proof/results-ticker"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/results-ticker/component.tsx 306 lines
// layout: hello-strip
// Results ticker: a slim proof strip that slowly scrolls customers' own short wins beside the price and one
// action, so proof sits right next to the click. No wins by default; pass only real, permissioned quotes.
import * as React from "react"
import { MessageSquareQuote, Pause, Play, UserRound } from "lucide-react"
export type ResultsTickerWin = {
/** The win in the customer's own words, kept short (one line). */
quote: React.ReactNode
name: string
/** Optional role, city or product shown after the name. */
detail?: string
/** Customer photo src; initials (or a person icon for slots) show when absent. */
image?: string
/** Alt text for this customer's photo; overrides the `imageAlt` template. */
imageAlt?: string
}
export type ResultsTickerProps = {
/** Real, permissioned customer wins. The strip renders nothing when empty. */
wins?: ResultsTickerWin[]
/** Strip title on the dark label segment. */
label?: string
/** Accessible name of the scrolling list of wins. */
listLabel?: string
/** Toggle text while the strip is scrolling. */
pauseLabel?: string
/** Toggle text while the strip is paused. */
playLabel?: string
/** Default photo alt text; {name} is replaced with the customer's name. */
imageAlt?: string
/** Bold lead-in before the price ("Just"). */
priceLead?: string
price?: string
/** The value said in words beside the price. */
priceNote?: string
actionLabel?: string
/** Navigation destination for the action; renders a link when set and not disabled. */
href?: string
/** Called when the action is clicked. */
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void
/** Seconds each win takes to cross the strip; higher is slower. */
secondsPerWin?: number
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
export function ResultsTicker(props: ResultsTickerProps) {
const {
wins = NO_WINS,
label = "In their own words",
listLabel = "Wins shared by customers",
pauseLabel = "Pause",
playLabel = "Play",
imageAlt = "Photo of {name}",
priceLead = "Just",
price = "$47",
priceNote = "less than one client call",
actionLabel = "Send me the kit",
href,
onAction,
secondsPerWin = 7,
disabled,
state = "default",
className,
} = props
const id = React.useId()
const [paused, setPaused] = React.useState(false)
const held = paused || state === "hover"
const isDisabled = Boolean(disabled) || state === "disabled"
const loop = React.useMemo(() => buildLoop(wins), [wins])
if (loop.length === 0) return null
const duration = `${loop.length * Math.max(2, secondsPerWin)}s`
const rootClass = ["cf-results-ticker", className].filter(Boolean).join(" ")
return (
<div
className={rootClass}
role="region"
aria-labelledby={`${id}-label`}
data-state={state}
data-paused={held ? "true" : undefined}
>
<style>{CSS}</style>
<div className="cf-results-ticker__strip">
<div className="cf-results-ticker__label">
<p id={`${id}-label`} className="cf-results-ticker__title">
<MessageSquareQuote aria-hidden="true" />
<span>{label}</span>
</p>
<button
type="button"
className="cf-results-ticker__toggle"
aria-controls={`${id}-track`}
onClick={() => setPaused((p) => !p)}
>
{held ? <Play aria-hidden="true" /> : <Pause aria-hidden="true" />}
<span>{held ? playLabel : pauseLabel}</span>
</button>
</div>
<div className="cf-results-ticker__viewport">
<div className="cf-results-ticker__window" tabIndex={0} role="group" aria-label={listLabel}>
<div
id={`${id}-track`}
className="cf-results-ticker__track"
style={{ "--cf-rt-duration": duration } as React.CSSProperties}
>
<ul className="cf-results-ticker__list">
{loop.map((item, i) => (
<WinItem key={i} win={item.win} ghost={item.ghost} imageAlt={imageAlt} />
))}
</ul>
<ul className="cf-results-ticker__list cf-results-ticker__list--dup" aria-hidden="true">
{loop.map((item, i) => (
<WinItem key={i} win={item.win} ghost={item.ghost} decorative imageAlt={imageAlt} />
))}
</ul>
</div>
</div>
</div>
<div className="cf-results-ticker__action">
<p className="cf-results-ticker__price">
<strong>
{priceLead} {price}
</strong>
<span>{priceNote}</span>
</p>
{href && !isDisabled ? (
<a className="cf-results-ticker__cta" href={href} onClick={onAction}>
{actionLabel}
</a>
) : (
<button type="button" className="cf-results-ticker__cta" disabled={isDisabled} onClick={onAction}>
{actionLabel}
</button>
)}
</div>
</div>
</div>
)
}
export default ResultsTicker
const NO_WINS: ResultsTickerWin[] = []
/** Fewest items in one pass of the loop, so short lists still fill a wide strip. */
const MIN_LOOP = 6
type LoopItem = { win: ResultsTickerWin; ghost: boolean }
/** Repeats the wins up to MIN_LOOP; repeats are "ghosts" hidden from assistive tech and reduced motion. */
function buildLoop(wins: ResultsTickerWin[]): LoopItem[] {
const out: LoopItem[] = []
if (wins.length === 0) return out
const target = Math.max(MIN_LOOP, wins.length)
for (let i = 0; i < target; i++) out.push({ win: wins[i % wins.length], ghost: i >= wins.length })
return out
}
function WinItem({
win,
ghost,
decorative,
imageAlt,
}: {
win: ResultsTickerWin
ghost: boolean
decorative?: boolean
imageAlt: string
}) {
const initials = initialsOf(win.name)
const silent = ghost || decorative
return (
<li className="cf-results-ticker__win" data-ghost={ghost ? "true" : undefined} aria-hidden={ghost ? true : undefined}>
<span className="cf-results-ticker__avatar">
{win.image ? (
<img
src={win.image}
alt={silent ? "" : win.imageAlt ?? imageAlt.replace("{name}", () => win.name)}
width={96}
height={96}
loading="lazy"
decoding="async"
/>
) : initials ? (
<span aria-hidden="true">{initials}</span>
) : (
<UserRound aria-hidden="true" />
)}
</span>
<span className="cf-results-ticker__text">
<q className="cf-results-ticker__quote">{win.quote}</q>
<span className="cf-results-ticker__who">
<span className="cf-results-ticker__name">{win.name}</span>
{win.detail ? <span className="cf-results-ticker__detail"> · {win.detail}</span> : null}
</span>
</span>
</li>
)
}
/** Up to two initials; empty for blank or bracketed slot names so the person icon shows instead. */
function initialsOf(name: string) {
const clean = name.trim()
if (!clean || clean.startsWith("[")) return ""
return clean
.split(/\s+/)
.slice(0, 2)
.map((part) => part[0])
.join("")
.toUpperCase()
}
const SHADOW_MD =
"var(--shadow-md,0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / 0.22),0 4px 10px -2px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / 0.2))"
const SHADOW_LG =
"var(--shadow-lg,0 2px 4px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / 0.22),0 12px 24px -8px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / 0.32))"
const SHADOW_SM =
"var(--shadow-sm,0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / 0.18),0 1px 3px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / 0.14))"
const CTA_HOVER = `background:linear-gradient(180deg,oklch(from var(--cf-rt-btn) calc(l - 0.02) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.06) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--cf-rt-btn) calc(l + 0.1) c h / 0.55),inset 0 -3px 0 oklch(from var(--cf-rt-btn) calc(l - 0.2) c h),${SHADOW_LG};`
// Edge fade: the mask's solid stop is an opaque theme token (var(--ink)). A mask reads alpha only, so the
// token's hue never paints and the fade behaves the same under every theme.
const EDGE_FADE =
"linear-gradient(90deg,transparent,var(--ink) 2.5rem,var(--ink) calc(100% - 2.5rem),transparent)"
const CSS = `
.cf-results-ticker{container-type:inline-size;width:100%;font-family:var(--font-body);color:var(--ink)}
.cf-results-ticker *,.cf-results-ticker *::before,.cf-results-ticker *::after{box-sizing:border-box}
.cf-results-ticker__strip{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:stretch;background:var(--card);border:1px solid var(--card-border,color-mix(in oklch,var(--ink) 12%,transparent));border-radius:var(--card-radius,var(--radius,0.875rem));box-shadow:var(--card-shadow,${SHADOW_MD});overflow:hidden}
.cf-results-ticker__label{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:0.75rem;min-width:0;padding:1rem 1.375rem;background:var(--band);color:var(--band-ink)}
.cf-results-ticker__title{display:flex;align-items:center;gap:0.5rem;margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.01em);font-size:1.0625rem;line-height:1.2;white-space:nowrap}
.cf-results-ticker__title svg{flex:none;width:1.25rem;height:1.25rem}
.cf-results-ticker__toggle{display:inline-flex;align-items:center;justify-content:center;gap:0.4rem;min-height:2.25rem;padding:0 0.875rem;border:1px solid oklch(from var(--band-ink) l c h / 0.35);border-radius:999px;background:oklch(from var(--band-ink) l c h / 0.08);color:var(--band-ink);font-family:var(--button-font,var(--font-body));text-transform:var(--button-case,none);font-size:0.875rem;font-weight:600;line-height:1;cursor:pointer;transition:background .2s ease,border-color .2s ease}
.cf-results-ticker__toggle svg{width:0.875rem;height:0.875rem;flex:none}
.cf-results-ticker__toggle:focus-visible{outline:2px solid var(--band-ink);outline-offset:2px}
@media (hover:hover){.cf-results-ticker__toggle:hover{background:oklch(from var(--band-ink) l c h / 0.16);border-color:oklch(from var(--band-ink) l c h / 0.6)}}
@media (pointer:coarse){.cf-results-ticker__toggle{min-height:2.75rem}}
.cf-results-ticker__viewport{position:relative;display:flex;align-items:center;min-width:0;padding-block:1.125rem}
.cf-results-ticker__viewport:has(.cf-results-ticker__window:focus-visible){outline:3px solid var(--field-focus,var(--accent));outline-offset:-5px}
.cf-results-ticker__window{width:100%;min-width:0;overflow:hidden;-webkit-mask-image:${EDGE_FADE};mask-image:${EDGE_FADE}}
.cf-results-ticker__window:focus-visible{outline:none}
.cf-results-ticker__track{display:flex;width:max-content;animation:cf-results-ticker-marquee var(--cf-rt-duration,42s) linear infinite}
.cf-results-ticker[data-paused] .cf-results-ticker__track,.cf-results-ticker__window:hover .cf-results-ticker__track,.cf-results-ticker__window:focus-within .cf-results-ticker__track{animation-play-state:paused}
@keyframes cf-results-ticker-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.cf-results-ticker__list{display:flex;flex:none;margin:0;padding:0;list-style:none}
.cf-results-ticker__win{display:flex;align-items:center;gap:0.875rem;padding:0.25rem 1.75rem;border-right:1px solid oklch(from var(--ink) l c h / 0.14);white-space:nowrap}
.cf-results-ticker__avatar{flex:none;display:grid;place-items:center;width:3rem;height:3rem;border-radius:50%;overflow:hidden;background:color-mix(in oklch,var(--ink) 6%,var(--card));border:1px solid oklch(from var(--ink) l c h / 0.12);color:var(--ink);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1rem;line-height:1;transition:transform .25s ease}
.cf-results-ticker__avatar svg{width:1.5rem;height:1.5rem;color:var(--muted)}
.cf-results-ticker__avatar img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 25%}
@media (hover:hover){.cf-results-ticker__win:hover .cf-results-ticker__avatar{transform:scale(1.06)}}
.cf-results-ticker__text{display:flex;flex-direction:column;gap:0.25rem}
.cf-results-ticker__quote{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.01em);font-size:1.3125rem;line-height:1.2;color:var(--ink);quotes:"“" "”"}
.cf-results-ticker__quote::before{content:open-quote;color:var(--accent);margin-right:0.06em}
.cf-results-ticker__quote::after{content:close-quote}
.cf-results-ticker__who{font-size:0.9375rem;line-height:1.3}
.cf-results-ticker__name{color:var(--ink);font-weight:600}
.cf-results-ticker__detail{color:var(--muted)}
.cf-results-ticker__action{display:flex;align-items:center;gap:1.125rem;padding:1rem 1.25rem 1rem 1.5rem;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-results-ticker__price{display:flex;flex-direction:column;gap:0.25rem;margin:0;white-space:nowrap}
.cf-results-ticker__price strong{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.01em);font-size:1.5rem;line-height:1.1;color:var(--ink);font-variant-numeric:tabular-nums}
.cf-results-ticker__price span{font-size:0.875rem;font-weight:500;line-height:1.3;color:var(--ink)}
.cf-results-ticker__cta{--cf-rt-btn:var(--button-bg,var(--cta));display:inline-flex;align-items:center;justify-content:center;min-height:3.25rem;padding:0 1.625rem;border:1px solid oklch(from var(--cf-rt-btn) calc(l - 0.12) c h);border-radius:var(--button-radius,var(--radius,0.625rem));background:linear-gradient(180deg,oklch(from var(--cf-rt-btn) calc(l + 0.04) c h),var(--button-bg-2,var(--cta-2)));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.0625rem;line-height:1.1;letter-spacing:-0.005em;text-decoration:none;white-space:nowrap;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cf-rt-btn) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--cf-rt-btn) calc(l - 0.16) c h),${SHADOW_MD});cursor:pointer;transition:transform .16s ease,background .2s ease,box-shadow .2s ease}
@media (hover:hover){.cf-results-ticker__cta:not(:disabled):hover{${CTA_HOVER}}}
.cf-results-ticker[data-state="hover"] .cf-results-ticker__cta:not(:disabled){${CTA_HOVER}}
.cf-results-ticker__cta:not(:disabled):active,.cf-results-ticker[data-state="active"] .cf-results-ticker__cta:not(:disabled){transform:translateY(1px);background:linear-gradient(180deg,var(--button-bg-2,var(--cta-2)),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.04) c h));box-shadow:inset 0 2px 3px oklch(from var(--cf-rt-btn) calc(l - 0.22) c h / 0.5),${SHADOW_SM}}
.cf-results-ticker__cta:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-results-ticker__cta:disabled{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));border-color:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.1) c h);text-shadow:none;box-shadow:var(--button-2-shadow, var(--shadow-sm));cursor:not-allowed}
@container (max-width: 56rem){
.cf-results-ticker__strip{grid-template-columns:minmax(0,1fr)}
.cf-results-ticker__label{flex-direction:row;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.75rem 1rem}
.cf-results-ticker__viewport{padding-block:1rem}
.cf-results-ticker__win{gap:0.75rem;padding-inline:1.25rem}
.cf-results-ticker__avatar{width:2.625rem;height:2.625rem}
.cf-results-ticker__quote{font-size:1.125rem}
.cf-results-ticker__action{flex-wrap:wrap;gap:0.75rem 1rem;padding:1rem}
.cf-results-ticker__price{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:0.25rem 0.5rem;white-space:normal}
.cf-results-ticker__cta{flex:1 1 100%}
}
@media (prefers-reduced-motion: reduce){
.cf-results-ticker__track{animation:none;width:auto}
.cf-results-ticker__list--dup,.cf-results-ticker__win[data-ghost]{display:none}
.cf-results-ticker__window{overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin;-webkit-mask-image:none;mask-image:none}
.cf-results-ticker__win{scroll-snap-align:start}
.cf-results-ticker__toggle{display:none}
.cf-results-ticker__avatar,.cf-results-ticker__cta,.cf-results-ticker__toggle{transition:none}
.cf-results-ticker__win:hover .cf-results-ticker__avatar{transform:none}
.cf-results-ticker__cta:not(:disabled):hover,.cf-results-ticker__cta:not(:disabled):active,.cf-results-ticker[data-state] .cf-results-ticker__cta:not(:disabled){transform:none}
}
`
pieces/proof/results-ticker/specimen.tsx 16 lines
import { ResultsTicker, type ResultsTickerProps } from "../results-ticker"
import defaults from "../../studio-defaults.json"
export const states = ["default", "hover", "active", "disabled"]
// Sample wins for the specimen only (fictional people); a live page passes real, permissioned quotes.
const SAMPLE_WINS = [
{ quote: "Mapped my whole funnel in one evening", name: "Dana R.", detail: "Austin" },
{ quote: "My first opt-in page went live on day two", name: "Marcus T.", detail: "Coach, Leeds" },
{ quote: "Finally knew which page came first", name: "Priya S.", detail: "Toronto" },
{ quote: "Launched my offer the same week", name: "Jo M.", detail: "Course creator" },
]
export default function ResultsTickerSpecimen({ state = "default" }: { state?: ResultsTickerProps["state"] }) {
return <ResultsTicker state={state} price={defaults.sample.price} wins={SAMPLE_WINS} />
}
| Name | Type | Details |
|---|---|---|
wins OptionalResultsTicker |
ResultsTickerWin[] |
|
label OptionalResultsTicker |
string |
|
listLabel OptionalResultsTicker |
string |
|
pauseLabel OptionalResultsTicker |
string |
|
playLabel OptionalResultsTicker |
string |
|
imageAlt OptionalResultsTicker |
string |
|
priceLead OptionalResultsTicker |
string |
|
price OptionalResultsTicker |
string |
|
priceNote OptionalResultsTicker |
string |
|
actionLabel OptionalResultsTicker |
string |
|
href OptionalResultsTicker |
string |
|
onAction OptionalResultsTicker |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
secondsPerWin OptionalResultsTicker |
number |
|
disabled OptionalResultsTicker |
boolean |
|
state OptionalResultsTicker |
"default" | "hover" | "active" | "disabled" |
|
className OptionalResultsTicker |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB