Exact, not approximate
Every number comes from the rendered page. Sizes, spacing, line heights and contrast, measured to the pixel.
PixelSpec is a free, open-source CSS inspector for your live website. Measure spacing, typography and color, pin visual feedback to any element, and copy a precise spec your AI coding agent can act on.
Runtime dependencies
Line to install
Gzipped, dev builds only
Open source, forever
Every number comes from the rendered page. Sizes, spacing, line heights and contrast, measured to the pixel.
Notes carry the selector, the component and the styles that matter. Paste once and your agent knows what to change.
It lives in its own shadow root and only loads in development. Your styles, bundle and users never see it.
A CSS inspector built for UI review. Hover for names and sizes, click for the full spec, and hover a second element to measure the distance between them. Every value is one click from your clipboard.
See padding, margin and the gap between children, drawn right on the element.
Measure the space between any two elements in pixels. Hold Alt to measure to the parent.
The font that actually rendered, with font size, weight, line height and letter spacing.
Text and background colors with the WCAG contrast ratio, checked against what's really behind them.
React, Vue and Svelte components named automatically, with source files in dev builds.
Click anything and type. A numbered marker keeps the note on its element, even after a reload.
Every note ships with its CSS selector, component, size and the styles that matter. Your agent knows which element you mean, what it looks like now, and what you want instead. No screenshots, no guessing.
Set it up in a minuteUI feedback for /pricing (1440×900): 1. Make this button bigger main>section.hero>button.cta "Start free trial" 126×34 p:10 18 | Inter 14/14 w600 | contrast:3.7 fails AA 2. Cards should line up with the nav section.plans>div.grid <PlanGrid> src/plans.tsx 1104×520 p:0 24 | grid gap:24 cols:3 3. Too tight. Use the 8px grid div.card>ul.features "Unlimited projects" 320×96 m:0 0 12 | col gap:6 | Inter 15/22 w400
# UI feedback Page: https://acme.dev/pricing · Viewport: 1440 × 900 ## 1. Make this button bigger **`main > section.hero > button.cta`** - Text: "Start free trial" - Size: 126 × 34 at x 657, y 412 - Box: padding 10px 18px · radius 999px - Typography: Inter 14px / 14px, weight 600 - Colors: text #FFFFFF, background #3581F6, contrast 3.66:1 (fails AA) ## 2. Cards should line up with the nav …
Click an element and type what should change. Select text to quote it.
Press C to copy every note. Compact by default, so it costs few tokens.
Any coding agent reads it. It gets the element, the numbers and your intent.
Open PixelSpec from the button in the corner or with Alt + Shift + I. Then review your UI on the real page with the same five moves every time.
Name and size of anything under the cursor.
The full spec. Click any value to copy it.
↑↓Hover a second element for the distance.
AltType a note, press Enter. A marker pins it.
EnterEvery note, ready for your agent.
CWorks with React, Next.js, Vite, Vue, Svelte and plain HTML. PixelSpec loads only in development, has zero dependencies and never touches your styles.
npm install -D pixelspecimport { PixelSpec } from 'pixelspec/react'; export default function App() { return ( <> <YourApp /> {process.env.NODE_ENV === 'development' && <PixelSpec />} </> ); }
npm install -D pixelspecif (import.meta.env.DEV) { import('pixelspec').then(({ init }) => init()); }
<script src="https://unpkg.com/pixelspec"></script>
data-active="true" start open data-hotkey="alt+shift+i" toggle key data-position="bottom-left" toolbar corner data-ai-detail="full" copy format
Everything you need to know about inspecting, measuring and annotating your UI with PixelSpec.
PixelSpec is a free, open-source visual feedback tool and CSS inspector for websites. It runs as an overlay on your live site in development, so you can measure spacing, typography and color, pin notes to elements, and copy precise feedback for your AI coding agent.
Turn on PixelSpec and hover any element. Padding shows in green, margin in orange and the gaps between children in pink, with the value in pixels. Hover a second element to see the exact distance between the two.
Yes. Press C to copy every note as compact text or full Markdown, then paste it into Claude Code, Cursor, Codex, Copilot or any agent that reads text. Each note includes the selector, component, size and styles, so the agent finds the right element.
Both. Designers use it for design QA on the real build: check spacing, type and color against the design, then leave notes on the exact element instead of sending screenshots. Developers and vibe coders use it to turn “this looks off” into precise instructions their AI coding agent can fix in one pass.
When you build with an AI agent, describing visual bugs in words is the slow part. With PixelSpec you click the element, type what should change and copy. The agent gets the selector, component name, size, spacing, font and colors with every note, so it edits the right element without guessing.
No. You load it only in development, it renders inside its own shadow root so it never changes your styles, and it has zero runtime dependencies.
Any website. Install it from npm for React, Next.js, Vite, Vue or Svelte, or add one script tag to plain HTML. React, Vue and Svelte component names are detected automatically.
PixelSpec reads the text color and the real composited background behind it, then shows the WCAG contrast ratio and whether it passes AA or AAA.
Yes. PixelSpec is open source under the MIT license, free for personal and commercial use.
Add PixelSpec to your dev build and ship every pixel the way you meant it.