Card
A bordered surface that groups related content.
Staticimport { Card } from 'umbra-ui'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Render the single child element (e.g. an `<a>`) as the card. |
interactive | boolean | false | Adds hover and focus affordances for cards that act as a link or button. |
size | "sm" | "md" | "lg" | md | Inner padding. |
variant | "outline" | "ghost" | "surface" | surface | `surface` is a filled layer, `outline` is border only, `ghost` has neither. |
Usage notes
Compose with CardHeader, CardTitle, CardDescription, CardContent and CardFooter.
Accessibility
CardTitlerenders an<h3>; adjust your heading outline accordingly.- For a clickable card use
interactive asChildwith a single<a>or<button>child rather than a click handler on a div.
Import
import { Card } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app