NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3891 most downloaded on npm
A simple base class for creating fast, lightweight web components
Last release 9 months ago
23 Dec 2025
Release timing varies
gaps range from 2 weeks to 6 months
Nearly every release is documented
notes for 33 of 35 stable releases
23 versions withdrawn
withdrawn after publishing
9 years old
87 releases · first in 2017
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.
### Major Changes - #4170 `04c8d65a` - Graduate @lit-labs/task to @lit/task, its permanent location. @lit-labs/task is now just a proxy for @lit/task,
@lit/reactive-element is a new package that factors out the base class that provides the reactive update lifecycle based on property/attribute changes to LitElement (what was previously called UpdatingElement) into a separate package. LitElement now extends ReactiveElement to add lit-html rendering via the render() callback. See ReactiveElement API for more details.UpdatingElement has been renamed to ReactiveElement.updating-element package has been renamed to @lit/reactive-element.@internalProperty decorator has been renamed to @state._getUpdateComplete to getUpdateComplete.reflect: true and its toAttribute function returns undefined the attribute is now removed where previously it was left unchanged (#872).unhandledrejection event handler on window.renderRoot is now created when the element's connectedCallback is initially run.requestUpdateInternal. The requestUpdate method is now identical to this method and should be used instead.initialize method has been removed. This work is now done in the element constructor.static addInitializer for adding a function which is called with the element instance when is created. This can be used, for example, to create decorators which hook into element lifecycle by creating a reactive controller (#1663).connectedCallback, disconnectedCallback, willUpdate, update, and updated. To ensure it has access to the element lifecycle, a controller should be added in the element's constructor. To add a controller to the element, call addController(controller).removeController(controller) which can be used to remove a controller from a ReactiveElement.willUpdate(changedProperties) lifecycle method to UpdatingElement. This is called before the update method and can be used to compute derived state needed for updating. This method is intended to be called during server side rendering and should not manipulate element DOM.### Minor Changes - #4151 `5680d483` - Make context decorators work with standard decorators ### Patch Changes - #4210 `cf7d96d4` - Graduate @lit-labs
#4210 cf7d96d4 - Graduate @lit-labs/context to @lit/context, its permanent location. @lit-labs/context is now just a proxy for @lit/context, so code need not be duplicated in projects that depend on both.
#4200 8e737fbd - Support @provide with experimental decorators on a property. Previously we only supported it on an accessor, which happened automatically if used with @state or @property.
d8e80656 - The analyzer no longer crashes in many cases when encountering code with unexpected syntax or cases that the analyzer does not yet handle. The custom elements manifest generator also logs diagnostics collected while generating the manifest, but generates the manifest whenever possible.d8e80656]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Patch Changes - #4888 `3eb64fbf` - Move Slots type assertion to fix type errors on generated components.
2c59ceb9]:
Updated dependencies \[`290a608a`]:
### Patch Changes - #4731 `ff87eb46` Thanks @kyubisation! - Add fallback for call site location detection for webkit
ff87eb46 Thanks @kyubisation! - Add fallback for call site location detection for webkit28c33d23 Thanks @bennypowers! - Includes TypeScript typings and source maps in npm tarball, corrects main package.json fieldd8e80656]:
webpackModuleRulesTest accepts a RegExp that will match modules where Lit SSR support will be injected. Ideally it should match entrypoint to your rou
#4993 a33d6792 Thanks @ADNolan! - Prevent duplicative patching of React.createElement.
#4960 6a72c869 Thanks @fernandofranca! - Add additional options for configuring webpack rules:
webpackModuleRulesTest accepts a RegExp that will match modules where Lit SSR support will be injected. Ideally it should match entrypoint to your routes. This used to be internally set as, and now defaults to, /\/pages\/.*\.(?:j\|t)sx?$\|\/app\/.*\.(?:j\|t)sx?$/.webpackModuleRulesExclude accepts an array of RegExp to exclude from any modules selected with above option. This used to be internally set as, and now defaults to, [/next\/dist\//, /node_modules/].4cf588b0 Thanks @bennypowers! - Initial pre-release2c59ceb9]:
### Patch Changes - #4940 `b42e0465` Thanks @raoufswe! - [Changed] - update webpack exclude to filter node_modules
d8e80656]:
### Patch Changes - #4311 `cabe72a8` - Removed lit package from dependency. It is now listed as a dev dependency since it is only used for testing.
2c59ceb9]:
### Patch Changes - #4840 `37c02502` Thanks @kyubisation! - Fix type of nextjs config wrapper - #4815 `d3ce79a7` Thanks @JamesIves! - Adds support for
#4840 37c02502 Thanks @kyubisation! - Fix type of nextjs config wrapper
#4815 d3ce79a7 Thanks @JamesIves! - Adds support for Next.js 15
290a608a]:
### Minor Changes - #5208 `fb64afc2fbe5d086d1586feaf1a9b9646e5aaccd` Thanks @bencbradshaw! - feat: replace clean-css with lightningcss for CSS minific
fb64afc2fbe5d086d1586feaf1a9b9646e5aaccd Thanks @bencbradshaw! - feat: replace clean-css with lightningcss for CSS minification#4575 aa4fc3ef - Add support for Next.js 14 and App Router. No longer support Next.js 12.
Note: By default, components in the App Router are React Server Components (RSCs). Deep SSR of Lit components does not work within server components as they result in React hydration mismatch due to the presence of the <template> element in the RSC payload containing the serialized server component tree, and the custom element definitions will not be included with the client bundle either when imported in server component files.
Make sure any Lit components you wish to use are beyond the 'use client'; boundary. These will still be server rendered for the initial page load just like they did for the Pages Router.
#3885 7932f7dd - @lit-labs/ssr-react and @lit-labs/react now coordinate prop handling during server rendering and hydration.
@lit-labs/ssr-react will call setAttribute() with all props provided during server rendering unless they are provided in <code>_$litProps$</code> object made by @lit-labs/react. Previously, it would call setProperty() for props that were found in the element's prototype, and setAttribute() for those that weren't. If you wish to server render custom elements that take properties that can not be set as attributes (i.e. not serializeable or have different name as attribute/property), you must use @lit-labs/react to create a React wrapper component.@lit-labs/react now has a Node build and export condition to do special prop handling during server rendering. It detects the presence of React.createElement monkey patch by @lit-labs/ssr-react and provides props to be set as properties to the createElement() call.@lit-labs/ssr-react will add the defer-hydration attribute to custom elements that had properties set so that @lit-labs/react wrapped elements have a chance to set properties on the element before Lit element hydration is triggered.@lit-labs/react wrapped components will suppress hydration warnings raised by React due to server rendered attributes.Add rollup 4 as a supported peerDependency
b83b3e6e Thanks @bencbradshaw! - - Combine rollup-plugin-minify-html-literals, minify-html-literals, and parse-literals into a single package
Your coding agent can read these notes before it upgrades. Set up the MCP server →