Lit

A simple, fast library for building standards-based web components

Library
npm
v3.3.3
21,863 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
78 /100 Good
Development Activity 72
Maintenance 72
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
83 /100 Excellent
Architecture 87
Code Quality 88
Innovation 82
Learning Curve 75

Lit is Google’s library for authoring native web components with a reactive base class, a tagged-template-literal HTML renderer, and scoped CSS — without the runtime weight of a full application framework. Because components compile down to standard Custom Elements and Shadow DOM, they interoperate with any framework (or none) and can be dropped into React, Vue, or plain HTML pages alike.

The lit package is the umbrella entry point over the monorepo’s lit-html (templating) and lit-element/@lit/reactive-element (reactive base class) packages, plus a growing set of official add-ons (@lit/context, @lit/task, @lit/localize) for cross-cutting concerns like dependency injection, async state, and i18n.

What You Get

  • A LitElement base class with a customizable reactive update lifecycle
  • The html/css tagged-template functions from lit-html for declarative, diffed rendering
  • Decorators (@property, @state, @query, @customElement) for concise component authoring
  • A directive system (repeat, until, classMap, styleMap, ref, guard) for advanced template logic
  • Official companion packages for context (@lit/context), async tasks (@lit/task), localization (@lit/localize), and React interop (@lit/react)

Common Use Cases

  • Building framework-agnostic, embeddable design-system components shared across multiple frontend stacks
  • Authoring lightweight web components for a marketing site or micro-frontend without pulling in a full SPA framework
  • Wrapping Lit components for consumption in a React app via @lit/react
  • Server-rendering Lit templates with @lit-labs/ssr for content-heavy sites needing hydration

Under The Hood

Architecture: The lit package (packages/lit/src/index.ts) is a thin re-export layer composing three underlying packages in the monorepo: lit-html (packages/lit-html/src/lit-html.ts) handles template parsing/diffing via tagged template literals, @lit/reactive-element provides the low-level reactive-property lifecycle, and lit-element (packages/lit-element) merges the two into LitElement. Directives (packages/lit/src/directives/*.ts — repeat, until, cache, keyed, etc.) plug into the template-diffing engine as first-class extension points rather than special-cased renderer logic.

Tech Stack: Pure TypeScript compiled to ESM-only output, built and tested via Web Test Runner across real browsers rather than jsdom, with a Wireit/npm-workspaces monorepo layout (packages/lit, packages/lit-html, packages/lit-element, packages/labs/*) managed by lerna-style versioning.

Code Quality: lit-html’s test suite alone spans 35+ files including dedicated dev-mode and version-stability tests (lit-html_dev_mode_test.ts, version-stability_test.js), reflecting the project’s zero-tolerance stance on template-diffing regressions given its use at Google-scale. Strict TypeScript typing backs every public decorator and directive.

API Design: The core API surface is deliberately small — extend LitElement, return html\…`fromrender(), declare @property()` fields — pushing advanced behavior (async values, dependency injection, localization) into opt-in companion packages instead of bloating the base class, which keeps the barrier to a first working component very low.

Used by 28 apps in this directory

Python
64%
Other

Onyx

AI Agents · AI Assistants · Knowledge Management

32,935

Self-hostable AI platform with agentic RAG, 50+ connectors, deep research, code execution, and support for every major LLM provider.

View details
92
Repo Health
83
Technical
68
Dependency
Built with
Python 64%
TypeScript 26%
Updated 5 days ago
TypeScript
90%
MIT

OpenClaw

AI Agents · AI Assistants

392,894

An open-source AI assistant that runs on your own hardware and meets you in Discord, Slack, WhatsApp, iMessage, Telegram, and 20+ other channels, with native apps for every major platform.

View details
88
Repo Health
88
Technical
66
Dependency
Built with
TypeScript 90%
Updated 5 days ago
TypeScript
90%
MIT

OpenClaw

AI Agents · AI Assistants

392,894

An open-source AI assistant that runs on your own hardware and meets you in Discord, Slack, WhatsApp, iMessage, Telegram, and 20+ other channels, with native apps for every major platform.

View details
88
Repo Health
88
Technical
66
Dependency
Built with
TypeScript 90%
Updated 5 days ago
TypeScript
90%
MIT

OpenClaw

AI Agents · AI Assistants

392,894

An open-source AI assistant that runs on your own hardware and meets you in Discord, Slack, WhatsApp, iMessage, Telegram, and 20+ other channels, with native apps for every major platform.

View details
88
Repo Health
88
Technical
66
Dependency
Built with
TypeScript 90%
Updated 5 days ago
Ruby
78%
GPL 3.0

OpenProject

Collaboration · Productivity · Project Management

16,598

The open source project management platform that unifies Gantt charts, agile boards, time tracking, and team collaboration under full self-hosted control.

View details
96
Repo Health
79
Technical
69
Dependency
Built with
Ruby 78%
TypeScript 14%
Updated 5 days ago
Go
71%
Apache 2.0

OSV.dev

Security

3,001

Google's open-source vulnerability database that maps CVEs to exact package versions across 50+ ecosystems with a public API and data dumps.

View details
87
Repo Health
82
Technical
66
Dependency
Built with
Go 71%
Python 19%
Updated 6 days ago
TypeScript
94%
MIT

qm

AI Agents · AI Assistants · Automation

15,518

An open-source, multiplayer agent harness that gives every employee and every room in a company its own scoped memory, sandbox, and AI agent — in Slack and on the web.

View details
81
Repo Health
88
Technical
73
Dependency
Built with
TypeScript 94%
Updated 5 days ago
TypeScript
61%
AGPL 3.0

Silex

Design Tools · No Code Platforms

3,015

Free, open-source visual website builder that exports clean HTML/CSS — no lock-in, no subscription, host anywhere

View details
89
Repo Health
68
Technical
67
Dependency
Built with
TypeScript 61%
Rust 15%
JavaScript 11%
Updated 6 days ago
TypeScript
61%
AGPL 3.0

Silex

Design Tools · No Code Platforms

3,015

Free, open-source visual website builder that exports clean HTML/CSS — no lock-in, no subscription, host anywhere

View details
89
Repo Health
68
Technical
67
Dependency
Built with
TypeScript 61%
Rust 15%
JavaScript 11%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers