Feature tour
See every feature of the plugin running, each next to the guide that sets it up. Everything on this page is live: the figures are the plugin’s own UI, not screenshots.
Hot patching that keeps state
Section titled “Hot patching that keeps state”Save a component and the page stays put. A hot patch is an edit applied to the running page without a reload: the plugin updates the class in place, so every element keeps its state. The indicator in the corner of the page pulses green when a patch lands. Click the figure to replay the pulse.
On by default. Guide: Keep state across edits.
One stylesheet for every shadow root
Section titled “One stylesheet for every shadow root”Import a CSS file with ?css-sheet and every component that imports it
adopts the same CSSStyleSheet. Save the file and the plugin swaps that
sheet’s text: every shadow root restyles in place, nothing re-renders, and
the page keeps its state. Without it, saving the CSS reloads the page.
On by default. Guide: Share one stylesheet with ?css-sheet.
Open a component’s source from the page
Section titled “Open a component’s source from the page”Hold the shortcut and point at any element. The overlay outlines the component and names the file and line that declares it and the one that renders it. Click to open either in your editor.
Turn on: sourceOverlay option. Guide: Open a component in your editor from the page.
Inspect live components
Section titled “Inspect live components”The DevTools panel lists every Lit element on the page as a tree. Select one to read and edit its properties, state and controllers while it runs. This is the whole panel, inspecting a small cart above it.
Turn on: the timeline option, with Vite DevTools. Guide: Set up the DevTools panel, then Inspect live components.
Read every component’s documentation
Section titled “Read every component’s documentation”Select an element and the details pane shows what its author wrote: a summary, what each property is for, the events it fires, its slots, parts and CSS custom properties. The cart above is documented by a Custom Elements Manifest it links. Your own components need none: their JSDoc is read from source as you edit.
- Your componentssrc/user-card.ts
/** * A user's avatar and name. * @fires select - The card was chosen. * @slot - Extra details under the name. * @csspart avatar - The image. */Read from source while you edit. No manifest needed.
- Librariesnode_modules/…/package.json
"customElements": "custom-elements.json"Found through each dependency. Web Awesome comes documented.
- Any siteindex.html
<link rel="custom-elements-manifest" href="/custom-elements.json">Lit Inspector reads the manifests a page links.
- Components tab
- Lit Inspector
- Your coding agent
The same docs reach Lit Inspector and, through the lit_component-docs MCP
tool, your coding agent.
Guide: Read a component’s documentation.
See every update and its cause
Section titled “See every update and its cause”The Updates tab counts each component’s updates and shows what changed in each, with the time it took.
Guide: Updates.
Read a session on one timeline
Section titled “Read a session on one timeline”Record a session and the Timeline puts every render, property change, patch and custom event on one time axis, in tracks or as a list.
Guide: Record and read the timeline.
Give your coding agent the page
Section titled “Give your coding agent the page”The same component tree and timeline are MCP tools. An agent asks which components re-rendered and why, and reads the answer from the running page instead of guessing from the code.
Guide: Connect a coding agent.
Inspect sites you don’t serve
Section titled “Inspect sites you don’t serve”Lit Inspector is the same panel as a browser extension. It works on production builds and on any Lit site, with no Vite and no plugin.
In Chrome it also adds a Lit tab to the Elements panel, beside Styles and Computed. Select any node there and the tab shows the Lit element at or around it. Below, the Elements tree is drawn from the cart’s real DOM and the Lit tab is the real panel, following it.
Guide: Inspect any site with Lit Inspector, and its section on the browser’s own panels.