HtmlForgeX

API Reference

Class

EmailOfferCard

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

Email-safe offer card (badge + price + optional code + highlights + CTA). Designed for promos, upgrades, retention offers and marketing campaigns.

Inheritance

Constructors

Methods

AddAction 2 overloads
public EmailOfferCard AddAction(Action<EmailButton> configure) #
Returns: EmailOfferCard

Adds an action button configured via callback.

Parameters

configure System.Action{HtmlForgeX.Email.EmailButton} requiredposition: 0
public EmailOfferCard AddAction(String text, String href, EmailButtonStyle style = Primary, EmailButtonSize size = Medium) #
Returns: EmailOfferCard

Adds an action button.

Parameters

text System.String requiredposition: 0
href System.String requiredposition: 1
style HtmlForgeX.Email.EmailButtonStyle = Primary optionalposition: 2
size HtmlForgeX.Email.EmailButtonSize = Medium optionalposition: 3
AddFeature 2 overloads
public EmailOfferCard AddFeature(String text, Boolean included = true, String href = "") #
Returns: EmailOfferCard

Adds a highlight feature.

Parameters

text System.String requiredposition: 0
included System.Boolean = true optionalposition: 1
href System.String = "" optionalposition: 2
public EmailOfferCard AddFeature(Action<EmailFeatureItem> configure) #
Returns: EmailOfferCard

Adds a highlight feature configured via callback.

Parameters

configure System.Action{HtmlForgeX.Email.EmailFeatureItem} requiredposition: 0
public override String ToString() #
Returns: String
public EmailOfferCard WithBadge(String text) #
Returns: EmailOfferCard

Sets badge text.

Parameters

text System.String requiredposition: 0
public EmailOfferCard WithCode(String code, String label = null) #
Returns: EmailOfferCard

Sets a promo code.

Parameters

code System.String requiredposition: 0
label System.String = null optionalposition: 1
public EmailOfferCard WithDescription(String description) #
Returns: EmailOfferCard

Sets description.

Parameters

description System.String requiredposition: 0
public EmailOfferCard WithPrice(String price, String period = "", String oldPrice = "") #
Returns: EmailOfferCard

Sets pricing.

Parameters

price System.String requiredposition: 0
period System.String = "" optionalposition: 1
oldPrice System.String = "" optionalposition: 2
public EmailOfferCard WithPriceCaption(String caption) #
Returns: EmailOfferCard

Sets price caption.

Parameters

caption System.String requiredposition: 0
public EmailOfferCard WithTitle(String title) #
Returns: EmailOfferCard

Sets title.

Parameters

title System.String requiredposition: 0

Properties

public String Icon { get; set; } #

Optional icon shown on the left (emoji or short text).

public String BadgeText { get; set; } #

Optional small badge shown in the header (e.g. "Limited time").

public String Title { get; set; } #

Title.

public String Description { get; set; } #

Optional description under the title.

public String Price { get; set; } #

Primary price string (e.g. "$49").

public String PricePeriod { get; set; } #

Price period (e.g. "/year").

public String OldPrice { get; set; } #

Optional previous price (strikethrough).

public String PriceCaption { get; set; } #

Optional caption under the price (e.g. "Renews at $99/year").

public String CodeLabel { get; set; } #

Optional code label shown above the code.

public String Code { get; set; } #

Optional promo code (renders a compact monospace pill).

public List<EmailFeatureItem> Features { get; } #

Feature highlights (email-safe check list).

public List<EmailButton> Actions { get; } #

Actions shown under the card content (0–2 recommended).

public Boolean StackActionsOnMobile { get; set; } #

Whether to stack action buttons on mobile (where media queries are supported).

public String BackgroundColor { get; set; } #

Background color of the card (theme-aware by default).

public String BorderColor { get; set; } #

Border color of the card.

public String BorderRadius { get; set; } #

Border radius.

public String CardPadding { get; set; } #

Card padding.

public String AccentColor { get; set; } #

Accent color (theme-aware by default). Used for icon circle and accents.

public String TitleColor { get; set; } #

Title color (theme-aware by default).

public String MutedColor { get; set; } #

Muted text color (theme-aware by default).

public Boolean UseDescriptionOpacity { get; set; } #

Whether to render description using opacity (preferred) instead of a fixed muted color.

public Double DescriptionOpacity { get; set; } #

Opacity used for the description when UseDescriptionOpacity is enabled.

public String CodeBackgroundColor { get; set; } #

Code pill background color.

public String CodeBorderColor { get; set; } #

Code pill border color.

public String CodeTextColor { get; set; } #

Code text color.

public String CodePadding { get; set; } #

Code pill padding.

public String CodeFontSize { get; set; } #

Code pill font size.

public String CodeLetterSpacing { get; set; } #

Code pill letter spacing.

public Boolean DashedCodeBorder { get; set; } #

Whether to use a dashed border around the code pill.