# C cohort retention 3

> Feature adoption — share using a feature by month

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/c-cohort-retention-3).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/c-cohort-retention-3
- Screenshot: https://shadcn.exchange/shot/cnippet/c-cohort-retention-3/light.png
- Registry item: https://ui.cnippet.dev/r/c-cohort-retention-3.json
- Categories: cohort retention
- Listed: 2026-10-27, source last changed 2026-10-27

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/cnippet/c-cohort-retention-3.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/cohort-retention`, `@cnippet/chart-card`

## Files

### `registry/default/chart-variants/c-cohort-retention-3.tsx`

```tsx
"use client";

import { ChartCard } from "@/registry/default/charts/chart-card";
import { CohortRetention } from "@/registry/default/charts/cohort-retention";

const cohorts = ["Jun", "Jul", "Aug", "Sep", "Oct"];
const sizes = [860, 910, 1040, 1185, 1230];

// Deterministic adoption of the new automations feature, by signup month.
// The feature launched in August, so older cohorts start low.
const data = cohorts.map((cohort, c) => ({
  cohort,
  size: sizes[c] ?? 0,
  values: Array.from(
    { length: cohorts.length - c },
    (_, m) => +Math.min(0.12 + c * 0.06 + m * 0.07, 0.9).toFixed(3),
  ),
}));

export default function FeatureAdoption() {
  return (
    <ChartCard
      className="max-w-xl"
      description="Share of each signup cohort that has created an automation, by month since signup"
      title="Automations adoption"
    >
      <CohortRetention
        color="var(--chart-3)"
        data={data}
        periodLabel={(m) => `Month ${m}`}
        showLegend
        sizeFormatter={(v) => `${v} users`}
      />
    </ChartCard>
  );
}
```
