A surface for grouping content: elevated, outlined, glass or brand.
import { Card } from "@kivu-ui/react"On this page
import { Card } from "@kivu-ui/react";import { Card } from "@kivu-ui/react";
export default function Demo() {
return (
<div className="grid w-full gap-4 sm:grid-cols-2 lg:grid-cols-4">
<Card variant="elevated">Elevated</Card>
<Card variant="outline">Outline</Card>
<Card variant="subtle">Subtle</Card>
<Card variant="brand">Brand</Card>
</div>
);
}Frosted panel for photos and gradients.
Hours tracked this month
142.5 h
import { Card } from "@kivu-ui/react";
export default function Demo() {
return (
<div className="w-full rounded-kivu-xl bg-gradient-to-br from-primary-400 to-primary-700 p-8">
<Card variant="glass" padding="lg" className="max-w-sm">
<p className="text-sm text-white/80">Hours tracked this month</p>
<p className="font-display text-3xl">142.5 h</p>
</Card>
</div>
);
}Hover lift plus asChild to make the whole card a link.
import { Card } from "@kivu-ui/react";
const projects = [
{ name: "Brand refresh", meta: "12 tasks · due Friday" },
{ name: "Website launch", meta: "31 tasks · 3 members" },
];
export default function Demo() {
return (
<div className="grid w-full gap-4 sm:grid-cols-2">
{projects.map((p) => (
<Card key={p.name} interactive asChild>
<a href="#interactive" className="flex items-center justify-between">
<span>
<span className="block text-lg">{p.name}</span>
<span className="text-sm text-fg-subtle">{p.meta}</span>
</span>
<span aria-hidden>›</span>
</a>
</Card>
))}
</div>
);
}Extends <div> attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "elevated" | "outline" | "subtle" | "glass" | "brand" | "elevated" | Visual style. |
padding | "none" | "sm" | "md" | "lg" | "md" | Inner spacing. |
radius | "md" | "lg" | "xl" | "lg" | Corner radius. |
interactive | boolean | false | Hover lift and pointer cursor. |
asChild | boolean | false | Render the single child (e.g. a router Link) with this card's styles and behaviour. |
Every component also accepts className and forwards its ref. Root CSS class: .kivu-card