X-ray vision for your website's design DNA.

npm i useoutlinekit

Drop one React component. It scans your entire page and extracts fonts, type scale, colors, spacing rhythm, grid columns, component boundaries, and accessibility issues. Copy the output into Claude Code, Cursor, or any AI tool.

Click the button below to scan this page right now:


Six layers of insight

Each layer reveals a different dimension of your design system. Toggle them individually or scan everything at once.

Grid
Column positions, alignment edges
Aa
Typography
Fonts, sizes, type scale
Colors
Text, background, border palette
Spacing
Padding, margin, rhythm
Components
React names, boundaries, depth
Accessibility
Missing alt, labels, contrast

Typography extraction

OutlineKit finds every font family and size used on your page, counts how many elements use each, and captures a sample text snippet. Here's what it finds on a typical dashboard:

Design DNA → TypographyLive scan
TYPE SCALE
28pxX-ray vision for your website×1
18pxSix layers of insight×8
15pxDrop one React component. It scans…×42
14pxMonthly Revenue×12
13pxnpm install useoutlinekit -D×18
12px$124,500 — up 12% from last month×24
11pxlocalhost:3000/dashboard×16
FONTS: Inter (98%), SF Mono (2%)
7 sizes detected · 2 font families · baseline rhythm: 24px

Color palette extraction

Scans every element's color, backgroundColor, and borderColor. Groups them by usage type and counts occurrences.

Design DNA → ColorsLive scan
TEXT COLORS
#171717 ×84
#525252 ×42
#737373 ×18
#a3a3a3 ×12
#2563eb ×6
#dc2626 ×2
BACKGROUNDS
#ffffff ×32
#fafafa ×24
#f5f5f5 ×16
#1a1a1a ×8
BORDERS
#e8e8e8 ×40
#d4d4d4 ×8
12 unique colors detected across 3 categories

Spacing scale detection

Collects every padding and margin value, filters out noise, and reveals your actual spacing scale. Also detects baseline rhythm from vertical gaps between siblings.

Design DNA → SpacingLive scan
4px
×18
8px
×36
12px
×42
14px
×14
16px
×30
20px
×24
24px
×20
32px
×14
40px
×8
48px
×6
Baseline rhythm: 8px · Radii: 3px 6px 8px 10px 14px
10 spacing values detected · 5 border-radius values

Accessibility scanning

Checks every element for common issues: images without alt text, buttons without accessible names, inputs without labels, links without href, and text with low contrast ratio (below 4.5:1 WCAG AA).

Design DNA → AccessibilityLive scan
🔴Image missing alt textimg.hero-bg
🔴Button has no accessible namebutton.icon-btn
🔴Input missing labelinput#search
🔴Low contrast 2.3:1 (needs 4.5:1)p.muted
🟡Link missing hrefa.nav-link
5 issues found · 4 errors · 1 warning

Output

The full Design DNA report in markdown. Copy it directly into your AI agent.

# OutlineKit Design DNA Report 186 elements scanned on localhost:3000/dashboard Viewport: 1440×900 ## Fonts - Inter (172 elements) — sizes: 28px, 18px, 15px, 14px, 13px, 12px - SF Mono (14 elements) — sizes: 12.5px, 11px ## Type Scale - `28px` — 1 use — "X-ray vision for your website" - `18px` — 8 uses — "Six layers of insight" - `15px` — 42 uses — "Drop one React component…" - `14px` — 12 uses — "Monthly Revenue" - `13px` — 18 uses — "npm install useoutlinekit" - `12px` — 24 uses — "$124,500 — up 12%" - `11px` — 16 uses — "localhost:3000/dashboard" ## Colors Text: `#171717` (×84), `#525252` (×42), `#737373` (×18) Background: `#ffffff` (×32), `#fafafa` (×24), `#f5f5f5` (×16) ## Spacing Scale 4px (×18) · 8px (×36) · 12px (×42) · 16px (×30) · 20px (×24) · 24px (×20) · 32px (×14) · 40px (×8) Baseline rhythm: 8px ## Border Radii `8px` (×40), `6px` (×22), `10px` (×14), `3px` (×12), `14px` (×4) ## Grid Detected columns at: 0px, 220px, 260px, 680px, 720px ## Accessibility Issues (5) 🔴 Image missing alt text`img.hero-bg` 🔴 Button has no accessible name`button.icon-btn` 🔴 Input missing label`input#search` 🔴 Low contrast 2.3:1 (needs 4.5:1)`p.muted` 🟡 Link missing href`a.nav-link`

Install

terminal
npm install useoutlinekit -D
layout.tsx
import { Outline } from 'useoutlinekit'

function App() {
  return (
    <>
      <YourApp />
      {process.env.NODE_ENV === "development" && <Outline />}
    </>
  )
}

Props

All optional. Works with zero configuration.

enabledEnable/disable (default: true)
layersArray of active layers (default: all six)
rootCSS selector to scope scanning (default: "body")
ignoreTag names to skip (default: [])
colorOverlay accent color (default: "#2563eb")
toolbarShow toolbar (default: true)
positionToolbar corner (default: "bottom-right")
onScanCalled after scan completes (receives DesignDNA)
onCopyCalled when copy clicked (receives markdown)
shortcutToggle shortcut (default: "ctrl+shift+o")
classNameCustom class for toolbar wrapper

Types

types
type DesignDNA = {
  fonts: { family: string; count: number; sizes: string[] }[]
  typeScale: { size: string; px: number; count: number; sample: string }[]
  colors: { value: string; property: 'color'|'background'|'border'; count: number }[]
  spacingScale: { px: number; count: number }[]
  radii: { value: string; count: number }[]
  elements: ScannedElement[]
  gridColumns: number[]
  baselineRhythm: number | null
  a11yIssues: { selector: string; issue: string; severity: 'error'|'warning' }[]
  meta: { url; title; viewport; elementCount; timestamp }
}

type ScannedElement = {
  selector: string; tag: string
  rect: { x; y; width; height }
  depth: number; component: string|null; role: string
}

type LayerType = 'grid'|'typography'|'colors'|'spacing'|'components'|'a11y'

Programmatic API

script.ts
import { scanDesignDNA, formatDesignDNA } from 'useoutlinekit'

// Scan the page
const dna = scanDesignDNA('body')

// Access structured data
console.log(dna.fonts)        // → [{family: 'Inter', count: 172, sizes: [...]}]
console.log(dna.typeScale)    // → [{size: '28px', px: 28, count: 1, sample: '...'}]
console.log(dna.colors)       // → [{value: '#171717', property: 'color', count: 84}]
console.log(dna.spacingScale) // → [{px: 8, count: 36}, {px: 12, count: 42}]
console.log(dna.a11yIssues)   // → [{selector: '...', issue: '...', severity: 'error'}]

// Generate markdown for agent
const md = formatDesignDNA(dna)
// → "# OutlineKit Design DNA Report\n186 elements..."

Exports: Outline, scanDesignDNA, formatDesignDNA, BlueprintOverlay

Type exports: OutlineProps, OutlineState, LayerType, DesignDNA, ScannedElement


Keyboard shortcuts

Ctrl+Shift+OToggle scan on/off
EscClose overlay

~5.7kb gzipped · zero dependencies · React 18+ · MIT