The sources setting
designTokensExplorer.sources is an array of source objects. Each source loads tokens from a local file path or remote URL and appears as a separate panel in the sidebar.
settings.json
Source properties
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name shown in the sidebar panel header |
path | string | Yes | Local path (relative to workspace root) or HTTPS URL |
groups | array | No | List of token groups with optional preview type assignment |
Groups
Groups control how tokens are organized in the sidebar and which visual preview renderer is applied. Each group matches tokens by name prefix.name matches the beginning of the token name. The type then controls the preview renderer shown next to the value.
Group type reference
| Type | Preview rendered | Example values |
|---|---|---|
color | Color swatch | #7C3AED, rgb(124, 58, 237), hsl(263, 70%, 58%) |
size | Visual width bar (rem→px converted) | 1rem, 16px, 0.5rem |
radius | Rounded corner demo | 0.5rem, 4px, 50% |
font-size | Scaled text sample | 0.875rem, 1.25rem |
font-weight | Weight demo text | 400, 700, bold |
line-height | Multi-line spacing demo | 1.5, 1.75, 2 |
shadow | Shadowed element | 0 2px 4px rgba(0,0,0,0.1) |
easing | SVG cubic-bezier curve | cubic-bezier(0.4, 0, 0.2, 1) |
time | Duration text | 150ms, 0.3s |
filter | No preview | blur(4px) |
Supported file formats
CSS custom properties
The file must declare tokens inside a:root {} block:
tokens/brand.css
-- prefix (color-primary, space-1, etc.).
SCSS
.scss files are loaded with the same parser as CSS. The file must declare tokens as CSS custom properties inside a :root {} block. SCSS line comments (//) are supported inside :root. SCSS-specific syntax outside of custom property declarations is ignored.
tokens/brand.scss
JSON
Flat or nested JSON objects are both supported. Nested keys are joined with-:
tokens/tokens.json
color-primary, color-neutral-100, color-neutral-900, space-1, space-2.
Nesting depth is limited to 20 levels.
JavaScript / TypeScript (local only)
String and number exports are parsed via regex — no code is executed:tokens/tokens.ts
Remote sources
Anypath starting with https:// is fetched as a remote source. The format is inferred from the file extension in the URL.
- Timeout: 10 seconds
- Maximum response size: 1 MB
- Private IPs, localhost, and loopback addresses are blocked (SSRF protection)
.js/.tsremote sources are not supported