DX Spatial Grid:↳ Token Inspector

A development-only inspector for React 18 and 19, published on npm. Click an element on your own page, calibrate its radius, padding, gap, margin and colours, and copy the result out as CSS, JSON or a prompt for whichever agent you use.

Back to Work
Role: Open Source / Solo Year: 2026 Stack: React · TypeScript · Vite · Tailwind CSS v4 · npm Timeline: On npm since Oct 2026 · now 0.2.0

// 01

Overview

The DX Spatial Grid & Token Inspector is a small open-source tool for inspecting a React UI while you build it and editing its spatial and colour tokens on screen. It grew out of the same design-systems problem I was solving in Mothership: AI tools and handoffs drift when tokens and layout rules are not visible, inspectable, and exportable in the environment where the UI actually runs.

DX Grid 0.2.0 Harness: Template Grid Manager, the Token Calibration Unit with the colour picker open on Border Preset and the page's colour tokens listed first, and Live Token Preview.
The Harness in 0.2.0, with the colour picker open. Your page's own colour tokens come first.

// 02

Challenge

Design tokens and spatial layout rules often live in Figma variables or JSON files, but the truth is in the compiled UI. Without a harness that bridges those layers, calibration becomes guesswork and every agent or engineer session starts from zero. I needed a small, honest DX surface that made node structure and token values legible in the browser, then let me copy results back out as CSS, JSON, or a paste-ready agent prompt.

// 03

Try it

Open live demo →

Harness + overlay tabs · no login required

Install from npm →

npm install -D dx-grid-inspector

Source on GitHub →

MIT · building in public

// 04

Outcome

It ships two modes: a three-panel Harness (Template Grid Manager, Token Calibration Unit, Live Token Preview) for calibrating mock nodes, and an Overlay that wraps a real app so you click the element itself. It is MIT-licensed and published on npm as a development-only package, with React as its only peer dependency.

Version 0.2.0 came out of the first outside feedback. After 0.1 went out, someone in a developer community asked for three things: arrow-key nudging, a real colour picker, and a way to export everything at once. All three shipped, along with gap and margin. The colour picker is my own, with no dependencies. It works in OKLCH, lists the page's own colour tokens first and snaps onto them, shows which screens can display a colour, and gives the contrast ratio as you drag.

Overlay demo: the content card selected, its padding nudged from 24px to 40px with the up arrow key, sixteen presses.
The Overlay on a real card: the arrow keys nudge its padding from 24px to 40px, live.
Overlay demo: the colour picker on Surface Fill, hue at 320 degrees, the card's fill now plum, marked every screen.
The picker turns the card's fill to plum, and says every screen can show it.

// 05

Reflection

It started as a portfolio-scale open-source slice, and it still shows how I think about DX tooling: small surface area, deterministic exports, and no fake in-app AI. The difference now is that feedback comes from outside, and 0.2.0 is the first release shaped by it. The repo is the source of truth; the live demo is the proof.