Skip to content

Rule.io SDK


Rule.io SDK / rcml/src / createLogoElement

Function: createLogoElement()

createLogoElement(options?): RcmlLogo

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

Build an <rc-logo> element — semantically identical to rc-image but conventionally used to slot the brand logo. attrs.src can be provided directly, or the logo can inherit its source via attrs.rc-class linking to an <rc-class> declared in <rc-head>.

Parameters

options?

LogoElementOptions = {}

Optional attribute map. Omit entirely for a bare <rc-logo /> that inherits from the brand-style context.

Returns

RcmlLogo

A typed RcmlLogo node.

Throws

When attrs are unknown or have invalid values.

Example

ts
createLogoElement({ attrs: { src: 'https://cdn.example.com/logo.png', width: '96px' } })
createLogoElement()  // inherits from brand-style's rc-class