Updated

Technology · Code & frameworks

lit-html

lit.dev
Open source

What is lit-html?

lit-html is the templating library of Lit, which renders and updates HTML from JavaScript template literals. It can be installed on its own with npm or used inside Lit components.[1][2]

lit-html is a lightweight, efficient, and expressive HTML templating library for JavaScript. It allows developers to write HTML templates in JavaScript using template literals with embedded expressions. lit-html is designed for high performance, with minimal overhead and efficient updates. It's particularly useful for building web components and can be used standalone or as part of larger frameworks.

lit-html belongs toJavaScript librariescategory.

What it is

The templating library inside Lit[1]

Syntax

JavaScript template literals tagged with html[2]

Updates

Re-renders only the parts that changed[2]

Standalone

Works outside Lit components[1]

155websites

use it — 6.1% of the 2,539 websites we scanned in the last 12 months

#7of 108

tools in its category seen in our scans (we recognize 253)

29public pages

on UptimeCard — open any of them to see how that site is doing

In short: a small templating library for rendering and updating HTML from JavaScript. Use it alone or as the template layer of Lit components.[1]

3.5% of all websites we track run lit-html

What is lit-html used for?

In short, from the websites we scan

Rendering HTML from JavaScript
Templates are JavaScript template literals tagged with html, with expressions for the dynamic parts.[2]
Updating only what changed
Lit builds an efficient representation of a template so it can re-render only the parts that changed.[2]
Templating without components
The templating library can be used standalone, outside of a Lit component.[2]
What it does
lit-html is one of the javascript libraries tools websites use. In our scans it is #7 of the 108 we see.
On real websites
Among 19 public websites we scan that use it: rendering web components (13 sites), building interactive widgets (6 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate.
Used together with
It is often installed next to lit-element, reCAPTCHA, GSAP.

Should you use lit-html?

The 10-second version, from the vendor’s own pages and what we see in our scans

lit-html fits if…

  • You want to render and update HTML efficiently from JavaScript, with or without web components[1]

Look elsewhere if…

  • You want reactive properties and scoped styles as well: those come from Lit's component base class, not from lit-html alone[1][3]

Products

Parts of Lit, as described in its docs

lit-html

This page

The standalone templating library for rendering and updating HTML[1]

The base class for Lit components, which uses lit-html for rendering[5]

Support and help for lit-html

How the vendor says you can reach it, and the public help community

Discord

A Lit Discord server for chatting with the community and dev team[3]

GitHub

Issues, code and contributions are on GitHub[3]

Stack Overflow

Questions and answers about Lit on Stack Overflow[3]

Stack Overflow

241 questions[7][8]

73% have an upvoted answer. [lit-html] questions

lit-html versions

The newest release, the series that still gets fixes, and what changed

Latest release

3.3.0[6]

Released 11 Apr 2025

What lit-html sites add on top

How many of the 155 lit-html sites we scanned also run each tool, grouped by what the tool does

Tag manager

Google Tag Manager
53%82 sites
Adobe Experience Platform Launch
13%20 sites

Analytics

Google Analytics
47%73 sites
Facebook Pixel
23%35 sites
Linkedin Insight Tag
17%27 sites

Cookie consent

OneTrust
21%32 sites
Osano
15%23 sites

Online store

Cart Functionality
18%28 sites

The full bar means every lit-html site. A site can run several tools for one job, so the shares of tools in one group can add up to more than 100%.

How lit-html sites protect themselves

Share of the 155 sites we scanned that run each protection

HSTS73% · 113 sites

HTTP Strict Transport Security (HSTS) informs browsers that the site should only be accessed using HTTPS

reCAPTCHA28% · 43 sites

reCAPTCHA is a free service from Google that helps protect websites from spam and abuse

Cloudflare Bot Management14% · 21 sites

Cloudflare bot management solution identifies and mitigates automated traffic to protect websites from bad bots

Protections add up, they do not replace each other: a site can run all of them.

What sites use lit-html for

An estimate from UptimeCard's technology map of 19 public sites

Runs the whole site18 sites

aiia.eu · coralogix.com · devolutions.net

Runs the marketing site1 sites

uberall.com

Rough guide, not a measurement: each description is written automatically from the site’s technology stack and the site has not confirmed it. A site is counted once, in the first group its description fits (shop, help and docs, blog, marketing site; otherwise the whole site). Descriptions that only guess (“likely”, “may”) are left out.

At a glance

UptimeCard's own scans and tests of 2,539 websites · refreshed weekly

How lit-html sites scoreout of 100 · hover or tap a score for details

53PerformanceLowaverage site: 5193AccessibilityGoodaverage site: 9193Best practicesGoodaverage site: 9692SEOGoodaverage site: 92

Page load time

Loads about as fast as the average site

lit-html sites
3.3 s
All sites
3.5 s

Most lit-html sites load in 2.6–4.4 s. Home page weight: 4.1 MB vs 3.4 MB for all sites. 28 public sites measured.

Where are they hosted?

Mostly Cloudflare and Amazon Web Services

  • Cloudflare34%
  • Amazon Web Services31%
  • Fastly7%
  • Board of Regents of the University System of Georgia3%
  • Other24%
United States 55%Canada 31%Australia 3%

Who uses it?

Technology and Software is the biggest group

Technology and Software69%
Business Services1.5× avg17%
Cybersecurity7%
Educational Resources7%

Share of 29 classified public sites. “× average” compares with all 961 public sites.

How lit-html sites are built

Closest partners. The number says how many times more often the tool runs on lit-html sites than on an average website. Hover a partner for its share of sites.

lit-element16×Osano9×Google Maps8×Adobe Experience Manager3×Adobe Experience Platform Launch3×GSAP3×Java3×

Stacks we see most. Tools that tend to run together with lit-html on the same websites. The percentage is the share of all 155 lit-html sites that run the whole stack.

11 stacks · swipe, drag or use the arrows
#1

lit-html + Akamai + Adobe Experience Manager + Boomerang

4.5%7 of 155 sites
#2

lit-html + Osano + Sentry

4.5%7 of 155 sites
#3

lit-html + Sentry + Wistia

3.9%6 of 155 sites
#4

lit-html + GSAP + Adobe Experience Manager + Adobe Client Data Layer

2.6%4 of 155 sites
#5

lit-html + GSAP + Google Maps + Contact Form 7

2.6%4 of 155 sites
#6

lit-html + GSAP + Unpkg

3.2%5 of 155 sites
#7

lit-html + Unpkg + web-vitals

3.2%5 of 155 sites
#8

lit-html + Sentry + Unpkg

2.6%4 of 155 sites
#9

lit-html + Adobe Experience Manager + Unpkg

2.6%4 of 155 sites
#10

lit-html + Adobe Experience Manager + Brightcove

2.6%4 of 155 sites
#11

lit-html + Osano + HeroUI

2.6%4 of 155 sites

Similar tools in its category

JavaScript libraries: 253 tools known, 108 seen in our scans

How websites combine lit-html with other tools

Relationships found on the websites that use it, from the same map status pages show.

Needs another tool 15Complements another tool 11Built on a platform 3Overlaps with another 2

Websites using lit-html

155 websites use lit-html: 6.1% of the 2,539 websites we scanned in the last 12 months. A selection is shown below.

Scores are out of 100: P Performance · A Accessibility · B Best practices · S SEO. Green 80+, yellow 65–79, orange 50–64, red below 50. The dot shows whether our last scan found the site failing (red) or not (green); Red, amber or blue: an active incident on the site's status page (outage, degraded, maintenance) or a failing scan; amber also means a certificate ending within 30 days. Hover the dot for details.

Who is behind lit-html

From its own pages and public records, with sources

Maintained by

OpenJS Foundation[3]

Its story

  1. 2021

    Lit 2 reached stable release and was described as smaller, better, faster, SSR-ready and ready for production.[4]

  2. 2023

    Lit 3.0 launched as the next major version, together with Labs graduations and a compiler.[4]

  3. 2025

    Lit officially joined the OpenJS Foundation as an Impact Project.[4]

Questions about lit-html

What is lit-html?
lit-html is the templating library of Lit, which renders and updates HTML from JavaScript template literals. It can be installed on its own with npm or used inside Lit components.
What is lit-html used for?
Templates are JavaScript template literals tagged with html, with expressions for the dynamic parts. Lit builds an efficient representation of a template so it can re-render only the parts that changed. The templating library can be used standalone, outside of a Lit component. lit-html is one of the javascript libraries tools websites use. In our scans it is #7 of the 108 we see. Among 19 public websites we scan that use it: rendering web components (13 sites), building interactive widgets (6 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate. It is often installed next to lit-element, reCAPTCHA, GSAP.
Do I need Lit components to use lit-html?
No. The templating part of Lit is a standalone library that can be used outside the Lit component model.[1]
How do I install it?
It can be installed separately from lit with npm.[1]
What can I import from the package?
The main imports are html and render, with extra modules for directives, async directives, static html and polyfill support.[1]
What does lit-html do about styles?
Nothing by itself: it focuses on rendering HTML, and styling follows the patterns of whatever component system you use it in.[1]
Who stewards Lit?
Lit is part of the OpenJS Foundation, which joined it as an Impact Project in October 2025.[3][4]
How many websites use lit-html?
We found lit-html on 155 of the 2,539 websites we scanned in the last 12 months (6.1%). 29 of them have a public status page.
What are the alternatives to lit-html?
Other javascript libraries tools we recognize include jQuery, core-js, Swiper, jQuery Migrate.

Is your website built with lit-html?

Create a free status page that shows your visitors your site is up. It also gives your site its own public page where new people can discover it.

Example status page card