Components / Content
Badge
Markdown crates/ui/src/widgets/content.rs docs.rs
use ui::widgets::Content;
theme.badge("badge")
theme.badge_active("active")Both return a Div, so a badge with an icon in it is a child you add.
API
pub trait Content: ThemeExt {
/// Hairline pill in the muted text tone.
fn badge(&self, label: impl Into<SharedString>) -> Div;
/// The emerald "connected / running / on" pill.
fn badge_active(&self, label: impl Into<SharedString>) -> Div;
// ...
}