类型 CardLayout

API 文档由 Go 源码生成,内容为英文。

type CardLayout struct {
	Header  ui.Rect
	Content ui.Rect
	Footer  ui.Rect
}

CardLayout is where the sections of a painted card are. Each rectangle is the content box, already inset by the card's horizontal spacing. A section that was not asked for is the zero rectangle.

构造函数

PaintCard#

func PaintCard(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, options CardOptions) CardLayout

PaintCard paints a shadcn card surface and returns the layout of its sections: py spacing above and below, gap spacing between sections, px spacing at the sides, and the optional header and footer rules. The surface is the same at both sizes; Size changes only the spacing.