_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
chartHorizontal bar chart
progressProgress bar or stepped meter
sparklineInline trend line drawn from a series
trendTrend indicator: latest value and its change
statsKPI tiles: a label, the number, and its change
stepsNumbered steps, or a tracker of where something has got to
timelineThe same walk with dots instead of numbers
ratingA star rating, as one score or a breakdown
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, stats, rating
paddingBare keywordcompact, spaciouscallout, highlight, stats
colorcolor=<color>Hex, named, rgb(), or hsl() colorcallout, highlight, centered, header, footer, and every data directive
bgbg=<color>Hex, named, rgb(), or hsl() colorcallout, highlight, stats
border-radiusborder-radius=<value>Any CSS length (e.g. 16px, 0)callout, highlight, chart, progress, sparkline, stats

The data directives — chart, progress, sparkline, stats, steps, and rating — all take color for the drawn part, and each has its own parameters for the scale, the size, and the ground behind the drawing. See their pages.

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