Card

Content cards for media, stats, features, and interactive surfaces.

Loading preview...

Examples

Practical examples and common states for the same installable component.

Default

Static content card with premium dark/light mode surface shadow config.

examples/card-default.tsx
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/wensity/card";
export function CardDefault() {
return (
<Card className="w-[380px]">
<CardHeader>
<CardTitle>System Information</CardTitle>
<CardDescription>Overview of current system state.</CardDescription>
</CardHeader>
<CardContent className="space-y-3">
<div className="flex items-center justify-between text-xs border-b border-zinc-100 dark:border-white/[0.04] pb-2">
<span className="text-zinc-500">Node Status</span>
<span className="font-semibold text-emerald-500">Operational</span>
</div>
<div className="flex items-center justify-between text-xs border-b border-zinc-100 dark:border-white/[0.04] pb-2">
<span className="text-zinc-500">Active Load</span>
<span className="font-semibold dark:text-zinc-300">14.8%</span>
</div>
</CardContent>
</Card>
);
}

Interactive

Sleek hover highlights for border and background (with no press scaling).

examples/card-interactive.tsx
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/wensity/card";
export function CardInteractive() {
return (
<Card interactive className="w-[380px]">
<CardHeader>
<CardTitle>Interactive Node</CardTitle>
<CardDescription>Hover over this card to view details.</CardDescription>
</CardHeader>
<CardContent>
<p className="text-xs text-zinc-600 dark:text-zinc-400">
Features transition-aware border tinting and subtle background shifts.
</p>
</CardContent>
</Card>
);
}

Media

Opt-in media zoom that keeps the frame stable and respects motion preferences.

examples/card-media.tsx
import { Card, CardMedia, CardHeader, CardTitle, CardDescription } from "@/components/wensity/card";
export function CardMediaDemo() {
return (
<Card interactive className="w-[380px]">
<CardMedia aspectRatio="video" hoverZoom>
<img
src="https://images.unsplash.com/photo-1579546929518-9e396f3cc809?auto=format&fit=crop&w=600&q=80"
alt="Colorful pattern"
/>
</CardMedia>
<CardHeader>
<CardTitle>Media Preview</CardTitle>
<CardDescription>Cropped layout media demo.</CardDescription>
</CardHeader>
</Card>
);
}

Stat

Large numbers with trend badges and path-animating SVG sparklines.

examples/card-stat.tsx
import { Card, CardHeader, CardTitle, CardStatTrend, CardStatSparkline } from "@/components/wensity/card";
export function CardStat() {
return (
<Card className="w-[380px]">
<CardHeader className="flex flex-row items-center justify-between pb-2 space-y-0">
<div>
<CardTitle className="text-sm font-semibold text-zinc-500">Network Load</CardTitle>
<div className="mt-1 flex items-baseline gap-2">
<span className="text-3xl font-bold font-mono tracking-tight text-white">842 GB</span>
<CardStatTrend value="8.4%" trend="down" />
</div>
</div>
<CardStatSparkline
data={[30, 28, 25, 27, 24, 22, 19, 18, 16, 15, 14]}
trend="down"
width={90}
height={32}
/>
</CardHeader>
</Card>
);
}

Feature

Includes icons and CTA links with responsive arrow shifts.

examples/card-feature.tsx
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardFeatureAction } from "@/components/wensity/card";
import { IconServer } from "@tabler/icons-react";
export function CardFeature() {
return (
<Card interactive className="w-[380px]">
<CardHeader>
<div className="inline-flex size-9 items-center justify-center rounded-xl bg-blue-500/10 text-blue-500 border border-blue-500/20 mb-3">
<IconServer className="size-5" />
</div>
<CardTitle>Server Configuration</CardTitle>
<CardDescription>Deploy microservices in minutes.</CardDescription>
</CardHeader>
<CardContent>
<p className="text-xs text-zinc-600 dark:text-zinc-400 leading-relaxed">
Instantly setup containers with auto-scaling networks and dedicated storage allocations.
</p>
</CardContent>
<CardFooter className="pt-2">
<CardFeatureAction label="Manage Servers" />
</CardFooter>
</Card>
);
}