Repo Card
GitHub repository preview card with description, language dot, star and fork counts, license, and topic tags.
Installation
$ shadcn add @jalco/repo-cardUsage
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
API Reference
RepoCard
Notes
- ISR caching. Repository data cached for 1 hour. No API key required.
- Pre-fetched data. Pass the
dataprop 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.