xray.

What xray does

A dev-time overlay that maps computed styles back to the design tokens they came from.

Hover any element in your running app and xray tells you which design tokens its computed styles map to — and which of those values only work in the theme, mode or density you happen to be looking at.

button.hand-button6 locked2 drift
src/App.tsx:36:13
modedarklight
densityhighlowmediummobiletouch
height28pxlocked
28px is --salt-size-base at medium only. This element is locked to one density — it renders wrong at high, low, mobile, touch.
--salt-size-base --salt-spacing-350
high20px
low36px
medium ·28px
mobile44px
touch44px
background-colorrgb(255, 255, 255)locked
rgb(255, 255, 255) is --salt-container-primary-background at light only. That token changes with mode — hardcoding it breaks dark.
--salt-container-primary-background --salt-editable-primary-background --salt-editable-primary-background-hover
darkrgb(36, 37, 38)
light ·rgb(255, 255, 255)
padding (right, left)8pxlocked
8px is --salt-spacing-100 at medium only. This element is locked to one density — it renders wrong at high, low, touch.
--salt-spacing-100 --salt-spacing-fixed-800 --salt-size-unit
high4px
low12px
medium ·8px
mobile8px
touch16px
border-colorrgb(124, 124, 124)drift
rgb(124, 124, 124) matches no colour token; nearest is --salt-color-gray-100 at ΔE 0.021.
border-width1pxdrift
1px is exactly --salt-size-divider-strokeWidth. Same value today, but it will not follow the token.
--salt-size-divider-strokeWidth --salt-size-separator-strokeWidth --salt-size-border
captured from the playground

Why a browser is involved

Every other token linter works on source text. That is enough to tell you padding: 8px is not a var().

None of them can tell you that 8px is --salt-spacing-100, that the token resolves to four different values across four densities, and that this element is therefore correct at exactly one of them. That needs the cascade resolved, and resolving the cascade needs a browser.

This page is the fixture

The site you are reading declares two real variant axes — theme and density, in the sidebar — and leaves one component hardcoded on purpose. Press ⇧⌘X on the landing page and you are inspecting it with the tool it documents.

Where to go next

  • Setup — Vite and Next.js, plus the hotkey.
  • What it reports — the five verdicts, and which ones matter.
  • How it works — why there is no config and no adapter for your design system.
  • In CIxray record, baselines, and exit codes.

On this page