fifth/ui

GitHub Hover Card

Card with smooth hover effect from GitHub's homepage

Installation

npx shadcn@latest add https://raw.githubusercontent.com/FifthWit/ui/refs/heads/main/public/r/gh-hover-card.json

Usage

import {
	GhCardImage,
	GhCardRoot,
	GhCardTitle,
	GhCardLabel,
	GhCardHeader,
	GhCardSubHeader,
	GhCardContent,
} from "@//components/github-hover-card";
export function GithubCardDemo() {
	return (
		<GhCardRoot href="https://example.com">
			<GhCardImage
				blur="30px"
				alt="Description"
				src="https://example.com/image.png"
				darken={0.3}
			/>
			<GhCardTitle>Hover Me</GhCardTitle>
			<GhCardContent>
				<GhCardLabel>Design Corp</GhCardLabel>
				<GhCardHeader>
					Figma gains 100x users after mandating anime girlfriends for all users
				</GhCardHeader>
				<GhCardSubHeader>Read More</GhCardSubHeader>
			</GhCardContent>
		</GhCardRoot>
	);
}

On this page