073
A retention triangle by signup week: hover or arrow through any cell to light its row and column, read it against the average, and flip between percentages and head counts.
akacohort·retention·heatmap
Run this in any project set up for the shadcn CLI. It copies the Cohort Grid source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/cohort-grid.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { CohortGrid } from "@/components/cohort-grid";
export default function Page() {
return <CohortGrid />;
}A free React component in the Numbers collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Cohort Grid source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| title | string | "Retention by signup week" |
| caption | string | "Active users each week after signing up" |
| cohorts | Cohort[] | defaultCohorts |
| periodPrefix | string | "W" |
| periodName | string | "Week" |
| defaultMode | CohortMode | "percent" |
| color | string | "var(--color-violet-500)" |
| locale | string | "en-US" |
| className | string | — |