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:
BadgeContent::Dot— a small filled circle, no text.BadgeContent::Count—0renders nothing; values>= 100clamp to"99+"so the pill never grows past the visual budget reserved for it.BadgeContent::Text— a short status (“Owner”, “Beta”).
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
- Badge
Face - An immediate-mode badge for hosts that own their row geometry (shell
overlays, painted lists): the
Badgelook without a layout node.
Enums§
- Badge
Content - See module docs for content semantics.