
About Lit
Lit is a small library for building web components. It adds reactive properties and efficient templates on top of the browser's native custom elements.
What it does
Lit lets you write components that are standard custom elements, so they work in plain HTML, in any framework or in a content management system. Styles are scoped with Shadow DOM by default, which keeps component CSS from leaking into the rest of the page. When data changes, Lit updates only the dynamic parts of a template rather than rebuilding a virtual tree. The library is small, and the site puts the compressed size at around 5 KB, which keeps load times short.
Key features
- Reactive properties for component state
- Declarative HTML templates
- Scoped styles with Shadow DOM
- Standard custom elements
- Small footprint of around 5 KB
Who it's for
Teams building shared design systems or components that must work across several frameworks. Developers who want standards-based components with a small library on top will find it a good match, especially for sites that mix frameworks.
Pricing and good to know
Lit is open source under the BSD-3-Clause license, so it is free to use. The site says Lit is part of the OpenJS Foundation. Its documentation includes a playground where you can try examples and edit them in the browser.
Highlights
- Reactive properties for component state
- Declarative HTML templates
- Scoped styles with Shadow DOM
- Standard custom elements that work anywhere
- Small footprint of around 5 KB












