This guide is written for people who are new to VS Code.
By the end, you will:
- Open a folder correctly (this matters)
- Open Live UI Editor
- Choose what to edit from the Detected main + Other detected targets lists
- Make a small change and verify it updates your code
Live UI Editor shows a preview of your UI inside VS Code. You can click elements and visually change things like:
- Text
- Color
- Spacing (padding/margin)
- Typography
Then Live UI Editor tries to write those changes back into your real project files.
There are two workflows:
- Static HTML Mode: edit a single
.htmlfile (no dev server required). - App Mode: connect to a running dev server (Vite / Next.js / etc.), then stage edits and click Apply to Code.
If you're not sure which one to use, start with Static HTML Mode.
Live UI Editor needs a folder open so it can find your project files.
- In VS Code, click File > Open Folder...
- Choose your project folder
- Click Select Folder
- The Explorer panel (left side) shows folders/files.
- The window title shows the folder name.
- Click the Explorer icon on the left sidebar (it looks like two files), or
- Press
Ctrl+Shift+E
- Open the Command Palette:
- Press
Ctrl+Shift+P
- Press
- Type:
Live UI - Click Live UI: Open
- A new tab opens with the Live UI Editor Welcome / Quick Start screen.
- The Welcome screen auto-detects your workspace and shows a loading spinner while scanning.
On the Welcome screen you'll see something like:
- Detected main: the extension's best guess of what you probably want
- Other detected targets: other valid choices (apps, previews, HTML entrypoints)
Pick the one you want.
- If you see an HTML entrypoint you recognize (like
index.html), choose that for a quick win. - If you see an App/dev server choice, that's for App Mode.
Use this if you have an .html file.
- Choose an HTML entrypoint target
- Wait for the preview to load
- Click an element in the preview
- Make one small change (for example: change text, or adjust padding)
- The preview updates.
- Your
.htmlfile changes in VS Code (often shown by a dot on the file tab).
Open the .html file and look for changes like:
- Updated text inside an element
- Updated
style="..."attributes
Use this if your project is React/Vite/Next/etc.
App Mode requires your app to be running.
- Open the Terminal: click Terminal > New Terminal
- If needed, install dependencies:
npm install - Start the dev server (commonly):
npm run dev - Wait for a local URL to appear in the terminal (often
http://localhost:3000orhttp://localhost:5173) - In Live UI Editor, choose the detected App/dev server target
- Make edits, then click Apply to Code to write changes into source files
- The preview shows your real app.
- Clicking elements selects/highlights them.
- After Apply to Code, files like
.jsx/.tsxupdate.
Once you have a preview open, the toolbar gives you access to several tools:
| Panel | What it does |
|---|---|
| Inspector | View and edit every computed CSS property of the selected element |
| Element Tree | Browse and search the full DOM tree; click to select |
| Diff Preview | See a before/after diff of your HTML changes |
| CSS Cascade | View the full cascade of CSS rules for the selected element |
| Responsive Bar | Switch viewport to Mobile / Tablet / Laptop / Desktop breakpoints |
When an element is selected, you'll see toolbar buttons for:
- Insert - add a new element after the selection
- Duplicate (
Ctrl+D) - clone the selected element - Wrap (
Ctrl+G) - wrap the selection in a<div> - Delete (
Delete/Backspace) - remove the selected element
All operations support undo (Ctrl+Z) and redo (Ctrl+Shift+Z).
Live UI Editor can write back different kinds of changes:
- Text edits: double-click text and type. (Works best when the element can be mapped to source.)
- Style edits: color/spacing/typography changes are written using the chosen Style Target strategy.
- Layout edits:
- Static HTML Mode writes layout directly into the HTML.
- App Mode layout can be Off / Safe / Full (see App Mode page).
- Element CRUD: insert, duplicate, wrap, and delete operations are applied to the HTML source.
Live UI Editor includes a chat participant you can use in VS Code's Copilot Chat:
- Open Copilot Chat (
Ctrl+Shift+I) - Type
@ui-wizardfollowed by your question - The wizard can help scaffold UI, explain layout, and suggest design improvements
- In App Mode, your dev server must be running and reachable.
- If Apply-to-Code seems flaky, enable Stable IDs (App Mode sidebar).
- If you're unsure what to run, use Copy Copilot prompt on the Welcome screen.
If the Welcome screen shows "No folder open" or detection is empty:
- Repeat Step 1 (open a folder)
- Confirm the folder contains your project files
- For App Mode, start your dev server and keep it running
Then open the Troubleshooting page.