lit-element VS Preact

Compare lit-element vs Preact and see what are their differences.

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. (by Polymer)

Preact

⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM. (by preactjs)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
lit-element Preact
8 110
4,492 36,021
0.1% 0.5%
0.0 9.3
24 days ago about 22 hours ago
TypeScript JavaScript
BSD 3-clause "New" or "Revised" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

lit-element

Posts with mentions or reviews of lit-element. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-07-29.
  • GraphQL - Diving Deep
    47 projects | dev.to | 29 Jul 2021
    Using vanilla JS or TS or using web components and want to have a framework-independent way of doing things? You can stick to the GraphQL codegen itself since it takes care of almost everything underneath. Or if you want, you can also use Apollo Client’s vanilla version @apollo/client/core. Apollo Elements does come with support for a lot of webcomponent libraries like Lit, Fast and Gluon or even without any of it and hence is quite flexible.
  • 17 Best Web Development Frameworks For 2021
    16 projects | dev.to | 2 Jul 2021
    The LitElement framework is easy to use as a base class to create lightweight and faster web components for working with any framework. LitElement is yet another one of the top web development frameworks among developers for using lit-html for rendering into shadow DOM. It also adds API for managing attributes and properties. Let’s find out whether the framework is good enough for your project.
  • How to Implement an Event Bus in TypeScript
    1 project | dev.to | 16 Jun 2021
    When you're working with Web Components through LitElement, it's usual firing events for sending messages between them. You can use either Standard or Custom events.
  • A Technology Radar Volume 24 summary
    10 projects | /r/webdev | 25 Apr 2021
    🔸lit-element - a simple base class for creating fast, lightweight web components;
  • Lit - New framework from Google
    3 projects | /r/javascript | 21 Apr 2021
    Isn't this just Polymer Lit Elements rebranded? https://github.com/Polymer/lit-element
  • React-like components without react?
    6 projects | /r/webdev | 15 Apr 2021
    Web components are a good start, but it is better to use LitElement to build them in that case, instead of using it directly.
  • I made a Vue 3 inspired library powered by WebComponents using @vue/reactivity
    2 projects | /r/javascript | 3 Jan 2021
    Other frameworks which are using the same principle are [lit-element](https://github.com/Polymer/lit-element) and [heresy](https://github.com/WebReflection/heresy). there are surely more but these are ones i've found when looking for inspiration.
  • Using tailwind at build-time with lit-element
    8 projects | dev.to | 29 Dec 2020
    Using a lit-element component:

Preact

Posts with mentions or reviews of Preact. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-05.

What are some alternatives?

When comparing lit-element and Preact you can also consider the following projects:

Svelte - Cybernetically enhanced web apps

react-18 - Workgroup for React 18 release.

React - The library for web and native user interfaces.

Alpine.js - A rugged, minimal framework for composing JavaScript behavior in your markup.

Next.js - The React Framework

solid - A declarative, efficient, and flexible JavaScript library for building user interfaces.

Bit - A build system for development of composable software.

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

Express - Fast, unopinionated, minimalist web framework for node.

PostCSS - Transforming styles with JS plugins

Vue.js - This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core