Skip to main content

Content types

Every content block in a column carries the Content envelopeid, type, and values. The type discriminates which shape values takes. This page is the per-type reference.

Per-mode variants

Content blocks render in four display modes — email, web, document, popup. Each mode exposes a subset of values fields (e.g. email-only border-collapse handling, web-only hover states). The embedded editor surfaces only the options that apply to the active mode. /v3/templates/validate applies the rules of one mode at a time — email unless you pass displayMode — so pass the mode your design was saved from.

Built-in types

There are 15 built-in content types. Modes lists the display modes where the type is available — "all" means email, web, popup, and document.

typeModesWhat it is
buttonallA call-to-action button — label, link, color, border, padding, alignment.
carouselemail, web, popupAn image slideshow. Interactive on web/popup and in AMP email.
dividerallA horizontal rule with color, thickness, and width controls.
formweb, popupA submittable form — configurable fields, layout, labels, and a submit button.
headingallAn h1h4 heading. values.headingType controls the level.
htmlemail, web, popupA raw-HTML escape hatch. Use sparingly — the editor renders the string verbatim, no sanitization.
imageallAn image with optional link, alt text, alignment, and per-device sizing.
menuemail, web, popupA navigation menu — a list of labeled links with a shared style.
page_breakdocumentForces a page break at this point when the document is exported.
paragraphallA rich-text paragraph stored as Lexical editor state in values.textJson. The editor inserts these for new text content.
socialallA row of social-network icons with per-network URLs and a shared style.
tableallA data table with header, body, and footer bands and per-cell styling.
textallThe legacy rich-text block (TinyMCE era): values.text holds inline HTML. Kept for backward compatibility with existing templates — the editor now inserts paragraph (Lexical) instead.
timeremail, web, popupA countdown to a target timestamp. Renders a server-side image so it works in email clients without JS.
videoemail, web, popupA YouTube/Vimeo video. Web and popup embed a player; email renders a linked thumbnail with an overlaid play icon.

Shared properties

Nearly every type's values carries this common envelope of layout and behavior fields — the exact subset varies by type and display mode. They are documented once here and omitted from the per-type tables below.

PropertyTypeNotes
containerPaddingstringCSS-style padding shorthand around the block, e.g. "10px" or "10px 20px".
anchorstringOptional fragment id for in-page anchor links.
hideDesktopbooleanHide on desktop breakpoint.
hideMobilebooleanHide on mobile breakpoint.
displayConditionobject | nullMerge-tag-based show/hide condition; null = always show.
_meta{ htmlID: string, htmlClassNames: string }Stable identifiers for CSS targeting. Editor-managed.
selectable, draggable, duplicatable, deletable, hideablebooleanPer-block editor permissions (all default true). Set to false to lock that interaction in the editor.
lockedbooleanLocks the block against all editing (default false).

For the canonical per-type schema, validate a payload against /v3/templates/validate — the response will tell you exactly which fields are required and which are extras.

button

A call-to-action button with a label, click action, and full typography and box styling.

PropertyTypeModesDescription
textstringLegacy inline-HTML label, kept for backward compatibility with existing templates — new designs should set textJson.
textJsonstringJSON-stringified Lexical editor state for the label — the current format (the editor is Lexical-based).
href{ name, attrs, values }Click action: { name, values: { href, target } }name is the action type (web, email, phone, ...).
buttonColors{ color, backgroundColor, hoverColor, hoverBackgroundColor }{ color, backgroundColor, hoverColor, hoverBackgroundColor } — CSS colors.
size{ autoWidth, width }{ autoWidth, width } — set autoWidth: false to honor width (e.g. "50%").
fontFamily{ defaultFont, type, label, value, url, weights }{ label, value }value is the CSS font stack; Google fonts also carry url.
fontSizestring | numbere.g. "14px".
lineHeightstringe.g. "120%".
textAlign'left' | 'center' | 'right' | 'justify'Button alignment in the column — left, center, right.
paddingstringInner padding, e.g. "10px 20px".
borderobjectPer-side keys: borderTopWidth, borderTopStyle, borderTopColor (and Left/Right/Bottom).
borderRadiusstringe.g. "4px".
_styleGuidestring | null
ai_bannernever
fontWeightnumber | { label, value }
letterSpacingnumber | string
suggestionsnever
synced{ id, dirty, updatedAt } | null

An image slideshow. Fully interactive on web and popup and in the AMP email variant.

PropertyTypeModesDescription
showPreviewsbooleanemail, web, popupShow thumbnail previews under the active slide.
previewWidthnumber | stringemail, web, popupThumbnail width, e.g. "100px".
autoplaybooleanemail, web, popupAuto-advance slides (AMP email variant only).
loopbooleanemail, web, popupWrap from the last slide back to the first (AMP email variant only).
_styleGuidestring | nullemail, web, popup
ai_bannerneveremail, web, popup
synced{ id, dirty, updatedAt } | nullemail, web, popup

The slides themselves live outside values: the content object carries a sibling embedded field — { "images": { "type": "image", "values": [ ... ] } } — with one image-shaped values object per slide (src, altText, action).

divider

A horizontal rule.

PropertyTypeModesDescription
widthnumber | stringLine length as a percentage of the column, e.g. "100%".
border{ borderTopColor, borderTopStyle, borderTopWidth }{ borderTopWidth, borderTopStyle, borderTopColor } — style is solid, dotted, dashed.
textAlign'left' | 'center' | 'right' | 'justify'Where the line sits when narrower than the column — left, center, right.
_styleGuidestring | null
ai_bannernever
synced{ id, dirty, updatedAt } | null

form

A submittable form with configurable fields and a submit button. web and popup modes only.

PropertyTypeModesDescription
action{ method, target, url }web, popupSubmit endpoint: { url, method, target }method is GET or POST, target is _self or _blank.
fieldsarray<object>web, popupOne object per field: { name, type, label, placeholder_text, show_label, required, options? }options is a string array for choices.
fieldWidthstringweb, popupWidth of each field, e.g. "100%".
fieldDistancestringweb, popupVertical space between fields, e.g. "10px".
formWidth{ autoWidth, width }web, popup{ autoWidth, width }.
formAlign'left' | 'center' | 'right' | 'justify'web, popupleft, center, right.
buttonTextnumber | stringweb, popupSubmit button label.
buttonColors{ color, backgroundColor, hoverColor, hoverBackgroundColor }web, popup{ color, backgroundColor, hoverColor, hoverBackgroundColor }.
buttonAlign'left' | 'center' | 'right' | 'justify'web, popupSubmit button alignment.
labelColorstringweb, popupField label color — see also labelFontFamily, labelFontSize, labelAlign.
_styleGuidestring | nullweb, popup
ai_bannerneverweb, popup
buttonBorderobjectweb, popup
buttonBorderRadiusstringweb, popup
buttonFontFamily{ defaultFont, type, label, value, url, weights }web, popup
buttonFontSizestring | numberweb, popup
buttonMarginstringweb, popup
buttonPaddingstringweb, popup
buttonWidth{ autoWidth, width }web, popup
fieldBackgroundColorstringweb, popup
fieldBorderobjectweb, popup
fieldBorderRadiusstringweb, popup
fieldColorstringweb, popup
fieldFontFamily{ defaultFont, type, label, value, url, weights }web, popup
fieldFontSizestring | numberweb, popup
fieldPaddingstringweb, popup
labelAlign'left' | 'center' | 'right' | 'justify'web, popup
labelFontFamily{ defaultFont, type, label, value, url, weights }web, popup
labelFontSizestring | numberweb, popup
labelPaddingstringweb, popup
placeholderAlign'left' | 'center' | 'right' | 'justify'web, popup
synced{ id, dirty, updatedAt } | nullweb, popup

heading

A heading. headingType controls the rendered level.

PropertyTypeModesDescription
textstringLegacy inline-HTML heading text, kept for backward compatibility with existing templates — new designs should set textJson.
textJsonstringJSON-stringified Lexical editor state for the heading — the current format (the editor is Lexical-based).
headingType'h1' | 'h2' | 'h3' | 'h4'h1, h2, h3, or h4.
fontSizestring | numbere.g. "22px".
fontFamily{ defaultFont, type, label, value, url, weights }{ label, value }value is the CSS font stack.
fontWeightnumber | { label, value }100900.
colorstringText color.
textAlign'left' | 'center' | 'right' | 'justify'left, center, right, justify.
lineHeightstringe.g. "140%".
linkStyleobject{ inherit, linkColor, linkHoverColor, linkUnderline, linkHoverUnderline }inherit: true uses the body's link styling.
_styleGuidestring | null
ai_bannernever
letterSpacingnumber | string
suggestionsnever
synced{ id, dirty, updatedAt } | null

html

A raw-HTML escape hatch.

PropertyTypeModesDescription
htmlstringemail, web, popupRaw HTML rendered verbatim — no sanitization.
_styleGuidestring | nullemail, web, popup
ai_bannerneveremail, web, popup
synced{ id, dirty, updatedAt } | nullemail, web, popup

image

An image with optional link and alt text.

PropertyTypeModesDescription
srcobject{ url, width?, height?, autoWidth?, maxWidth? }width/height are intrinsic pixel numbers; maxWidth is a percentage string.
altTextnumber | stringAlternate text for accessibility and blocked-image fallback.
textAlign'left' | 'center' | 'right' | 'justify'Alignment in the column — left, center, right.
action{ name, attrs, values }Optional click-through link: { name: "web", values: { href, target } }.
_styleGuidestring | null
ai_bannernever
suggestionsnever
synced{ id, dirty, updatedAt } | null

A navigation menu — a list of labeled links with a shared style.

PropertyTypeModesDescription
menu{ items }email, web, popup{ items: [...] } — each item is { key, text, link }; key is a unique id, link is { name, values: { href, target } }.
layout'horizontal' | 'vertical'email, web, popuphorizontal or vertical.
align'left' | 'center' | 'right' | 'justify'email, web, popupleft, center, right.
separatorstringemail, web, popupText rendered between items in horizontal layout.
textColorstringemail, web, popupItem text color.
linkColorstringemail, web, popupLink color.
fontFamily{ defaultFont, type, label, value, url, weights }email, web, popup{ label, value }.
fontSizestring | numberemail, web, popupe.g. "14px".
paddingstringemail, web, popupPer-item padding, e.g. "5px 15px".
_styleGuidestring | nullemail, web, popup
ai_bannerneveremail, web, popup
fontWeightnumber | { label, value }email, web, popup
letterSpacingnumber | stringemail, web, popup
synced{ id, dirty, updatedAt } | nullemail, web, popup

page_break

Forces a page break at this point when the document is exported. document mode only.

PropertyTypeModesDescription
colorstringdocumentColor of the page-break rule.
_styleGuidestring | nulldocument
ai_bannerneverdocument
synced{ id, dirty, updatedAt } | nulldocument

paragraph

A rich-text paragraph stored as Lexical editor state — the block the editor inserts for all new text content.

PropertyTypeModesDescription
textJsonstringJSON-stringified Lexical editor state. Required.
fontSizestring | numbere.g. "14px".
fontFamily{ defaultFont, type, label, value, url, weights }{ label, value }value is the CSS font stack.
fontWeightnumber | { label, value }100900.
colorstringText color.
textAlign'left' | 'center' | 'right' | 'justify'left, center, right, justify.
lineHeightstringe.g. "140%".
linkStyleobject{ inherit, linkColor, linkHoverColor, linkUnderline, linkHoverUnderline }.
_styleGuidestring | null
ai_bannernever
letterSpacingnumber | string
synced{ id, dirty, updatedAt } | null

social

A row of social-network icons.

PropertyTypeModesDescription
icons{ iconType, icons, editor }{ iconType, icons: [{ name, url }] }name is the network (e.g. "Facebook"), url the profile link.
align'left' | 'center' | 'right' | 'justify'left, center, right.
iconSizenumber | stringIcon size in pixels (15–72).
spacingnumber | stringSpace between icons in pixels.
_styleGuidestring | null
ai_bannernever
synced{ id, dirty, updatedAt } | null

iconType picks the icon style: circle, circle-black, circle-white, rounded, rounded-black, squared, squared-black.

table

A data table with optional header and footer bands, striped rows, and per-cell styling.

PropertyTypeModesDescription
table{ headers, rows, footers }The cell data: { headers, rows, footers }, each an array of { cells, height } rows — cell shape below.
columnsnumber | stringColumn count (1–8); must match the number of cells per row.
rowsnumber | stringBody row count; must match table.rows.length.
borderobjectPer-side table border (borderTopWidth, borderTopStyle, borderTopColor, ...).
enableHeaderbooleanRender the table.headers band.
enableFooterbooleanRender the table.footers band.
stripedRowsbooleanAlternate body-row backgrounds.
stripedRowsBackgroundColorstringStripe color.
linkStyleobjectLink styling inside cells.
_styleGuidestring | null
ai_bannernever
cellBackgroundColor{ property, selectedCellId }
cellColor{ property, selectedCellId }
cellPadding{ property, selectedCellId }
cellTextAlign{ property, selectedCellId }
cellVerticalAlign{ property, selectedCellId }
contentBackgroundColorstring
contentColorstring
contentFontFamily{ defaultFont, type, label, value, url, weights }
contentFontSizestring | number
contentFontWeightnumber | { label, value }
contentLetterSpacingnumber | string
contentLineHeightstring
contentPaddingstring
contentTextAlign'left' | 'center' | 'right' | 'justify'
contentVerticalAlign'top' | 'middle' | 'bottom'
footerBackgroundColorstring
footerColorstring
footerFontFamily{ defaultFont, type, label, value, url, weights }
footerFontSizestring | number
footerFontWeightnumber | { label, value }
footerPaddingstring
footerTextAlign'left' | 'center' | 'right' | 'justify'
footerVerticalAlign'top' | 'middle' | 'bottom'
headerBackgroundColorstring
headerColorstring
headerFontFamily{ defaultFont, type, label, value, url, weights }
headerFontSizestring | number
headerFontWeightnumber | { label, value }
headerPaddingstring
headerTextAlign'left' | 'center' | 'right' | 'justify'
headerVerticalAlign'top' | 'middle' | 'bottom'

Each cell in table is { text?, textJson?, width, backgroundColor?, color?, textAlign?, verticalAlign?, padding? }width is a percentage number, row height is in pixels, and cells store their content in textJson (Lexical editor state, the current format) with text as the legacy HTML field kept for existing templates — the same convention as button.

Each band also has a styling family of prefixed properties — header*, content*, and footer* (e.g. headerBackgroundColor, contentFontSize, footerColor) — covering font family, size, weight, colors, alignment, and padding per band.

text

The legacy rich-text block from the TinyMCE era. values.text holds inline HTML; merge tags work via {{ tag }}. Kept for backward compatibility with existing templates — the editor now uses Lexical and inserts paragraph blocks for new text content.

PropertyTypeModesDescription
textstringInline HTML — <a>, <strong>, <em>, spans for color/size. Required on this legacy block.
fontSizestring | numbere.g. "14px".
fontFamily{ defaultFont, type, label, value, url, weights }{ label, value }value is the CSS font stack.
colorstringText color.
textAlign'left' | 'center' | 'right' | 'justify'left, center, right, justify.
lineHeightstringe.g. "140%".
linkStyleobject{ inherit, linkColor, linkHoverColor, linkUnderline, linkHoverUnderline }.
_styleGuidestring | null
ai_bannernever
fontWeightnumber | { label, value }
letterSpacingnumber | string
synced{ id, dirty, updatedAt } | null

timer

A countdown to a target timestamp, rendered server-side as an animated image so it works in email clients without JS.

PropertyTypeModesDescription
countdownobjectemail, web, popupThe timer definition — key sub-fields below.
countdown.endTimestringemail, web, popupTarget end time as "YYYY-MM-DDTHH:mm:ss" (no zone suffix — interpreted in timezone).
countdown.timezonestringemail, web, popupIANA timezone, e.g. "America/Los_Angeles".
countdown.showLabelsbooleanemail, web, popupShow the Days/Hours/Minutes/Seconds labels.
countdown.digitColor, countdown.labelColor, countdown.backgroundColorstringemail, web, popupColors for digits, labels, and the image background.
countdown.digitFontSize, countdown.labelFontSizenumberemail, web, popupFont sizes in pixels; font families via digitFontFamily / labelFontFamily.
width{ autoWidth, width }email, web, popup{ autoWidth, width } — rendered image width.
textAlign'left' | 'center' | 'right' | 'justify'email, web, popupAlignment in the column.
altTextnumber | stringemail, web, popupAlternate text for the rendered image.
action{ name, attrs, values }email, web, popupOptional click-through link: { name: "web", values: { href, target } }.
_styleGuidestring | nullemail, web, popup
ai_bannerneveremail, web, popup
synced{ id, dirty, updatedAt } | nullemail, web, popup

video

A YouTube or Vimeo video. Web and popup embed a real player; email renders a linked thumbnail with an overlaid play icon (email clients can't run embedded players).

PropertyTypeModesDescription
videoobjectemail, web, popup{ url, type, videoId?, thumbnail?, playIconColor?, playIconSize? }type is youtube or vimeo.
href{ name, attrs, values }email, web, popupClick-through action for the email thumbnail: { name, values: { href, target } }.
_styleGuidestring | nullemail, web, popup
ai_bannerneveremail, web, popup
synced{ id, dirty, updatedAt } | nullemail, web, popup

Custom tools

Embedders can register their own content types via unlayer.registerTool(...). Custom blocks carry an extra slug discriminator:

{
"type": "custom",
"slug": "my_pricing_block",
"values": {
/* shape defined by the embedder */
}
}

The values shape is whatever your tool definition declares — by default Unlayer validates the envelope and treats values as opaque. To go deeper, pass your tool declarations in the customTools field of /v3/templates/validate and each declared option is checked with the exact value schema a built-in tool would have. See Custom Tools for the registration API.

  • Design object — the root that contains everything.
  • Block object — the rows / columns that hold these content items.
  • Custom Tools — register your own content types.
  • Validate — verify a design against the canonical schema.