Skip to content
caliper ui docs

Pro

Cohort retention

A triangle of retention by sign-up cohort.

Pro
pnpm dlx shadcn@latest add @caliper/cohort-retention

Northwind retention

How many accounts from each 2026 sign-up month are still active

Monthly retention by sign-up month
JoinedSizeM0M1M2M3M4M5M6
May420
Jun465
Jul510
Aug488
Sep540
Oct603
Average100%85%74%66%60%56%53%

Monthly retention by sign-up month
CohortSizeMonth 0Month 1Month 2Month 3Month 4Month 5Month 6
May420420336290262244231222
Jun465465381330298277262
Jul510510428372339318
Aug488488420371344
Sep540540475430
Oct603603540
Installs components/ui/cohort-retention.tsxDepends on d3-shapeMotion shared motion tokens

When to use

Use it for

  • Judging product stickiness over time.

Skip it when

  • There are too few users to fill the cohorts.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/cohort-retention

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { CohortRetention } from "@/components/ui/cohort-retention"

The worked example comes with Pro

The 32-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

CohortRetention

component
PropTypeDefault
label *string—
cohorts *readonly Cohort[]—
periodLabelstring"Month"
loadingboolean—
errorstring—
classNamestring—

Accessibility

It exposes grid and status semantics, with aria-label, aria-busy and aria-hidden kept in step with state. Changes that matter are announced through a live region.

No custom key handling; Tab and the native activation keys do the work.

Motion

Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.

All Revenue charts examples