_emailmd_
Directives

Directives

Special block-level content sections for email layout.

Directives are special block-level sections that control the email layout. They use the ::: fenced container syntax:

::: directive
Content goes here
:::

Available Directives

DirectiveDescription
headerContent above the main body (logos, brand images)
heroFull-width section with background image
columnsMulti-column layouts that stack on mobile
calloutHighlighted tip or note
highlightEmphasized content block
centeredCenter-aligned text
spacerExplicit vertical whitespace
dividerStyled horizontal rule
socialSocial link icon row
accordionCollapsible FAQ panels
footerFooter with links and legal text

The spacer and divider directives are single-line: they take no content and need no closing :::.

There is also a single-line include directive that splices in reusable markdown partials supplied by the rendering app.

Parameters

Some directives accept space-separated parameters after the directive name to customize alignment, padding, and colors:

::: callout center
Centered callout content
:::

::: highlight center compact bg=#dc2626
Compact, centered highlight with custom background
:::
ParameterSyntaxValuesApplies To
alignBare keywordcenter, left, rightcallout, highlight, header, footer
paddingBare keywordcompact, spaciouscallout, highlight
colorcolor=<color>Hex, named, rgb(), or hsl() colorcallout, highlight, centered, header, footer
bgbg=<color>Hex, named, rgb(), or hsl() colorcallout, highlight
border-radiusborder-radius=<value>Any CSS length (e.g. 16px, 0)callout, highlight

Parameter values are validated: an unrecognized color, alignment, or length falls back to the theme default and surfaces a render warning rather than breaking the email. Template tags like {{brand_color}} are passed through for your sending app to resolve.

See each directive's page for detailed examples.

On this page