Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Artboard InspectorNew to Visual Studio Code? Get it now.
Artboard Inspector

Artboard Inspector

Nguyen Thai

|
16 installs
| (1) | Free
View and inspect design files inside VS Code — Adobe XD (.xd) and Figma local copies (.fig): artboards, layers, sizes, spacing, colors, fonts and CSS. Works offline.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Artboard Inspector

Selecting a layer and measuring the gap to its neighbour

Open Adobe XD (.xd) files and Figma local copies (.fig) in VS Code and inspect them like a developer handoff tool.

  • Artboard list with filter, layer tree, zoom/pan canvas
  • Click a layer to see position, size, fill, border, radius, shadow, typography, generated CSS and Tailwind classes; click any value to copy it
  • With a layer selected, hover another one (or the artboard background) to see the spacing redlines
  • Board view: every artboard at its position in the file, inspect and measure across artboards
  • Search the text and layer names of every artboard, Japanese included
  • Save embedded images as they are stored, export any layer as SVG or as PNG at 1x/2x/3x
  • Overlay a screenshot of the implementation on an artboard to compare the two
  • Compare two versions of a design: changed, added and removed artboards and layers, with before → after values
  • Reloads automatically when the file changes on disk
  • Fully offline: the file is unzipped and rendered locally, nothing is uploaded

Inspecting a text layer: typography, insets to the parent and CSS

Board view

Switch the toolbar from Artboard to Board (or press B) to see every artboard of the file where the designer placed it — one board per Figma page (pick it in the toolbar), one board for an XD file. Click any layer on any artboard to inspect it, hover another layer or artboard to measure the distance (also between artboards), and double-click an artboard or its title to open it on its own. Clicking an artboard in the list flies to it. Only artboards near the screen and large enough to read are drawn in full, so files with hundreds of artboards stay responsive.

Board view: measuring from a layer in one artboard to a layer in another

Tailwind classes

Next to the CSS, the inspector lists Tailwind CSS v4 classes for the selected layer, written from the same values. Default-theme utilities are used only when they give exactly the design's value (size-10, rounded-xl, text-sm for 14px/20px, font-bold, tracking-wide; lengths on the 4px grid). Anything else, and every color, shadow and gradient, is an arbitrary value (w-[191px], text-[#CA4343], shadow-[0_2px_8px_rgba(0,0,0,0.08)]). A project's own Tailwind theme is not read.

Search

Press Cmd+F (Ctrl+F on Windows/Linux) or click the search box at the top of the sidebar and type part of a text or a layer name. Matching ignores case and character width — ABC finds abc, ガイド finds ガイド — and line breaks. Each result shows the layer, the text around the match and its artboard; choosing one opens that artboard, selects the layer in the canvas, the layer tree and the inspector. The first 200 results are listed.

Key (search box) Action
↓ / ↑ Move through the results
Enter Open the result; again for the next one (Shift+Enter: the previous one)
Esc Clear the search; again to leave the box

Export

Select a layer (in either view) and use Export at the bottom of the inspector:

  • Save image — shown for layers filled with an embedded image: the image exactly as stored in the design file (PNG, JPEG, GIF, WebP or SVG).
  • Export SVG — the layer on its own, cropped to what it paints including strokes and shadows. Images are embedded as data URIs and text stays text, so the fonts must be installed wherever the SVG is opened.
  • Export PNG 1x / 2x / 3x — the same drawing rendered at that scale (name@2x.png), up to 16384 px per side.

VS Code asks where to save, starting in the design file's folder with the layer name. A layer is exported without its parents' opacity, masks and shadows.

Compare with a screenshot

Click Overlay in the toolbar and pick a PNG, JPEG or WebP screenshot, paste one with Cmd/Ctrl+V, or hold Shift while dropping an image file on the canvas (without Shift, VS Code opens the dropped file itself). It is drawn over the artboard from its top-left corner and follows zoom and pan, and layers can still be inspected and measured through it. In the bar below the toolbar, set the Scale of the capture (image pixels per design pixel; 2x/3x for retina screenshots, guessed from the image width), the opacity, the Difference blend (pixels that match turn black), hide or remove it. While it is shown, the arrow keys nudge it by 1 px (Shift: 10 px) and the bar shows the offset. Each artboard keeps its own screenshot until the editor is closed; nothing is written to disk. Screenshots over 50 MB are refused, and the board view shows no overlays.

Compare versions

When a revised file arrives, click Compare… in the toolbar and pick the earlier version (.xd or .fig). The open file is the current version; Swap turns that around and Exit leaves compare mode. Artboards are matched by id, then by name (a name used more than once is not matched); layers by id, then by name under a matched parent.

  • The artboard list counts the changed layers of each artboard and marks New and Removed artboards (removed ones are listed last and open as the earlier version); Changed only hides the rest. The board shows the same badges on the artboard titles.
  • On the canvas, added layers are outlined in green, changed ones in amber, and removed ones are dashed ghosts where they were. Before / After (or `) shows the other version of the artboard at the same zoom, with the same layer selected.
  • The inspector lists the changes of the artboard (click one to select it) and, for a layer, each changed property as before → after: text, position and size, rotation, opacity, fill, image, border, radius, shadow, typography, visibility, the outline of a path, and the name.

Values are compared the way the inspector shows them (lengths to 0.01 px, colors as hex and alpha), so nothing is reported that the inspector shows as equal. Positions are compared in artboard pixels, but a group that moved together with all its layers is marked once, on the group (a frame by its own box); its layers are marked only where they moved by a different amount. A group sized by its layers reports no size of its own. Layers inside an added or removed group are part of that change. Images are compared by their content. The width of positioned XD text depends on the fonts installed, so it is not compared; its content and typography are.

The other file is opened with the same limits as any design file. Comparing stops after 250,000 layers per file (the artboards left out are marked), and up to 1,000 changes are listed per artboard.

Figma files (.fig)

In Figma choose File → Save local copy… and open the downloaded .fig file in VS Code. Every top-level frame (also frames inside sections) becomes an artboard, listed as Page / Section / Frame. The file is decoded and drawn locally — no Figma account, token or network access is needed.

Build from source

Requires Node.js 22.18 or later (the tests and scripts run TypeScript directly) and pnpm 10.

corepack enable                    # provides the pnpm version pinned in package.json
pnpm install
pnpm package                       # runs all checks, writes artboard-inspector-<version>.vsix
code --install-extension artboard-inspector-0.4.0.vsix

Releasing

  1. Bump version in package.json and add a matching ## <version> section to CHANGELOG.md; merge to main.
  2. Push a tag v<version> (e.g. git tag v0.3.0 && git push origin v0.3.0). The Release workflow checks that the tag matches package.json, runs pnpm check and pnpm package, and creates a GitHub Release with the .vsix attached and the CHANGELOG section as notes, then publishes that .vsix to Open VSX (secret OPEN_VSX, an Open VSX access token). An existing release can be published to Open VSX with the Publish to Open VSX workflow (Actions → Run workflow, with its tag).
  3. Download the .vsix from the release and upload it to the Marketplace by hand.

Shortcuts (canvas focused)

Key Action
Scroll / trackpad Pan
Ctrl/Cmd + scroll, pinch Zoom at the cursor
Space + drag, middle drag, drag outside the artboard Pan
B Switch between Artboard and Board view
+ / - Zoom in / out
1 100%
0 Fit artboard (Board: fit the whole board)
W Fit width
Esc Select the parent layer (Board: then the artboard, then nothing)
Arrow keys, Shift + arrow keys Nudge the overlaid screenshot by 1 px / 10 px
` Compare mode: switch between the earlier and the current version of the artboard
Double-click (Board) Open that artboard on its own

Limitations

  • Text is drawn with the fonts installed locally. Fonts the design uses but this machine lacks are listed as "not installed" in the inspector; XD's Windows fallback fonts (Yu Gothic UI) are approximated with proportional Japanese metrics.
  • Files larger than 300 MB, or with more than 50,000 layers per artboard, are refused or cut off (with a notice) to keep VS Code responsive.
  • Search reads the first 5,000 characters of each text layer and stops after 250,000 layers or 5 million characters per file; the result count then says how many artboards were searched.
  • Blur and background-blur effects are not rendered (listed under "Not rendered" in the artboard inspector).
  • Figma: layers are redrawn from the file, so they can differ slightly from Figma itself. Layers with several fills show only the top one, angular/diamond gradients are drawn as radial ones, and FigJam objects (stickies, widgets) are listed as unsupported. Only .fig local copies are read — Figma links are not.

Development

pnpm watch                            # rebuild on change, then F5 in VS Code to launch the extension host
pnpm check                            # type-check, lint, fast tests (node:test + happy-dom), build
pnpm coverage                         # fast tests with Node's built-in coverage report
pnpm test:e2e                         # Playwright in the installed Google Chrome against the browser preview
pnpm test:vscode                      # extension tests inside VS Code (uses the installed app if found)
pnpm smoke <file.xd|file.fig>...     # parse and render every artboard, print warnings
pnpm preview <file.xd|file.fig> <dir> [--compare <earlier>] # static browser copy of the webview for UI checks
pnpm sample <out.xd> [--earlier]      # write an original demo design (used for the screenshots above), or its earlier version
  • pnpm test:e2e checks the synthetic demo (selection, inspector values, redlines, zoom, board view, images actually decoded, exports, no console/CSP errors). To run the generic checks on your own files as well, list them in E2E_FILES, separated by : — e.g. E2E_FILES="$HOME/a.xd:$HOME/b.fig" pnpm test:e2e; set E2E_EXPORT_DIR to a folder outside the repository to keep the files those checks export. E2E_COMPARE lists pairs of versions the same way, earlier then later (E2E_COMPARE="$HOME/v1.xd:$HOME/v2.xd" pnpm test:e2e), to compare them and check the reported values against the inspector. It needs Google Chrome; no Playwright browser download is required.
  • pnpm test:vscode opens the demo .xd and a small synthetic .fig in a real VS Code and checks that the Artboard Inspector editors open them by default, and that a file posted from a webview is saved next to the design file. Set VSCODE_EXECUTABLE to use a specific VS Code build; without it and without /Applications/Visual Studio Code.app, a copy of VS Code is downloaded.
  • pnpm preview writes the design data to <dir>, and E2E_FILES runs build previews in a temporary folder; keep real designs out of the repository.

Trademarks

Adobe XD is a trademark of Adobe Inc. Figma is a trademark of Figma, Inc. This project is an independent viewer for .xd and .fig files and is not affiliated with, sponsored or endorsed by Adobe or Figma. The icon is original artwork.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft