All versions since 0.19.0
0.19.0
Lit rendered on the server with @lit-labs/ssr now works with the plugin:
edits hot-patch hydrated components and reach the next server render, shared
sheets arrive styled, and the Components tab shows where hydration stands. A
new SSR example covers dev, production builds and StackBlitz. Lit Inspector
gains a Lit tab in the Elements panel and reads Custom Elements Manifests from
more places, and the DevTools flag double renders. Nothing needs action to
upgrade.
Added
- Server-rendered Lit works in the dev server. With
@lit-labs/ssrin your Vite server, an edit patches hydrated components in place and the next server render uses the new code instead of failing because the tag is already defined. A?css-sheetrenders into the declarative shadow root, so the page arrives styled, and its edits restyle hydrated components. Adefer-hydrationcomponent edited before it wakes renders the new template, and a page whose HTML predates an edit renders that component once in the browser instead of failing to hydrate. The new SSR guide shows the setup, and Troubleshooting covers the dock’s socket in middleware mode. - The Components tab shows hydration state. A server-rendered component
is marked deferred while
defer-hydrationholds it back, not hydrated until its first update, and SSR the moment it hydrates, in the tree and the details pane. - An SSR example, on StackBlitz too. Open it from the README or the docs’ Demos page: the counter arrives as server HTML, hydrates, and keeps its count through an edit, with the DevTools dock connected.
- Server-rendered pages in production builds, with the Lit panel. The SSR
guide and example cover a production build served without Vite: shared
?css-sheetstyles arrive inlined, and the Lit panel attaches throughlit-devtools devwith each element’s hydration state. - The Lit panel works without Vite DevTools. With
timeline: trueand noDevTools(), the dev server serves the panel at/__lit/and prints its address, instead of only warning that the panel never mounted. - A Lit tab in the Elements panel. The browser extension adds a Lit tab to the Elements sidebar, beside Styles and Computed, showing the properties, state, slots, parts and source links of the Lit element you select there.
- Double renders are flagged. An update that a component’s own previous
update scheduled, usually because
updated()set a property, is marked re-rendered in the Updates tab and2×in the Timeline list, andlit_update-summaryreports it asselfCaused. The Components tab’s Warnings count how many times the recording shows an element re-rendering itself, also under a production build. - The Components tab counts dispatched events. With the Custom events layer on, a Dispatched section lists how many times the selected element dispatched each event type during the recording.
- Properties show which class declared them. For a component that extends a base class or uses mixins, the Properties and State tables group their rows under the declaring class, the element’s own first.
- Component docs include members from your mixins. For a component
written as
extends Sized(Base), the Components tab lists what your project’sSizedmixin adds, marked as inherited from it, and still reachesBasepast a package mixin such asSignalWatcher. - Agents can set component properties. The new
lit_set-proptool sets a reactive property, or a field inside the object it holds, on a live element and answers with the element’s details afterwards. Agent edits land as overrides in the panel, where you can switch them off or clear them. - Lit Inspector can pause on an update or a property change. Arm update or render on the selected element, or the pause toggle on one of its properties, and the page stops in the debugger when it happens.
- Lit Inspector finds more Custom Elements Manifests. When a page links
none, the Lit tab looks for every
custom-elements.jsonbeside the page’s scripts and offers them, so Web Awesome’s docs show component documentation with one click. Manifests on another site, such as a CDN, work once Chrome is granted access to it, through an Allow access button for a linked one. - Choose the manifests Lit Inspector reads. The Settings tab’s Component
docs section lists the page’s linked manifests, the ones found and the ones
you add by URL, such as
/dist/custom-elements.json. Each can be switched off, ignored and reset, or moved up and down; the first switched-on one that describes a component supplies its docs. - The extension shows where an element is rendered. On a page without the Vite plugin, the details pane’s rendered row names the template tag that created an element, found by the template’s text in the page’s sources, and in Chrome a click opens it in the Sources panel.
- Read component docs without hovering. Turn on “inline descriptions” under Components in the Settings tab, and every documented property, attribute, slot and part shows its description under its row.
unoSheet()works with presetWind4. Passpreflights: trueto keep Wind4’s theme variables and@propertyrules in the shared sheet; drop the reset at the preset withpresetWind4({preflights: {reset: false}}).- Context consumers waiting for a provider say so. A subscribing consumer that no provider has answered yet reads “waiting for a provider” instead of linking to a provider that never answered it, and links as soon as a ContextRoot replays its request.
Changed
- The Settings tab no longer lists env var names. Hints name the plugin option alone, the reset button reads “Reset overrides”, and a value set from the environment still shows its “(env)” badge.
Fixed
- Hiding the panel clears what it drew on the page. Collapsing the dock, closing DevTools with the browser extension, or closing a panel opened as its own tab now takes down the anatomy overlay, hover outline and breakpoints and stops Live, instead of leaving them until the page reloads. The overlay comes back when the dock opens again.
- Slotted context consumers link to the right provider. A consumer slotted into a component whose shadow tree provides the context now links to that provider, instead of to none or to one further out.
- A provider’s details follow a value set directly. Setting a context
provider’s value with
setValue, without its host updating, refreshes the selected provider’s row right away instead of on its next update. - A component whose constructor threw is no longer called “not Lit”. The Components tab marks it not upgraded and says its constructor probably threw, instead of claiming another library defined it.
- The Anatomy “not rendered” list follows the page. A light child added with a slot name the element doesn’t have, or renamed to one, shows up without reselecting the element.
- The Updates tab’s equal-content badge shows its icon again. The badge that flags a property changed to a new reference with equal content rendered as a bare number.
lit-devtools mcpfinds dev servers behind your own HTTP server. When Vite runs in middleware mode with your server passed in, the plugin registers that server’s real port instead of probing 5173 and warning that discovery is unavailable.
0.20.0
The plugin now runs in Astro. lit() server-renders and hydrates Lit
components with no other renderer, and litDevtools() brings hot patching and
the Lit panel, opened from Astro’s dev toolbar. The Components tab reads
hydration as a state and stops labelling other libraries’ elements. The
DevTools now warn when the Lit Inspector extension and the plugin share a page,
and both work there. Nothing needs action to upgrade.
Added
- The plugin runs in Astro, with the Lit panel in the dev toolbar. Add
litDevtools()from@oddsquad/vite-plugin-lit/astroto your integrations: Lit components hot-patch in place, hydrated or not, and the Lit logo in Astro’s dev toolbar opens the panel on the page you are on.LIT_PLUGIN_TIMELINE=falseturns the panel off, and thetimelineoption wins over it. - Lit components render and hydrate in Astro with no other renderer.
lit()from@oddsquad/vite-plugin-lit/astroserver-renders Lit components, hydrates them with their array and object props, keeps adefer-hydrationyou wrote until you remove it, and needs no hydrate imports in your pages. Components nested in another’s shadow root hydrate after a view transition too. - Resize the Lit window in Astro’s dev toolbar. Drag the grip in its top corner to make it bigger or smaller; the size sticks across page loads, and a double click on the grip resets it. The window lines up with where the toolbar is docked.
- The DevTools warn when two runtimes share a page. With the Lit Inspector extension enabled on a dev server that already runs the plugin, the console and the Components tab now say that two runtimes are loaded and that the extension should be off for that site, instead of the picker silently doing nothing.
Changed
- Hydration state reads as a state. A server-rendered component that has hydrated is now marked hydrated instead of SSR, and deferred, not hydrated and hydrated show as pills in the Components tree and details, with a drop icon that is empty until the element hydrates and filled once it has.
- Custom elements from other libraries sit in the tree unmarked. The muted not Lit chip is gone from their rows and the details head, so wrappers like Astro’s islands no longer crowd the tree with labels; the details pane still says why they have no properties.
- A component that never upgraded shows one chip, not two. One the server rendered was marked both not upgraded and not hydrated, as if hydration were still coming; it now carries only not upgraded, whose tooltip says it still shows the HTML the server sent.
Fixed
- The Lit Inspector extension works on a dev server that runs the plugin. Enabled for such a site, Pick did nothing and threw in the console, and Vite DevTools lost the page. The extension’s runtime now serves the page and the plugin’s shares it, so both panels show the tree and Pick works from either.
- The link printed with the DevTools code opens the Lit panel. Without the
Vite DevTools hub, the
#devframe_otplink in the terminal opened your app instead of the panel at/__lit/, so you had to type the code; it now opens the panel, approved. - The Lit panel connects on StackBlitz without Vite DevTools. In a
WebContainer the panel the plugin serves at
/__lit/used to be refused by its own socket and never show the page; it now admits StackBlitz’s origins.
0.20.1
A patch of fixes: the Lit tab in Firefox DevTools works again after opening blank since 0.19.0, server-rendered elements hydrate with the source overlay on, and closing a panel tab always clears what it drew. Nothing needs action to upgrade.
Fixed
- The Lit tab works in Firefox DevTools again. Since 0.19.0 it opened blank in Firefox; it now shows the site’s status and the inspector once the site is enabled.
- Server-rendered Lit elements hydrate with the source overlay on. An element whose template renders another custom element no longer re-renders in the browser with a warning about an edit that never happened, in Astro or any other server rendering.
- Closing a panel tab always clears what it drew on the page. The anatomy overlay, outline and Live mode no longer outlive a panel tab that closed too fast to say so, or crashed.
- The panel stops filling the console with warnings. Opening it no longer
prints Web Awesome’s
size="small" is deprecatedwarnings, and a panel in a tab of its own, at/__lit/or in Firefox’s DevTools, no longer warns that the in-page channel has no handshake targets.
0.21.0
Lit Inspector now opens sources in your editor: on a page a Vite dev server serves, even without the plugin, a component’s defined and rendered links open the file. Locations read shorter everywhere, by package and version or relative to the project, and a library’s component names the module its manifest gives. The panel also follows sites that swap in a new page body, such as webawesome.com. Nothing needs action to upgrade.
Added
- The extension opens sources in your editor on a Vite dev server. On a
page Vite serves, with or without the plugin, the defined and
rendered links open the file in your editor instead of only in Chrome’s
Sources panel, and work in Firefox too. They use the plugin’s endpoint when
it serves one, else Vite’s own
/__open-in-editor, under the page’sbase. When the extension can’t tell where the project is on disk, the bottom of the Lit tab says so and offers Set project folder… for the site.
Changed
- Locations in dependencies name the package. A component from a
package reads as its name, version and path inside it, such as
@awesome.me/webawesome 3.14.0 › dist/chunks/chunk.js:11, instead of five lines of pnpm store path; the full path is in the tooltip. - A package’s component names its module. When the package ships a Custom
Elements Manifest, defined reads as the module and class it names, such
as
components/card/card.js (WaCard), instead of a bundler chunk. That holds in the Vite panel and, for a manifest read from the site, in the extension. - Project files read relative to the project. A location given as an
absolute path, such as Astro’s for an element in
.astromarkup, readssrc/pages/basics.astro:26, in the Vite panel and in the extension on a Vite dev server; the full path is in the tooltip.
Fixed
- The panel follows sites that swap in a new page body. On a site that navigates with Turbo Drive, such as webawesome.com, the Components tree updates as you follow links, and the hover outline, update flashes and element picker keep working.
- Lit components with a closed shadow root show their children. The Components tree lists what such a component renders, and Live follows changes inside it, as the anatomy view already did.
- Elements written in
.astromarkup show where they are rendered. The rendered link, the source overlay and timeline events now point at the.astrofile and line, where before those elements had no location at all. - The extension finds a decorated component on a Vite dev server. On a
page Vite serves without the plugin, defined pointed at the compiler’s
decoratehelper instead of the file that declares the class.
0.22.0
The Lit DevTools now run in any server. createLitDevtools() serves the
panel from your app’s own origin, without Vite or a second port, and docks it
in a drawer along the bottom of the page. An Elysia example puts it next to
server rendering on Bun, and a forms example shows form-associated elements
with :state(). The panel takes its colours, type and code font from the Lit
Design System, and agents can read the docs as Markdown. Nothing needs action
to upgrade.
Added
- The Lit DevTools in any server.
createLitDevtools()from@oddsquad/vite-plugin-lit/devframegives a server without Vite (Elysia, Hono,Bun.serve, a SvelteKit or Next.js route) one request handler for the panel, its page script and its RPC on the app’s own origin, with nolit-devtools devprocess or second port. - The panel docks in the page. With
createLitDevtools(), a Lit button in the corner opens the panel in a resizable drawer along the bottom of the page, and picking an element opens it there instead of in another tab. It reopens as you left it; passdock: falseto keep it a tab. - An Elysia example, without Vite. A guestbook that Elysia renders on Bun
with
@lit-labs/ssr, streams, hydrates and keeps live over a WebSocket, with a form that works before it hydrates. It shows the hydration traps to avoid, attaches the standalone Lit DevTools, and builds into a single executable. - A forms example. A text field, a switch and a star rating extend one
FormControlbase class and work in a plain<form>: they submit withFormData, block submit while invalid, reset, and follow a disabled fieldset. Each shows what it is doing as:state()custom states for CSS to style on. - Every docs page has a Markdown copy. Append
index.mdto a page’s address, follow itsrel="alternate"link, or sendAccept: text/markdownto get the page as Markdown, with Link headers pointing to llms.txt and the sitemap. - An agent skill for the plugin. Agents that read Agent Skills Discovery
find it at
/.well-known/agent-skills/on the docs site: setup, CSS delivery, hot-patch failures and the DevTools MCP server in one file. - A setup prompt for coding agents. The Installation page has a prompt to copy into your agent; it installs the plugin, adds it to the Vite config and registers the types, then lists what it changed.
- Browser agents can search and read the docs through WebMCP. In a
browser with WebMCP, the docs offer
search_docs,read_docs_pageandopen_docs_pagetools.
Changed
- The panel takes the Lit Design System’s theme. Its colours, focus ring, motion and type scale come from the same tokens as the docs, in both colour schemes. Corners stay square; pills, status dots and the Timeline’s layer chips are round.
- The panel sets code in Lilex. Values, source locations, timings and the Timeline’s lanes use the Lilex monospace instead of the system one.
- The Updates count no longer looks like an error. The number on the Updates tab is blue instead of red; the orange count on Components still flags Lit warnings.
- A lighter split between the tree and the details. The divider in the Components view is a hairline that lights up blue under the pointer, and is just as easy to drag.
- The docs moved to lit-devtools.oddsquad.dev. Links in the DevTools panel, the README and the extension listing point there, and the old oddcelot.github.io/vite-plugin-lit/ addresses redirect.
Fixed
- A re-created child keeps its own listeners and lookups. When a parent
edit makes Lit re-create a child,
#privatearrow-function listeners and fields the child sets inconnectedCallback, such as a form it looks up, stay the new element’s instead of being overwritten by the old one’s. - Dark outlines and nulls are legible. In the dark scheme, unchecked
switches, inputs and outlined buttons have a visible outline, and
nullvalues in the Properties view no longer fade into the background. - The
./buildand./astro/*exports have types on JSR. JSR no longer warns that these entry points have no type declarations, and installing the package from JSR types them like the others.
0.23.0
The Components panel now shows what a component keeps to itself: its
#private fields, readable and editable under the dev server, and the custom
states, form value and validity of a form-associated element. The tree no
longer has a Live switch; it stays live, holds still under the pointer and
paces itself on busy pages. The panel’s rows, colours and fields got easier
to read and hit, and the docs run the examples live beside the panel. Nothing
needs action to upgrade.
Added
- The Components panel shows and edits a component’s
#privatefields. Under the dev server, a Private section after State lists each native#privatefield as#namewith its live value. A string, number or boolean has the same edit button as a property, kept as an override you can switch off, pin across reloads or remove, and the component re-renders with it. Agents read them throughlit_component-detailsand set them throughlit_set-prop. They come from thehmr.privateFieldsrewrite, so turning that off hides them. - The Components details show custom states and form values. An element
that calls
attachInternals()gets an Internals section with the states:state()matches, the value it last passed tosetFormValue(), and its validity and validation message, kept live as they change. Agents read the same throughlit_component-details. - Try the examples live in the docs. The Demos page opens flame, Web Awesome, Fernhouse, CSS, Tailwind, Forms and the tutorial’s app running in your browser with the DevTools panel under them, with nothing to boot and a zoom control; StackBlitz is one switch away for editing their files.
Changed
- The live component tree keeps up with busy pages without slowing them. A page that changes constantly still gets a fresh tree every so often, rebuilds space themselves out by how long the last one took, and none run while the Timeline is recording.
- The Components toolbar sets Pick apart from the switches. Pick is a crosshair beside the tag filter, and Flash and Anatomy, which stay on until you turn them off, sit together as one group at the right.
- Tree and list rows are easier to hit. Rows in the component tree and the timeline list are 24px tall, the minimum target size WCAG asks for.
- Element references and functions no longer share a colour. Tags and element refs are teal, functions stay blue, in both colour schemes.
Fixed
- A link to a component opens its details even before the page is ready.
Opening the panel on
#tab=components&component=Nbefore the page connected, or before its components defined, no longer shows “This element is no longer in the page” for an element that is there. - Settings’ About shows the page’s Lit even when opened first. A panel opened on the Settings tab before the page connected said “lit: not detected” until the tab was reopened; it now lists the page’s Lit packages as soon as the page connects.
- Disabled fields no longer pass for empty ones. A disabled select or input is dimmed, filled and dash-outlined with a not-allowed cursor, and the tags of a multi-select read as live rather than greyed out.
- The Lit tab’s footer buttons work in a narrow panel. A long notice no longer covers its own “Don’t show again” or “Not now”: the text is cut short instead, and shows whole when you hover it.
Removed
- The Components tab’s Live toggle is gone; the tree is always live. It stays still while the pointer is over it, so the row under the pointer does not move, and catches up when the pointer leaves. A tree paused in an earlier version comes back live.
0.24.0 Latest
Your components now describe themselves: the plugin writes a Custom Elements
Manifest from your sources, in the build, the dev server or from
lit-devtools manifest, and the details pane reads more of what a component
declares, dispatches and inherits. A language server brings the same
knowledge to your editor, and @oddsquad/lit-devtools installs the plugin,
the server and its Oxlint rules as one package. Nothing needs action to
upgrade.
Added
- Generate a Custom Elements Manifest from your components. Set
manifest: trueandvite buildemitscustom-elements.jsonbeside the bundle, the dev server serves it live, andwritekeeps a copy in the project for editors and Storybook, with no separate analyzer to set up. lit-devtools manifestwrites a Custom Elements Manifest from the command line. It reads every script undersrcand writescustom-elements.json, ready for aprepublishOnlyscript or CI. It uses your Vite config’s aliases, and in a project without one resolves imports the way Node and TypeScript do,tsconfig.jsonpaths included.- A language server for Lit components.
@oddsquad/lit-language-servercompletes your components’ tags, attributes, properties and events in templates, shows their docs on hover, types event handlers and reports one that doesn’t fit its event, in Zed or any LSP editor. Configure it withlitPlugin({languageServer}). - Install everything as
@oddsquad/lit-devtools. One package brings the plugin (@oddsquad/lit-devtools/vite,/astro), the language server and the Oxlint rules (/oxlint); the separate packages stay for a project that wants one part. - Components inherit docs from the library elements they extend. A component built on, say, Web Awesome’s badge now lists the badge’s properties, slots and events in the details pane, read from Web Awesome’s own Custom Elements Manifest.
- Components show the events they dispatch, even without
@fires. An event your class sends withthis.dispatchEvent(new CustomEvent('pick'))now appears under Events in the details pane, typedCustomEvent. - The manifest says what each event carries. An event dispatched as
new CustomEvent('add-to-cart', {detail: {id: this.productId}})is listed asCustomEvent<{id: string}>, also when a@firestag documents it without a type. - Component docs read
@attr,@prop,@defaultand@tag. JSDoc written for the Custom Elements Manifest analyzer now shows in the details pane: attributes and properties the code doesn’t declare, defaults it doesn’t initialize, and the tag of a class registered elsewhere. - Components show the defaults their constructor sets. A
this.variant = 'neutral'in the constructor now shows as the default ofvariantin the details pane, even when the property comes from a library base class such as Web Awesome’s. - Vanilla custom elements show their observed attributes. An element
that lists
static observedAttributes = ['mode']now showsmodeunder Attributes in the details pane, described by an@attrtag if it has one.