Guide

How to import localhost into Figma.

Capture your local dev server, preview deploy or staging build into Figma as editable layers with one keyboard shortcut, using the Twinfig Chrome extension.

Updated

The short answer

Install the Twinfig Chrome extension and plugin, open your app on localhost in Chrome, press ⌥⇧P to capture the full page or ⌥⇧E to pick one element, then paste into the Twinfig plugin in Figma with ⌘V. The capture arrives as editable layers.

Before you start

  • Your app running locally, for example on localhost:3000
  • Google Chrome 116 or later with the Twinfig extension
  • The Twinfig plugin open in Figma

Steps

  1. Install the extension and plugin

    Add Twinfig for Chrome and the Twinfig plugin for Figma.

  2. Open your app in Chrome

    Start your dev server and open it, for example on localhost:3000 or localhost:5173. Preview deploys and staging behind SSO work the same way.

  3. Capture

    Press ⌥⇧P for the full page or ⌥⇧E to pick an element. The capture is copied to your clipboard.

    The Twinfig Chrome extension popup. Capture modes Full page, Visible area, Element and Pages; viewports As is, 1440, 1024, 768 and 390; theme As is, Light, Dark or Both; data Real or Mock; states Default or All. Beside it, a Pages picker listing 30 pages found from links and the sitemap, with a /blog/ template collapsed to 2 of 24 pages and a Capture button.
    Chrome extension: capture modesFull page, visible area, one element or several pages, at the viewports, themes and states you choose.
  4. Paste into Figma

    In the Twinfig plugin, press ⌘V. The page arrives as real layers.

  5. Keep iterating

    Recapture a frame in place after you change the code instead of starting over.

Which frameworks work

All of them. Twinfig reads what Chrome renders, so React, Next.js, Remix, Vue, Nuxt, Svelte, Astro, Tailwind and plain HTML work the same way. Apps running through the web target of Expo and React Native are detected and captured at phone widths.

Capture more than the resting state

Hover, focus, active states and open menus or dialogs can be captured and added as variants such as State=Hover. You can also capture several viewports and both light and dark themes in one run.

Automate a whole repo

The CLI can install a repo, start its dev server or Storybook, find the routes and capture each one into a bundle for the plugin.

FAQ

Questions, answered.

Does anything leave my machine?

Not with the extension. The capture goes to your clipboard, your local history and, if you choose, a file. Twinfig does not receive the content of pages you capture with the extension.

Does it need changes to my codebase?

No. The extension reads the page as rendered.

Start from what’s live.
Finish it in Figma.