Lit

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

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

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
68/100Good
Development Activity48
Maintenance56
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
83/100Excellent
Architecture87
Code Quality88
Innovation82
Learning Curve75

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/*.tsrepeat, 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 9 apps in this directory

TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript88%
Updated today
Python
54%
Other

authentik

Authentication · Security

24,980

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
68
Dependency
Built with
Python54%
TypeScript33%
Updated today
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
JavaScript
81%
MIT

localforge

AI Code Assistants · AI Agents · Developer Tools

396

A local, multi-provider AI coding agent with a real desktop and web UI — bring your own Anthropic, OpenAI, Gemini, Bedrock, or local Ollama keys and let it read, edit, and run code in your own project folder.

View details
46
Repo Health
54
Technical
72
Dependency
Built with
JavaScript81%
CSS12%
Updated 1 years ago
TypeScript
97%
MPL 2.0

Logto

Authentication

14,380

Open-source auth infrastructure for SaaS and AI apps with OIDC, SAML, and RBAC

View details
91
Repo Health
83
Technical
67
Dependency
Built with
TypeScript97%
Updated today
Python
66%
Other

Onyx

AI Assistants · AI Agents · Knowledge Management

31,658

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
72
Dependency
Built with
Python66%
TypeScript28%
Updated today
Go
56%
Apache 2.0

OSV.dev

Security

2,888

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
90
Repo Health
82
Technical
70
Dependency
Built with
Go56%
Python32%
Updated today
TypeScript
70%
AGPL 3.0

Silex

No Code Platforms · Design Tools

2,928

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

View details
88
Repo Health
68
Technical
69
Dependency
Built with
TypeScript70%
JavaScript13%
Updated 2 days ago
C#
62%
MIT

Umbraco CMS

CMS

5,227

The friendly open-source .NET CMS that gives developers full control over content, structure, and delivery without lock-in.

View details
97
Repo Health
78
Technical
81
Dependency
Built with
C#62%
TypeScript37%
Updated today

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

Search