JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js"></script>

<script id="test-template" type="text/x-handlebars-template">
  <label>Label here</label>
  {{#textField {'id':'text_field_1', 'class':'some-class', size:30} }}{{/textField}}
  <p>Help text here.</p>
</script>

JavaScript

Handlebars.registerHelper('textField', function(attributes) {
    var result = '';

    for (var property in attributes) {
       result += ' ' + property + '="' + attributes[property] + '"';
    }

    return result;
});

$(function() {

    var markup = $('#test-template').html();
    var template = Handlebars.compile(markup);
    $('body').append(template());

});