Swarm About
An about section that tells the company's story in three chapters. The mark on the right is the company today, drawn as hollow rings; each chapter fills in as much of it as existed then, so stepping from twelve GPUs in a lab to one global endpoint brings the solid dots in from the edge.
"use client";
import * as React from "react";
import { Swarm } from "@/components/ui/swarm";
/* ── Content ─────────────────────────────────────────────────
* Everything you'd change to make the section yours: the
* heading, the chapters of your story and the facts under it.
* The mark on the right is the company today; each chapter's
* `fill` is how much of it existed then, so stepping through
* the story fills it in, dot by dot, from the edge.
* ─────────────────────────────────────────────────────────── */
/** The brand color: the eyebrow and the square marks on the stage. Light and dark. */
const ACCENT = { light: "#d93f06", dark: "#ff7a45" };
/** The part of the mark that didn't exist yet: quiet gray rings. */
const RINGS = "text-zinc-300 dark:text-zinc-700";
/** Covey's mark: three discs and a smaller one joining them, drawn in a 24 × 24 box. */
const MARK = [disc(6.5, 17.5, 4.5), disc(17.5, 17.5, 4.5), disc(6.5, 6.5, 4.5), disc(18.5, 5.5, 3)].join("");
const EYEBROW = "About Covey";
const HEADING = "Built from spare parts.";
const LEAD =
"Covey started as a way to borrow the lab's GPUs at night. It grew one idle card at a time, and it still does.";
const CHAPTERS = [
{
year: "2023",
title: "Twelve cards in a lab",
body: "Two grad students wired their department's idle GPUs to one queue so their models could train overnight.",
fill: 0.04,
figure: "12 GPUs",
/** The chapter's dots blend `from` → `to`; `year` is its year's color, dark enough to read at 12px. */
tones: { from: "text-[#00b25d] dark:text-[#34d399]", to: "text-[#00a3ff] dark:text-[#38bdf8]", year: "text-[#008a48] dark:text-[#34d399]" },
},
{
year: "2024",
title: "A network, by accident",
body: "Other labs asked to plug in. By December, 4,000 GPUs in 38 cities were answering each other's requests.",
fill: 0.38,
figure: "4,096 GPUs",
tones: { from: "text-[#7c3aed] dark:text-[#a78bfa]", to: "text-[#ff2d87] dark:text-[#ff5ca8]", year: "text-[#7c3aed] dark:text-[#a78bfa]" },
},
{
year: "2026",
title: "One endpoint",
body: "Today 41,207 GPUs answer as one, and a few more come online every hour. Most of them would otherwise sit dark.",
fill: 0.93,
figure: "41,207 GPUs",
tones: { from: "text-[#ff5a1f] dark:text-[#ff7a45]", to: "text-[#ff2d87] dark:text-[#ff5ca8]", year: "text-[#d93f06] dark:text-[#ff7a45]" },
},
];
const FACTS = [
{ label: "Founded", value: "Zurich, 2023" },
{ label: "Team", value: "23 people" },
{ label: "Cities", value: "212" },
];
/** Seconds a chapter stays before the story moves on by itself, until the visitor picks one. */
const CHAPTER_HOLD = 3.2;
/* ── Section ─────────────────────────────────────────────── */
export function SwarmAbout() {
const [index, setIndex] = React.useState(0);
const [picked, setPicked] = React.useState(false);
const timer = React.useRef(0);
const chapter = CHAPTERS[index];
React.useEffect(() => () => window.clearTimeout(timer.current), []);
// Once a chapter's dots have landed, hold it, then turn to the next, stopping on today.
const onSettle = React.useCallback(() => {
window.clearTimeout(timer.current);
if (picked || index === CHAPTERS.length - 1) return;
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
timer.current = window.setTimeout(() => setIndex((i) => Math.min(i + 1, CHAPTERS.length - 1)), CHAPTER_HOLD * 1000);
}, [picked, index]);
const pick = (i: number) => {
window.clearTimeout(timer.current);
setPicked(true);
setIndex(i);
};
return (
<section
style={{ "--accent": ACCENT.light, "--accent-dark": ACCENT.dark } as React.CSSProperties}
className="bg-white text-zinc-950 dark:bg-[#09090b] dark:text-white"
>
{/* On a phone the mark sits between the intro and the chapters, so a tapped chapter fills it in view. */}
<div className="mx-auto grid max-w-6xl grid-cols-1 gap-x-16 gap-y-10 px-6 py-20 sm:py-24 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] lg:grid-rows-[auto_1fr] lg:gap-y-0">
<div className="min-w-0 lg:col-start-1 lg:row-start-1">
<p className="font-mono text-[11px] tracking-wide text-(--accent) uppercase dark:text-(--accent-dark)">{EYEBROW}</p>
<h2 className="mt-4 text-4xl leading-[1.05] font-semibold tracking-[-0.035em] text-balance sm:text-5xl">{HEADING}</h2>
<p className="mt-5 max-w-md text-base leading-relaxed text-zinc-600 dark:text-zinc-400">{LEAD}</p>
</div>
<figure className="relative mx-auto w-full max-w-[32rem] lg:col-start-2 lg:row-span-2 lg:row-start-1 lg:self-center">
<Swarm
path={MARK}
fill={chapter.fill}
dotSize={5.5}
gap={1.5}
label={`Covey in ${chapter.year}: ${chapter.figure}`}
onSettle={onSettle}
dotClassName={chapter.tones.from}
gradientClassName={chapter.tones.to}
ringClassName={RINGS}
className="aspect-square border border-zinc-950/10 bg-[#f4f4f5] dark:border-white/10 dark:bg-white/[0.03]"
>
<span aria-hidden className="absolute top-[8%] right-[9%] size-2.5 bg-(--accent) dark:bg-(--accent-dark)" />
<span aria-hidden className="absolute bottom-[10%] left-[8%] size-2.5 border border-zinc-400 dark:border-zinc-600" />
</Swarm>
<figcaption className="flex items-center justify-between gap-4 border-x border-b border-zinc-950/10 px-4 py-3 font-mono text-[11px] tracking-wide text-zinc-500 uppercase dark:border-white/10 dark:text-zinc-400">
<span>Covey, {chapter.year}</span>
<span aria-live="polite" className="text-zinc-800 tabular-nums dark:text-zinc-200">
{chapter.figure}
</span>
</figcaption>
</figure>
<div className="min-w-0 lg:col-start-1 lg:row-start-2">
<ol className="border-t lg:mt-10 border-zinc-950/10 dark:border-white/10">
{CHAPTERS.map((c, i) => {
const on = i === index;
return (
<li key={c.year} className="border-b border-zinc-950/10 dark:border-white/10">
<button
type="button"
aria-current={on ? "step" : undefined}
onClick={() => pick(i)}
className="group grid w-full grid-cols-[3.5rem_minmax(0,1fr)] gap-x-4 rounded-sm py-4 text-left focus-visible:bg-zinc-950/[0.03] focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-zinc-950 dark:focus-visible:bg-white/[0.04] dark:focus-visible:outline-white"
>
<span
className={`font-mono text-xs tabular-nums transition-colors duration-200 ${on ? c.tones.year : "text-zinc-500 group-hover:text-zinc-700 dark:text-zinc-400 dark:group-hover:text-zinc-200"}`}
>
{c.year}
</span>
<span className="min-w-0">
<span
className={`block text-[15px] font-medium tracking-tight transition-colors duration-200 ${on ? "" : "text-zinc-500 group-hover:text-zinc-800 dark:text-zinc-400 dark:group-hover:text-zinc-200"}`}
>
{c.title}
</span>
{/* The open chapter's story; the grid row folds the others to nothing. */}
<span
className={`grid transition-[grid-template-rows,opacity] duration-300 ease-out ${on ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`}
>
<span className="overflow-hidden">
<span className="block pt-1.5 text-sm leading-relaxed text-zinc-600 dark:text-zinc-400">{c.body}</span>
</span>
</span>
</span>
</button>
</li>
);
})}
</ol>
<dl className="mt-8 grid grid-cols-3 gap-4">
{FACTS.map((f) => (
<div key={f.label}>
<dt className="font-mono text-[11px] tracking-wide text-zinc-500 uppercase dark:text-zinc-400">{f.label}</dt>
<dd className="mt-1 text-[15px] font-medium tracking-tight">{f.value}</dd>
</div>
))}
</dl>
</div>
</div>
</section>
);
}
/** A circle as path data, so the mark stays one `d` string. */
function disc(cx: number, cy: number, r: number) {
return `M${cx} ${cy - r}A${r} ${r} 0 1 1 ${cx} ${cy + r}A${r} ${r} 0 1 1 ${cx} ${cy - r}Z`;
}
Installation
The CLI writes components/swarm-about.tsx, the components it's built with (components/ui/swarm.tsx) and lib/utils.ts, and installs clsx and tailwind-merge. It needs the @keyframeui registry in components.json; add it once per project.
npx shadcn@latest add @keyframeui/swarm-aboutThen put it where the section goes. The copy, links and data sit in constants at the top of the file, so making it yours starts there.
import { SwarmAbout } from "@/components/swarm-about";
export default function Page() {
return <SwarmAbout />;
}
Built with
Each of these is a component on its own, with its own examples and props. The block installs them for you.