Component docs
Loading
import { Card } from "@pixxl-tools/components";
// In Server Components:
import { Card } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
padding | SurfacePadding | md | Inner padding (default md). |
title | ReactNode | — | Header title (any node; use a heading element for document outline). |
variant | SurfaceVariant | solid | Surface style (default solid). |
actions | ReactNode | — | Header actions, at the inline end of the title. |
as | CardElement | article | Element to render (default article; li inside a list of cards). |
footer | ReactNode | — | Footer slot. |
paddingdefault mdSurfacePadding
Inner padding (default md).
titleReactNode
Header title (any node; use a heading element for document outline).
variantdefault solidSurfaceVariant
Surface style (default solid).
actionsReactNode
Header actions, at the inline end of the title.
asdefault articleCardElement
Element to render (default article; li inside a list of cards).
footerReactNode
Footer slot.
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
Complex object props use fixed fixtures. Primitive props stay editable.
<Card padding="md" variant="solid">Card body</Card><Card title="Card">Body</Card><Card padding="md" variant="solid">Card body</Card>