Introducing shieldcn — README badges, shadcn style.

Check it out

Repo Card

GitHub repository preview card with description, language dot, star and fork counts, license, and topic tags.

class-variance-authority
Loading...

Installation

$ shadcn add @jalco/repo-card

Usage

import { RepoCard } from "@/components/repo-card"
<RepoCard owner="shadcn-ui" repo="ui" />

Async server component — fetches the GitHub API at build time and caches the result for 1 hour via Next.js ISR. Optional GITHUB_TOKEN env var raises the rate limit.

Examples

Grid layout

Loading...

API Reference

RepoCard

PropType

Notes

  • ISR caching. Repository data cached for 1 hour. No API key required.
  • Pre-fetched data. Pass the data prop to skip the API call.
  • Language colors. 30+ language colors built in. Unknown languages use gray.
  • Status badges. Archived repos show an amber badge. Forks show a fork badge.