Appearance
Rule.io SDK / rcml/src / createAttributesElement
Function: createAttributesElement()
createAttributesElement(
options):RcmlAttributes
Defined in: rcml/src/email/create-rcml-element.ts:1039
Build an <rc-attributes> container — holds tag-level default attributes that apply across the document. Valid children are the supported style tags (<rc-body>, <rc-section>, <rc-button>, <rc-heading>, <rc-text>, <rc-social>), each carrying attributes that the renderer uses as defaults for matching elements in the body.
Parameters
options
options.children is the list of style-override declarations.
Returns
A typed RcmlAttributes node.
Throws
When any child is not a valid style-override tag.
Example
ts
createAttributesElement({
children: [createBodyElement({ attrs: { 'background-color': '#ffffff' }, children: [] })],
})