# Lit

> Simple. Fast. Web Components.

Source: https://talira.ai/catalog/lit-k21shh94
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / ui frameworks](https://talira.ai/categories/libraries/ui-frameworks), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [OpenJS Foundation](https://talira.ai/orgs/openjs-foundation.md)

Lit is a small library for building fast, lightweight web components. Its `LitElement` base class adds reactive properties, Shadow DOM-scoped styles and declarative templates written as tagged template literals, and it updates only the dynamic parts of the UI rather than diffing a virtual DOM, in about 5 KB minified and compressed. Every Lit component is a native custom element, so it works in plain HTML or inside any framework, which makes Lit a common choice for shareable components and design systems. The monorepo also has `@lit/localize`, `@lit/context`, `@lit/task`, a React wrapper and labs packages for server-side rendering, routing and signals. Lit is part of the OpenJS Foundation and is BSD-3-Clause licensed.

## Links

- Website: https://lit.dev/
- GitHub: https://github.com/lit/lit
- Docs: https://lit.dev/docs/

## Problems it solves

- build UI components once and use them in React, Vue, Angular or plain HTML
- our design system has to work across teams using different frontend frameworks
- writing native custom elements by hand takes too much boilerplate
- keep a component's CSS from leaking into the rest of the page and vice versa
- a tiny component library that doesn't add much to the bundle
- re-render a component when one of its attributes or properties changes
- render web components on the server and hydrate them in the browser
- embed widgets in pages built by a CMS or static site generator

## Features

- LitElement base class for native custom elements
- reactive properties and attributes that trigger efficient re-renders
- styles scoped with Shadow DOM
- declarative templates with tagged template literals (lit-html)
- about 5 KB minified and compressed
- TypeScript decorators or plain JavaScript
- @lit/localize, @lit/context, @lit/task and @lit/react packages
- labs packages for server-side rendering (@lit-labs/ssr), routing, motion and signals
- online playground

## Trust

Overall: 0.27 out of 1.
Signals: backing 0.30, extensibility 0.00.

- backed by OpenJS Foundation

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [Svelte](https://talira.ai/catalog/svelte-madys0ms.md): Web development for the rest of us
- [React](https://talira.ai/catalog/react-a48drvqv.md): The library for web and native user interfaces
- [Preact](https://talira.ai/catalog/preact-xsg58zsf.md): Fast 3kB alternative to React with the same modern API
- [Vue.js](https://talira.ai/catalog/vue-js-x09qxxh1.md): The Progressive JavaScript Framework

## Sources

[^1]: https://github.com/lit/lit/blob/main/LICENSE (checked 23 Nov 2026)
[^2]: https://lit.dev/ (checked 23 Nov 2026)
