Card

A flexible container for grouping related content with headers and footers.

Overview

The Card component provides a flexible container system for grouping related content. It includes specialized sections for headers, content, footers, and toolbars.

Set hoverable on the root card when you want the surface to transition from surface-1 to surface-2 on hover.

Usage

import { Button } from "@tilt-legal/cubitt-components/button";
import {
  Card,
  CardContent,
  CardHeader,
  CardHeading,
  CardTitle,
  CardToolbar,
} from "@tilt-legal/cubitt-components/card";
import { Label } from "@tilt-legal/cubitt-components/label";
import { Switch } from "@tilt-legal/cubitt-components/switch";
<Card>
  <CardHeader>
    <CardHeading>
      <CardTitle>...</CardTitle>
    </CardHeading>
    <CardToolbar>
      ...
    </CardToolbar>
  </CardHeader>
  <CardContent>
    ...
  </CardContent>
</Card>;

Examples

Hoverable

With Toolbar

Use CardToolbar to add action buttons to the header.

With Meta (Top)

Use CardMeta at the top of a card for metadata like timestamps, categories, or status.

With Meta (Bottom)

CardMeta can also be placed at the bottom for footer-style metadata.

Advanced


API Reference

Card

The root container component for all card sections.

PropTypeDefault
hoverablebooleanfalse
classNamestring-

CardHeader

Contains the card heading and optional toolbar. Uses flexbox layout to align items.

PropTypeDefault
classNamestring-

CardHeading

Wrapper for CardTitle and CardDescription with vertical spacing.

PropTypeDefault
classNamestring-

CardTitle

The main heading for the card (renders as h3).

PropTypeDefault
classNamestring-

CardDescription

Supporting text that describes the card's purpose.

PropTypeDefault
classNamestring-

CardToolbar

Container for action buttons, aligned to the right of the header.

PropTypeDefault
classNamestring-

CardContent

The main content area of the card.

PropTypeDefault
classNamestring-

CardTable

Alternative content area optimized for table layouts.

PropTypeDefault
classNamestring-

CardFooter

The bottom section for actions or additional information.

PropTypeDefault
classNamestring-

CardMeta

Displays metadata like timestamps, categories, or tags. Can be placed at the top or bottom of the card.

PropTypeDefault
classNamestring-

On this page