Module chip
Expand description
Chips and badges: one family of pill-shaped marks.
A Chip is a compact interactive pill for tags, filters and tokens: it
carries a label and can be selectable (a filter that toggles, lifted
when chosen) and/or removable (a trailing × that removes a token, a
recipient or an applied filter). A super::Badge is the
non-interactive member of the family: a count, a dot or a short status.
Both are pills (radii.full): pill-shaped by meaning. Both take a
ChipStyle, never a colour: ChipStyle::Neutral is the quiet raised
pill, ChipStyle::Tinted carries a Tone (a status or a person) as a
faint wash and edge with neutral ink, ChipStyle::Live is the one filled
pill, in your colour, for something that wants your attention (an unread
count, something live). Danger red is only for errors and failures, a
Tinted(Tone::Danger) status. Canvas hosts paint the same
pills with ChipFace and super::BadgeFace.
Interactions surface through the toolkit’s drain channel —
Chip::take_toggled and Chip::take_removed — rather than callbacks,
so a CRDT-native host reads them each frame and mutates its own model.
Structs§
- Chip
- Chip
Colors - The resolved colours of one pill.
- Chip
Face - An immediate-mode chip for a canvas that lays out its own rows (a rail,
a curve, a toolbar): the
Chipwidget’s look with no layout node.