Interface ContainerComponentFactory

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ContainerComponentFactory
Functional interface for creating container component instances that need access to the ComponentRegistry in order to instantiate and render child components.

Use this with MjmlConfiguration.Builder.registerContainerComponent(String, ContainerComponentFactory) for components that render nested MJML children (similar to mj-section or mj-column).

See Also:
  • Method Details

    • create

      BaseComponent create(MjmlNode node, GlobalContext globalContext, RenderContext renderContext, ComponentRegistry registry)
      Creates a container component instance from the given parsed node.
      Parameters:
      node - the parsed MJML node for the component
      globalContext - the document-wide context gathered during head processing
      renderContext - the current rendering context (container width, position, etc.)
      registry - the component registry used to create and render child components
      Returns:
      the created container component instance