A simple low level base class for creating fast, lightweight web components
Last release 8 months ago
23 Dec 2025
Ships unpredictably
gaps range from 2 weeks to 1.2 years
Most releases are documented
notes for 21 of 31 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
42 releases · first in 2020
Release timeline
42 releases since 2020Releases
- 2.1.223 Dec 2025
- 2.1.111 Jul 2025
- 2.1.011 Apr 2025
Release notes
Open source →Minor Changes
-
#4901
c9160405Thanks @maxpatiiuk! - Dev mode warnings are now emitted on the next microtask after package import, allowing for a wider opportunity to suppress the warnings by consumers. -
#4934
4824c4ce- Adds property option foruseDefault. When set, the initial default value is not considered a change and does not reflect whenreflectis set. In addition, when the attribute is removed, the default value is restored.
Patch Changes
Additional notes
Open source →Minor Changes
- #4221
5a60fbc6Thanks @rivajunior! - export Options interface
-
- 2.0.431 Jan 2024
Additional notes
Open source →Patch Changes
- #4485
57b00630- Add "browser" export condition entrypoints to any package.json files with "node" export conditions. This fixes Node test runners emulating browser environments that were incorrectly loading the "node" entrypoints instead of the browser code. - Updated dependencies [
e901c582]:- @lit-labs/[email protected]
Additional notes
Open source →Patch Changes
- #3976
3cf98cd8Thanks @Westbrook! - Fixes #3904 "Clipping parents include ancestors ofposition: fixedelement"
- #4485
- 2.0.39 Jan 2024
Release notes
Open source →Patch Changes
-
#4591
045b6f15Thanks @a11delavar! - Do not initialize observers to prevent failing in SSR environment. -
Updated dependencies [
feccc1ba]:
Additional notes
Open source →Patch Changes
- #4172
dc1d323f- Revert custom children type added in #4142 and instead use our copy ofPropsWithoutReftype so thatpreact/compattyping will work. Preact users facing type errors using wrapped components should configure"paths"in theirtsconfig.jsonso thatreacttypes will instead resolve topreact/compatas described in Preact's TypeScript documentation. Going withpreact/compatalso solves compatibility issues arising from TypeScript >= 5.1 changing JSX tag type check.
Additional notes
Open source →Patch Changes
-
#3909
feded34bThanks @chrispaterson! - Refactored and refurbished ScrollerController attach/detach code in effort to reduce potential memory leaks due to held instance references. -
#3892
f5b2013d- Changed accessor and iterator code to support ES5 compilation. -
#3929
c3672fca- Added new support utilities for dealing with ResizeObserver loop limit exceeded errors.
-
- 2.0.216 Nov 2023
Release notes
Open source →Patch Changes
-
#4387
bf551b5b- EnsurerenderRootexists before first update (#4268) -
#4282
c7922a0cThanks @MaxArt2501! - Fix a bug where accessing a@querydecorated field with thecacheflag set before the first update would result innullbeing cached permanently.nullwill no longer be cached before the first update and inDEV_MODEnow raises a warning. -
#4388
839ca0f8- Fixes bug where adding or removing controllers during a reactive controller lifecycle would affect the execution of other controllers (#4266). Controllers can now be added/removed during lifecycle without affecting others.
-
- 2.0.128 Oct 2023
- 2.0.010 Oct 2023
Additional notes
Open source →Major Changes
-
#4146
0f6878dc- Generated accessor for reactive properties now wrap user accessors and automatically callthis.requestUpdate()in the setter. As in previous versions, users can still specifynoAccessor: true, in which case they should callthis.requestUpdate()themselves in the setter if they want to trigger a reactive update. -
#4254
1040f758- Change the type ofReactiveElement.renderRootand return type ofReactiveElement.createRenderRoot()to beHTMLElement | DocumentFragmentto match each other and lit-html'srender()method. -
#3850
7e8491d4- Delete deprecated queryAssignedNodes behavior and arguments. Migrate deprecated usage with a selector argument to use@queryAssignedElements. E.g.:@queryAssignedNodes('list', true, '.item')to@queryAssignedElements({slot: '', flatten: false, selector: '.item'}).
Patch Changes
Additional notes
Open source →Major Changes
-
#4027
c28cb6ed- - [BREAKING] Removed deprecated call signature forcreateComponent()taking multiple arguments. A single option object must be passed in instead.Example:
- createComponent(React, 'my-element', MyElement, {onfoo: 'foo'}) + createComponent({ + react: React, + tagName: 'my-element', + elementClass: MyElement, + events: {onfoo: 'foo'}, + })- Refactored to move implementation directly into render function of
forwardRefrather than creating a class component. This removes an extra React component of the same name showing up in the component tree.
- Refactored to move implementation directly into render function of
Patch Changes
Additional notes
Open source →Major Changes
- New package serving as the main entry point for all users of Lit (including
LitElement,ReactiveElement, andlit-html). See the Migration Guide for more details.
-
- 2.0.0-pre.129 Sept 2023pre-release
Additional notes
Open source →Major Changes
-
#4146
0f6878dc- Generated accessor for reactive properties now wrap user accessors and automatically callthis.requestUpdate()in the setter. As in previous versions, users can still specifynoAccessor: true, in which case they should callthis.requestUpdate()themselves in the setter if they want to trigger a reactive update.
Minor Changes
-
#4183
6470807f- Make the decorators work with theaccessorkeyword whenexperimentalDecoratorsis true.
Patch Changes
-
- 2.0.0-pre.027 Apr 2023pre-release
Release notes
Open source →Major Changes
-
#3850
7e8491d4- Remove transform for deprecated usage of queryAssignedNodes. -
#3814
23326c6b- Update to TypeScript 5.0, which includes breaking changes to the TypeScript compiler APIs.
Patch Changes
Additional notes
Open source →Major Changes
-
#3850
7e8491d4- Delete deprecated queryAssignedNodes behavior and arguments.Migrate deprecated usage with a selector argument to use
@queryAssignedElements. E.g.:@queryAssignedNodes('list', true, '.item')to@queryAssignedElements({slot: '', flatten: false, selector: '.item'}).
Patch Changes
-
- 1.6.32 Aug 2023
- 1.6.21 Jun 2023
- 1.6.112 Jan 2023
Nothing published for this version
- 1.6.09 Jan 2023
Release notes
Open source →Minor Changes
-
#4893
6c051d517bd92761787897b2c8c060ed419126e2Thanks @kyubisation! - Implement ShadowRoot and document in event path -
#4894
baa780d2b78a4b792cf61b220b8e3e186739d48cThanks @kyubisation! - Add DOM shim implementation forMutationObserver,ResizeObserverandIntersectionObserver
Patch Changes
-
#5240
b9de4295489b0caf91069bfe21f640f3ab5e12bbThanks @kyubisation! - Register CSSStyleSheet polyfill in global scope when using Node.js hook for importing CSS files -
#5330
077a4b727d0d30540f1813bbbe66477790c9805eThanks @cecilyhunt! - fix(ssr-dom-shim): Add stubs for TS 6.0.3 compatibility
-
- 1.5.08 Dec 2022
Nothing published for this version
- 1.4.23 Nov 2022
Nothing published for this version
- 1.4.118 Aug 2022
Nothing published for this version
- 1.4.012 Aug 2022
- 1.4.0-next.125 Jul 2022pre-release
Nothing published for this version
- 1.4.0-next.025 Jul 2022pre-release
Nothing published for this version
- 1.3.422 Jul 2022
Nothing published for this version
- 1.3.329 Jun 2022
Nothing published for this version
- 1.3.229 Apr 2022
Nothing published for this version
- 1.3.115 Mar 2022
Nothing published for this version
- 1.3.018 Feb 2022
Release notes
Open source →Minor Changes
- #4755
25962bf5Thanks @kyubisation! - Implement SSR event handling and an optional flagglobalThis.litSsrCallConnectedCallbackto callconnectedCallbackduring SSR, if set to true.
- #4755
- 1.2.315 Feb 2022
Nothing published for this version
- 1.2.27 Feb 2022
Nothing published for this version
- 1.2.125 Jan 2022
Release notes
Open source →Patch Changes
- #4553
65bc240cThanks @kyubisation! - Implement Element.localName and Element.tagName. Fixes 3375.
- #4553
- 1.2.013 Jan 2022
Additional notes
Open source →Minor Changes
-
#3885
7932f7dd-@lit-labs/ssr-reactand@lit-labs/reactnow coordinate prop handling during server rendering and hydration.- [Breaking]
@lit-labs/ssr-reactwill callsetAttribute()with all props provided during server rendering unless they are provided in <code>_$litProps$</code> object made by@lit-labs/react. Previously, it would callsetProperty()for props that were found in the element's prototype, andsetAttribute()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/reactto create a React wrapper component. @lit-labs/reactnow has a Node build and export condition to do special prop handling during server rendering. It detects the presence ofReact.createElementmonkey patch by@lit-labs/ssr-reactand provides props to be set as properties to thecreateElement()call.@lit-labs/ssr-reactwill add thedefer-hydrationattribute to custom elements that had properties set so that@lit-labs/reactwrapped elements have a chance to set properties on the element before Lit element hydration is triggered.@lit-labs/reactwrapped components will suppress hydration warnings raised by React due to server rendered attributes.
- [Breaking]
-
- 1.1.212 Jan 2022
Release notes
Open source →Patch Changes
- #4598
7cfb2274Thanks @jun-sheaf! - Usetarget.setinstead of member assignment in@consume()decorator.
- #4598
- 1.1.16 Jan 2022
Additional notes
Open source → - 1.1.05 Jan 2022
Release notes
Open source →Minor Changes
Patch Changes
- Updated dependencies [
feccc1ba,290a608a]:- [email protected]
- @lit-labs/[email protected]
Additional notes
Open source →Minor Changes
- #4371
62df19daThanks @autopulated! -ContextProvidercan now be added to any HTML elements, not just custom elements implementing aReactiveControllerHost.
Patch Changes
- Updated dependencies [
- 1.0.29 Nov 2021
Release notes
Open source →Patch Changes
- #4836
05691ba4Thanks @maxpatiiuk! - Improve type inference of tuples returned by the args function being used as task function parameter.
Additional notes
Open source → - #4836
- 1.0.17 Oct 2021
Release notes
Open source →Patch Changes
-
#4552
4050cac6Thanks @jrencz! - Makestatusof Task a readonly propertySo far
statuswas writable which allowed for setting status of task form outside. Doing so did cause rendering of expected template but the task was becoming internally incoherent.Now attempt to assign
statuswill end up in throwing aTypeError.
Additional notes
Open source →Patch Changes
- #4335
7fc72f7bThanks @stefanpearson! - When passing arefcallback to the Component,createComponentwas previously intercepting it and wrapping it in an unbound function. This change memoizes the consumerrefwithuseCallback, to keep the reference stable and ensure it isn't invoked repeatedly on subsequent renders.
Additional notes
Open source →Patch Changes
-
#4329
df1980fe- Remove dependency onlitpackage. All implementation code only uses@lit/reactive-element.litis moved to dev dependencies as it is still used for tests. -
#4286
1fb7a108- Fix erroneous description for the JSDoc on the@provide()decorator. -
#4287
4edf9bc8- Broaden the host type of context controllers and decorators to be compatible with Lit 2
-
- 1.0.021 Sept 2021
Additional notes
Open source →Additional notes
Open source →Major Changes
@lit/reactive-elementis a new package that factors out the base class that provides the reactive update lifecycle based on property/attribute changes toLitElement(what was previously calledUpdatingElement) into a separate package.LitElementnow extendsReactiveElementto addlit-htmlrendering via therender()callback. See ReactiveElement API for more details.UpdatingElementhas been renamed toReactiveElement.- The
updating-elementpackage has been renamed to@lit/reactive-element. - The
@internalPropertydecorator has been renamed to@state. - For consistency, renamed
_getUpdateCompletetogetUpdateComplete. - When a property declaration is
reflect: trueand itstoAttributefunction returnsundefinedthe attribute is now removed where previously it was left unchanged (#872). - Errors that occur during the update cycle were previously squelched to allow subsequent updates to proceed normally. Now errors are re-fired asynchronously so they can be detected. Errors can be observed via an
unhandledrejectionevent handler on window. - ReactiveElement's
renderRootis now created when the element'sconnectedCallbackis initially run. - Removed
requestUpdateInternal. TherequestUpdatemethod is now identical to this method and should be used instead. - The
initializemethod has been removed. This work is now done in the element constructor.
Minor Changes
- Adds
static addInitializerfor 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). - Added ability to add a controller to an element. A controller can implement callbacks that tie into element lifecycle, including
connectedCallback,disconnectedCallback,willUpdate,update, andupdated. 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, calladdController(controller). - Added
removeController(controller)which can be used to remove a controller from aReactiveElement. - Added
willUpdate(changedProperties)lifecycle method to UpdatingElement. This is called before theupdatemethod 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.
- 1.0.0-rc.43 Sept 2021pre-release
Nothing published for this version
- 1.0.0-rc.319 Aug 2021pre-release
Nothing published for this version
- 1.0.0-rc.27 May 2021pre-release
Nothing published for this version
- 1.0.0-rc.121 Apr 2021pre-release
Nothing published for this version
- 1.0.0-pre.331 Mar 2021pre-release
Nothing published for this version
- 1.0.0-pre.212 Feb 2021pre-release
Nothing published for this version
- 1.0.0-pre.117 Dec 2020pre-release
Nothing published for this version