This component renders a heading (<h1>, <h2>, etc.) with customizable margin and style options. The heading level is determined by the As prop, and additional attributes can be passed to the element.

Example Usage

@using BlazorEmail.Components

<Heading As="HeadingTag.H2" M="0" Mb="1em>
    This is a custom heading!
</Heading>

Props

As
HeadingTag
default: "HeadingTag.H1"

Determines which heading tag. Can be one of H1, H2, H3, H4, H5, or H6.

M
string
default: "null"

A shorthand for setting the margin for all sides of the heading element.

Mx
string
default: "null"

Sets the horizontal margin (margin-left and margin-right) of the heading element.

My
string
default: "null"

Sets the vertical margin (margin-top and margin-bottom) of the heading element.

Mt
string
default: "null"

Sets the margin-top of the heading element.

Mr
string
default: "null"

Sets the margin-right of the heading element.

Mb
string
default: "null"

Sets the margin-bottom of the heading element.

Ml
string
default: "null"

Sets the margin-left of the heading element.