Agency Results Band
Proof band of big results (€42M, 4.8×, +212%) that count up on scroll, with labels and fine print.
statscountersresultsagency
Live Preview
Results, not reports
- ad spend managedacross Google, Meta, TikTok and LinkedIn
- €42M
- average client ROASlast 12 months, e-commerce clients
- 4.8×
- median organic growthafter 12 months of SEO
- +212%
- client retentionclients renewing after year one
- 96%
Usage
Copy and paste this code into your React component:
tsx
import { AgencyResultsBand } from 'react-component-kit-ui/sections';
<AgencyResultsBand stats={[{ value: '4.8×', label: 'average ROAS' }, { value: '+212%', label: 'organic growth' }]} />Manual Installation
If you are not using the npm package, create a new file and paste the following code: src/components/sections/AgencyResultsBand.tsx + AgencyResultsBand.css:
AgencyResultsBand.tsx
'use client';
import { useEffect, useRef } from 'react';
import './AgencyResultsBand.css';
/** class:list → className */
function cx(...args: unknown[]): string {
const out: string[] = [];
const walk = (v: unknown) => {
if (!v) return;
if (typeof v === 'string' || typeof v === 'number') out.push(String(v));
else if (Array.isArray(v)) v.forEach(walk);
else if (typeof v === 'object') for (const [k, on] of Object.entries(v as Record<string, unknown>)) if (on) out.push(k);
};
args.forEach(walk);
return out.join(' ');
}
/**
* AgencyResultsBand — Proof band of big results that count up when scrolled into view
* (€42M, 4.8×, +212%…), each with a label and a fine-print detail.
*
* @param {string} eyebrow - Small label. Default 'Results, not reports'.
* @param {string} title - Optional heading.
* @param {Array<{value: string, label: string, detail?: string}>} stats - Figures. Numbers inside value animate; prefix/suffix are kept.
* @param {string} variant - Style (accent|outline|dark). Default 'accent'.
* @param {number} duration - Count-up duration in ms. Default 1400.
* @param {string} className - Extra class.
*
* Accessibility: the final value is in the HTML (the animation only rewrites the visible text and
* is skipped with prefers-reduced-motion); figures form a description list.
*/
export interface AgencyResultsBandProps {
eyebrow?: string;
title?: string;
stats?: Array<{ value: string; label: string; detail?: string }>;
variant?: 'accent' | 'outline' | 'dark';
duration?: number;
className?: string;
}
export function AgencyResultsBand({
eyebrow = 'Results, not reports',
title,
stats = [
{ value: '€42M', label: 'ad spend managed', detail: 'across Google, Meta, TikTok and LinkedIn' },
{ value: '4.8×', label: 'average client ROAS', detail: 'last 12 months, e-commerce clients' },
{ value: '+212%', label: 'median organic growth', detail: 'after 12 months of SEO' },
{ value: '96%', label: 'client retention', detail: 'clients renewing after year one' },
],
variant = 'accent',
duration = 1400,
className = '',
}: AgencyResultsBandProps) {
// Client-side behaviour: runs once after mount.
const mounted = useRef(false);
useEffect(() => {
if (mounted.current) return;
mounted.current = true;
const animate = (el: HTMLElement, ms: number) => {
const final = el.dataset.count ?? el.textContent ?? '';
const m = final.match(/^(\D*?)([\d.,]+)(.*)$/);
if (!m) return;
const [, pre, num, post] = m;
const decimals = (num.split('.')[1] ?? '').length;
const target = parseFloat(num.replace(/,/g, ''));
if (!isFinite(target)) return;
const start = performance.now();
const step = (t: number) => {
const p = Math.min(1, (t - start) / ms);
const eased = 1 - Math.pow(1 - p, 3);
const v = (target * eased).toFixed(decimals);
el.textContent = `${pre}${num.includes(',') ? Number(v).toLocaleString('en') : v}${post}`;
if (p < 1) requestAnimationFrame(step);
else el.textContent = final;
};
requestAnimationFrame(step);
};
document.querySelectorAll<HTMLElement>('[data-results-band]:not([data-bound])').forEach((band) => {
band.dataset.bound = '';
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches || !('IntersectionObserver' in window)) return;
const ms = Number(band.dataset.duration) || 1400;
const io = new IntersectionObserver((entries) => {
entries.forEach((e) => {
if (!e.isIntersecting) return;
io.disconnect();
band.querySelectorAll<HTMLElement>('[data-count]').forEach((el) => animate(el, ms));
});
}, { threshold: 0.35 });
io.observe(band);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return (
<>
<div className="arb-cq" data-rk-8f49e4="">
<section className={cx(['arb', `arb--${variant}`, className])} data-results-band data-duration={duration} data-rk-8f49e4="">
<div className="arb__head" data-rk-8f49e4="">
{eyebrow && <p className="arb__eyebrow" data-rk-8f49e4="">{eyebrow}</p>}
{title && <h2 className="arb__title" data-rk-8f49e4="">{title}</h2>}
</div>
<dl className="arb__grid" data-rk-8f49e4="">
{stats.map((s, __i: number) => (
<div key={__i} className="arb__item" data-rk-8f49e4="">
<dt className="arb__label" data-rk-8f49e4="">{s.label}{s.detail && <small data-rk-8f49e4="">{s.detail}</small>}</dt>
<dd className="arb__value" data-count={s.value} data-rk-8f49e4="">{s.value}</dd>
</div>
))}
</dl>
</section>
</div>
</>
);
}
export default AgencyResultsBand;AgencyResultsBand.css
.arb-cq:where([data-rk-8f49e4]) { container-type: inline-size; }
.arb:where([data-rk-8f49e4]) { padding: clamp(1.75rem, 5cqi, 3.5rem); border-radius: var(--r-xl, 28px); color: var(--c-text-1, #fff); }
.arb--accent:where([data-rk-8f49e4]) { background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); }
.arb--outline:where([data-rk-8f49e4]) { border: 1.5px solid var(--c-text-1, #fff); }
.arb--dark:where([data-rk-8f49e4]) { background: #0b0c0a; color: #f3f5ec; }
.arb__head:where([data-rk-8f49e4]) { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3, 0.75rem); margin-bottom: clamp(1.5rem, 4cqi, 2.5rem); }
.arb__eyebrow:where([data-rk-8f49e4]) { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
.arb__title:where([data-rk-8f49e4]) { color: inherit; margin: 0; max-width: 24ch; font-size: clamp(1.5rem, 3cqi, 2.2rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.05; }
.arb__grid:where([data-rk-8f49e4]) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: clamp(1.25rem, 3cqi, 2rem); margin: 0; }
.arb__item:where([data-rk-8f49e4]) { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--sp-3, 0.75rem); padding-top: var(--sp-4, 1rem); border-top: 1.5px solid currentColor; }
.arb__value:where([data-rk-8f49e4]) { margin: 0; font-size: clamp(2.8rem, 7cqi, 5rem); font-weight: 900; letter-spacing: -0.06em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.arb__label:where([data-rk-8f49e4]) { display: grid; gap: 4px; font-size: 1rem; font-weight: 800; }
.arb__label:where([data-rk-8f49e4]) small:where([data-rk-8f49e4]) { font-size: 0.82rem; font-weight: 500; opacity: 0.72; }