We're now on Bluesky! Follow us here! Simple. Fast. Web Components.SimpleSkip the boilerplateBuilding on top of the Web Components standards, Lit adds just what you need to be happy and productive: reactivity, declarative templates and a handful of thoughtful features to reduce boilerplate and make your job easier. Every Lit feature is carefully designed with web platform evolution in mind.FastTiny footprint, instant updatesWeighing in at around 5 KB (minified and compressed), Lit helps keep your bundle size small and your loading time short. And rendering is blazing fast, because Lit touches only the dynamic parts of your UI when updating — no need to rebuild a virtual tree and diff it with the DOM.Web ComponentsInteroperable & future-readyEvery Lit component is a native web component, with the superpower of interoperability. Web components work anywhere you use HTML, with any framework or none at all. This makes Lit ideal for building shareable components, design systems, or maintainable, future-ready sites and apps.import {html, css, LitElement} from 'lit';import {customElement, property} from 'lit/decorators.js'; @customElement('simple-greeting')export class SimpleGreeting extends LitElement { static styles = css`p { color: blue }`; @property() name = 'Somebody'; render() { return html`<p>Hello, ${this.name}!</p>`; }}import {html, css, LitElement} from 'lit'; export class SimpleGreeting extends LitElement { static styles = css`p { color: blue }`; static properties = { name: {type: String}, }; constructor() { super(); this.name = 'Somebody'; } render() { return html`<p>Hello, ${this.name}!</p>`; }}customElements.define('simple-greeting', SimpleGreeting);<simple-greeting name="World"></simple-greeting>Edit this example in the Lit PlaygroundCustom ElementsLit components are standard custom elements, so the browser treats them exactly like built-in elements. Use them in hand-written HTML or framework code, output them from your CMS or static site builder, even creat...
First seen: 2025-09-03 07:54
Last seen: 2025-09-03 16:56