noahgdev

Activity Heatmap

Dashboards

About

A calendar heatmap for shadcn/ui in the style of GitHub's contribution graph. Give it dated values and it lays out the year in weeks, with a tooltip per day and intensity steps drawn from your theme color.

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

Code

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

Usage.tsx

import { ActivityHeatmap } from "@/components/ui/dashboardcn-activity-heatmap"

// Deterministic sample data so the demo is stable between renders.
function sampleData(days: number, end: Date) {
  let seed = 42
  const random = () => {
    seed = (seed * 1664525 + 1013904223) % 4294967296
    return seed / 4294967296
  }
  return Array.from({ length: days }, (_, i) => {
    const date = new Date(end)
    date.setDate(end.getDate() - (days - 1 - i))
    const weekend = date.getDay() === 0 || date.getDay() === 6
    const base = weekend ? 2 : 10
    const value = random() < 0.25 ? 0 : Math.round(random() * base * 3)
    const key = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`
    return { date: key, value }
  })
}

const end = new Date(2026, 8, 2)
const data = sampleData(365, end)

export default function ActivityHeatmapDemo() {
  return (
    <div className="w-full">
      <ActivityHeatmap data={data} endDate={end} unit="deploys" />
    </div>
  )
}

More by noahgdev

View all
  • Metric List

    Metric List

  • Sankey Chart

    Sankey Chart

  • Scatter Chart

    Scatter Chart

  • Radar Chart

    Radar Chart

  • Donut Chart

    Donut Chart

  • Composed Chart

    Composed Chart

  • Bar Chart

    Bar Chart

  • Funnel Chart

    Funnel Chart

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    659
  • Analytics Dashboard

    Analytics Dashboard

    59
  • Creator Dashboard

    Creator Dashboard

    208
  • Insights Dashboard

    Insights Dashboard

    35
  • serf dashboard

    serf dashboard

    137
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    293
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Business/Sales Dashboard

    Business/Sales Dashboard

    1.5K