Skip to content

Component Avatar

MeowLynxSea edited this page Jun 18, 2026 · 6 revisions

Avatar

A user avatar: image, initials, or name. Optional status dot.

use yororen_ui::headless::avatar::avatar;

avatar("user-1", cx)
    .name("Ada Lovelace")
    .initials("AL")
    .circle(true)
    .render(cx)

Props

Method Purpose
src(source) Image source.
initials(s) Fallback when no src.
name(s) Display name + aria-label.
size(px) Diameter.
circle(v) true = circle; false = rounded square.
has_status(v) Show the status dot.
status_color(hsla) Status dot color.

.render(cx) returns Stateful<Div>. Pure data — no state entity.

See also: Badge, Icon, Image.

Clone this wiki locally