App Mode connects Live UI Editor to your running application (usually a local dev server) and lets you edit the real UI.
In App Mode, edits are staged as Pending first. They are only written back into your files when you click Apply to Code.
You need:
- A project that can run locally (Vite/React, Next.js, etc.)
- Node.js installed
- A dev server URL that works in a normal browser (usually
http://127.0.0.1:<port>)
If you don't have a running app/dev server, use Static HTML Mode instead.
- Open VS Code's terminal: Terminal > New Terminal
- Install dependencies (only needed once):
npm install - Start the dev server (common):
npm run dev - Wait for a message that includes a local URL
- The terminal prints a URL like
http://localhost:5173orhttp://localhost:3000.
Copy that URL into your normal browser. If it loads, App Mode is much more likely to work.
- Open the Command Palette:
Ctrl+Shift+P - Run: Live UI: Open
- Choose: App Mode (dev server)
- Choose how to connect:
- Start dev server (integrated terminal) (if you want the extension to run it)
- Start dev server (external) (if you already started it)
- Use existing URL (paste your URL)
- Click Start App Mode
- A preview loads your app.
- You can click UI elements and see an overlay/selection.
App Mode has two interaction modes:
- Edit mode: selection overlays, drag/resize, click-to-code.
- Browse mode: your app behaves normally (good for login flows, menus, navigation).
Use the sidebar button to switch.
- Switch to Edit mode
- Click an element
- Make a small change (text or style)
- Look for Pending: N
- Click Apply to Code
- Pending count goes back down after applying.
- One or more source files change (often
.jsx/.tsx).
If you click Discard, pending edits are removed and nothing is written.
App Mode includes the same tool panels as Static HTML Mode:
| Panel | What it does |
|---|---|
| Inspector | View and edit computed CSS properties of the selected element |
| Element Tree | Browse the full DOM tree with search; click to select |
| Diff Preview | Before/after diff of pending changes |
| CSS Cascade | Full cascade of CSS rules for the selected element |
| Responsive Bar | Switch viewport to common breakpoints |
With an element selected you can Insert, Duplicate (Ctrl+D), Wrap (Ctrl+G), and Delete (Delete/Backspace). All operations support undo/redo (Ctrl+Z / Ctrl+Shift+Z).
Hold Ctrl+Shift and click to add elements to the selection. Press Ctrl+A to select all siblings. Bulk operations (delete, style changes) apply to every selected element.
If Apply-to-Code seems to change the wrong place (or can't find the element), enable Stable IDs.
- In the App Mode sidebar, click Enable Stable IDs
- Follow the prompts
- Restart your dev server (important)
What Stable IDs does:
- Writes a dev-only Babel plugin file into your app
- Patches your framework config (Vite/Next) so elements get stable
data-luiidentities - Makes element to source mapping much more reliable
This controls where style changes go:
- Auto: best-effort choice
- Tailwind: edits utility classes where possible
- CSS file: writes class rules into a chosen CSS file
- Inline: writes inline style props
If you're unsure, start with Auto.
- Off (safest): preview-only; nothing written for layout moves
- Safe: persists drag moves as margin adjustments (more responsive-friendly)
- Full: persists width/height/transform (advanced)
If you're just getting started, use Off or Safe.
If VS Code is connected to a remote environment:
- The Live UI Editor panel runs locally.
- Your dev server runs remotely.
App Mode routes the embedded preview through a proxy that works with port-forwarding.
If hot reload (HMR) doesn't reconnect:
- Confirm the dev server port is forwarded/reachable.
- Prefer default dev-server configs (same-origin websocket URLs usually work best).
If your app also needs a backend/API server (auth, data, etc.), App Mode can help start it via Start Backend.