HtmlForgeX

API Reference

Class

EmailHero

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

A simple hero block (icon + eyebrow + title + subtitle + optional CTA) built with email-safe markup. Designed to help users build pretty emails without writing HTML or CSS.

Inheritance

Constructors

Methods

public override String ToString() #
Returns: String
public EmailHero WithAlignment(Alignment alignment) #
Returns: EmailHero

Sets alignment.

Parameters

alignment HtmlForgeX.Email.Alignment requiredposition: 0
public EmailHero WithButton(String text, String href, EmailButtonStyle style = Primary, EmailButtonSize size = Medium, Boolean fullWidth = false) #
Returns: EmailHero

Sets CTA 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
fullWidth System.Boolean = false optionalposition: 4
public EmailHero WithEyebrow(String eyebrow) #
Returns: EmailHero

Sets eyebrow text.

Parameters

eyebrow System.String requiredposition: 0
public EmailHero WithIcon(String icon) #
Returns: EmailHero

Sets the icon.

Parameters

icon System.String requiredposition: 0
public EmailHero WithSubtitle(String subtitle) #
Returns: EmailHero

Sets subtitle.

Parameters

subtitle System.String requiredposition: 0
public EmailHero WithTitle(String title) #
Returns: EmailHero

Sets title.

Parameters

title System.String requiredposition: 0

Properties

public String Icon { get; set; } #

Optional icon displayed above the title (emoji or short text).

public String Eyebrow { get; set; } #

Optional small label displayed above the title (e.g., "New release").

public String Title { get; set; } #

Hero title.

public String Subtitle { get; set; } #

Hero subtitle/description.

public Alignment Alignment { get; set; } #

Text alignment for the hero content.

public Int32 IconSize { get; set; } #

Icon size in px.

public EmailFontSize TitleSize { get; set; } #

Title font size.

public EmailFontSize SubtitleSize { get; set; } #

Subtitle font size.

public EmailFontSize EyebrowSize { get; set; } #

Eyebrow font size.

public String TitleColor { get; set; } #

Title color (theme-aware by default).

public String SubtitleColor { get; set; } #

Subtitle color (theme-aware by default). Use SubtitleOpacity for a muted look.

public String EyebrowColor { get; set; } #

Eyebrow color (theme-aware by default).

public Boolean UseSubtitleOpacity { get; set; } #

When true, renders subtitle with reduced opacity instead of a hard-coded muted color.

public Double SubtitleOpacity { get; set; } #

Opacity used for the subtitle when UseSubtitleOpacity is enabled.

public String ButtonText { get; set; } #

Optional CTA button text.

public String ButtonHref { get; set; } #

Optional CTA button URL.

public EmailButtonStyle ButtonStyle { get; set; } #

CTA button style.

public EmailButtonSize ButtonSize { get; set; } #

CTA button size.

public Boolean FullWidthButton { get; set; } #

When true, the CTA button is rendered full width.