card

fun card(background: PdfColor? = PdfColor.White, cornerRadius: Dp = 8.dp, padding: Padding = Padding.all(12.dp), border: BorderStroke? = null, cornerRadiusEach: CornerRadius? = null, borderEach: BorderSides? = null, backgroundPaint: PdfPaint? = null, clipToBounds: Boolean = false, dropShadow: DropShadow? = null, rotation: Float = 0.0f, opacity: Float = 1.0f, block: ColumnScope.() -> Unit)

Convenience shortcut that wraps block in a column inside a decorated box. Equivalent to:

box(background = ..., cornerRadius = ..., padding = ..., border = ...) {
aligned(BoxAlignment.TopStart) { column { block() } }
}

Useful for stat panels, list items, dashboard tiles — anywhere a Material-style card pattern is the natural shape.

Parameters

background

fill colour. Defaults to white.

cornerRadius

outer corner radius. Defaults to 8 dp.

padding

inset between the card outline and the content.

border

optional outline stroke.