Capture your favourite UI Component from any website in a single click.
pickUI is a Chrome Extension for developers that allows you to inspect any element on a webpage and extract its HTML & CSS as a clean, copy-pasteable component.
Unlike the standard Chrome DevTools, pickUI bakes the computed styles directly into the HTML tags as inline styles, allowing you to copy a button, card, nav bar etc. and paste it anywhere (React, HTML, Email templates) while preserving its exact look.
- Smart Inspector: Hover over any element to highlight it.
- Gap-Proof HUD: Features a smart "Invisible Bridge" and debounce logic, so the "Get Component" button doesn't run away when you try to click it.
- Clean CSS Extraction: Automatically filters out default browser styles, CSS variables, and vendor prefixes. Only captures what matters.
- Side Panel Workflow: Uses Chrome's Side Panel API so the UI stays open while you browse and inspect multiple elements.
- Core: React + TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Browser API: Chrome Extension Manifest V3 (Side Panel, Scripting, Storage)
-
Clone the repository
git clone [https://github.com/yourusername/pickUI.git](https://github.com/yourusername/pickUI.git) cd pickUI -
Install Dependencies
npm install
-
Build the Extension
npm run build
This will create a
distfolder in your project root. -
Load into Chrome
- Open Chrome and navigate to
chrome://extensions. - Toggle Developer Mode (top right corner).
- Click Load Unpacked.
- Select the
distfolder from your project directory.
- Open Chrome and navigate to
- Click the pickUI icon in your Chrome toolbar. This opens the Side Panel on the right.
- Click "🎯 Pick Element" in the side panel.
- Hover over any element on the current webpage.
- A "✚ Get Component" button will appear floating next to the element. Click it.
- The HTML code (with inline CSS) will appear in the Side Panel.
- Click "Copy" and paste it into your project!
pickUI/
├── public/
│ └── manifest.json # Chrome Extension Manifest V3
├── src/
│ ├── background.ts # Service Worker (Handles Side Panel toggle)
│ ├── content.ts # The Inspector Logic (Runs on webpages)
│ └── popup/ # The Side Panel UI (React)
│ ├── App.tsx # Main UI Logic & Code Generator
│ └── main.tsx # Entry point
├── vite.config.ts # Multi-page build configuration
└── tailwind.config.js # Tailwind setup
Understanding where things live will help you move faster:
src/content.ts: The Eye of the extension. This script runs on the webpage, handles the hover detection, the Invisible Bridge HUD button logic, and CSS extraction.src/popup/App.tsx: The Brain of the UI. This is the React application running in the Side Panel. It handles generating the HTML strings and displaying the data.src/background.ts: The Service Worker. Mainly handles opening the Side Panel when the icon is clicked.manifest.json: The configuration file (Permissions, versioning, etc.).
If you find a bug, please create a new Issue and include:
- Browser & Version: (e.g., Chrome 120, Brave, Arc)
- OS: (e.g., Windows 11, macOS Sonoma)
- Steps to Reproduce:
- Go to '...'
- Click on '...'
- See error '...'
- Screenshots/Video: Since this is a visual tool, a GIF or screenshot helps immensely.
- Create a Branch:
git checkout -b feature/amazing-feature
- Make your changes.
- Test Manually:
- Commit your changes:
(Please use semantic commit messages:
git commit -m "feat: Add support for capturing SVG gradients"feat,fix,docs,style,refactor) - Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request against the
mainbranch.
- TypeScript: We use TypeScript for everything. Please avoid using
anyunless absolutely necessary (like when dealing with messy DOM APIs). - Styling: We use Tailwind CSS. Avoid writing custom CSS files unless you are modifying the scrollbar or global resets.
- Formatting: If possible, ensure your code is formatted with Prettier before submitting.