HtmlForgeX

API Reference

Class

EmailAvatarStack

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements
Modifiers sealed

Compact list of avatars rendered as an email-safe row. Can optionally "overlap" avatars using negative margins (modern clients); legacy clients fall back to a tight row.

Inheritance

Constructors

Methods

public EmailAvatarStack AddAvatar(String source, String altText = "", String href = "") #
Returns: EmailAvatarStack

Adds an image avatar.

Parameters

source System.String requiredposition: 0
altText System.String = "" optionalposition: 1
href System.String = "" optionalposition: 2
public EmailAvatarStack AddInitials(String initials, String backgroundColor = null, String href = "") #
Returns: EmailAvatarStack

Adds an initials avatar.

Parameters

initials System.String requiredposition: 0
backgroundColor System.String = null optionalposition: 1
href System.String = "" optionalposition: 2
public override String ToString() #
Returns: String
public EmailAvatarStack WithAlignment(Alignment alignment) #
Returns: EmailAvatarStack

Sets alignment.

Parameters

alignment HtmlForgeX.Email.Alignment requiredposition: 0
public EmailAvatarStack WithHref(String href, Boolean openInNewWindow = false) #
Returns: EmailAvatarStack

Sets a link for the whole stack.

Parameters

href System.String requiredposition: 0
openInNewWindow System.Boolean = false optionalposition: 1

Properties

public List<EmailAvatarStackItem> Items { get; } #

Avatars in stack order.

public Int32 MaxVisible { get; set; } #

Maximum number of visible avatars. Remaining count is shown as a "+N" avatar.

public String AvatarSize { get; set; } #

Avatar size (e.g. "28px").

public Boolean Overlap { get; set; } #

Whether to attempt overlap styling (uses negative margins where supported).

public Int32 OverlapPx { get; set; } #

Overlap amount in pixels (when Overlap is enabled).

public String AvatarBorderWidth { get; set; } #

Border width around avatars (helps separation when overlapping).

public String AvatarBorderColor { get; set; } #

Border color around avatars (theme-aware by default).

public String MoreBackgroundColor { get; set; } #

Background color of the "+N" avatar (light mode default).

public String MoreTextColor { get; set; } #

Text color of the "+N" avatar.

public String Href { get; set; } #

Optional link URL for the whole stack.

public Boolean OpenInNewWindow { get; set; } #

Whether to open Href in a new window.

public Alignment Alignment { get; set; } #

Alignment of the stack (left/center/right).