Skip to content

Blocks ​

Every block is { type, props, style? }, plus children for containers. Props are the block's content; style is its box and typography. Everything is optional: a missing value falls back to the default shown here (what the editor inserts) or to the email's settings.

Style keys ​

Blocks share three groups of style keys:

Box (every block)

KeyTypeDescription
paddingnumber or { top, right, bottom, left }px, 0–200
backgroundColorcolor
border{ width, style, color }width 0–20 px; style solid, dashed or dotted
borderRadius0–100px

Align

KeyType
alignleft, center or right

Typography

KeyTypeDescription
fontFamilyfont key or CSS stackSee fonts
fontSize8–96px
fontWeightnormal, bold or 100–900
colorcolor
lineHeight0.8–3unitless
letterSpacing-5–20px
BlockStyle keys
heading, text, htmlBox, align, typography
buttonBox, align, and fontFamily, fontSize, fontWeight, letterSpacing
social, image, video, avatar, custom, containerBox, align
divider, spacer, columns, columnBox

Colors are hex values, transparent, or theme tokens like $primary. See Values.

Default styles ​

New blocks start with this style; anything else comes from the email's settings.

BlockDefault style
headingpadding 16 / 24 / 8 / 24
textpadding 8 / 24
buttonpadding 16 / 24 (weight from the theme styles)
image, video, socialpadding 16 / 24, align: 'center'
avatarpadding 16 / 24, align: 'left'
divider, html, custompadding 16 / 24
containerpadding 16 / 0
columnspadding 8 / 24
spacer, columnnone

Padding is written top / right / bottom / left, or vertical / horizontal when the sides match.

Content ​

heading ​

A title or section heading.

PropTypeDefaultDescription
textstring'Heading'Inline markdown: bold, italic, links, code.
level1, 2, 3232px, 24px or 20px unless style.fontSize is set.

text ​

Paragraphs of body copy in restricted markdown.

Default: 'Write something people want to read.'

PropTypeDescription
markdownstringParagraphs, line breaks, **bold**, *italic*, ~~strike~~, `code`, links, - and 1. lists. Raw HTML is escaped.

button ​

A call-to-action link styled as a button. Outlook-safe.

PropTypeDefaultDescription
textstring'Get started'Label
hrefURL'https://example.com'Link
variantsolid, soft, outline, ghost, linkthemeLook of the button
shaperectangle, rounded, pillthemerounded uses the theme's button radius
sizexs, sm, md, lgtheme
fullWidthbooleanfalseStretch to the content width
buttonColorcolor$primaryFill of solid buttons; tint, border or text of the others
textColorcolorwhite on solid, else the button colorLabel color

Leave variant, shape and size unset to follow the theme's component styles.

social ​

A row of social network icons linking to your profiles.

PropTypeDefaultDescription
links{ network, href, label?, icon? }[]X, LinkedIn, Instagram, YouTubeUp to 16, in order
variantbrand, dark, lightdarkNetwork colors, black tiles or gray tiles
shapecircle, rounded, squarecircle
size16–4832Icon size in px
gap0–3212Space between icons in px

Networks: x, facebook, instagram, linkedin, youtube, tiktok, threads, bluesky, github, discord, whatsapp, pinterest, telegram, mastodon, reddit, website, email (use a mailto: link). label is the alt text (defaults to the network name); icon is your own square image URL.

Media ​

image ​

A picture, optionally linked.

PropTypeDefaultDescription
srcURLa placehold.co placeholderAbsolute image URL
altstringAlways describe the image
hrefURLLink when clicked
width1–1200 or 'full''full'px, or fill the content width. Omit for the natural size.
height1–2000px; usually omitted

video ​

Email can't play video inline, so this is a thumbnail with a play button that links to the video.

PropTypeDefaultDescription
urlURLWhere the video plays, e.g. a YouTube or Vimeo link
thumbnailURLPoster image. Omit for YouTube links to use the video's own thumbnail.
altstring'Watch the video'
width80–1200 or 'full''full'Shown at 16:9

avatar ​

A small round or square portrait or logo.

PropTypeDefaultDescription
srcURLa placehold.co placeholder
altstring
size16–25664Diameter in px
shapecircle, square, roundedcircle

Layout ​

divider ​

PropTypeDefaultDescription
colorcolor$border
thickness1–24theme (1)px
width1–100100% of the content width
lineStylesolid, dashed, dottedtheme (solid)

spacer ​

PropTypeDefaultDescription
height1–40024px

container ​

Groups blocks with a shared background, border or padding. Style it and put blocks in children.

PropTypeDescription
cardbooleanStyle as a card: the theme's card radius, border and shadow (the block's own borderRadius and border win).

columns ​

A row of 1–4 column blocks.

PropTypeDefaultDescription
gap0–8016px between columns
verticalAligntop, middle, bottomtop
stackOnMobilebooleantrueStack columns on small screens

column ​

One column inside columns. Holds any blocks, including another columns row.

PropTypeDescription
width5–100% of the row. Omit to share the remaining space equally.
cardbooleanStyle as a card, like container.

Advanced ​

html ​

Raw HTML for anything the other blocks can't express. Inserted as-is, so it's your job to keep it email-safe.

Default: '<p>Custom <strong>HTML</strong></p>'

PropTypeDescription
htmlstringUp to 500,000 characters

custom ​

A block type your app defines. See Custom blocks.

PropTypeDescription
namestringThe definition's name, e.g. product-card
dataobjectContent, shaped by the definition's schema

In code ​

BLOCK_DEFINITIONS holds each type's label, description, category, props and style Zod schemas, container flag and defaults. BLOCK_TYPES lists the types, and canContain(parentType, childType) checks placement.

Released under the MIT License.