HtmlForgeX

API Reference

Class

EmailPhotoCard

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

Email-safe photo card (image + title/description + optional CTA). Useful for "featured photo", galleries, announcements and visual newsletters.

Inheritance

Constructors

Methods

public override String ToString() #
Returns: String
public EmailPhotoCard WithButton(String text, String href, EmailButtonStyle style = Secondary, EmailButtonSize size = Medium, Boolean fullWidth = true) #
Returns: EmailPhotoCard

Sets CTA button.

Parameters

text System.String requiredposition: 0
href System.String requiredposition: 1
style HtmlForgeX.Email.EmailButtonStyle = Secondary optionalposition: 2
size HtmlForgeX.Email.EmailButtonSize = Medium optionalposition: 3
fullWidth System.Boolean = true optionalposition: 4
public EmailPhotoCard WithDescription(String description) #
Returns: EmailPhotoCard

Sets description.

Parameters

description System.String requiredposition: 0
public EmailPhotoCard WithImage(String source, String alt = "", String href = null, String height = null) #
Returns: EmailPhotoCard

Sets image.

Parameters

source System.String requiredposition: 0
alt System.String = "" optionalposition: 1
href System.String = null optionalposition: 2
height System.String = null optionalposition: 3
public EmailPhotoCard WithTitle(String title, String href = null) #
Returns: EmailPhotoCard

Sets title.

Parameters

title System.String requiredposition: 0
href System.String = null optionalposition: 1

Properties

public String ImageSource { get; set; } #

Image source URL/path/base64/cid.

public String ImageAlt { get; set; } #

Alt text for the image.

public String ImageHref { get; set; } #

Optional URL wrapping the image.

public String ImageHeight { get; set; } #

Optional height attribute for the image (e.g., "260").

public String Title { get; set; } #

Title text.

public String TitleHref { get; set; } #

Optional URL wrapping the title.

public String Description { get; set; } #

Optional description text.

public String BackgroundColor { get; set; } #

Background color (theme-aware by default).

public String BorderColor { get; set; } #

Border color.

public String BorderRadius { get; set; } #

Border radius.

public String CardPadding { get; set; } #

Content padding (below the image).

public String TitleColor { get; set; } #

Title color (theme-aware by default).

public String DescriptionColor { get; set; } #

Description color (theme-aware by default).

public Boolean UseDescriptionOpacity { get; set; } #

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

public Double DescriptionOpacity { get; set; } #

Opacity used for description when UseDescriptionOpacity is enabled.

public String ButtonText { get; set; } #

Optional CTA button text.

public String ButtonHref { get; set; } #

Optional CTA 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.