All effects
Parameter playground

Drag a slider: the demo replays itself so the difference is visible, and the matching number inside the prompt is rewritten. Copy it and you take a prompt tuned to your taste.

Blank rate 28% The year re-tiles instantly: 5% nearly perfect attendance, 60% sporadic; 28% feels human
Shade steps 4 档 Cells re-tint: 3 steps look chunky, 6 get hard to tell apart; 4 is the sweet spot
Charts

Check-in Heatmap

A full year of activity as small squares in four shade steps; tap any day for its detail bubble.

AI Prompt
Make a check-in heatmap (like the GitHub contribution graph): lay out a full year of days as small squares colored in 4 shade steps by check-in count (28 percent of days left blank); tapping a day pops up a detail bubble with that date and count. HTML/CSS grid plus vanilla JS.

How it works

The GitHub-style contribution graph is a CSS Grid calendar in disguise: 53 columns by 7 rows of small squares, where each cell's color maps the day's count to one of four levels. Storing the level as a data-level attribute and styling through attribute selectors keeps the JS dumb and the CSS declarative. Grid beats absolutely-positioned cells because column widths and row heights self-align, and the uniform gap is one line of CSS. The data side is a single folding function: walk the date array, compute week-of-year and day-of-week, and drop each count into its cell.

The tap detail popover is where implementations usually break. Read the tapped cell's getBoundingClientRect, position the bubble above it absolutely, then flip below or clamp horizontally when near the viewport edges - without that flip, bubbles on the top row or screen edge get cut off. A 150-millisecond rise-and-fade entrance keeps the popover light rather than loud.

How to use this prompt

Great for check-ins, commits, spending logs - anything with a year of daily activity. Send your data shape (an array of date-plus-count) and the AI will generate the full-year mapping. On mobile, add the instruction that cells must stay square with constant gaps as they shrink; the AI will choose between fr-unit sizing and fixed pixels and handle the scaling math.

Tips for better results

Do not build the four levels from opacity steps of one color - use a single hue ramping light to dark (GitHub's #9be9a8 to #0e4429 style) for far better legibility. Outline today's cell so users stop hunting for it. On desktop, show a light tooltip on hover and reserve the full popover for click - two information layers that never fight. Past roughly 400 cells, stop binding listeners per cell and delegate from the container; it halves memory and simplifies the code.

Keep exploring