ContributionGraph

A calendar of days as squares, darker for busier ones. They pop in column by column; point at one for its date and count. Charts.

Open playground
OctNovDecJanFebMarMonWedFri
LessMore

About

ContributionGraph is a React component in the Charts category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { ContributionGraph } from "@ashutoshswamy/smoui" and set data, weeks, end among its 4 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { ContributionGraph } from "@ashutoshswamy/smoui";

<ContributionGraph data={[{ date: "2026-03-30", value: 6 }]} weeks={26} unit="commits" />

Props 4

data

One entry per active day.

{ date: string; value: number }[]
weeks

Weeks shown. Default 26.

number
end

Last day shown. Default the latest in the data.

string
unit

What a value counts. Default contributions.

string