Barbiche is a logic-full template engine for browser environment. It has been designed to give you complete control over the data you want to merge into an HTML fragment. Once minified and gzipped, Barbiche size is 11KB.
- text and HTML insertion
- conditions (
- flexible subtemplate imports
- attribute setting
- class setting
Barbiche has a complete test suite that can be run in your browser.
We ask Barbiche to merge some data into an HTML template:
The returned document fragment can then be inserted anywhere you want. It contains:
Barbiche requires support of
<template> element and basic support of
element.classList API. Here is the support table:
|Native (v2 & v3)||Polyfilled (v2)||Polyfilled (v3)|
Polyfills, once minified and gzipped, weight an additionnal 2KB.