Gradient IMG
GitHub Bento Stats project screenshot

GitHub Bento Stats

Personal

A React component to display GitHub stats in a bento-style layout.

Next.jsTypeScriptTailwindshadcn uigraphQL

GitHub Bento Stats

A React component to display GitHub stats in a bento-style layout.

Image#

preview

Installation#

Install the package using npm:
npm i github-bento-stats

Usage#

'use client';

import { GitHubBento } from 'github-bento-stats';

const Page = () => {
  const gitToken = process.env.NEXT_PUBLIC_GITHUB_TOKEN;
  
  if (!gitToken) {
    console.log("GitHub Token is not found");
    return null;
  }

  return (
    <div>
      <GitHubBento
        username='idityaGE'
        githubToken={gitToken}
        showGraph
      />
    </div>
  );
};

export default Page;

Props#

PropTypeDescription
usernamestringGitHub username.
githubTokenstringGitHub personal access token (PAT).
showGraphbooleanShow contribution graph (optional).

Environment Variables#

Make sure to set up your GitHub token as an environment variable:
NEXT_PUBLIC_GITHUB_TOKEN=your_github_token