Streak grid
A yearly activity grid for visualizing streaks and daily progress.
Installation
npx shadcn@latest add qubydev/bunui/streak-gridHow to use
import { StreakGrid } from "@/components/ui/streak-grid"import { TooltipProvider } from "@/components/ui/tooltip"const activity = [{ date: "2026-09-01", count: 2 },{ date: "2026-09-02", count: 6 },{ date: "2026-09-03", count: 0 },]export function Demo() {return (<TooltipProvider><StreakGriddata={activity}itemLabel="activities"weekStartsOn={1}/></TooltipProvider>)}
Props
Options you can pass to customize this component.
data*StreakGridDay[]Daily activity entries with a date, count, and optional label or explicit intensity level.
weekStartsOn01Choose Sunday (0) or Monday (1) as the first day of the week.
itemLabelstringText shown after the total count in the summary.
showLegendbooleanShows the Less-to-More intensity legend.
showSummarybooleanShows the total activity count beneath the grid.
showMonthLabelsbooleanShows month labels above multi-week views.
cellSizenumberCell size in pixels. Values are clamped between 8 and 28.
gapnumberGap between cells in pixels. Values are clamped between 1 and 12.
formatTooltip(day: StreakGridResolvedDay) => React.ReactNodeOptional custom tooltip renderer for pointer and keyboard users.
formatSelection(day: StreakGridResolvedDay) => React.ReactNodeOptional custom summary content shown for three seconds after clicking or tapping a day.
classNamestringExtra classes merged onto the component root.
Dependencies
License & Usage
- •Free to use and modify in personal and commercial projects.
- •Attribution to Bun UI is appreciated when using a component.
- •Please do not resell the components as your own kit.