Scan complete · 375ms · 506 code files

Design System Diagnosis

excalidraw/excalidraw · scanned 2026-08-12
Health score
55/100
vite-reactTypeScriptSassmonorepoCLAUDE.md.github/copilot-instructions.md
Summary
42 colour pairs are nearly identical (#121212 next to #111111), copy-paste, not decisions. 84 off-scale spacing values where a dozen would do. 83 inline style blocks bypassing every system. Messier than the median of 30 scanned repos on 3 of 6 core metrics. And the median repo is already a mess.

Where to start

Three tweaks · 55 → 85

01
Collapse the 42 near-identical colours
+10
#121212 and #111111 are the same colour to any eye, and they are used 6 times between them. Nobody chose to have both. Pick the one that is already a token, point the other at it, and the pair stops multiplying.
02
Unwind the 90 !important declarations
+10
Each one is a selector losing an argument with another selector; Actions.scss alone carries 26. Fix the specificity at the source and they stop being necessary.
03
Fold 83 inline style blocks back into the system
+10
These are static values written as style attributes; start with packages/excalidraw/components/PublishLibrary.tsx (7 blocks). Dynamic positioning was already excluded, so all of these could be classes or tokens today.

You sat through the roast

so you get a present.

208
distinct colours
Ideal Design System~24
Avg Design System96 · messier than 83%
Reputable systems24
44
shades of grey
Ideal Design System~13
Avg Design System14
Reputable systems5
84
off-scale spacing values
Ideal Design System~12
Avg Design System27 · messier than 93%
Reputable systems6
0
duplicated components
Ideal Design System0 =
Avg Design System14 · cleaner than 83%
Reputable systems10
83
inline style blocks
Ideal Design System0
Avg Design System45 · messier than 80%
Reputable systems12
42
near-identical colour pairs
Ideal Design System0
Avg Design System3 · messier than 87%
Reputable systems1
90
!important declarations
Ideal Design System0
Avg Design System5 · messier than 97%
Reputable systems3
0
components never imported
Ideal Design System0 =
Avg Design System13
Reputable systems0 =
0
arbitrary bracket values
Ideal Design System~20
Avg Design System91 · cleaner than 73%
Reputable systems0 =

Package by package

2 packages with enough UI to judge · the repo score above is the whole thing blended, and 6 packages were too small or too backend to score

packagescoreworst findingsize
packages/excalidraw 45 83 !important declarations 350 files
excalidraw-app 80 7 !important declarations 40 files

What your AI agent sees today

Your agent reads CLAUDE.md, .github/copilot-instructions.md. But none of it points at a single source of truth for components and tokens, because there isn't one yet. The numbers below are what your agent actually works from.

CLAUDE.md · Claude Code.github/copilot-instructions.md · GitHub Copilot
Palette
208colours

A healthy product palette is up to ~24 colours: one brand hue with a few tints, one accent, up to 13 greys, and status colours.

164 tokens44 strays
Colour usage
Sized by how often each is used
token stray
+148
Grey ramp · sorted dark → light · how many can you tell apart?
42 nearly identical pairs · copy-paste, not decisions
#121212 ×5 #111111 ×1#363541 ×4 #31303b ×1#0fb884 ×4 #12b886 ×1#ced4da ×3 #d4d4d4 ×1#ced4da ×3 #d3d3d3 ×1#ecfdf5 ×2 #ebfbee ×2#ecfdf5 ×2 #e6fcf5 ×1#e3e3e8 ×2 #e0e0e0 ×1+34 more

84 off-scale spacing values

a disciplined repo keeps these around a dozen · on-scale Tailwind steps (·) shown for context · off-scale in coral

0.5rem
105
1rem
54
0.75rem
49
0.25rem
48
2px
20
8px
18
1.5rem
17
4px
17
2rem
14
1em
13
10px
12
1px
12
0.625rem
11
0.125rem
9
0.375rem
9
0.2rem
9
3px
9
0px
8

Typography & shape

3
typefaces
Ideal Design System~3 =
Avg Design System2
Reputable systems1
33
font sizes
Ideal Design System~10
Avg Design System16 · messier than 80%
Reputable systems6
31
border radii
Ideal Design System~10
Avg Design System12 · messier than 97%
Reputable systems2
35
shadow styles
Ideal Design System~6
Avg Design System1 · messier than 100%
Reputable systems1
the type scale, at its real sizes · how many of these are the same decision?
2.8em ×1 Almost but not quite
2.6em ×1 Almost but not quite
2.25rem ×1 Almost but not quite
1.8em ×1 Almost but not quite
1.5em ×1 Almost but not quite
1.313rem ×2 Almost but not quite
1.3125rem ×2 Almost but not quite
1.25rem ×5 Almost but not quite
1.17em ×1 Almost but not quite
1.125rem ×5 Almost but not quite
1.1em ×1 Almost but not quite
1rem ×11 Almost but not quite
16px ×1 Almost but not quite
0.96em ×1 Almost but not quite
15px ×1 Almost but not quite
0.9rem ×4 Almost but not quite
and 15 more
the corners, drawn · 31 radii in one interface
4px ×14
0.5rem ×10
50% ×8
12px ×5
8px ×4
100% ×4
10px ×3
0.6875rem ×2
1rem ×1
0.75rem ×1
2.5rem ×1
0.2rem ×1
0.3em ×1
2px ×1
the elevations, cast, 6 of 35 · on the light surface they were drawn for
0 0 0 1px rgba(0, 0… ×2
0px 2px 4px 0 rgb(0… ×2
0 6px 16px rgba(0, … ×1
0 3px 8px rgba(0, 0… ×1
0 3px 5px -1px rgba… ×1
2px 2px 0 0 #494949… ×1

3 typefaces, declared 5 different ways

every distinct declaration is a chance for the next one to be wrong

"Assistant"×15
monospace×9
"Cascadia"×2
Cascadia×1
"Excalifont", "Xiaolai"×1

Where it hurts most

the 5 files carrying the most off-system styling

Duplicated components

every duplicate is a place where your agent has to guess which one is canonical, and it picks wrong half the time. Paths open in VS Code

list family · 7 variants
<ScrollableList>
packages/excalidraw/components/ScrollableList.tsx
used 2×
<UserList>
packages/excalidraw/components/UserList.tsx
used 2×
<CustomColorList>
packages/excalidraw/components/ColorPicker/CustomColorList.tsx
used 1×
<FontPickerList>
packages/excalidraw/components/FontPicker/FontPickerList.tsx
used 1×
<LanguageList>
excalidraw-app/app-language/LanguageList.tsx
used 1×
<PickerColorList>
packages/excalidraw/components/ColorPicker/PickerColorList.tsx
used 1×
…and 1 more
popover family · 5 variants
<PropertiesPopover>
packages/excalidraw/components/PropertiesPopover.tsx
used 6×
<ToolPopover>
packages/excalidraw/components/ToolPopover.tsx
used 4×
<FreedrawToolPopover>
packages/excalidraw/components/Tools.tsx
used 2×
<SelectionToolPopover>
packages/excalidraw/components/Tools.tsx
used 2×
<Popover>
packages/excalidraw/components/Popover.tsx
used 1×
input family · 4 variants
<StatsDragInput>
packages/excalidraw/components/Stats/DragInput.tsx
used 5×
<ColorInput>
packages/excalidraw/components/ColorPicker/ColorInput.tsx
used 1×
<TTDDialogInput>
packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx
used 1×
<DimensionDragInput>
packages/excalidraw/components/Stats/Dimension.tsx
footer family · 4 variants
<Footer>
packages/excalidraw/components/footer/Footer.tsx
used 2×
<AppFooter>
excalidraw-app/components/AppFooter.tsx
used 1×
<DebugFooter>
excalidraw-app/components/DebugCanvas.tsx
used 1×
<FooterCenter>
packages/excalidraw/components/footer/FooterCenter.tsx
toggle family · 4 variants
<DarkModeToggle>
packages/excalidraw/components/DarkModeToggle.tsx
used 1×
<PreferencesToggleGridModeItem>
packages/excalidraw/components/main-menu/DefaultItems.tsx
<PreferencesToggleZenModeItem>
packages/excalidraw/components/main-menu/DefaultItems.tsx
<ToggleTheme>
packages/excalidraw/components/main-menu/DefaultItems.tsx
radio family · 2 variants
<RadioSelection>
packages/excalidraw/components/RadioSelection.tsx
used 6×
<RadioGroup>
packages/excalidraw/components/RadioGroup.tsx
used 2×

83 inline style blocks

styling no system can see

90 !important declarations · the cascade admitting defeat
Actions.scss ×26styles.scss ×13ColorPicker.scss ×8LayerUI.scss ×5index.scss ×4QuickSearch.scss ×4

What you actually use

344 components defined · top by adoption · the real system, buried in here

componentuseddefined inprops
<IconButton> 44× packages/excalidraw/components/IconButton.tsx size visible IconButtonProps
<FilledButton> 14× packages/excalidraw/components/FilledButton.tsx icon onClick label variant color
<Trans> 14× packages/excalidraw/components/Trans.tsx i18nKey
<Dialog> 13× packages/excalidraw/components/Dialog.tsx none
<Island> 13× packages/excalidraw/components/Island.tsx padding style viewportUI viewportUIName
<DropdownMenuItem> 11× packages/excalidraw/components/dropdownMenu/DropdownMenuItem.tsx icon badge value shortcut selected
<Spinner> 11× packages/excalidraw/components/Spinner.tsx size circleWidth synchronized
<Tooltip> 10× packages/excalidraw/components/Tooltip.tsx label long style disabled
<Button> packages/excalidraw/components/Button.tsx type onSelect selected rest
<DropdownMenuItemCheckbox> packages/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.tsx none