https://www.styled-components.com maybe?
https://polymer.github.io/lit-html
https://github.com/WebReflection/hyperHTML
I've also used them for DSLs, i.e. the following grammar compiler (where the actions are literal functions defined in the grammar string as follows), sadly never released:
https://gist.github.com/bdowning/4dca9f006f230bc7e8c18a2b9c9...
https://facebook.github.io/relay/docs/en/query-renderer.html
You can do almost anything with Nim, for function calls! I personally like UFCS (Uniform Function Call Syntax), aka:
let something: int = item.function(arg2, arg3,...).function.function(vararg).etc
https://www.styled-components.com maybe?