Tag
Compact label for categories or metadata — static or dismissible.
Set appearance and size, add an icon, and wire on_dismiss when users can remove the tag. For clickable filter or toggle tags use InteractionTag; for multi-select from predefined options use TagPicker. Nest multiple tags in TagGroup when they share size and appearance.
- Category or status labels in tables and navigation
- Removable labels with dismiss affordance
- Tag collections inside
crate::TagGroup
- Put label text in children.
- Set
dismissible=trueandon_dismissfor standalone removable tags. - Nest in
crate::TagGroupwithvaluewhen group-level dismiss handling is needed. - Set
sizeor rely on parent group size inheritance.
Static tag for category or status labels in tables and filters.
Use dismissible to show the dismiss button, and on_dismiss to handle removal. Render from reactive state so the tag disappears when dismissed.
dismissible— shows the dismiss affordanceon_dismiss— called on dismiss button click; update your visibility signal here
Medium, small, and extra-small presets align tags with surrounding density.
Filled, outline, and brand presets trade emphasis against surrounding chrome.
An optional leading icon renders in the tag media slot.
Icons and dismiss buttons can appear on the same tag.
Extra CSS classes merge onto the tag root for layout-specific styling.