A fully customizable GitHub-style contributions heatmap for React
npx shadcn@latest add https://github-calendar-kappa.vercel.app/r/github-calendar.jsonPreview
213 contributions in the last 3 months· @om2309
Customize
Color Theme
Cell Shape
Cell Size
16pxGap Size
4pxTime Range
Week Start
Usage Instructions
// Install via shadcn registry// npx shadcn@latest add https://github-calendar-kappa.vercel.app/r/github-calendar.json import { GitHubCalendar } from "@/components/ui/github-calendar" export default function App() { return ( <GitHubCalendar username="om2309" colorScheme="blue" cellSize={16} cellShape="circle" timeRange="3-months" /> )}Props API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| username | string | required | GitHub username to fetch and display contributions for — required |
| colorScheme | "green" | "blue" | "purple" | "orange" | "pink" | "dracula" | "halloween" | "blue" | Preset theme palette for the levels |
| colors | [string, string, string, string, string] | — | Custom 5-stop color array override [empty, level1, level2, level3, level4] |
| cellSize | number | 16 | Width and height of each grid cell in pixels |
| cellGap | number | 4 | Spacing between grid cells in pixels |
| cellShape | "square" | "circle" | "rounded" | "circle" | Shape styling for each contribution cell |
| showTooltip | boolean | true | Toggle displaying the hover information tooltip |
| showMonthLabels | boolean | true | Toggle showing month names above columns |
| showDayLabels | boolean | true | Toggle showing day of week labels on the left (Mon, Wed, Fri) |
| weekStart | "sun" | "mon" | "sun" | Determines which day of the week to start the columns on |
| animate | boolean | false | Enable staggered mounting scale animation for cells |
| timeRange | "3-months" | "6-months" | "1-year" | "3-months" | Adjusts the historical date limit shown in the calendar |
| onCellClick | (day: ContributionDay) => void | — | Callback function fired when a cell is clicked |