Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / createDividerElement

Function: createDividerElement()

createDividerElement(options?): RcmlDivider

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

Build an <rc-divider> element — a horizontal rule. Defaults to a 1px solid black line spanning 100% width when attrs are omitted.

Parameters

options?

DividerElementOptions = {}

Optional attribute map. attrs.border-color, attrs.border-style, attrs.border-width, and attrs.width control the rule's appearance.

Returns

RcmlDivider

A typed RcmlDivider node.

Throws

When attrs are unknown or have invalid values.

Example

ts
createDividerElement({ attrs: { 'border-color': '#cccccc', 'border-width': '1px' } })