# lit

> A library for building fast, lightweight web components

Latest version **3.3.3** (published 2026-05-14) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install lit
pnpm add lit
yarn add lit
bun add lit
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.3.3 |
| Published | 2026-05-14 |
| First published | 2012-07-04 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 103.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 21816 |
| Author | Google LLC |
| Maintainers | kevinpschaaf, sorvell, rictic, graynorton, justinfagnani, aomarks, lit-robot, augustjk |

## Links

- npm: https://www.npmjs.com/package/lit
- Repository: https://github.com/lit/lit
- Homepage: https://lit.dev/
- Issues: https://github.com/lit/lit/issues
- npm.io page: https://npm.io/package/lit

## Dependencies (3)

- [lit-html](https://npm.io/package/lit-html.md) ^3.3.0
- [lit-element](https://npm.io/package/lit-element.md) ^4.2.0
- [@lit/reactive-element](https://npm.io/package/@lit/reactive-element.md) ^2.1.0

## Recent versions

- 3.3.3 (latest) — 2026-05-14
- 3.0.0-pre.1 (pre) — 2023-09-29
- 2.3.0-next.1 (next) — 2022-07-25
- 3.3.2 — 2025-12-23
- 3.3.1 — 2025-07-11
- 3.3.0 — 2025-04-11
- 3.2.1 — 2024-10-07
- 3.2.0 — 2024-08-05
- 3.1.4 — 2024-06-04
- 3.1.3 — 2024-04-15
- 3.1.2 — 2024-01-31
- 3.1.1 — 2024-01-09
- 3.1.0 — 2023-11-16
- 3.0.2 — 2023-11-02
- 3.0.1 — 2023-10-28
- … 43 more at https://npm.io/package/lit/versions

## README

<div align="center">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="./logo-dark.svg" alt="Lit" width="300" height="141">
  </source>
  <source media="(prefers-color-scheme: light)" srcset="./logo.svg" alt="Lit" width="300" height="141">
  </source>
  <img src="./logo.svg" alt="Lit" width="300" height="141">
</picture>

### Simple. Fast. Web Components.

[![Build Status](https://github.com/lit/lit/actions/workflows/tests.yml/badge.svg)](https://github.com/lit/lit/actions/workflows/tests.yml)
[![Published on npm](https://img.shields.io/npm/v/lit.svg?logo=npm)](https://www.npmjs.com/package/lit)
[![Join our Discord](https://img.shields.io/badge/discord-join%20chat-5865F2.svg?logo=discord&logoColor=fff)](https://lit.dev/discord/)
[![Mentioned in Awesome Lit](https://awesome.re/mentioned-badge.svg)](https://github.com/web-padawan/awesome-lit)

</div>

Lit is a simple library for building fast, lightweight web components.

At Lit's core is a boilerplate-killing component base class that provides reactive state, scoped styles, and a declarative template system that's tiny, fast and expressive.

## Documentation

See the full documentation for Lit at [lit.dev](https://lit.dev)

## Overview

Lit provides developers with just the right tools to build fast web components:

- A fast declarative HTML template system
- Reactive property declarations
- A customizable reactive update lifecycle
- Easy to use scoped CSS styling

Lit builds on top of standard web components, and makes them easier to write:

```ts
import {LitElement, html, css} from 'lit';
import {customElement, property} from 'lit/decorators.js';

// Registers the element
@customElement('my-element')
export class MyElement extends LitElement {
  // Styles are applied to the shadow root and scoped to this element
  static styles = css`
    span {
      color: green;
    }
  `;

  // Creates a reactive property that triggers rendering
  @property()
  mood = 'great';

  // Render the component's DOM by returning a Lit template
  render() {
    return html`Web Components are <span>${this.mood}</span>!`;
  }
}
```

Once you've defined your component, you can use it anywhere you use HTML:

```html
<my-element mood="awesome"></my-element>
```

## Contributing

Please see [CONTRIBUTING.md](../../CONTRIBUTING.md).

---
_Source: https://npm.io/package/lit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
