Angular 徽章库 | ng-hub-ui-badges

面向状态、计数器与可移除筛选标签的语义化 Angular 徽章,提供 CSS 变量与公开 SCSS mixin,支持自定义颜色族。

交互式示例

探索实时示例,了解该库在常见 Angular 用例中的表现。

语义矩阵

Semantic colours
PrimarySecondarySuccessDangerWarningInfo
Visual variants
SolidSoftOutlineGhostSubtleSurface

尺寸与形状

Sizes
XSSMMDLG
Shapes
PillRoundedSquare

状态与计数

Status dots
API gatewayOnline
Review queuePending review
Billing exportsBlocked
Counters
12 5 alerts 42 deployments

可移除筛选器

3 active filters
Priority: High Assigned: Me Status: Open

开放式语义主题

Brand solidBrand softBrand outlineBrand ghostBrand surface

截断与提示

Narrow column — long labels truncate; hover a badge for the full text.
Processing invoice exportCompleted with warningsCompletedWaiting for manual approval
Explicit tooltip overrides the label, even when it fits:SyncedCap the width per badge with --hub-badge-max-width:A very long capped label

可交互的筛选 chip

Status (single select) Open Pending Closed Selected: open
Labels (multiple select) bug feature docs urgent Selected: feature

纸片颜色

Semantic colours
primarysecondarysuccessdangerwarninginfoneutrallightdark
Standalone toggle (two-way selected)
NotificationsRemovableDisabled
notifications: true