Skip to component
GGamma

Day grid

Read daily activity as sized dots, inspect exact amounts, and optionally select a day.

New
Piano practice

June 2026

710minutes this month
35 minutesSelected Thursday 18 June: 35 minutes

Illustrative practice journal.

Live previewUse keyboard to interact

Implementation

1"use client";2 3import {4  useEffect,5  useRef,6  useState,7  type CSSProperties,8  type HTMLAttributes,9  type KeyboardEvent,10  type PointerEvent,11} from "react";12 13export type DayGridLevel = 0 | 1 | 2 | 3 | 4;14 15export type DayGridCell = {16  /** A stable key, independent of the order of the days. */17  id: string;18  /** An ISO calendar date, without a time zone. */19  date: string;20  /** The date in words, for example “Friday 12 June”. */21  label: string;22  /** The measured amount; null means unavailable, rather than zero. */23  amount: number | null;24  level: DayGridLevel;25  disabled?: boolean;26};27 28export type DayGridProps = Omit<