Skip to content

Avatar

Display user profile image, initials or fallback icon

  • Import
    import "@tapsioss/web-components/avatar";
  • Tag
    <tapsi-avatar></tapsi-avatar>

Properties

NameDescriptionTypeDefault Value
labelA label to use to describe the avatar to assistive devices.string-
altThe alternative text description of the avatar image, used for accessibility.string-
imageThe image source to use for the avatar.string-
loadingIndicates how the browser should load the image."eager" | "lazy""eager"
sizeThe size of the avatar."xs" | "sm" | "md" | "lg" | "xlg" | "xxlg""md"

Slots

NameDescription
-The default slot to use when image is not present.

TIP

You can use slot names as variables:

ts
import { Slots } from "@tapsioss/web-components/avatar";

console.log(Slots.DEFAULT); // ""