Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Snapshots

Copy any element from a web page, frames from Figma, or an image onto a canvas to iterate on.

A snapshot is an element from another page, such as your production app or a page on localhost, pasted onto a canvas with its markup and styles. You can comment on it, wireframe over it and ask the agent to change it.

Install the extension

Snapshots come from the Dex Snapshot extension for Chrome, Edge, Arc or Brave. Run this to print the extension’s folder:

npx dex extension

Open chrome://extensions, turn on Developer mode, choose Load unpacked and pick that folder.

Copy an element

  1. On any page, click the extension, or press Alt Shift S.
  2. Point at an element. Press ↑ and ↓ to move to its parent or child.
  3. Click, or press Enter, to copy it. To copy an element with a menu open, Shift-click instead, then open the menu within three seconds.
  4. Click a canvas in Dex and press ⌘ V.

The snapshot goes in the cell nearest your pointer, or in a Snapshots section when the pointer isn’t over the canvas. Dex doesn’t need to be running while you copy.

To send feedback on the extension, right-click its icon and choose Send feedback.

What a snapshot keeps

Each snapshot is a view, snapshot-<site>-<what>.tsx, with its own scoped CSS. It keeps:

  • Styles: each element’s styles that differ from the browser’s defaults, and the page’s colour variables
  • States: hover and focus styles
  • Layout: widths, margins and grids as the page set them, so the snapshot reflows when you resize its frame
  • Motion: CSS animations and transitions
  • Menus: submenus that open on hover or focus, and buttons marked aria-expanded that open and close a panel

A snapshot has none of the page’s scripts. Links go nowhere, forms send nothing, and iframes become empty boxes. Images and fonts still load from the original site. Media queries aren’t kept, so a snapshot has the styles of the width you copied it at.

Menus that a script builds only when they open aren’t on the page while closed, so open the one you want before you copy.

Paste from Figma

Copy frames or layers in Figma, click the canvas and press ⌘ V. Each layer becomes a snapshot built from Figma’s data, not a picture:

  • Auto layout becomes flexbox
  • Fills, strokes and effects become CSS colours, gradients, borders, shadows and radii
  • Text keeps its fonts and styles, loaded from Google Fonts when they’re there
  • Vectors become SVG
  • Variables bound to colours become CSS variables
  • Images are saved in the file’s images/ folder
  • Layout grids show when the grid is on
  • Layer names become data-name attributes

Paste an image

Paste or drop a PNG, JPEG, GIF, WebP or SVG onto a canvas. Each image becomes a snapshot at its own size, saved in the file’s images/ folder.

Iterate on a snapshot

  • Change it: comment on it and post to the agent, which edits the snapshot’s markup and CSS
  • Rebuild it: choose Rebuild with our components in the frame’s menu. The agent builds a new view from your design system, matching the snapshot’s layout and content, in a row below.

Use snapshots of other companies’ pages for reference only. Keep them out of anything you ship.