Aashir Zayd

Contribution Heatmap

Dashboards 11

About

A polished GitHub-style contribution heatmap component for React and TypeScript. Includes dark/light theme support, multiple color palettes, interactive tooltips, replay animation, and export-to-image functionality. Designed for dashboards, developer portfolios, analytics platforms, and activity tracking interfaces with a clean, modern UI and customizable layout

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Contribution Heatmap to your project and fits it to your theme.

Code

How Contribution Heatmap is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client"

import ContributionHeatmap from "@/components/ui/contribution-heatmap"

function generateData() {

  const today = new Date()
  const data = []

  for (let i = 365; i >= 0; i--) {

    const d = new Date(today)
    d.setDate(today.getDate() - i)

    data.push({
      date: d.toISOString().split("T")[0],
      count: Math.random() < 0.5 ? 0 : Math.floor(Math.random() * 6)
    })

  }

  return data
}

export default function Demo() {

  const data = generateData()

  return (
    <div className="w-full flex flex-col items-center gap-6 p-10">

      <div className="text-center max-w-md">

        <h2 className="text-lg font-semibold">
          Contribution Heatmap
        </h2>

        <p className="text-sm text-muted-foreground mt-1">
          A GitHub-style activity heatmap with theme support,
          export functionality, and animated replay.
        </p>

      </div>

      <ContributionHeatmap data={data} />

    </div>
  )
}

Dependencies

More by Aashir Zayd

View all
  • Uptime Pet

    Uptime Pet

    19
  • Punch Card Input

    Punch Card Input

    14
  • Tumbler Password

    Tumbler Password

More in Dashboards

View all
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.6K
  • Stat Card

    Stat Card

    46
  • Sidebar

    Sidebar

    392
  • Chart Component

    Chart Component

    11
  • SaaS Template

    SaaS Template

    2.7K
  • Fitness Bento Grid

    Fitness Bento Grid

    42
  • Financial Bento Grid

    Financial Bento Grid

    129
  • Course Design Cards

    Course Design Cards

    1.3K