Card

Compound surface with header, body, footer slots. Elevated, outlined, and flat variants.

Data Display@sisyphos-ui/cardView on npmView as Markdown

Preview

tsx

Monthly report

Updated 2 hours ago · 24 pages

Ready

Summary of platform events and metrics for the past 30 days, with comparisons to the previous period and a breakdown by team.

Installation

Install the individual package:

$ pnpm add @sisyphos-ui/card @sisyphos-ui/core

Or use the umbrella package that bundles everything:

$ pnpm add @sisyphos-ui/ui

Usage

Import the component styles and the component itself:

snippet.tsxtsx
import "@sisyphos-ui/card/styles.css";
import { Card } from "@sisyphos-ui/card";

Variants

`elevated` (shadow), `outlined` (border), and `filled` (solid background).

tsx

elevated

variant="elevated"

outlined

variant="outlined"

filled

variant="filled"

Interactive

`interactive` promotes the card to a button role with focus/hover states.

tsx

Acme Inc.

12 members · 43 projects · owner

Side projects

3 members · 8 projects · member

Padding

`padding` tunes inner spacing — useful for dense grids.

tsx

padding="none"

padding="sm"

padding="md"

padding="lg"

API

Props table is being written. See the package README for the complete API surface.

The full API including refs, ARIA attributes, and HTML passthroughs lives in the package README.

Was this page helpful?
Edit this page on GitHub