explaingit

abi/screenshot-to-code

🔥 Hot72,627TypeScriptAudience · developerComplexity · 3/5ActiveLicenseSetup · hard

TLDR

Drop in a screenshot or design mockup, get back working front-end code. AI converts visual designs to HTML, React, Vue, or other frameworks automatically.

Mindmap

mindmap
  root((repo))
    What it does
      Screenshot to code
      Multiple output formats
      AI vision analysis
    Input types
      Website screenshots
      UI mockups
      Figma designs
      Video recordings
    Output formats
      HTML Tailwind
      React Vue
      Bootstrap SVG
    Tech stack
      TypeScript React
      Python FastAPI
      Vite Poetry
    Use cases
      Designer prototyping
      Dev handoff starting point
      AI UI experimentation
    AI providers
      Google Anthropic
      OpenAI models

Things people build with this

USE CASE 1

Convert a Figma mockup into a working React component without manually writing the layout code.

USE CASE 2

Take a screenshot of a competitor's website and generate a starting-point HTML version to iterate on.

USE CASE 3

Prototype a UI design quickly by uploading a sketch or wireframe and getting functional code back.

USE CASE 4

Record a screen interaction video and generate a working prototype that mimics the recorded behavior.

Tech stack

TypeScriptReactVitePythonFastAPIPoetryDocker

Getting it running

Difficulty · hard Time to first run · 1h+

Requires Docker, FastAPI backend, and likely an AI/vision API key (e.g., Claude, GPT-4V) to convert images to code.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

Screenshot-to-code is a tool that takes an image, such as a screenshot of a website, a UI mockup, or a Figma design, and uses AI to convert it into working front-end code. The problem it solves is the tedious work of manually translating a visual design into HTML, CSS, or a component framework. You drop in an image and get back functional code that reproduces the visual layout. The tool works by sending the image to an AI vision model, which analyzes the visual layout and generates corresponding code. It supports multiple output formats including HTML with Tailwind CSS (a popular utility-based styling framework), plain HTML with CSS, React with Tailwind, Vue with Tailwind, Bootstrap, and SVG. The supported AI models include options from Google, Anthropic, and OpenAI. There is also experimental support for video input, where you can record a screen interaction and the tool will try to generate a working prototype based on what it sees. The architecture is a React frontend built with Vite (a fast build tool) and a Python FastAPI backend. You run both locally and connect them, or use the hosted version at screenshottocode.com. You would use this if you are a designer who wants to quickly prototype from mockups without writing code, a developer who wants a starting point when implementing a design handoff, or someone experimenting with AI-assisted UI development. It requires an API key from at least one of the supported AI providers. The tech stack is TypeScript and React on the frontend, Python with FastAPI on the backend, and Poetry for Python dependency management. Docker is also supported for running the whole stack together.

Copy-paste prompts

Prompt 1
I have a screenshot of a website design. How do I use screenshot-to-code to convert it to React with Tailwind CSS?
Prompt 2
Set up screenshot-to-code locally with the Python backend and React frontend. What API key do I need and how do I connect them?
Prompt 3
I want to generate HTML from a Figma design using screenshot-to-code. What output formats are available and which one should I pick?
Prompt 4
Can screenshot-to-code handle video input? How do I record a screen interaction and turn it into a working prototype?
Prompt 5
What AI models does screenshot-to-code support and how do I choose between Google, Anthropic, and OpenAI options?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.