XrayUI is a developer-focused browser extension that enables real-time UI inspection. Hover over any element on a webpage to instantly view the underlying HTML, CSS classes, styles, and structural information, making it easier to analyze, learn from, and debug web interfaces.
TypeScript
0
1 commits
updated Jun 4, 2026
A production-ready Chrome Extension that lets you inspect any UI element on any webpage and instantly analyze it like a senior frontend developer โ powered by Google Gemini AI.
Ctrl+Shift+I| Panel | Features |
|---|---|
| Info | Tag, ID, classes, box model, attributes, frameworks |
| Styles | Typography, colors, flex/grid, computed styles with search |
| Accessibility | WCAG contrast ratio, ARIA, score 0โ100, grade AโF |
| Design | Color palette, typography scale, spacing system, effects |
| AI | Explain, Generate React, Improve UI, Analyze Design |
| History | Searchable, pinnable inspection history |
| Shortcut | Action |
|---|---|
Ctrl+Shift+I | Toggle inspector |
Ctrl+K | Open command palette |
1โ6 | Switch between panels |
Esc | Deactivate inspector |
git clone https://github.com/youruser/explain-this-ui
cd explain-this-ui
npm install
cp .env.example .env
Edit .env:
VITE_GEMINI_API_KEY=your_key_here
Get a free Gemini API key at aistudio.google.com.
npm run build
chrome://extensionsdist/ folderCtrl+Shift+Isrc/
โโโ background/ # Service Worker (MV3)
โโโ content/ # Injected into pages
โ โโโ inspector.ts # Hover highlight + click capture
โ โโโ analyzer.ts # DOM + CSS extraction
โ โโโ screenshot.ts # Screenshot capture
โ โโโ styles.css # Injected overlay styles
โโโ popup/ # Extension toolbar popup
โโโ sidepanel/ # Main analysis UI
โ โโโ App.tsx
โ โโโ components/
โ โ โโโ layout/ # Header, CommandPalette
โ โ โโโ panels/ # BasicInfo, Styles, A11y, Design, AI
โ โ โโโ history/ # InspectionHistory
โ โ โโโ ui/ # Badge, Card, CopyButton, ColorSwatch, etc.
โ โโโ hooks/ # useInspector, useAI, useTheme
โ โโโ services/ # ai.service, export.service
โ โโโ store/ # Zustand stores (inspector, history, settings)
โโโ types/ # TypeScript interfaces
โโโ utils/ # color, css, accessibility, framework utils
# Watch mode (rebuilds on save)
npm run dev
# Type check
npm run type-check
After any change in watch mode, go to chrome://extensions and click the refresh icon on the extension card.
| Technology | Purpose |
|---|---|
| React 18 | Side panel + popup UI |
| TypeScript 5 | Type safety |
| TailwindCSS 3 | Styling |
| Vite 5 | Build tool |
| @crxjs/vite-plugin | Chrome extension HMR |
| Zustand 4 | State management |
| Gemini 1.5 Flash | AI analysis |
| Lucide React | Icons |
| React Markdown | AI response rendering |
| Variable | Description | Default |
|---|---|---|
VITE_GEMINI_API_KEY | Gemini API key (required for AI) | โ |
VITE_OPENAI_API_KEY | OpenAI API key (optional) | โ |
VITE_AI_PROVIDER | gemini or openai | gemini |
VITE_GEMINI_MODEL | Gemini model name | gemini-1.5-flash |
VITE_OPENAI_MODEL | OpenAI model name | gpt-4o-mini |
The dist/ folder will contain:
manifest.jsonbackground/index.js โ Service workercontent/index.js + content/styles.css โ Injected scriptspopup/index.html โ Toolbar popupsidepanel/index.html โ Main analysis panelBuilt with Vite, CRXJS, TailwindCSS, and Google Gemini.
MIT
XrayUI is a developer-focused browser extension that enables real-time UI inspection. Hover over any element on a webpage to instantly view the underlying HTML, CSS classes, styles, and structural information, making it easier to analyze, learn from, and debug web interfaces.
TypeScript
0
1 commits
updated Jun 4, 2026
A production-ready Chrome Extension that lets you inspect any UI element on any webpage and instantly analyze it like a senior frontend developer โ powered by Google Gemini AI.
Ctrl+Shift+I| Panel | Features |
|---|---|
| Info | Tag, ID, classes, box model, attributes, frameworks |
| Styles | Typography, colors, flex/grid, computed styles with search |
| Accessibility | WCAG contrast ratio, ARIA, score 0โ100, grade AโF |
| Design | Color palette, typography scale, spacing system, effects |
| AI | Explain, Generate React, Improve UI, Analyze Design |
| History | Searchable, pinnable inspection history |
| Shortcut | Action |
|---|---|
Ctrl+Shift+I | Toggle inspector |
Ctrl+K | Open command palette |
1โ6 | Switch between panels |
Esc | Deactivate inspector |
git clone https://github.com/youruser/explain-this-ui
cd explain-this-ui
npm install
cp .env.example .env
Edit .env:
VITE_GEMINI_API_KEY=your_key_here
Get a free Gemini API key at aistudio.google.com.
npm run build
chrome://extensionsdist/ folderCtrl+Shift+Isrc/
โโโ background/ # Service Worker (MV3)
โโโ content/ # Injected into pages
โ โโโ inspector.ts # Hover highlight + click capture
โ โโโ analyzer.ts # DOM + CSS extraction
โ โโโ screenshot.ts # Screenshot capture
โ โโโ styles.css # Injected overlay styles
โโโ popup/ # Extension toolbar popup
โโโ sidepanel/ # Main analysis UI
โ โโโ App.tsx
โ โโโ components/
โ โ โโโ layout/ # Header, CommandPalette
โ โ โโโ panels/ # BasicInfo, Styles, A11y, Design, AI
โ โ โโโ history/ # InspectionHistory
โ โ โโโ ui/ # Badge, Card, CopyButton, ColorSwatch, etc.
โ โโโ hooks/ # useInspector, useAI, useTheme
โ โโโ services/ # ai.service, export.service
โ โโโ store/ # Zustand stores (inspector, history, settings)
โโโ types/ # TypeScript interfaces
โโโ utils/ # color, css, accessibility, framework utils
# Watch mode (rebuilds on save)
npm run dev
# Type check
npm run type-check
After any change in watch mode, go to chrome://extensions and click the refresh icon on the extension card.
| Technology | Purpose |
|---|---|
| React 18 | Side panel + popup UI |
| TypeScript 5 | Type safety |
| TailwindCSS 3 | Styling |
| Vite 5 | Build tool |
| @crxjs/vite-plugin | Chrome extension HMR |
| Zustand 4 | State management |
| Gemini 1.5 Flash | AI analysis |
| Lucide React | Icons |
| React Markdown | AI response rendering |
| Variable | Description | Default |
|---|---|---|
VITE_GEMINI_API_KEY | Gemini API key (required for AI) | โ |
VITE_OPENAI_API_KEY | OpenAI API key (optional) | โ |
VITE_AI_PROVIDER | gemini or openai | gemini |
VITE_GEMINI_MODEL | Gemini model name | gemini-1.5-flash |
VITE_OPENAI_MODEL | OpenAI model name | gpt-4o-mini |
The dist/ folder will contain:
manifest.jsonbackground/index.js โ Service workercontent/index.js + content/styles.css โ Injected scriptspopup/index.html โ Toolbar popupsidepanel/index.html โ Main analysis panelBuilt with Vite, CRXJS, TailwindCSS, and Google Gemini.
MIT