GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rudrodip/gitmap: github contribution heatmap component for react

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
components
components
 
 
lib
lib
 
 
public
public
 
 
types
types
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bun.lock
bun.lock
 
 
components.json
components.json
 
 
eslint.config.mjs
eslint.config.mjs
 
 
next.config.ts
next.config.ts
 
 
package.json
package.json
 
 
postcss.config.mjs
postcss.config.mjs
 
 
registry.json
registry.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Gitmap

A React component for visualizing GitHub contributions as a heatmap.

Features

  • GitHub-style contribution heatmap visualization
  • Customizable color themes
  • Configurable date ranges
  • Optional month and day labels
  • Show contribution counts on cells
  • Tooltip with contribution details on hover

Installation

npx shadcn@latest add https://gitmap.rudro.dev/r/gitmap.json
# or
bunx --bun shadcn@latest add https://gitmap.rudro.dev/r/gitmap.json
# or
pnpm dlx shadcn@latest add https://gitmap.rudro.dev/r/gitmap.json
# or
yarn shadcn@latest add https://gitmap.rudro.dev/r/gitmap.json

Getting Started

Run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

.env.local

NEXT_PUBLIC_APP_URL=http://localhost:3000

Open http://localhost:3000 to see the demo.

Usage

import { Gitmap } from "@/components/gitmap"

<Gitmap
  contributions={contributions}
  from={new Date("2024-01-01")}
  to={new Date("2024-12-31")}
  colors={{
    empty: "#ebedf0",
    level1: "#9be9a8",
    level2: "#40c463",
    level3: "#30a14e",
    level4: "#216e39",
  }}
  showMonths={true}
  showDays={true}
  showCounts={false}
/>

Props

Prop Type Default Description
contributions ContributionDay[] required Array of contribution data
from Date required Start date of the range
to Date required End date of the range
colors GitmapColors required Color theme for the heatmap
cellSize number 10 Size of each cell in pixels
cellGap number 3 Gap between cells in pixels
showMonths boolean true Show month labels
showDays boolean true Show day labels (Mon, Wed, Fri)
showCounts boolean false Show contribution count inside cells
className string - Additional CSS classes

Types

interface ContributionDay {
  date: string      // Format: "yyyy-MM-dd"
  count: number     // Number of contributions
  level: 0 | 1 | 2 | 3 | 4  // Intensity level
}

interface GitmapColors {
  empty: string   // Color for 0 contributions
  level1: string  // Color for level 1
  level2: string  // Color for level 2
  level3: string  // Color for level 3
  level4: string  // Color for level 4
}

License

MIT License - see LICENSE for details.

About

github contribution heatmap component for react

gitmap.rudro.dev

Topics

githubgithub-contribution-graphheatmapshadcn

Resources

Readme
MIT license
Activity

Stars

17 stars

Watchers

0 watching

Forks

2 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.