Card
Updated
Card is a panel in a 2px ink frame on the same 4px dithered drop shadow as the fields and radio cards, with an optional header and footer split off by ink rules. Like the charts, it takes your theme's ink and paper, light or dark, and needs no Tailwind.
Example
Export report
A CSV of every series on this dashboard.
Just a body: a framed panel for anything, like a chart or a form.
import "@/components/dithercharts/controls.css"
import { Button } from "@/components/dithercharts/button"
import { Card } from "@/components/dithercharts/card"
import { Checkbox } from "@/components/dithercharts/checkbox"
// The shadow sits 4px outside the right and bottom edges, so leave room for it.
<Card
title={<h3>Export report</h3>}
description="A CSV of every series on this dashboard."
footer={<Button size="sm">Export</Button>}
>
<Checkbox label="Include hidden series" defaultChecked />
</Card>Install
Controls install with DitherCharts Pro. See Installation to log in, then import controls.css once, e.g. in your root layout.
npx dithercharts add card
Props
It renders a native element, so every other attribute that element takes passes through.
| Prop | Type | Default | Description |
|---|---|---|---|
| title | Type ReactNode | Default – | The header's title, in pixel caps. Pass a heading element, e.g. <h2>, to put it in the page outline. |
| description | Type ReactNode | Default – | A line under the title, in muted text. |
| footer | Type ReactNode | Default – | A row under the body, split off by an ink rule, e.g. for buttons. Laid out at the end. |
| children | Type ReactNode | Default – | The body. |

