pub trait Content: ThemeExt {
// Provided methods
fn badge(&self, label: impl Into<SharedString>) -> Div { ... }
fn badge_active(&self, label: impl Into<SharedString>) -> Div { ... }
fn avatar(&self, initials: impl Into<SharedString>) -> Div { ... }
fn tag(&self, label: impl Into<SharedString>) -> Div { ... }
fn breadcrumb(&self) -> Div { ... }
fn breadcrumb_item(
&self,
label: impl Into<SharedString>,
current: bool,
) -> Div { ... }
fn breadcrumb_separator(&self) -> Svg { ... }
fn empty_state(
&self,
icon: impl Into<Icon>,
title: impl Into<SharedString>,
hint: impl Into<SharedString>,
) -> Div { ... }
}Provided Methods§
Sourcefn badge(&self, label: impl Into<SharedString>) -> Div
fn badge(&self, label: impl Into<SharedString>) -> Div
Right-anchored badge pill: rounded-full border px-2 py-0.5.
Sourcefn badge_active(&self, label: impl Into<SharedString>) -> Div
fn badge_active(&self, label: impl Into<SharedString>) -> Div
Emerald status pill (the Accounts “Active” badge:
bg-emerald-400/[0.12] text-emerald-300/90).
Sourcefn avatar(&self, initials: impl Into<SharedString>) -> Div
fn avatar(&self, initials: impl Into<SharedString>) -> Div
Circular avatar holding one or two initials — the fallback every avatar needs, and often the whole thing on a monochrome surface.
Sourcefn tag(&self, label: impl Into<SharedString>) -> Div
fn tag(&self, label: impl Into<SharedString>) -> Div
A removable chip — a token in a filter bar or a recipient field. The caller adds the click handler for the ✕.
Breadcrumb trail. Items are added by the caller with
Self::breadcrumb_item, separated by Self::breadcrumb_separator.
One crumb. The last one is current and stops looking clickable.
The chevron between crumbs.
Sourcefn empty_state(
&self,
icon: impl Into<Icon>,
title: impl Into<SharedString>,
hint: impl Into<SharedString>,
) -> Div
fn empty_state( &self, icon: impl Into<Icon>, title: impl Into<SharedString>, hint: impl Into<SharedString>, ) -> Div
The centered “nothing here yet” panel: icon, headline, one line of hint.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".