Lit
A simple, fast library for building standards-based web components
Repository Health
Technical Analysis
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
LitElementbase class with a customizable reactive update lifecycle - The
html/csstagged-template functions fromlit-htmlfor 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/ssrfor 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
Onyx
AI Agents · AI Assistants · Knowledge Management
Self-hostable AI platform with agentic RAG, 50+ connectors, deep research, code execution, and support for every major LLM provider.
OpenClaw
AI Agents · AI Assistants
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.
OpenClaw
AI Agents · AI Assistants
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.
OpenClaw
AI Agents · AI Assistants
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.
OpenProject
Collaboration · Productivity · Project Management
The open source project management platform that unifies Gantt charts, agile boards, time tracking, and team collaboration under full self-hosted control.
OSV.dev
Security
Google's open-source vulnerability database that maps CVEs to exact package versions across 50+ ecosystems with a public API and data dumps.
qm
AI Agents · AI Assistants · Automation
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.
Silex
Design Tools · No Code Platforms
Free, open-source visual website builder that exports clean HTML/CSS — no lock-in, no subscription, host anywhere
Silex
Design Tools · No Code Platforms
Free, open-source visual website builder that exports clean HTML/CSS — no lock-in, no subscription, host anywhere