Ballmac UI home

Contribution Graph

A compact daily activity heatmap with token-based intensity and an accessible summary.

Installation

$ pnpm dlx shadcn@latest add @ballmac/contribution-graph

Usage

import { ContributionGraph } from "@/components/ballmac/contribution-graph"

The full example is in the Code tab above.

Examples

States and variants

API reference

PropTypeDefault
data*

Daily values in calendar order.

ContributionDay[]—
label*

Accessible description of the measure.

string—
levels

Number of color levels for nonzero values.

2 | 3 | 44

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Tab / Arrow keysFocuses and scrolls the heatmap; total and date span are announced

Use with AI

A compact daily activity heatmap with token-based intensity and an accessible summary. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Contribution Graph (@ballmac/contribution-graph) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Show a daily activity pattern over time

Not for

  • Use a calendar when dates need interaction

Registry JSON: https://ui.ballmac.com/r/contribution-graph.json

Credits

Free to use in personal and commercial projects.

npm
None