Command Palette

Search for a command to run...

GitHub/GitHub Languages

GitHub Languages

A visual language breakdown bar showing the programming languages used in a GitHub repository with percentage labels.

Open in v0Open in
TypeScript68.2%JavaScript18.5%Rust8.1%CSS3.2%MDX1.5%Shell0.5%

Overview

A visual component that fetches the programming languages used in a GitHub repository and displays them as a colored bar with percentage labels, matching GitHub's official language colors.

Installation

bunx shadcn@latest add @elements/github-languages

Usage

import { GitHubLanguages } from "@/components/elements/github/github-languages";

export function TechStack() {
  return <GitHubLanguages owner="vercel" repo="next.js" />;
}

Props

PropTypeDefaultDescription
ownerstring-GitHub repository owner
repostring-GitHub repository name
showLabelsbooleantrueShow language labels with percentages
staticDataLanguageData[]-Static data array (bypasses API)
classNamestring-Additional CSS classes

Static Data Shape

{
  name: string;
  percentage: number;
  color: string;
}[]

Environment Variables

For higher API rate limits:

GITHUB_TOKEN=your_github_token

Features

  • Fetches real-time language data from GitHub API
  • Uses official GitHub language colors
  • Responsive colored bar visualization
  • Optional language labels with percentages
  • Built-in loading and error states