Skip to content

Configuration

TailTrace can be configured via a tailtrace.json file in your project root, or through each tool’s settings.

Create a tailtrace.json file:

{
"colors": {
"primary": "#3b82f6",
"primary-dark": "#1d4ed8",
"secondary": "#10b981",
"danger": "#ef4444",
"warning": "#f59e0b"
},
"spacing": {
"xs": "4px",
"sm": "8px",
"md": "16px",
"lg": "24px",
"xl": "32px"
},
"fontSize": {
"xs": "12px",
"sm": "14px",
"base": "16px",
"lg": "18px",
"xl": "20px"
},
"borderRadius": {
"sm": "4px",
"md": "8px",
"lg": "12px",
"full": "9999px"
},
"deltaEThreshold": 2.3,
"spacingThreshold": 2
}

A map of token names to hex color values. TailTrace uses CIEDE2000 Delta-E for perceptual matching.

{
"colors": {
"brand-blue": "#3b82f6",
"brand-green": "#10b981"
}
}

A map of token names to spacing values. Supports px, rem, and em units.

{
"spacing": {
"1": "4px",
"2": "8px",
"4": "16px"
}
}

The maximum Delta-E difference for a color to be considered a “fuzzy” match. Default is 2.3 (the just-noticeable difference for human vision).

ValueMeaning
0Exact matches only
1.0Very strict
2.3Default (JND threshold)
5.0Lenient

The maximum pixel difference for spacing to be considered a “fuzzy” match. Default is 2.

TailTrace can automatically read your tailwind.config.js:

{
"extends": "./tailwind.config.js"
}

This extracts your theme colors, spacing, and typography settings.

Configure via the popup settings panel. Settings are stored in chrome.storage.local.

Use VS Code settings:

{
"tailtrace.configPath": "./tailtrace.json",
"tailtrace.deltaEThreshold": 2.3
}

Pass config to the decorator:

.storybook/preview.ts
import { withTailtraceAudit } from '@tailtrace/storybook-addon';
export const decorators = [
withTailtraceAudit({
deltaEThreshold: 2.3,
}),
];

With TailTrace Pro, you can sync configurations across your team:

  1. Create a workspace at tailtrace.dev
  2. Add your config via the dashboard
  3. Team members fetch config automatically via API
{
"cloud": {
"workspaceId": "ws_abc123",
"configId": "cfg_xyz789"
}
}