Scan any website β Extract its exact design system β Generate AI-ready rebuild prompts
π¬ See UISnap in Action
π Click "Scan This Page" β Watch colors, fonts, and layout get extracted in real time β Copy the AI-optimized prompt β Paste into v0, Lovable, or Cursor β Get a pixel-perfect clone
Screenshots coming soon β scan any website and see the magic!
UISnap is a Chrome extension that performs UI reverse engineering. Point it at any website, click "Scan", and it will:
- Extract the exact design system β real hex colors, font families, font sizes, spacing, border-radius values β all read directly from the live CSS, not guessed by AI.
- Capture full-page screenshots β automatically scrolls the page and captures every viewport, with duplicate detection to avoid redundant frames.
- Analyze the layout with Gemini AI β sends the screenshots + extracted tokens to Google's Gemini 1.5 Flash model to understand the page structure, section hierarchy, hero types, gallery patterns, and navigation style.
- Generate platform-specific rebuild prompts β produces 4 highly detailed, expert-level prompts optimized for v0, Lovable, Cursor, and a Universal format that works with any AI tool.
The output isn't a generic "build me a landing page" prompt β it includes your exact colors, your exact fonts, your exact spacing, your real page headings, and section-by-section build instructions so the AI coding tool can produce a near-pixel-perfect clone.
As developers, we often see a beautiful website and think: "I want to build something like this." But recreating a UI from scratch is tedious:
- Manually inspecting colors in DevTools? Slow.
- Guessing font sizes? Inaccurate.
- Describing layout to an AI? Vague.
UISnap bridges the gap. It automates the entire "reverse engineering" step β from CSS inspection to AI analysis β and hands you a ready-to-paste prompt that actually produces results. No more 20-minute DevTools sessions. No more generic prompts. Scan β Copy β Paste β Build.
- Reads actual CSS values via
getComputedStyleβ not screenshots, not guesses - Extracts: primary/secondary/accent colors, background, text color, all raw palette colors
- Detects heading & body fonts, sizes, weights, and line heights
- Measures section gaps, container padding, border-radius per element type (card, button, input)
- Parses
:rootCSS custom properties for full design system coverage
- Auto-scrolls the entire page from top to bottom
- Captures each viewport as a high-quality screenshot
- Uses image hashing to detect duplicate frames (sticky footers, fixed backgrounds)
- Sends up to 6 representative screenshots to the AI for analysis
- Identifies: layout style, navigation pattern, design aesthetic, color mood
- Maps every section (Hero, Features, Pricing, Testimonials, Footer, etc.)
- Detects: hero type (static/carousel/text-only), gallery type (grid/masonry/stacked), footer type (minimal/multi-column)
- Provides section-by-section descriptions for precise reconstruction
| Prompt | Optimized For | Tech Stack |
|---|---|---|
| V0 Prompt | Vercel v0 | Next.js 14, Tailwind CSS, shadcn/ui |
| Lovable Prompt | Lovable.dev | Vite, React 18, React Router, Framer Motion |
| Cursor Prompt | Cursor IDE | Next.js 14, file-by-file spec with folder structure |
| Universal Prompt | Any AI tool | Framework-agnostic, works with ChatGPT/Claude/etc. |
| Color Palette | Designers | CSS vars, Tailwind config, Figma Design Tokens JSON |
- Saves your last 10 scans automatically to
chrome.storage.local - Click any past scan to reload its full results β no need to re-scan
- Shows URL, timestamp, and screenshot count for each entry
- Shows real-time color swatches as they're extracted from the page
- Displays a live screenshot counter as the page scrolls
- Dynamic status updates: "Extracting tokens..." β "Capturing (3)..." β "Analyzing with Gemini..."
- Save your own Gemini API key in the Settings tab
- Key is stored in
chrome.storage.localand never displayed after saving - Bypasses the Cloudflare proxy for direct, faster API calls
- Remove your key anytime with one click
- V0 Prompt: Copies prompt + opens
v0.dev/chatin a new tab - Lovable Prompt: Copies prompt + opens
lovable.devin a new tab - Other prompts: Copy to clipboard with visual confirmation
- If the content script can't read a heavily obfuscated page, tokens are marked as
isFallback - A warning banner appears: "We had trouble reading this site's exact code. The AI will rely mostly on visual screenshots."
- The scan still completes using AI vision as the primary data source
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CHROME BROWSER β
β β
β ββββββββββββββββ messages ββββββββββββββββββββββββββββ β
β β Popup UI β ββββββββββββββΊ β Background Service β β
β β (popup.tsx) β β Worker (background.ts) β β
β β β β β β
β β β’ Scan Tab β β β’ Orchestrates scan β β
β β β’ History β β β’ Takes screenshots β β
β β β’ Settings β β β’ Calls Gemini API β β
β ββββββββββββββββ β β’ Saves history β β
β ββββββββββββ¬ββββββββββββββββ β
β β β
β messages β β
β βΌ β
β ββββββββββββββββββββββββ β
β β Content Script β β
β β (content.ts) β β
β β β β
β β β’ Reads DOM/CSS β β
β β β’ Scrolls page β β
β β β’ Extracts tokens β β
β ββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
HTTPS β
βΌ
ββββββββββββββββββββββββββββ
β Cloudflare Worker β
β (worker/index.js) β ββββββββββββββββ
β β βββββββΊ β Google Gemini β
β β’ Hides API key β β 1.5 Flash β
β β’ Proxies requests β βββββββ β β
β β’ CORS handling β ββββββββββββββββ
ββββββββββββββββββββββββββββ
β
OR (BYOK mode)
β
User's own API key βββββββββββββββββββΊ Google Gemini
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Plasmo v0.90.5 | Chrome extension framework with React support |
| UI | React 18.2 + TypeScript 5.3 | Popup interface with tabs and live preview |
| AI | Google Gemini 1.5 Flash | Visual layout analysis from screenshots |
| Proxy | Cloudflare Workers | Secure API key proxy (zero-cost serverless) |
| Storage | chrome.storage.local |
Scan history, API key, session data |
| Screenshot | chrome.tabs.captureVisibleTab |
Native Chrome screenshot API |
| CSS Analysis | getComputedStyle + DOM traversal |
Direct CSS token extraction |
uisnap/
βββ popup.tsx # Main popup UI β tabs, live preview, settings
βββ background.ts # Service worker β scan orchestrator
βββ content.ts # Content script β injected into web pages
β
βββ components/
β βββ ScanButton.tsx # Animated scan trigger button
β βββ ResultPanel.tsx # Design tokens + analysis display
β βββ ExportButtons.tsx # Platform prompt buttons with deep links
β
βββ lib/
β βββ types.ts # TypeScript interfaces (DesignTokens, ScanResult, etc.)
β βββ extract.ts # DOM/CSS design token extraction engine
β βββ capture.ts # Full-page screenshot capture with dedup
β βββ gemini.ts # Gemini API client (proxy + BYOK support)
β βββ prompt-builder.ts # Platform-specific prompt generators
β βββ crawler.ts # Multi-page link discovery (experimental)
β
βββ worker/
β βββ index.js # Cloudflare Worker β secure Gemini API proxy
β
βββ assets/
β βββ icon.png # Extension icon
β
βββ package.json # Dependencies and manifest config
βββ tsconfig.json # TypeScript configuration
βββ .prettierrc.mjs # Code formatting rules
- Node.js 18+ (Download)
- npm (comes with Node.js)
- Google Chrome browser
# 1. Clone the repository
git clone https://github.com/Darshan3690/UI_snap.git
cd UI_snap/uisnap
# 2. Install dependencies
npm install
# 3. Build for production
npm run build- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (toggle in top-right corner)
- Click Load unpacked
- Select the
uisnap/build/chrome-mv3-prodfolder - Pin the UISnap extension from the puzzle piece icon
By default, UISnap uses a shared Cloudflare Worker proxy. For better performance and no rate limits, use your own key:
- Go to Google AI Studio
- Create a new API key (free tier available)
- Open UISnap β Settings tab
- Paste your key and click Save API Key
- Your key is stored securely in
chrome.storage.localand hidden from the UI
cd uisnap
npm run devThis starts Plasmo's dev server. Load the extension from uisnap/build/chrome-mv3-dev in Chrome. Changes to your source files will automatically reload the extension.
npm run buildOutput goes to uisnap/build/chrome-mv3-prod. Load this folder in Chrome for the optimized build.
npm run packageCreates a .zip file ready for Chrome Web Store submission.
- Navigate to any website in Chrome
- Click the UISnap extension icon
- Click "Scan This Page"
- Watch the live preview as tokens are extracted and screenshots are captured
- Color swatches β see the exact hex codes extracted from CSS
- Typography β heading and body font families with sizes
- Analysis β AI-detected layout style, sections, and patterns
- Prompt preview β a snippet of the generated prompt
- Click "V0 Prompt" β Prompt copied + v0.dev opens automatically
- Click "Lovable Prompt" β Prompt copied + lovable.dev opens automatically
- Click "Cursor Prompt" β Copy and paste into Cursor IDE
- Click "Universal Prompt" β Works with ChatGPT, Claude, or any AI
- Switch to the History tab to see your last 10 scans
- Click any entry to instantly reload its results
- Tech: Next.js 14 App Router + Tailwind CSS + shadcn/ui
- Includes: Tailwind config color block, real page headings, section-by-section instructions
- Best for: Quick, beautiful single-page prototypes
- Tech: Vite + React 18 + React Router + Framer Motion
- Includes: Multi-page app structure (Home, About, Services, Gallery, Contact)
- Best for: Full multi-page web applications
- Tech: Next.js 14 + TypeScript + shadcn/ui
- Includes: Exact folder structure, file-by-file spec,
globals.csswith CSS variables,tailwind.config.tsready to copy - Best for: Developers who want a complete, production-grade codebase
- Tech: Framework-agnostic
- Includes: Full design system with CSS custom properties, strict β/β rules, animation specs
- Best for: Any AI tool (ChatGPT, Claude, Copilot, etc.)
- Includes: Named colors, CSS
:rootvariables, Tailwind config, Figma Design Tokens JSON - Best for: Designers importing into Figma or building a design system
βββββββββββ ββββββββββββ βββββββββββββ ββββββββββββ
β Visit ββββββΊβ Click ββββββΊβ UISnap ββββββΊβ Copy β
β Website β β Scan β β Analyzes β β Prompt β
βββββββββββ ββββββββββββ βββββββββββββ ββββββ¬ββββββ
β
ββββββββββββ βββββββββββββ β
β Pixel- βββββββ Paste in ββββββββββββ
β Perfect β β v0 / AI β
β Clone! β β Tool β
ββββββββββββ βββββββββββββ
- Core scan engine (DOM extraction + screenshots + Gemini)
- Platform-specific prompts (v0, Lovable, Cursor, Universal)
- Scan History (last 10 scans)
- Live progress preview (color swatches + screenshot counter)
- BYOK β Bring Your Own Gemini API Key
- Deep links (auto-open v0.dev / lovable.dev)
- Fallback handling for obfuscated sites
- Multi-page crawl β scan linked pages automatically
- Side-by-side comparison β original vs. generated UI
- Export to Figma β generate a Figma file from tokens
- Support OpenAI / Anthropic models β choose your AI provider
- Chrome Web Store listing β one-click install
- Firefox / Edge support β cross-browser extension
- Team sharing β share scan results via link
Contributions make open source amazing! Here's how you can help:
# Fork the repo, then:
git clone https://github.com/YOUR_USERNAME/UI_snap.git
cd UI_snap/uisnap
npm install
npm run dev- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'feat: add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
| Area | Ideas |
|---|---|
| π¨ UI/UX | Dark/light theme toggle, responsive popup redesign |
| π§ AI | Support for OpenAI GPT-4o, Anthropic Claude |
| π Prompts | New prompt templates for Bolt, Replit, WindSurf |
| π¬ Extraction | Better color ranking, CSS animation detection |
| π Browser | Firefox WebExtension port, Edge support |
| π Docs | Video tutorials, example scan outputs |
Is UISnap free?
Yes! UISnap is 100% free and open source. The default mode uses a shared Cloudflare Worker proxy with a free-tier Gemini API key. For unlimited usage, you can add your own free Gemini API key in Settings.
Does it work on any website?
It works on most websites. Some heavily obfuscated sites (canvas-based rendering, heavy JavaScript frameworks) may not yield perfect CSS extraction β in those cases, UISnap falls back to AI visual analysis and shows a warning banner.
Is my API key safe?
Yes. Your API key is stored locally in chrome.storage.local β it never leaves your browser except when making direct API calls to Google. It is never sent to our proxy server. After saving, the key is completely hidden from the UI.
Can I use it with ChatGPT or Claude instead of v0?
Absolutely! Use the Universal Prompt β it's framework-agnostic and works with any AI coding tool, including ChatGPT, Claude, Copilot, and more.
How accurate are the extracted colors?
Colors are read directly from the page's computed CSS via getComputedStyle β they are the exact hex/rgb values the browser renders, not AI-guessed approximations.
Why do I see "Scan failed" on some pages?
This usually happens on:
chrome://internal pages (extensions can't access these)- Pages that block content scripts via CSP
- PDF viewers or non-HTML content
Try scanning a regular website like stripe.com or apple.com.
This project is licensed under the MIT License β see the LICENSE file for details.
You are free to use, modify, and distribute this project. Attribution is appreciated but not required.
Having issues or questions?
- π Bug Reports: Open an issue
- π‘ Feature Requests: Open an issue
- π¬ Discussions: GitHub Discussions
If UISnap helped you build something awesome, consider giving it a star!
Every star motivates me to keep improving UISnap π
Built with β€οΈ by Darshan
Scan. Copy. Build. Ship.