Stats Bars

Cohort retention heatmap

Shaded grid of weekly retention

Live preview
Create a cohort retention card with Tailwind CSS and no chart library. A bordered card with a title, a subline naming the metric, and a legend on the right made of five small squares stepping from light to solid with "Low" and "High" captions. The body is a horizontally scrollable table with border-separate spacing, a header row of "Cohort", "Users", and Week 0 through Week 6, and an empty tbody. Close with a footnote about how the cohort is defined. Then add JavaScript that fills the table from an array of cohorts, each with a signup month, a user count, and a retention curve: render one cell per week, shade it by writing an rgba background whose alpha tracks the percentage, flip the text to white once the cell is dark enough to need it, print the percentage inside the cell, leave future weeks as an empty dashed placeholder, and add a title tooltip converting the percentage back into a user count.