bezel

Components / Content

Avatar

Markdown crates/ui/src/widgets/content.rs docs.rs

use ui::widgets::Content;

theme.avatar("TC")
theme.avatar("K")

No image variant: that is div().rounded_full().overflow_hidden() around a gpui img, and where the image comes from belongs to the app.

API

pub trait Content: ThemeExt {
    /// One or two initials, 28px.
    fn avatar(&self, initials: impl Into<SharedString>) -> Div;

    // ...
}
Avatar