Card
Container with a sketch border. Optional offset rectangle behind it reads as a paper shadow.
Field notes
A container with a sketch border. Text inside stays HTML.<Card title="Field notes" shadow={true} roughness={1.5}>
A container with a sketch border.
</Card>Usage
import { Card } from "doodleui-react";
<Card title="Field notes" shadow>
A container with a sketch border.
</Card>
Cards do not bundle drop-shadow CSS. The shadow is another rough.js rectangle, translated a few pixels.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
| title | ReactNode | undefined | Optional heading inside the card. |
| footer | ReactNode | undefined | Optional footer row. |
| shadow | boolean | true | Offset hachure rectangle behind the card. |
| fill | string | undefined | rough.js fill color for the face rectangle. |
| roughness | number | 1.5 | How wobbly the stroke is. 0 is almost geometric. 3+ is messy. |
| seed | number | provider / random | Locks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed. |
| sketchColor | string | #1f1d1a | Stroke color. Also tints primary/accent fills where relevant. |
| className | string | undefined | Passed through to the root element. |
| style | CSSProperties | undefined | Passed through to the root element. |