Github Repo Card
nyxui/github-repo-cardFreeComponent
A card component that displays information about a GitHub repository. It includes the repository name, description, stars, forks, and a link to the repository.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://nyxui.com/r/github-repo-card.jsonSource
1"use client";2import { useState, useMemo } from "react";3import Link from "next/link";4import {5 BookOpen,6 Code,7 Eye,8 Github,9 History,10 Star,11 GitFork,12 Check,13 ExternalLink,14 Calendar,15} from "lucide-react";16import { cn } from "@/lib/utils";17import Image from "next/image";1819const LANGUAGE_COLORS = {20 JavaScript: "#f1e05a",21 TypeScript: "#3178c6",22 Python: "#3572A5",23 Java: "#b07219",24 Go: "#00ADD8",25 Rust: "#dea584",26 C: "#555555",27 "C++": "#f34b7d",28 "C#": "#178600",29 PHP: "#4F5D95",30 Ruby: "#701516",31 Swift: "#F05138",32 Kotlin: "#A97BFF",33 Dart: "#00B4AB",34 HTML: "#e34c26",35 CSS: "#563d7c",36 Shell: "#89e051",37};3839export type ThemeOption = {40 id: string;41 name: string;42 description: string;43 cardBg: string;44 cardBorder: string;45 cardHoverShadow: string;46 accentColor: string;47 accentColorLight: string;48 graphColor: string;49 graphBgColor: string;50 badgeBg: string;51 badgeText: string;52 textMuted: string;53 textNormal: string;54 glowEffect?: string;55 backdropBlur?: string;56};5758export const themes: ThemeOption[] = [59 {60 id: "modern-dark",61 name: "Modern Dark",62 description: "Sleek dark theme with blue accents and glassmorphism",63 cardBg:64 "bg-gradient-to-br from-slate-900/95 via-slate-800/95 to-slate-900/95",65 cardBorder: "border border-slate-700/50 backdrop-blur-xl",66 cardHoverShadow:67 "hover:shadow-2xl hover:shadow-blue-500/20 hover:scale-[1.02] transition-all duration-500 ease-out",68 accentColor: "text-blue-400",69 accentColorLight: "text-blue-400/20",70 graphColor: "text-blue-400",71 graphBgColor: "text-blue-400/10",72 badgeBg: "bg-slate-800/80 backdrop-blur-sm border border-slate-700/50",73 badgeText: "text-blue-300",74 textMuted: "text-slate-400",75 textNormal: "text-slate-100",76 glowEffect: "hover:shadow-blue-500/25",77 backdropBlur: "backdrop-blur-xl",78 },79 {80 id: "modern-light",81 name: "Modern Light",82 description: "Clean light theme with glassmorphism and subtle shadows",83 cardBg: "bg-gradient-to-br from-white/95 via-slate-50/95 to-white/95",84 cardBorder: "border border-slate-200/60 backdrop-blur-xl",85 cardHoverShadow:86 "hover:shadow-2xl hover:shadow-slate-200/60 hover:scale-[1.02] transition-all duration-500 ease-out",87 accentColor: "text-indigo-600",88 accentColorLight: "text-indigo-600/20",89 graphColor: "text-indigo-600",90 graphBgColor: "text-indigo-600/10",91// … truncated
What it pulls in
npm packages
Files it writes
More from shadcn/ui
All 68 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 3D Layered Card3d-layered-card | shadcn/ui | Components | Free | 1 dep | |
| Animated Code Blockanimated-code-block | shadcn/ui | Components | Free | 3 deps | |
| Animated Grainy Backgroundanimated-grainy-bg | shadcn/ui | Components | Free | 1 dep | |
| Animated Textanimated-text | shadcn/ui | Components | Free | 1 dep | |
| Apple Glass Effectapple-glass-effect | shadcn/ui | Components | Free | 1 dep | |
| Bubble Backgroundbubble-background | shadcn/ui | Components | Free | no deps | |
| Custom Cursorcustom-cursor | shadcn/ui | Components | Free | 1 dep | |
| Cyberpunk Cardcyberpunk-card | shadcn/ui | Components | Free | no deps |
