Componentdata
Card
Double-frame surface container with header, content, and footer.
Preview
Live Preview
Front Row
Row C · Seat 12 · No refunds
Keep this stub until the end of the show.
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add cardOr install the full npm package:
npm install bigbulluiUsage
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
<Card>
<CardHeader>
<CardTitle>Title</CardTitle>
<CardDescription>Description</CardDescription>
</CardHeader>
<CardContent>Content</CardContent>
</Card>Source code
card.tsxZero dependencies (only React + utils). Copy and paste directly into your project:
import * as React from "react";
import { cn } from "./lib/utils";
function Card({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
className={cn(
"rounded-lg border-[1.5px] border-foreground bg-card text-card-foreground outline-1 outline-dashed outline-offset-[-7px] transition-shadow duration-200 hover:shadow-[5px_5px_0_0_var(--color-border)]",
className
)}
{...props}
/>
);
}
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
return <div className={cn("flex flex-col gap-1.5 p-6", className)} {...props} />;
}
function CardTitle({ className, ...props }: React.ComponentProps<"h3">) {
return <h3 className={cn("font-mono text-[15px] font-bold uppercase leading-none tracking-[0.12em]", className)} {...props} />;
}
function CardDescription({ className, ...props }: React.ComponentProps<"p">) {
return <p className={cn("text-sm text-muted-foreground", className)} {...props} />;
}
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
return <div className={cn("p-6 pt-0", className)} {...props} />;
}
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
return <div className={cn("flex items-center p-6 pt-0", className)} {...props} />;
}
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter };