A MooTools-based JavaScript Template Engine

The Moo Template Engine (MTE) provides the means to easily create HTML templates from JavaScript and HTML. The templates let you render DOM elements which can be inserted in to the DOM tree.

The rendered elements may be customized (data bound) by supplying rendering data (a data source) upon rendering. If the data source is observable the rendered elements will observe the data source and re-render themselves whenever the data source is modified.

Simple concept

A simple template created with HTML:

A simple template created with JavaScript:

Data binding

A data bound template created in HTML. The template binds its content to a property called 'myContent'.

Observable models

In this example an observable model is used as data source and thus the rendered element is updated when the model changes.


The scripts are release under the MIT license


The Moo Template Engine is implemented by Henrik Cooke with inspiration from WPF and Mooml