shadcn.io is not affiliated with official shadcn/ui
User Retention Dashboard Block for Radix UI
Retention curves for six monthly signup cohorts: tick the cohorts to compare, read week 0 to 12 on one chart with a dashed average, and check weeks 1, 4, 8 and 12 in a small table.
Installation
Overview
See whether newer users stay longer than older ones with this user retention dashboard for React with Radix UI. A hairline frame with a plus mark on each corner has a list of six monthly signup cohorts, April to September, each with its user count and a checkbox. Beside it, a hand-built chart draws the checked cohorts' retention from week 0 to week 12: every cohort has its own marker shape and a line that gets heavier with recency, so the curves tell apart without colour, and a dashed line is the average of the cohorts old enough to have each week. A small table under the chart lists weeks 1, 4, 8 and 12 for each checked cohort and for the average. Two cohorts always stay checked. It's built from native checkboxes, a table and Guides, with a CSS entrance only. For product analytics, lifecycle reports and any review of whether changes are working.
FAQ
How do I fill it with my cohorts?
Edit COHORTS: each has a month, the number of users who signed up, and rates, the percent still active in week 0, 1, 2 and so on. A cohort that is too new simply has a shorter list, so its line and its table cells stop where the data stops. The chart, the table, the average and the sentence under the title are worked out from those lists.
What does the dashed average mean?
For each week it is the mean of the checked cohorts that have a figure for that week. Because newer cohorts drop out of the later weeks, the average at week 12 describes the older cohorts only. The caption under the chart says so, and the table shows a dash where a cohort has no figure yet.
Why can't I uncheck every cohort?
A single curve has nothing to compare it with, so the list keeps two checked. Unchecking the second-to-last one leaves it checked and the status line says to keep at least two.