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 playgroundOctNovDecJanFebMarMonWedFri
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
npm i @ashutoshswamy/smouiUsage
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
More charts components
- AreaChartDraws itself in. A guide, dot and tooltip follow the pointer on springs.
- BarChartBars grow in a wave. The pointed bar lights up and its value pops above it.
- BulletChartProgress against a goal. The bar fills on a spring, a tick marks the target, and rows that beat it turn solid.
- BumpChartWho was ahead of whom, step by step. Lines swap places the way rankings do; point at one and it comes forward.
- DonutChartRing sweeps in segment by segment. Hover swells a segment and swaps the center.
- DumbbellChartBefore and after per row. The bar stretches between the dots, then the change lands in green or red.