A contribution heatmap with a footer panel that expands over the grid to rank your top repositories.
Click the chevron to expand the top repositories over the grid, and again to collapse them back into the stack. Hover any cell for its count and date.
Options you can pass to customize this component.
usernamestringThe GitHub username you want the data for.
contributionsContribution[]Your own contribution data, instead of a username.
reposRepoContribution[]The repositories listed in the footer, highest first.
yearnumberYear shown in the heading. Defaults to the year of the last contribution.
accentstringstring[]The color of the contribution squares.
cellSizenumberSize of each day square in pixels.
monthsnumberHow many months of history to show.
showMonthsbooleanAdds a row of month names above the grid.
labelstringText shown in the footer next to the avatars.
defaultOpenbooleanStarts with the repository panel open. Ignored when open is set.
openbooleanPanel state for controlled usage. When set, the component stops managing its own state.
onOpenChange(open: boolean) => voidCalled with the next state when the chevron is clicked.
classNamestringExtra classes for the card that wraps the grid.
npx shadcn add swamimalode07/rare-ui/github-activityimport GitHubActivity from "@/components/ui/github-activity"export function Demo() {return <GitHubActivity username="swamimalode07" />}// or pass everything yourself<GitHubActivitycontributions={contributions}repos={[{ name: "Zero mail", count: 412, logo: <ZeroIcon /> }]}accent={["#0e4429", "#006d32", "#26a641", "#39d353"]}/>
Click the code icon in the top-right corner to view the source code.
Most components here are recreations of great work from around the web. I don't claim to be the original creator - this is my attempt to reverse-engineer, replicate, and often add a few extra features. I've tried to credit everyone; if I missed someone, let me know.
1
1863 contributions in 2025