npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-github-activity-calendar

v3.0.2

Published

![npm](https://img.shields.io/npm/dm/react-github-activity-calendar) [![npm](https://img.shields.io/npm/v/react-github-activity-calendar)](https://www.npmjs.com/package/react-github-activity-calendar) [![Made by Justin Charo](https://img.shields.io/badge/

Downloads

39

Readme

npm npm Made by Justin Charo npm version npm

React Github Activity Calendar

React component for displaying a user's Github activity in a calendar format.

https://www.npmjs.com/package/react-github-activity-calendar

View on my Portfolio 😉

https://justin.charo.gg/

Installation

To install the package, run:

npm install --save react-github-activity-calendar

Usage/Examples

To use the Graph component in your React project, import it and include it in your component's render method:

import { Graph } from "react-github-activity-calendar";

function App() {
  const githubApiKey = ""; // <your-github-api-key>
  const githubUserName = ""; // <github-username>
  const bgcolor = "";
  const textColor = "";

  return (
    <div className="App">
      <Graph
        userName={githubUserName}
        backgroundColor={bgcolor}
        githubApiKey={githubApiKey}
        color={textColor}
        enableAnimations={false} // optional prop to disable animations
      />
    </div>
  );
}

export default App;

Props

  • userName (required): The Github username for which to display activity.
  • githubApiKey (required): Your Github API key. It is requried that you generate your own API key from Github and pass it as a prop to the component If no API key is provided, the component will not be able to make requests to the Github API, to display your activity. I have provided steps to generate your api token below.
  • backgroundColor (optional): The background color of the calendar (hex color code, e.g. #ffffff).
  • color (optional): The color of the text and github icon(hex color code, e.g. #000000).

Generating a Github API Key

In case you forget where to see your tokens: https://github.com/settings/tokens To generate a Github API key, follow these steps:

    1. Sign in to your Github account.
    1. Go to your Settings page.
    1. Click on Developer settings in the left-hand menu.
    1. Click on Personal access tokens in the left-hand menu.
    1. Click on Generate new token.
    1. Give your token a name and select the scope to read:user.
    1. Click on Generate token.
    1. Copy the token and keep it somewhere safe.

Authors

Screenshots

App Screenshot