Updated

Technology · Code & frameworks

lit-element

lit.dev
Open source

What is lit-element?

lit-element is the LitElement base class of the Lit library, used to build web components (custom HTML elements). Lit is part of the OpenJS Foundation and its code is licensed under a BSD license.[1][2][3]

lit-element is a simple yet powerful base class for creating fast, lightweight web components. Built on top of lit-html, it provides a set of features for defining elements with a declarative style, including reactive properties, attributes, and an efficient rendering system. lit-element is ideal for developers looking to create reusable, framework-agnostic UI components with excellent performance.

lit-element belongs toJavaScript librariescategory.

What it is

A base class for custom HTML elements[1]

Extends

The native HTMLElement[2]

Output

Standard web components[3]

License

BSD, under the OpenJS Foundation[3]

128websites

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

#8of 108

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

19public pages

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

In short: the class you extend to build reusable web components with Lit. The components work with any framework or none at all.[2][3]

2.5% of all websites we track run lit-element

What is lit-element used for?

In short, from the websites we scan

Building reusable web components
A Lit component is a reusable piece of UI, defined as a custom element.[8][2]
Keeping component styles separate
Styles are scoped to the component by default using Shadow DOM.[3]
Re-rendering when data changes
A component re-renders whenever one of its reactive properties changes.[3]
Sharing components across frameworks
Web components work anywhere you use HTML, with any framework or none.[3]
What it does
lit-element is one of the javascript libraries tools websites use. In our scans it is #8 of the 108 we see.
Products
The vendor also offers lit-html, ReactiveElement.
On real websites
Among 12 public websites we scan that use it: building reusable web components (7 sites), powering interactive UI widgets (7 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate.
Who uses it
Compared with all public websites we scan, it is more common in Business Services (21% of its sites, 12% overall).
Used together with
It is often installed next to reCAPTCHA, OneTrust, Google Maps.

Should you use lit-element?

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

lit-element fits if…

  • You want to build shareable components or a design system that works across frameworks[3]
LitElement is one part of Lit: the templating comes from the separate lit-html library[4]

LitElement next to Stencil

Both produce standard web components. Wording comes from each project's own pages.

lit-elementStencil
What each one is
Described asBase classextends the native HTMLElement[1]Compilergenerates Web Components[5]
OutputNative web components[3]Web Componentsthat run everywhere[6]
StewardshipOpenJS Foundation[3]Ionican open source project by Ionic[6]
What we see in our scans
Websites running it1285% of 2,539 scanned sites2too few to compare
  • Stencil: A compiler that also produces Web Components[5]

Choose lit-element if…

  • You want to write components in JavaScript or TypeScript without a build step[1]
  • You want scoped styles and reactive properties on top of the native element[3]

Choose Stencil if…

  • You want a build-time compiler that generates the components[5]

Products

Parts of Lit, as described in its docs

LitElement

This page

The base class that Lit components extend[1]

The templating library that Lit factors out as a standalone package[4]

ReactiveElement

The class LitElement inherits from, which implements reactive properties[2]

Support and help for lit-element

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

693 questions[10][11]

71% have an upvoted answer. [lit-element] questions

lit-element versions

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

Latest release

4.2.0[9]

Released 11 Apr 2025

What lit-element sites add on top

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

Tag manager

Google Tag Manager
50%64 sites
Adobe Experience Platform Launch
12%15 sites

Analytics

Google Analytics
45%57 sites
Facebook Pixel
21%27 sites
Linkedin Insight Tag
15%19 sites

Cookie consent

OneTrust
22%28 sites

Online store

Cart Functionality
15%19 sites

The full bar means every lit-element 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-element sites protect themselves

Share of the 128 sites we scanned that run each protection

HSTS70% · 90 sites

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

reCAPTCHA28% · 36 sites

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

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

What sites use lit-element for

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

Runs the whole site11 sites

coralogix.com · docker.com · liquidweb.com

Hosts help, docs or support content1 sites

devolutions.net

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-element sites scoreout of 100 · hover or tap a score for details

54PerformanceLowaverage site: 5193AccessibilityGoodaverage site: 9192Best practicesGoodaverage site: 9692SEOGoodaverage site: 92

Page load time

Loads about 14% faster than the average site

lit-element sites
3.0 s
All sites
3.5 s

Most lit-element sites load in 2.5–4.0 s. Home page weight: 2.8 MB vs 3.4 MB for all sites. 18 public sites measured.

Who uses it?

Technology and Software is the biggest group

Technology and Software63%
Business Services21%
Educational Resources11%
Cybersecurity5%

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

How lit-element sites are built

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

Google Maps10×Unpkg3×Adobe Experience Manager3×GSAP3×Adobe Experience Platform Launch3×Java2×

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

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

lit-element + Akamai + Adobe Experience Manager + Boomerang

5.5%7 of 128 sites
#2

lit-element + OneTrust + Unpkg

5.5%7 of 128 sites
#3

lit-element + OneTrust + Adobe Experience Manager + Adobe Client Data Layer

3.1%4 of 128 sites
#4

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

3.1%4 of 128 sites
#5

lit-element + OneTrust + GSAP

3.9%5 of 128 sites
#6

lit-element + GSAP + Unpkg

3.9%5 of 128 sites
#7

lit-element + Akamai + Adobe Client Data Layer

3.9%5 of 128 sites
#8

lit-element + OneTrust + Google Maps

3.1%4 of 128 sites
#9

lit-element + Unpkg + Adobe Experience Manager

3.1%4 of 128 sites
#10

lit-element + Google Maps + Vue.js

3.1%4 of 128 sites
#11

lit-element + GSAP + Vue.js

3.1%4 of 128 sites
#12

lit-element + Unpkg + web-vitals

3.1%4 of 128 sites
#13

lit-element + Adobe Experience Manager + Brightcove

3.1%4 of 128 sites

Similar tools in its category

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

How websites combine lit-element with other tools

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

Needs another tool 17Complements another tool 9Integrates with another 4Built on a platform 3

Websites using lit-element

128 websites use lit-element: 5% 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-element

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.[7]

  2. 2022

    Lit 2.1 added new directives, a new decorator, a new observers package and task and server-rendering updates.[7]

  3. 2023

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

  4. 2024

    Signals support arrived in Lit Labs through a new package that integrates the TC39 Signals proposal with Lit.[7]

  5. 2025

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

Questions about lit-element

What is lit-element?
lit-element is the LitElement base class of the Lit library, used to build web components (custom HTML elements). Lit is part of the OpenJS Foundation and its code is licensed under a BSD license.
What is lit-element used for?
A Lit component is a reusable piece of UI, defined as a custom element. Styles are scoped to the component by default using Shadow DOM. A component re-renders whenever one of its reactive properties changes. Web components work anywhere you use HTML, with any framework or none. lit-element is one of the javascript libraries tools websites use. In our scans it is #8 of the 108 we see. The vendor also offers lit-html, ReactiveElement. Among 12 public websites we scan that use it: building reusable web components (7 sites), powering interactive UI widgets (7 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate. Compared with all public websites we scan, it is more common in Business Services (21% of its sites, 12% overall). It is often installed next to reCAPTCHA, OneTrust, Google Maps.
What does LitElement extend?
It extends ReactiveElement, which implements reactive properties and in turn extends HTMLElement.[2]
How do I register a Lit component?
Create a class that extends LitElement and register it with the browser, for example with the customElement decorator.[2]
Is LitElement the same as Lit?
LitElement is the base class that Lit is built around; Lit also includes the lit-html templating library, which can be used on its own.[1][4]
Do I need a build step?
No. Lit does not require compilation or building during development, so it can be used virtually tool-free.[1]
Who stewards Lit?
Lit is part of the OpenJS Foundation, which joined it as an Impact Project in October 2025.[3][7]
How many websites use lit-element?
We found lit-element on 128 of the 2,539 websites we scanned in the last 12 months (5%). 19 of them have a public status page.
What are the alternatives to lit-element?
Other javascript libraries tools we recognize include jQuery, core-js, Swiper, jQuery Migrate.

Is your website built with lit-element?

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