Docs·GitHub Repo Card

GitHub Repo Card

Server-rendered GitHub repository card with cached metadata, topics, language, and repository stats.

Installation

$pnpm dlx shadcn@latest add @spiderui/github-repo-card

Usage

API Reference

PropTypeDefault
ownerGitHub username or organization.
string—
repoGitHub repository name.
string—
dataOptional pre-fetched repository data that skips the API request.
GitHubRepoData—
variantSurface style for the card.
"default" | "outline" | "muted" | "ghost""default"
sizeCard spacing and corner radius.
"sm" | "default" | "lg""default"
showLanguageShow the primary language and colored dot.
booleantrue
showTopicsShow GitHub topics.
booleantrue
showLicenseShow SPDX license identifier.
booleantrue
showUpdatedShow relative last-push time.
booleantrue
maxTopicsMaximum topic tags before a remaining-count badge.
number4
classNameAdditional classes for the link card.
string—

Click on the icon in the top right of the example preview to view the source code for specific variants.

Keep in mind

This component is inspired by various open-source projects and patterns. Please verify licenses and implementation details before using in production.

Have any questions?
Contact on@ctrlcat0x
shadcn-ui/ui

A set of beautifully-designed, accessible components and a code distribution platform.

base-uicomponentslaravelnextjs+1
TypeScript119.5k9.5kMITtoday
vercel/next.js

The React framework for the web.

JavaScript141.1k31.5kMITtoday
import { GitHubRepoCard } from "@/components/ui/github-repo-card"
export default function Page() {
  return <GitHubRepoCard owner="shadcn-ui" repo="ui" />
}