Scalar Design System
This skill is Scalar's design system, distilled for two jobs:
- Designing Scalar UI in Paper (
code-to-design) — so a design uses Scalar's real palette, type, spacing, and component shapes from the first stroke, with no invented "design brief."
- Turning a Paper design into code (
design-to-code) — so the output maps back to the correct --scalar-* variables, Tailwind classes, and @scalar/components.
It complements the code-to-design and design-to-code plugin skills; this one supplies the Scalar-specific knowledge they lack.
Prerequisite for Paper work: Paper Desktop must be running with a file open. If the Paper MCP connection fails, ask the user to open Paper Desktop first.
The values below are a curated snapshot of the default theme — enough to design and implement directly. For the full variable catalog, all 13 theme presets, and the complete component list, read the reference files:
Brand essentials
Scalar's look is a clean, modern developer-tool aesthetic: high-contrast typography, restrained color, hairline borders, and small radii. Treat it as a product/clarity system, not a marketing/expressive one.
- Type:
Inter for UI and prose, JetBrains Mono for code.
- Accent:
#0099ff (one deliberate accent; everything else is neutral).
- Mode: light mode by default (
#fff ground, #1b1b1b text).
- Borders: hairline
0.5px, color #dfdfdf.
- Radii: small —
3px default, 6px large, 8px extra-large.
- Shape: information lives directly on surfaces; reserve cards/elevation for genuine grouping.
Foundations
- Scoping: every Scalar style lives under the
.scalar-app class. Any markup must be inside an element with class="scalar-app".
- Light / dark: a
.light-mode or .dark-mode class on a container selects the value set. Default to .light-mode.
- Layers: themes load in two CSS layers —
scalar-base (base variables + default theme) and scalar-theme (preset overrides). Unlayered CSS overrides both.
Design tokens (default theme)
Reference --scalar-* variables in CSS; in components, prefer the Tailwind classes (next section).
Color — text (--scalar-color-*)
| Variable |
Light |
Dark |
Role |
--scalar-color-1 |
#1b1b1b |
#e7e7e7 |
Primary text |
--scalar-color-2 |
#757575 |
#a4a4a4 |
Secondary text |
--scalar-color-3 |
#8e8e8e |
#797979 |
Muted text |
--scalar-color-accent |
#0099ff |
#00aeff |
Accent / interactive |
Color — background (--scalar-background-*)
| Variable |
Light |
Dark |
Role |
--scalar-background-1 |
#fff |
#0f0f0f |
Base surface |
--scalar-background-2 |
#f6f6f6 |
#1a1a1a |
Raised surface / hover |
--scalar-background-3 |
#e7e7e7 |
#272727 |
Highest contrast surface |
--scalar-background-accent |
#8ab4f81f |
#3ea6ff1f |
Tinted accent fill |
Borders & shadows
--scalar-border-color — #dfdfdf (light) / #2d2d2d (dark); --scalar-border-width — 0.5px.
--scalar-shadow-1 (subtle), --scalar-shadow-2 (lifted).
Semantic colors (--scalar-color-{green,red,yellow,blue,orange,purple}, plus --scalar-color-danger / --scalar-color-alert and matching --scalar-background-*). Light: green #069061, red #ef0006, yellow #edbe20, blue #0082d0, orange #ff5800, purple #5203d1.
Radii: --scalar-radius 3px, --scalar-radius-lg 6px, --scalar-radius-xl 8px.
Typography
- Content sizes: heading-1
24px, heading-2 20px, heading-3–6 16px, paragraph 16px, small 14px, mini 13px, micro 12px.
- UI app sizes:
--scalar-font-size-1…7 = 21, 16, 14, 13, 12, 12, 10 px.
- Line heights:
--scalar-line-height-1…5 = 32, 24, 20, 18, 16 px.
- Weights: regular
400, semibold 500, bold 600.
Tailwind class mapping
Scalar maps --scalar-* variables onto a custom Tailwind theme. In components, use these classes rather than raw variables. Source of truth: @scalar/themes/tailwind.css.
- Background:
bg-b-1, bg-b-1.5, bg-b-2, bg-b-3, bg-b-accent, bg-b-btn, bg-b-tooltip, bg-b-danger, bg-b-alert.
- Text:
text-c-1, text-c-2, text-c-3, text-c-accent, text-c-ghost, text-c-disabled, text-c-btn, text-c-tooltip, text-c-danger, text-c-alert.
- Themed:
text-green / bg-green, plus red, yellow, blue, orange, purple.
- Border:
border (uses --scalar-border-color, default width 0.5px); shadow-border for an inset hairline.
- Shadow:
shadow / shadow-md (shadow-1), shadow-lg (shadow-2), shadow-sm.
- Radius:
rounded & rounded-md (3px), rounded-lg (6px), rounded-xl (8px), rounded-full.
- Type:
font-sans (Inter), font-code (JetBrains Mono); sizes text-3xs 10, text-xxs/text-xs 12, text-sm 13, text-base 14, text-lg 16, text-xl 21; weights font-normal 400, font-medium 500, font-bold 600.
- Spacing: base unit is
4px, so p-1 = 4px, p-2 = 8px, gap-3 = 12px, etc. h-header = 48px.
- Breakpoints:
xs 400, sm 600, md 800, lg 1000, xl 1200.
Components — @scalar/components
A Vue 3 library (34 components) scoped to .scalar-app, styled with the Tailwind classes above via cva variants, and customizable through Tailwind class overrides (useBindCx). Import from the subpath, not the barrel:
import { ScalarButton } from '@scalar/components/button'
import { ScalarIconAcorn } from '@scalar/icons'
Headline components (full list in references/components.md):
- Buttons & inputs:
ScalarButton (variant solid | outlined | ghost | gradient | danger; size xs | sm | md), ScalarIconButton, ScalarTextInput, ScalarTextArea, ScalarToggle, ScalarCheckbox, ScalarSearchInput, ScalarFileUpload.
- Selection / floating:
ScalarCombobox, ScalarListbox, ScalarDropdown, ScalarPopover, ScalarTooltip (all positioned with Floating UI).
- Overlays:
ScalarModal (sizes xxs–full).
- Layout / nav:
ScalarHeader, ScalarSidebar, ScalarMenu.
- Content:
ScalarCard, ScalarCodeBlock, ScalarMarkdown, ScalarForm, ScalarLoading.
Icons come from @scalar/icons (1,500+ Phosphor icons as ScalarIcon<Name> components). Size with size-* (size-4, size-5) and color with text-*. ScalarButton takes an :icon prop.
Working in Paper
code-to-design — build Scalar UI in Paper
Paper writes literal HTML/CSS to the canvas with px sizes and hex colors, so translate Scalar tokens into concrete values:
- Ground
#fff, text #1b1b1b (secondary #757575), accent #0099ff, borders 0.5px #dfdfdf, radii 3–8px.
Inter for everything except code (JetBrains Mono); body text 16px, small 14px.
- Spacing on a 4px grid (4, 8, 12, 16, 24…).
- Default to light mode. Mirror the real component shapes (buttons, cards, sidebar rows) using these values.
- Because the design system is specified here, skip Paper's invented design brief and design directly in Scalar's system.
design-to-code — turn a Paper design into Scalar code
- Extract exact values from Paper with
get_jsx / get_computed_styles / get_fill_image — never read sizes or colors off a screenshot.
- Map values back to tokens / Tailwind: e.g.
#0099ff → --scalar-color-accent / text-c-accent; #fff → bg-b-1; #1b1b1b → text-c-1; 0.5px #dfdfdf border → border; 3px radius → rounded; 16px Inter → text-lg font-sans. See references/paper.md for the full table.
- Map elements to components: button →
ScalarButton (pick variant + size); card → ScalarCard; menu/select → ScalarDropdown / ScalarListbox / ScalarCombobox; dialog → ScalarModal; icon → an @scalar/icons ScalarIcon*. Import each from its subpath.
- Where the component docs are (to confirm a component, its props, and variants):
@scalar/components package.json exports — the subpath → component map.
- The bundled TypeScript declarations (
*.d.ts) shipped with each component — props, variants, and JSDoc.
- The
@scalar/components Storybook — live variants and controls.
- Output conventions: wrap rendered output in
.scalar-app; override styles with Tailwind classes via useBindCx (do not hand-write CSS); follow the vue-components skill for component code style.
Source of truth
When exact or current values matter, go to the package that owns them — read these from node_modules/<package>/ (or the package on npm):
- Tokens & theming —
@scalar/themes: the compiled variables and the Tailwind @theme mapping ship as @scalar/themes/style.css and @scalar/themes/tailwind.css; the JS API (getThemeStyles, presets, themeIds, ThemeId) is exported from the package root (@scalar/themes).
- Components —
@scalar/components: the subpath import map is in the package's package.json exports; the full export list and per-component props/variants live in the bundled type declarations (*.d.ts).
- Icons —
@scalar/icons: the ScalarIcon* set is exported from the package root (@scalar/icons).
Source: scalar/scalar — distributed by TomeVault.
1---2name: scalar-design-system3description: Scalar's design system — design tokens, theming (@scalar/themes), CSS variables, and the @scalar/components library. Use when designing or implementing Scalar UI, especially with Paper (code-to-design / design-to-code), so output matches real Scalar tokens, colors, typography, spacing, and components instead of generic defaults. Use when this capability is needed.4---56# Scalar Design System78This skill is Scalar's design system, distilled for two jobs:9101. **Designing Scalar UI in Paper** (`code-to-design`) — so a design uses Scalar's real palette, type, spacing, and component shapes from the first stroke, with no invented "design brief."112. **Turning a Paper design into code** (`design-to-code`) — so the output maps back to the correct `--scalar-*` variables, Tailwind classes, and `@scalar/components`.1213It complements the `code-to-design` and `design-to-code` plugin skills; this one supplies the Scalar-specific knowledge they lack.1415> **Prerequisite for Paper work:** Paper Desktop must be running with a file open. If the Paper MCP connection fails, ask the user to open Paper Desktop first.1617The values below are a curated snapshot of the **default** theme — enough to design and implement directly. For the full variable catalog, all 13 theme presets, and the complete component list, read the reference files:1819- [`references/tokens.md`](./references/tokens.md) — every `--scalar-*` variable, the Tailwind mapping, and all theme presets.20- [`references/components.md`](./references/components.md) — all 34 components, their variants/props, and the subpath import map.21- [`references/paper.md`](./references/paper.md) — bidirectional Paper ↔ Scalar mapping tables for round-tripping designs.2223## Brand essentials2425Scalar's look is a clean, modern developer-tool aesthetic: high-contrast typography, restrained color, hairline borders, and small radii. Treat it as a product/clarity system, not a marketing/expressive one.2627- **Type:** `Inter` for UI and prose, `JetBrains Mono` for code.28- **Accent:** `#0099ff` (one deliberate accent; everything else is neutral).29- **Mode:** light mode by default (`#fff` ground, `#1b1b1b` text).30- **Borders:** hairline `0.5px`, color `#dfdfdf`.31- **Radii:** small — `3px` default, `6px` large, `8px` extra-large.32- **Shape:** information lives directly on surfaces; reserve cards/elevation for genuine grouping.3334## Foundations3536- **Scoping:** every Scalar style lives under the `.scalar-app` class. Any markup must be inside an element with `class="scalar-app"`.37- **Light / dark:** a `.light-mode` or `.dark-mode` class on a container selects the value set. Default to `.light-mode`.38- **Layers:** themes load in two CSS layers — `scalar-base` (base variables + default theme) and `scalar-theme` (preset overrides). Unlayered CSS overrides both.3940## Design tokens (default theme)4142Reference `--scalar-*` variables in CSS; in components, prefer the Tailwind classes (next section).4344**Color — text** (`--scalar-color-*`)45| Variable | Light | Dark | Role |46|---|---|---|---|47| `--scalar-color-1` | `#1b1b1b` | `#e7e7e7` | Primary text |48| `--scalar-color-2` | `#757575` | `#a4a4a4` | Secondary text |49| `--scalar-color-3` | `#8e8e8e` | `#797979` | Muted text |50| `--scalar-color-accent` | `#0099ff` | `#00aeff` | Accent / interactive |5152**Color — background** (`--scalar-background-*`)53| Variable | Light | Dark | Role |54|---|---|---|---|55| `--scalar-background-1` | `#fff` | `#0f0f0f` | Base surface |56| `--scalar-background-2` | `#f6f6f6` | `#1a1a1a` | Raised surface / hover |57| `--scalar-background-3` | `#e7e7e7` | `#272727` | Highest contrast surface |58| `--scalar-background-accent` | `#8ab4f81f` | `#3ea6ff1f` | Tinted accent fill |5960**Borders & shadows**61- `--scalar-border-color` — `#dfdfdf` (light) / `#2d2d2d` (dark); `--scalar-border-width` — `0.5px`.62- `--scalar-shadow-1` (subtle), `--scalar-shadow-2` (lifted).6364**Semantic colors** (`--scalar-color-{green,red,yellow,blue,orange,purple}`, plus `--scalar-color-danger` / `--scalar-color-alert` and matching `--scalar-background-*`). Light: green `#069061`, red `#ef0006`, yellow `#edbe20`, blue `#0082d0`, orange `#ff5800`, purple `#5203d1`.6566**Radii:** `--scalar-radius` `3px`, `--scalar-radius-lg` `6px`, `--scalar-radius-xl` `8px`.6768**Typography**69- Content sizes: heading-1 `24px`, heading-2 `20px`, heading-3–6 `16px`, paragraph `16px`, small `14px`, mini `13px`, micro `12px`.70- UI app sizes: `--scalar-font-size-1…7` = `21, 16, 14, 13, 12, 12, 10` px.71- Line heights: `--scalar-line-height-1…5` = `32, 24, 20, 18, 16` px.72- Weights: regular `400`, semibold `500`, bold `600`.7374## Tailwind class mapping7576Scalar maps `--scalar-*` variables onto a custom Tailwind theme. In components, **use these classes** rather than raw variables. Source of truth: `@scalar/themes/tailwind.css`.7778- **Background:** `bg-b-1`, `bg-b-1.5`, `bg-b-2`, `bg-b-3`, `bg-b-accent`, `bg-b-btn`, `bg-b-tooltip`, `bg-b-danger`, `bg-b-alert`.79- **Text:** `text-c-1`, `text-c-2`, `text-c-3`, `text-c-accent`, `text-c-ghost`, `text-c-disabled`, `text-c-btn`, `text-c-tooltip`, `text-c-danger`, `text-c-alert`.80- **Themed:** `text-green` / `bg-green`, plus `red`, `yellow`, `blue`, `orange`, `purple`.81- **Border:** `border` (uses `--scalar-border-color`, default width `0.5px`); `shadow-border` for an inset hairline.82- **Shadow:** `shadow` / `shadow-md` (shadow-1), `shadow-lg` (shadow-2), `shadow-sm`.83- **Radius:** `rounded` & `rounded-md` (3px), `rounded-lg` (6px), `rounded-xl` (8px), `rounded-full`.84- **Type:** `font-sans` (Inter), `font-code` (JetBrains Mono); sizes `text-3xs` 10, `text-xxs`/`text-xs` 12, `text-sm` 13, `text-base` 14, `text-lg` 16, `text-xl` 21; weights `font-normal` 400, `font-medium` 500, `font-bold` 600.85- **Spacing:** base unit is `4px`, so `p-1` = 4px, `p-2` = 8px, `gap-3` = 12px, etc. `h-header` = 48px.86- **Breakpoints:** `xs` 400, `sm` 600, `md` 800, `lg` 1000, `xl` 1200.8788## Components — `@scalar/components`8990A Vue 3 library (34 components) scoped to `.scalar-app`, styled with the Tailwind classes above via `cva` variants, and customizable through Tailwind class overrides (`useBindCx`). Import from the **subpath**, not the barrel:9192```ts93import { ScalarButton } from '@scalar/components/button'94import { ScalarIconAcorn } from '@scalar/icons'95```9697Headline components (full list in [`references/components.md`](./references/components.md)):9899- **Buttons & inputs:** `ScalarButton` (variant `solid` | `outlined` | `ghost` | `gradient` | `danger`; size `xs` | `sm` | `md`), `ScalarIconButton`, `ScalarTextInput`, `ScalarTextArea`, `ScalarToggle`, `ScalarCheckbox`, `ScalarSearchInput`, `ScalarFileUpload`.100- **Selection / floating:** `ScalarCombobox`, `ScalarListbox`, `ScalarDropdown`, `ScalarPopover`, `ScalarTooltip` (all positioned with Floating UI).101- **Overlays:** `ScalarModal` (sizes `xxs`–`full`).102- **Layout / nav:** `ScalarHeader`, `ScalarSidebar`, `ScalarMenu`.103- **Content:** `ScalarCard`, `ScalarCodeBlock`, `ScalarMarkdown`, `ScalarForm`, `ScalarLoading`.104105**Icons** come from `@scalar/icons` (1,500+ Phosphor icons as `ScalarIcon<Name>` components). Size with `size-*` (`size-4`, `size-5`) and color with `text-*`. `ScalarButton` takes an `:icon` prop.106107## Working in Paper108109### code-to-design — build Scalar UI in Paper110111Paper writes literal HTML/CSS to the canvas with `px` sizes and hex colors, so translate Scalar tokens into concrete values:112113- Ground `#fff`, text `#1b1b1b` (secondary `#757575`), accent `#0099ff`, borders `0.5px` `#dfdfdf`, radii 3–8px.114- `Inter` for everything except code (`JetBrains Mono`); body text 16px, small 14px.115- Spacing on a 4px grid (4, 8, 12, 16, 24…).116- Default to light mode. Mirror the real component shapes (buttons, cards, sidebar rows) using these values.117- Because the design system is specified here, **skip Paper's invented design brief** and design directly in Scalar's system.118119### design-to-code — turn a Paper design into Scalar code1201211. **Extract exact values from Paper** with `get_jsx` / `get_computed_styles` / `get_fill_image` — never read sizes or colors off a screenshot.1222. **Map values back to tokens / Tailwind:** e.g. `#0099ff` → `--scalar-color-accent` / `text-c-accent`; `#fff` → `bg-b-1`; `#1b1b1b` → `text-c-1`; `0.5px #dfdfdf` border → `border`; `3px` radius → `rounded`; 16px Inter → `text-lg font-sans`. See [`references/paper.md`](./references/paper.md) for the full table.1233. **Map elements to components:** button → `ScalarButton` (pick variant + size); card → `ScalarCard`; menu/select → `ScalarDropdown` / `ScalarListbox` / `ScalarCombobox`; dialog → `ScalarModal`; icon → an `@scalar/icons` `ScalarIcon*`. Import each from its subpath.1244. **Where the component docs are** (to confirm a component, its props, and variants):125 - `@scalar/components` `package.json` `exports` — the subpath → component map.126 - The bundled TypeScript declarations (`*.d.ts`) shipped with each component — props, variants, and JSDoc.127 - The `@scalar/components` Storybook — live variants and controls.1285. **Output conventions:** wrap rendered output in `.scalar-app`; override styles with Tailwind classes via `useBindCx` (do not hand-write CSS); follow the `vue-components` skill for component code style.129130## Source of truth131132When exact or current values matter, go to the package that owns them — read these from `node_modules/<package>/` (or the package on npm):133134- **Tokens & theming — `@scalar/themes`:** the compiled variables and the Tailwind `@theme` mapping ship as `@scalar/themes/style.css` and `@scalar/themes/tailwind.css`; the JS API (`getThemeStyles`, `presets`, `themeIds`, `ThemeId`) is exported from the package root (`@scalar/themes`).135- **Components — `@scalar/components`:** the subpath import map is in the package's `package.json` `exports`; the full export list and per-component props/variants live in the bundled type declarations (`*.d.ts`).136- **Icons — `@scalar/icons`:** the `ScalarIcon*` set is exported from the package root (`@scalar/icons`).137138---139> Source: [scalar/scalar](https://github.com/scalar/scalar) — distributed by [TomeVault](https://tomevault.io).140<!-- tomevault:4.0:skill_md:2026-06-24 -->