Post

`html-esc`: A template literal tag which escapes interpolated values github.com/HugoDF/html-... `render-tmpl`: A `<template>` based HTML templating library ("directives" to make it easy to inject values and attributes into your template) github.com/HugoDF/rende...

github.comGitHub - HugoDF/render-tmpl: Use `<template>` as a rendering engine, < 100 lines of code.Use `<template>` as a rendering engine, < 100 lines of code. - HugoDF/render-tmpl

0 reposts2 likes

Both are ESM native, "no build" and "copy-paste into my project" friendly Examples with actual web components coming at some point. Note: I haven't tackled interactive forms, they don't have reactivity, they don't deal with event handlers

Small feedback: As a user of HTML, I want to write attributes as attributes, instead of putting them all inside a data-s-attr attribute in a new syntax.

For example instead of <img data-s-attr="src=url,alt=greeting" /> I'd want to write something like <img src=$url alt=$greeting /> or something.