Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Heatmap Activity Reviews Block for React

A sixteen-week calendar of review counts for a fitness band: each day a shaded button, and picking one lists that day's reviews as articles beside totals and the busiest day.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A review calendar for React with Base UI, for the Lynxmoor Band, a fictional fitness band. A header counts the reviews (derived from the 34 typed ones), then a split behind a divider. At the start, sixteen weeks of days as squares, a column for each week and a row for each weekday, every square a button shaded in five steps by how many reviews were posted that day (0, 1, 2, 3, or 4 or more, in solid tones of your text colour with the count printed in the square) and a key under it; below the calendar a list of facts gives the total, the days that had a review and the busiest day. The busiest day starts picked. At the end, a panel reads "4 reviews on 14 Jul" and lists that day's reviews as articles, each with stars, title, text, reviewer and, when the order matched, a "Verified purchase" mark. Pick a day with the pointer, or move with the arrow keys: up and down step a day, the start and end arrows step a week. On a phone the calendar scrolls sideways above the panel. It's built from Rating, Avatar and Guides, with native buttons and CSS transitions only.

FAQ

How do I use my own reviews?

Replace REVIEWS at the top of the file, oldest first. Each review has an id, name, rating from 1 to 5, an ISO date, a title, a body and verified. Set FIRST to the Monday of the first week and AS_OF to the last day shown; the squares, the counts, the shading, the facts and the busiest day are all derived. Change WEEKS and the grid's column count together if you want a different span.

How is the shading chosen?

By the day's count, capped at four: no reviews is the faintest tone, one is a little darker, and so on up to your text colour at full strength for four or more. Each step is a solid mix with the page background, never a transparent tint, and the number is printed in every square that has one so the shading is never the only signal. A key under the calendar names the five steps.

How does the keyboard work?

The calendar is one tab stop: the picked day. The up and down arrows move to the previous and next day, the arrows toward the start and the end move a week back and forward, Enter or Space picks the focused day, and picking is immediate, so the panel updates as you move. A polite line above the list says "3 reviews on 18 Aug". The list panel itself is a labelled region you can scroll by keyboard.

What if I pick a day with no reviews?

The line says "No reviews on 3 Jul" and the panel says nobody wrote one that day. Its height does not change: on a wide screen the panel is as tall as the calendar and scrolls inside, and on a phone it has a fixed height.

How does it fit on a phone?

The calendar keeps its sixteen columns at a touch-friendly size inside a sideways scroller, with the key and the facts under it, and the panel sits below, 24 rem tall with its own scroll. The page itself never scrolls sideways.

Does it work right to left?

The calendar keeps its left-to-right order because time runs that way, so the weeks still read forward; the facts, the panel and the review articles follow the page's direction, and each date and count phrase is isolated.

  • Pro

    Trend Overview Reviews

    Insights and trends

    A router's rating over twelve months as a line with monthly review-volume bars on one axis, a 6 or 12 month switch, a month Slider and a closing band reading that month's average, count and most helpful review.

  • Pro

    Timeline Feed Reviews

    Lists and pages

    Twelve reviews of a smart thermostat on a month-by-month timeline with each month's derived average and count, review cards on shared hairlines and a firmware filter.

  • Pro

    Analytics Summary Reviews

    Insights and trends

    Six products of one outdoor shop ranked by their reviews: a sortable table of average, count, a five-segment ratings bar, the 30-day change and the answered share, all worked out from typed reviews.

  • Pro

    Year In Review Reviews

    Insights and trends

    Six superlatives worked out from a bakery's typed reviews: the first, the best month, the most helpful, the longest, the fastest after the visit and the most disagreed with, each shown with its review.

  • Pro

    Insight Metrics Reviews

    Insights and trends

    Three insights worked out from typed café-app reviews, each a sentence with a two-bar evidence strip and a button that opens a Sheet listing the reviews behind it.

  • Pro

    Twenty reviews of a podcast app ten at a time in a fixed-height scroll region that appends five more at its end, with a Load more button, placeholder rows and a polite count.