Card
ElementsA composed surface for a single item, with room for context and actions.
ReadyResponsive
Usage
Package exportimport { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@jnpll/elements-ui/card";
<Card size="default" className="w-full max-w-sm">
<CardHeader>
<CardTitle>{"Studio workspace"}</CardTitle>
<CardDescription>Your space to make something good.</CardDescription>
</CardHeader>
<CardContent><img src="/samples/workspace.webp" alt="MacBook Pro on a clean workspace" className="mb-4 h-28 w-full rounded-md object-contain bg-white" /><p>Everything you need, in one place.</p></CardContent>
<CardFooter><span>Updated just now</span></CardFooter>
</Card>Examples
Compact spacing
API Reference
| Prop | Type / description | Default |
|---|---|---|
size | "default" | "sm"Controls internal spacing. | "default" |
children | ReactNodeCard sections and content. | - |
className | stringOverrides the default surface styles. | - |
Composition & accessibility
Compose CardHeader, CardTitle, CardDescription, CardContent, and CardFooter inside Card. CardAction provides a header action slot.
