HtmlForgeX

API Reference

Class

EmailBadge

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements

Small status label used to draw attention to key values (e.g., decision, VT ratio). Rendered as a styled span suitable for email clients.

Inheritance

Constructors

Methods

public override String ToString() #
Returns: String

Renders the badge as an HTML span with inline styles.

public EmailBadge WithBackgroundColor(String color) #
Returns: EmailBadge

Sets the background color.

Parameters

color System.String requiredposition: 0
public EmailBadge WithBorder(String width, String color) #
Returns: EmailBadge

Sets a solid border around the badge.

Parameters

width System.String requiredposition: 0
color System.String requiredposition: 1
public EmailBadge WithColor(String color) #
Returns: EmailBadge

Sets the foreground text color.

Parameters

color System.String requiredposition: 0
public EmailBadge WithFontSize(String size) #
Returns: EmailBadge

Sets the font size.

Parameters

size System.String requiredposition: 0
public EmailBadge WithRounded(Radius radius = Large) #
Returns: EmailBadge

Sets the badge corner radius.

Parameters

radius HtmlForgeX.Email.Radius = Large optionalposition: 0
public EmailBadge WithText(String text) #
Returns: EmailBadge

Sets the badge text.

Parameters

text System.String requiredposition: 0

Properties

public String Text { get; set; } #

Badge text displayed inside the label.

public String BackgroundColor { get; set; } #

Background color (hex or named) of the badge.

public String Color { get; set; } #

Foreground text color of the badge.

public String FontSize { get; set; } #

Font size of the badge text (e.g., 12px).

public String BorderColor { get; set; } #

Border color of the badge outline.

public String BorderWidth { get; set; } #

Border width of the badge outline (e.g., 1px).

public String BorderRadius { get; set; } #

Corner radius for the badge (e.g., 6px).