Card

Elements

A composed surface for a single item, with room for context and actions.

Studio workspace
Your space to make something good.
MacBook Pro on a clean workspace

Everything you need, in one place.

Updated just now
ReadyResponsive

Usage

Package export
tsx
import { 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
Studio workspace
Your space to make something good.
MacBook Pro on a clean workspace

Everything you need, in one place.

Updated just now

API Reference

PropType / descriptionDefault
size"default" | "sm"

Controls internal spacing.

"default"
childrenReactNode

Card sections and content.

-
classNamestring

Overrides the default surface styles.

-

Composition & accessibility

Compose CardHeader, CardTitle, CardDescription, CardContent, and CardFooter inside Card. CardAction provides a header action slot.