mjml.accordion_element

mjml.accordion_element(*args, attributes=None, content=None)

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

Parameters

*args : TagChild = ()

Children (MJMLTag objects)

attributes : Optional[TagAttrs] = None

Optional dict of tag attributes

content : Optional[str] = None

Optional text content for the tag

Returns

: MJMLTag

MJMLTag object representing <mj-accordion-element>

Examples

With children:

from emailer_lib.mjml import accordion_element, text
child = text("Hello World")

result = accordion_element(child)

With attributes:

result = accordion_element(attributes={"attr": "value"})

With both:

result = accordion_element(child, attributes={"background-color": "yellow"})