Componentdata0.46 KB gzipZero dependencies
Card
Double-frame surface container with header, content, and footer.
Preview
Live Preview
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
tsx9 lines
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.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxcard.tsx45 lines
import * as React from "react";import { cn } from "./lib/utils"; export type CardProps = React.ComponentProps<"div"> & { /** Dual-mode: false renders instantly with no motion. Default true. */ animated?: boolean;}; function Card({ className, animated = true, ...props }: CardProps) { return ( <div className={cn( "rounded-lg border-[1.5px] border-foreground bg-card text-card-foreground outline-1 outline-dashed outline-offset-[-7px] min-w-0", animated ? "transition-shadow duration-200 hover:shadow-[5px_5px_0_0_var(--color-border)] motion-reduce:transition-none" : "transition-none", className )}Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Card } from "@/components/ui/card"; <Card />| Prop | Type | Description |
|---|---|---|
| animated | boolean | Dual-mode: false renders instantly with no motion. Default true. |
Pairs well with
Metric CardDashboard KPI card with value, trend delta and period label.Stat TileKPI metric box with big tabular numbers, delta change and sparkline bars.ItemGeneric row surface with leading media, title, description, and trailing actions; hover lift with accent bar slide-in.LinkCardWhole-card link with sliding arrow, darkening border on hover and fade-up entrance.