Avatar

An image element with a fallback for representing the user.

@adoyle0

Fallback

AD

Overlapping

AB
CD
EF

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::avatar::*;

#[component]
pub fn AvatarAnatomy() -> impl IntoView {
    view! {
        <Avatar>
            <AvatarImage />
            <AvatarFallback />
        </Avatar>
    }
}

API Reference

Avatar

Contains the contents of an avatar.

Implements global attributes.

AvatarFallback

Renders a text fallback inside the avatar.

Implements global attributes.

AvatarImage

Renders an image inside the avatar.

Implements global and img attributes.