Umbra UI

Card

A bordered surface that groups related content.

Staticimport { Card } from 'umbra-ui'

Props

PropTypeDefaultDescription
asChild booleanfalseRender the single child element (e.g. an `<a>`) as the card.
interactive booleanfalseAdds hover and focus affordances for cards that act as a link or button.
size "sm" | "md" | "lg"mdInner 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

  • CardTitle renders an <h3>; adjust your heading outline accordingly.
  • For a clickable card use interactive asChild with 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