Tmplits
Tmplits is a framework for building HMI’s using the Handlebars template system. Tmplits manages loading assets and making them available as Partials to use throughout the HMI. This allows mixing standard HTML with a powerful template system, out of the box.
You can define content as a Partial:
MyCustomView.handlebars
<div>Hello World</div>
Anywhere you want to use a Partial, use the syntax:
{{> MyCustomView}}
In addition to Handlebars Partials, Tmplits implements a JavaScript-based user control system that allows even more flexibility in building controls.
To define a custom control:
//Any functions that is prefixed with tmplit
// is made available to your handlebars
function TmplitHello(context, args){
//Generate your custom components!
return `<div>Hello ${context[0]}</div>`
}
To use your custom controls you call them with the tmplit syntax:
{{tmplit 'Hello' 'world'}}
Tmplits also contains many ready-to-use HMI components, with little to no configuration required. The library and template system allows for flexible and fast HMI development.
For more information about Handlebars, please reference their API documentation
Overview
- Getting started
- Core Concepts
- Tmplit Components
- Developing New Tmplits
- Helpers
How to install Tmplit library.
An explanation of the components within the tmplit library.
Tmplits are functions that dynamically change with their inputs.
Steps for developing a new Tmplit and adding it to the repo for future use.
Handlebar helper functions