Badge
Overlays a small colored pip on the top-right corner of its child element. When Count is provided the pip displays that number as a label, capped at 99+. When Count is null a compact dot is rendered instead. The pip bleeds outside the child’s bounds so it is visible over the corner. Typically used on inventory slots, ability icons, minimap markers, and avatar thumbnails to communicate notifications, item quantity, or status.
Constructor
Badge
Creates a Badge element.
| Parameter | Description |
|---|---|
child | The element to attach the badge to. |
count | The count to display inside the pip. Null renders a dot badge. |
color | The pip background color. Null uses the theme’s error color. |
key | An optional key for reconciliation identity. |
Properties
Color
The background color of the pip. Null defaults to the theme’s ErrorColor.
Count
The numeric value displayed inside the pip. Null renders a compact dot with no label.
Last updated on