htl

A tagged template literal that allows safe interpolation of values into HTML, following the HTML5 spec (by observablehq)

Htl Alternatives

Similar projects and alternatives to htl

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better htl alternative or higher similarity.

htl reviews and mentions

Posts with mentions or reviews of htl. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-15.
  • Observable 2.0, a static site generator for data apps
    17 projects | news.ycombinator.com | 15 Feb 2024
    From the Observable Framework point of view, you’re very welcome to use Apache ECharts or any other library instead of Observable Plot, since you can import whatever you like and it’s all just JavaScript.

    Since there was a lot of interest in this thread, Mike added a page to the docs with an ECharts example: https://observablehq.com/framework/lib/echarts

    There are two pieces of that example code specific to Framework: the html`` tagged template literal creates a DOM element (see https://github.com/observablehq/htl, also usable outside Framework), and the display function inserts it into the document above the code block (see https://observablehq.com/framework/javascript/display). Note that, whereas Observable Plot takes an options object and returns a DOM element, ECharts instead takes a DOM element and mutates it — but in general they should be equally easy to use in Framework.

    Like Plot (and Vega-Lite, another great option), ECharts is also now one of Framework’s built-in “recommended libraries” (see https://observablehq.com/framework/javascript/imports#implic...), meaning that if you reference `echarts` Framework will lazy-load it for you. Adding that was a two-line diff: https://github.com/observablehq/framework/pull/811/files#dif.... But I wanna emphasize that Framework doesn’t have to explicitly “support” a given library for you to use it. “Supporting” in this case just means the convenience of saving you a one-line import statement. But don’t wait for our blessing!! Use whatever.

Stats

Basic htl repo stats
1
296
0.0
10 months ago

observablehq/htl is an open source project licensed under ISC License which is an OSI approved license.

The primary programming language of htl is JavaScript.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com