shadcn/uiNext.jsCopy-paste Block

Heatmap Calendar Component

A reusable React heatmap calendar built with shadcn/ui and Tailwind CSS. Visualize daily activity, fitness data, business metrics, IoT events, or learning progress with a GitHub-style heatmap.

Live Demo

Multiple usage patterns with live preview and copyable code.

Basic Usage

Calendar heatmap with built-in axis labels (months + weekdays).

Activity
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Less More
Axis Labels

Customize month format and which weekday rows are labeled.

Axis Labels
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Less More
Legend at Bottom

Move the intensity legend below the heatmap.

Activity
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Less More
Compact

Smaller cells and tighter spacing (axis labels disabled).

Compact View
Less More
Themes

Pick a theme and copy CSS variables (like shadcn themes).

Heatmap (Default)
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Less More
90 Days Range

Shorter time window.

Last 90 Days
Oct
Nov
Dec
Jan
Less More
Fitness / Health

Daily training minutes.

Training Minutes
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Less More
Business / Sales

Orders per day.

Orders
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Low High
Customer Support

Support tickets opened per day.

Support Tickets
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Fewer More
Learning / Education

Study minutes per day.

Study Time
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Less More

Install & Use

Copy the component and install a few lightweight dependencies.

Instructions

Required helper packages (commonly already present in shadcn projects).

Install dependenciesbash
npm install clsx tailwind-merge lucide-react