Builtin Library
README.md
card
Card composite — title + description + optional image placeholder +
arbitrary children inside a styled panel, built from panel + label
primitives. Pure Luau composition; the engine has no dedicated card
arm.
Exports
card(opts: CardOpts?) -> WidgetNode— build a card widget node.
Types:
CardOpts = { id?, classes?, class?, title?, titleColor?, description?, descriptionColor?, image?, children?, bg?, border?, borderWidth?, padding?, gap? }
Usage
local card = require("@builtin::modules.zui.widget.card")
card({
title = "Card title",
description = "muted secondary text",
image = "asset/path", -- optional 100px tall placeholder bar
children = { ... }, -- arbitrary widgets below
id = "myCard",
padding = 8,
})
Notes
- Click handling is not exposed directly — wrap in a clickable wrapper (e.g. an outer
Z.btnwith empty text) if needed. - The image slot currently renders a
panel_alt-coloured placeholder rect; once an image-loader pipeline lands, callers can pass a realZ.imageinstead. - Theme defaults (
panel,border,text,text_dim) come frommodules.zui.theme'sdefaulttable.