Appearance
Rule.io SDK / rcml/src / createSocialChildElement
Function: createSocialChildElement()
createSocialChildElement(
options):RcmlSocialElement
Defined in: rcml/src/email/create-rcml-element.ts:617
Build a single <rc-social-element> — one social-network icon link, used as a child of an <rc-social> container. attrs.name identifies the network (drives the default icon); attrs.href is the link target.
The factory name is intentionally distinct from the rc-social container factory (createSocialElement) to avoid the repetitive createSocialElementElement form the literal schema name would imply.
Parameters
options
options.attrs carries the network name and link URL; options.content is an optional label rendered next to the icon.
Returns
A typed RcmlSocialElement node.
Throws
When attrs are unknown or have invalid values.
Example
ts
createSocialChildElement({
attrs: { name: 'instagram', href: 'https://instagram.com/example' },
content: 'Follow us',
})