What is lit-html?Permalink to “What is lit-html?”
Building components? lit-html is not tied to any component model, it focuses only on creating and updating DOM. If you want to build components, check out LitElement, a library for building web components using lit-html templates.
lit-html TemplatesPermalink to “lit-html Templates”
`) instead of quotes - and tagged with lit-html's
lit-html is lazily rendered. Calling this function will evaluate the template literal using lit-html
html tag, and return a
TemplateResult - a record of the template to render and data to render it with.
TemplateResults are very cheap to produce and no real work actually happens until they are rendered to the DOM.
RenderingPermalink to “Rendering”
To render a
TemplateResult, call the
render() function with a result and DOM container to render to:
Ready to try it yourself? Head over to Getting Started.