Back to dashboards
ComponentChartFree

Contribution Heatmap React component

A year-long activity calendar in the style of a contribution graph: one square per day in week columns, five colour levels from quartiles, month and weekday labels, longest and current streaks, a best-day stat, day tooltips and a grid that fits any width.

About the Contribution Heatmap component

Contribution Heatmap is the familiar year-at-a-glance activity calendar: one square per day, arranged in week columns, with darker or brighter squares for busier days. The header adds the total, the longest and current streaks and the best day.

Colour levels come from quartiles of your active days, so one record day doesn't wash out the rest. Hover, tap or use the arrow keys to read any day, and the grid fits itself to the width, dropping the oldest weeks on small screens.

When to use it

Use it for commits and code reviews, writing or learning streaks, workouts, support tickets handled, logins or any daily count you want people to see as habits and gaps.

It shows patterns across a year; for exact day-to-day comparisons over a short period, a bar chart is clearer.

Installation

Add the Contribution Heatmap component to your project with the shadcn CLI. It lands in components/contribution-heatmap.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/contribution-heatmap

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install clsx tailwind-merge

More Chart components

Radial Bar Chart
Free
Sankey Diagram
Free
Streamgraph
Free
Treemap Chart
Free
Bullet Chart
Free
Waterfall Chart
Free