These helpers cover small status affordances and media output, plus the shared color tokens used across buttons, badges, alerts, and links.
paw.Alertpaw.Badgepaw.Iconpaw.ImgAPI 接口 |
Description 说明 |
|---|---|
Alert |
Contextual message box for inline feedback. 用于行内反馈的上下文提示框。 |
Badge |
Small pill-style status label. 小型胶囊样式状态标签。 |
Icon |
Bootstrap icon helper. Bootstrap 图标辅助类型。 |
Img |
Image helper with width, height, style, and circle support. 支持宽高、样式和圆形裁切的图片辅助类型。 |
ColorBodyEmphasis |
Default text color token used by ordinary links. 普通文本链接默认使用的文字颜色常量。 |
ColorPrimary .. ColorDark |
Context color tokens for filled or text-backed widgets. 用于实色或带文本背景组件的上下文颜色常量。 |
ColorPrimaryOutline .. ColorDarkOutline |
Outline-style button color tokens. 描边按钮风格的颜色常量。 |
Alerts, badges, and icons are lightweight enough to use throughout normal layouts and tables.
HealthyQueuedBlocked
paw.Alert{
Color: paw.ColorPrimary,
Body: paw.String("Paw ships small display helpers."),
}
paw.Badge{Text: "Healthy", Color: paw.ColorSuccess}
paw.Icon("info-circle-fill")
Color tokens are just string constants, so the same palette works across buttons, badges, and other widgets.

paw.Img{Src: "/assets/meme_ai.jpg", Width: 160}
paw.Img{Src: "/assets/meme_ai.jpg", Width: 96, Height: 96, Circle: true}
paw.Link{Name: "Primary"}.Button().Primary()
paw.Link{Name: paw.ColorPrimaryOutline, Color: paw.ColorPrimaryOutline}.Button()
Img defaults to max-width:100%, so it expands to the available width unless you also set Width or Height.
Regular text links default to ColorBodyEmphasis; button-style links default to ColorPrimary unless you pick another token.