HtmlForgeX

API Reference

Class

EmailSpacer

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements

Represents a spacer element for email layouts. Provides vertical spacing utility using table-based approach for email client compatibility.

Inheritance

Constructors

EmailSpacer 2 overloads
public EmailSpacer() #

Initializes a new instance of the EmailSpacer class.

public EmailSpacer(String height) #

Initializes a new instance of the EmailSpacer class with height.

Parameters

height System.String requiredposition: 0
The height of the spacer.

Methods

public EmailSpacer ExtraLarge() #
Returns: EmailSpacer

Sets an extra large spacing (48px).

public EmailSpacer Large() #
Returns: EmailSpacer

Sets a large spacing (32px).

public EmailSpacer Medium() #
Returns: EmailSpacer

Sets a medium spacing (16px).

public EmailSpacer Small() #
Returns: EmailSpacer

Sets a small spacing (8px).

public override String ToString() #
Returns: String

Renders the spacer as HTML. Uses a table-based approach for better email client compatibility.

public EmailSpacer WithHeight(String height) #
Returns: EmailSpacer

Sets the height of the spacer.

Parameters

height System.String requiredposition: 0
public EmailSpacer WithWidth(String width) #
Returns: EmailSpacer

Sets the width of the spacer.

Parameters

width System.String requiredposition: 0

Properties

public String Height { get; set; } #

Gets or sets the height of the spacer.

public String Width { get; set; } #

Gets or sets the width of the spacer.