mjml.social_element

mjml.social_element(content=None, attributes=None)

Create an MJML <mj-social-element> tag.

This is an ending tag that accepts text/HTML content but not MJML children.

Parameters

content : Optional[str] = None

Text or HTML content for the tag

attributes : Optional[TagAttrs] = None

Optional dict of tag attributes

Returns

: MJMLTag

MJMLTag object representing <mj-social-element>

Examples

With content:

from emailer_lib.mjml import social_element

result = social_element("Hello")

With attributes and content:

result = social_element("Hello", attributes={"background-color": "red"})