Fusuma

Components / Small parts

avatar

An avatar size pixels across.

Try it

This is the Account page of the gallery, running in your browser: avatar is on it, and it is the real widget. Press Run, then use it.

Live: Account, where avatar is usedOpen full size

Also on this pagebadgestepperstat_cardrow

An avatar size pixels across.

The initials sit in a circle in a colour the theme gives them. For a picture made from a seed see the avatars crate.

Signature

pub const fn avatar(initials: &str, size: u32) -> Avatar<'_>

Example

use fusuma::{avatar, row};
let view = row((avatar("AL", 32), avatar("GH", 32)));
let built = fusuma::doc::built::<(), _>(&view);
assert!(built.texts().contains(&"AL"));

All components · Source