fx-include

fx-include lazily loads markup from a local template or external HTML source into its own light DOM immediately or when a configured event occurs.

Fore include demo This input was initialized after lazy inclusion.

Immediate inclusion

The included content is loaded immediately into the page. Usually used for modularizing pages for easier editing.

Inclusion on event

Inclusion when receiving configured event. Used for lazy-loading sections.

Default behavior: loads once and removes the event listener.

Reloadable template include

With reload, every click clears and recreates the included content.

External include

Loads an external HTML file once and selects one fragment from it using a CSS selector.

Replace mode

The placeholder element is replaced by the included content.