Class IgcAvatarComponent

An avatar component is used as a representation of a user identity typically in a user profile.

Element

igc-avatar

Slot

  • Renders an icon inside the default slot.

Csspart

base - The base wrapper of the avatar.

Csspart

initials - The initials wrapper of the avatar.

Csspart

image - The image wrapper of the avatar.

Csspart

icon - The icon wrapper of the avatar.

Hierarchy

Hierarchy

  • SizableInterface<this> & LitElement<this>
    • IgcAvatarComponent

Constructors

Properties

alt: string

Alternative text for the image.

Attr

initials: string

Initials to use as a fallback when no image is available.

Attr

shape: "square" | "circle" | "rounded" = 'square'

The shape of the avatar.

Attr

size: "small" | "medium" | "large"

Determines the size of the component.

Attr

Deprecated

since v4.5.0. Use the --ig-size CSS custom property instead.

src: string

The image source to use.

Attr

styles: CSSResult[] = ...
tagName: "igc-avatar" = 'igc-avatar'

Methods