GitHub activity

A contribution heatmap with a footer panel that expands over the grid to rank your top repositories.

Dependencies

motion

Interaction Type

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.

Props

Options you can pass to customize this component.

Prop
Type
Description
username
string

The GitHub username you want the data for.

contributions
Contribution[]

Your own contribution data, instead of a username.

repos
RepoContribution[]

The repositories listed in the footer, highest first.

year
number

Year shown in the heading. Defaults to the year of the last contribution.

accent
stringstring[]

The color of the contribution squares.

cellSize
number

Size of each day square in pixels.

months
number

How many months of history to show.

showMonths
boolean

Adds a row of month names above the grid.

label
string

Text shown in the footer next to the avatars.

defaultOpen
boolean

Starts with the repository panel open. Ignored when open is set.

open
boolean

Panel state for controlled usage. When set, the component stops managing its own state.

onOpenChange
(open: boolean) => void

Called with the next state when the chevron is clicked.

className
string

Extra classes for the card that wraps the grid.

Installation

npx shadcn add swamimalode07/rare-ui/github-activity

How to use

import GitHubActivity from "@/components/ui/github-activity"
export function Demo() {
return <GitHubActivity username="swamimalode07" />
}
// or pass everything yourself
<GitHubActivity
contributions={contributions}
repos={[{ name: "Zero mail", count: 412, logo: <ZeroIcon /> }]}
accent={["#0e4429", "#006d32", "#26a641", "#39d353"]}
/>

Source Code

Click the code icon in the top-right corner to view the source code.

Keep in mind

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.

Contact

Found a bug or issue? Feel free to drop a DM.

License & Usage

  • Free to use and modify in both personal and commercial projects.
  • Attribution to Rare UI is appreciated when using a component.
  • Please don't resell the components as your own kit.
GitHub activity

1863 contributions in 2025

Top contributions in: