{% include topnav.html %}
{{ site.name }}

{{ site.description }}

Get Started

About

Fast, lightweight web components

LitElement is a simple base class for creating fast, lightweight web components that work in any web page with any framework.

Using lit-html

For rendering, LitElement uses [lit-html](https://lit-html.polymer-project.org/)—a fast HTML templating library. To build an app out of LitElement components, check out [PWA Starter Kit](https://pwa-starter-kit.polymer-project.org/).

Who are we?

LitElement is brought to you by developers on the Google Chrome team with the input of web developers at organizations big and small around the world.

Get started

Define a component in JavaScript:

custom-greeting.js

wzxhzdk:0

Include the component in your web page:

index.html

wzxhzdk:1 {% include project.html folder="index" openFile="custom-greeting.js" %}

Why use LitElement?

Made to share

Web components built with LitElement are made to share with the world and with others across your organization, no matter what libraries or frameworks they use.

Interoperable

LitElement follows the [web components standards](https://developer.mozilla.org/en-US/docs/Web/Web_Components), so your components will work with any framework. LitElement uses custom elements for easy inclusion in web pages, and shadow DOM for encapsulation. There’s no new abstraction on top of the web platform.

Fast and light

Whether your end users are in emerging markets or Silicon Valley, they’ll appreciate that LitElement is extremely fast. LitElement uses [lit-html](https://github.com/Polymer/lit-html) to define and render HTML templates. DOM updates are lightning-fast, because lit-html only re-renders the data that changes.

Browser Compatibility

LitElement works in all major browsers (Chrome, Firefox, IE, Edge, Safari, and Opera).

chrome logo firefox logo internet explorer logo edge logo safari logo opera logo

Next Steps

One.

[Try LitElement]({{ site.baseurl }}/try) in our live tutorial. You don’t need to install anything.

Two.

When you’re ready to dive in, [set up LitElement locally]({{ site.baseurl }}/guide/start) and start building components!