Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / createSpacerElement

Function: createSpacerElement()

createSpacerElement(options?): RcmlSpacer

Defined in: rcml/src/email/create-rcml-element.ts:510

Build an <rc-spacer> element — a block of vertical whitespace. Height defaults to 32px when attrs.height is omitted.

Parameters

options?

SpacerElementOptions = {}

Optional attribute map. attrs.height sets the vertical gap; padding attrs add additional surrounding space.

Returns

RcmlSpacer

A typed RcmlSpacer node.

Throws

When attrs are unknown or have invalid values.

Example

ts
createSpacerElement({ attrs: { height: '24px' } })