Appearance
Rule.io SDK / rcml/src / createSectionElement
Function: createSectionElement()
createSectionElement(
options):RcmlSection
Defined in: rcml/src/email/create-rcml-element.ts:654
Build an <rc-section> — a row-level container. Accepts 1–20 columns (per the schema's maxChildCount). Every direct child of <rc-body> is typically a section or a control-flow wrapper (<rc-loop> / <rc-switch> / <rc-wrapper>).
Parameters
options
options.children is the list of column children; options.attrs controls section-level background / padding / borders.
Returns
A typed RcmlSection node.
Throws
When attrs are invalid, any child is not an <rc-column>, or there are more than 20 children.
Example
ts
createSectionElement({
attrs: { 'background-color': '#ffffff', padding: '20px 0' },
children: [createColumnElement({ children: [...] })],
})