Skip to Content

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.

ParameterDescription
childThe element to attach the badge to.
countThe count to display inside the pip. Null renders a dot badge.
colorThe pip background color. Null uses the theme’s error color.
keyAn 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