Appearance
Rule.io SDK / rcml/src / createColumnElement
Function: createColumnElement()
createColumnElement(
options):RcmlColumn
Defined in: rcml/src/email/create-rcml-element.ts:744
Build an <rc-column> — a horizontal unit inside an <rc-section> or <rc-group>. Holds content elements (text, heading, button, image, divider, social, loops); sections, columns, and groups themselves are not valid children — groups sit at the section level, not inside a column.
Parameters
options
options.children is the list of content elements to stack vertically; options.attrs controls column-level padding, borders, width, vertical alignment.
Returns
A typed RcmlColumn node.
Throws
When attrs are invalid or any child is disallowed for columns — e.g. a nested <rc-section> or <rc-group>.
Example
ts
createColumnElement({
attrs: { 'vertical-align': 'top', width: '50%' },
children: [
createHeadingElement({ content: 'Welcome' }),
createTextElement({ content: 'Thanks for joining.' }),
],
})