belit
Fork of a simple library for composable DOM elements using tagged template strings.
belit
is a library for translating template strings into DOM elements on the server and on the client.
Example
belit
can be used with other libraries (like hyperx
) to create DOM trees.
const belit = const hyperx = const html = const div = html` This is in a DOM tree `
Namespaces
You can pass in a namespace to properly create namespaced elements (like svg)
const belit = const hyperx = const svg = const div = svg` <svg height="200" width="200"> <rect width="100" height="100" /> </svg>`
You can use the belit.html
and belit.svg
instead of calling the top-level function
const belit = const hyperx = const svg = const div = svg` <svg height="200" width="200"> <rect width="100" height="100" /> </svg>`
original license
(c) 2016 Kyle Robinson Young. MIT License