Skip to main content

Module badge

Module badge 

Expand description

Badge widget — the non-interactive member of the chip family: a small pill typically anchored over another element (avatar, icon, row). Three contents:

A badge takes a ChipStyle, never a colour. A count or a dot is ChipStyle::Live by default (something new happened), filled in your colour like a sidebar’s unread count; a text badge is ChipStyle::Neutral. A status reads as ChipStyle::Tinted(Tone::…). Canvas hosts paint the same pill with BadgeFace.

A “modified” mark (unsaved changes) is a dot in neutral primary ink (Badge::modified, BadgeFace::modified): it is not new and not anyone’s, so it takes no colour.

Positioning is the caller’s responsibility — Badge does not anchor itself to another widget.

Structs§

Badge
BadgeFace
An immediate-mode badge for hosts that own their row geometry (shell overlays, painted lists): the Badge look without a layout node.

Enums§

BadgeContent
See module docs for content semantics.