HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
lit
lit-element
TypeScript2018–2021
lit / lit-element

lit-element

LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.

7Distinct people
16Mentions
0Explicit recommenders
4.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year16 dated mentions

Observed mentions: 2018-05-24 18:43:16 UTC to 2021-06-09 16:33:47 UTC.

02468102018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC1019
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC505
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

What Hacker News says

16 sources
I see many people have problem with that in the comments here. However I don’t find that to be an issue. Passing properties (as opposed to attributes) allows complex types and many popular frameworks have a handy shorthand for it (e.g. in lit-html you write `<my-component .prop=${[1, 2, 3]}>`). In my opinion the bad ergonomics is actually when authoring the components (not consuming it). Many of the faults have been excellently pointed out previously[1]. The most glaring the boilerplate you have to write if you want your attributes to reflect a property. This has an easy fix though, which is that you simply don’t write your web components by hand. You either use a library (like lit-element[2]) or a compiler (like stencil[3]). I’m personally waiting for a less opinionated compiler with a smaller runtime then stencil (preferably no runtime;
Read the rest
perhaps that is Svelte with a web component target, I haven’t tried it). There is also a proposal for a declarative shadow DOM[4], which aims to tackle some of the bad dev experience we have with web components. However I’m personally a little skeptic that it is a good proposal, or that it will fix what most web component devs are concerned about. 1: https://dev.to/richharris/why-i-don-t-use-web-components-2ci... 2: https://github.com/lit/lit-element 3: https://stenciljs.com/ 4: https://github.com/whatwg/dom/issues/831
In Real-world CSS vs. CSS-in-JS performance comparison
"component tree is bound to the DOM as strings" You can pass data as props instead of attrs, same as with react - https://github.com/Polymer/lit-element. I wonder why this pop's up all the time. It is true that polymer had quite a bit of limitations, but there are other solutions like stencil, lit-element, svelte or vue (yes it can output WC's) that do not have those problems. Lit-html in latest version I think is only outperformed by inferno from popular solutions.
In React as a UI Runtime
Read the comments. The back-and-forth between Dan Abramov and Benny Powers is very enlightening (at least for someone like me who doesn't follow Web standards and library internals closely). I used to be skeptical about Web Components' ability to impose common standards [0], but I've recently become fascinated with Polymer (LitElement [1] and lit-html [2], specifically). There's even a Redux mixin for LitElement components. Were it not for React Native, I would be giving Polymer much more serious consideration for my go-to technology. [0] https://news.ycombinator.com/item?id=15058651 [1] https://github.com/Polymer/lit-element [2] https://github.com/Polymer/lit-html
In Why the React community is missing the point about Web Components
You should check out lit-html+LitElement. It's standards Web Components from the get-go - you don't write to a non-standard API and then compile it out like with Vue, you just use the standard connectedCallback(), disconnectedCallback(), etc lit-html is standard JS, with all the flexibility of a non-standard syntax extension like JSX, but without a compiler. Templates are expressions, can be passed to higher-order functions, and use JavaScript for control-flow. It's all ES modules, published to npm as ES modules, and loadable directly from CDNs like unpkg.com into all modern browsers. No CLI or custom tools needed, but also works with all the tools our there. Edit, link: https://github.com/Polymer/lit-element
In Vue CLI 3: A Game Changer for Front End Development?
I'm still super gung-ho about web components. The progressive browsers are committed to making it happen. The picture is not so bleak for custom elements: https://caniuse.com/#feat=custom-elementsv1 Firefox also just announced that Shadow DOM arrived in a nightly: https://bugzilla.mozilla.org/show_bug.cgi?id=1460069 https://news.ycombinator.com/item?id=17172613 Contrary to popular belief, you can start using web components WITH just custom elements and WITHOUT shadow DOM! https://twitter.com/rob_dodson/status/961780022628331520 I jumped onto this bandwagon early and struggled with Polymer 2 and HTML imports (ugh!). Now they have made the same realizations and moving forward LitElement will lead the charge toward usable and lightweight web components: https://www.polymer-project.org/blog/2018-05-02-roadmap-upda... https://github.com/Polyme
Read the rest
r/lit-element Here's how you can get started: https://github.com/Polymer/pwa-starter-kit/wiki It's not paradise, there are kinks to work out, but ultimately one can make production worthy apps with web components TODAY (polyfills available). You can sleep at night not worrying that your library will become the new jQuery someday: https://twitter.com/SaraSoueidan/status/999645120155746304
In Web Code is a solved Problem – how about fixing Web UI next?

Showing the 15 most recent of 16 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.