Ruler
Exact distances between two elements, guides and grid.
Try it yourself? The course has a Ruler module with 3 lessons.
Take the moduleWhat it's for
The Ruler (Spacing Inspector) lets designers and developers measure the exact pixel distance and spacing between any two elements on a page. This makes it easy to check whether margins, paddings and white space match the design system (for example 8px grid alignment).
What it can do
- Three tabs with icon and label (Distance, Guides, Grid) and a scaling work area: Bundles three layout tools without outer scrolling:
- Visual Ruler & Pythagoras (
A ↔ B):- Live on the page (& mobile iframe): Draws an adaptive SVG measuring triangle between element A and B, with a horizontal
Xruler at the bottom (with calipers and tick marks), a verticalYruler, a right-angle symbol (∟) and the dashed diagonal Pythagoras line (√(x² + y²)). For short distances between elements, the tool places the smallA/Bbadges on the outside and combines the measurements in a single floating callout outside the gap so nothing overlaps. - Theme-aware Blueprint canvas in the side panel: Shows a clear, light blueprint view in Light Mode (and automatically switches to dark blue in Dark Mode) with an
Xruler along the bottom, aYruler on the left, the diagonal Pythagoras line and three clickable copy cards (↔ X axis,↕ Y axis,⟋ Diagonal).
- Live on the page (& mobile iframe): Draws an adaptive SVG measuring triangle between element A and B, with a horizontal
- Guides & Outlines: Clear icon tiles with
ON/OFFstatus: Guides works as a real toggle for the crosshair (including a live counter badge of placed lines), next to DOM Outlines and a clear Clear guides button. - Column Grid: Quick presets (
12 · 1280,8 · 1024,4 · 100%) and2×2number fields for columns, max width, gutter and margin.
- Visual Ruler & Pythagoras (
- Clear & Restart: Pressing
Escape, clicking the clear button or switching tools clears the current measurement selection and removes temporary measurement outlines from the screen.