Command Palette

Search for a command to run...

57
Components
PreviousNext

GitHub Stars

Display GitHub repository star count with formatted numbers and a tooltip showing the full count.

Loading...
import { GitHubStars } from "@/components/github-stars";
 
export function GitHubStarsDemo() {
  return (
    <GitHubStars repo="jyotirmoydas/jyotimoydas.in" stargazersCount={1050} />
  );
}

Features

  • Displays the star count of a specified GitHub repository.
  • Optical alignment for better visual balance with the GitHub icon.
  • Formats large numbers for better readability (e.g., 1.2k for 1200).
  • Includes a tooltip that shows the full star count on hover.

Installation

bunx --bun shadcn add @jyotirmoydas/github-stars

Usage

import { GithubStars } from "@/components/jyotirmoydas/github-stars";
<GithubStars repo="jyotirmoydas/jyotimoydas.in" stargazersCount={1050} />

Examples

Fetching GitHub Stars with Server Component