Skip to content

Design tokens ​

ScopeView shares one token source across metric charts, traces, profiles and HTML values. Use public CSS variables for host customization.

Consume tokens ​

ts
import { SCOPEVIEW_DESIGN_TOKENS, CHART_TOKENS } from '@scopedb/scopeview/tokens';

const reading = SCOPEVIEW_DESIGN_TOKENS.component.tooltip.fontSize;
const labelSize = CHART_TOKENS.labelSize;
console.log(reading.css, labelSize);

SCOPEVIEW_DESIGN_TOKENS contains the typed catalog. CHART_TOKENS contains resolved numeric constants. The authoring JSON is available at @scopedb/scopeview/tokens.json. These entries are DOM-free; importing metadata does not register elements.

A leaf's css field names a public custom property. A runtime field generates a numeric constant and does not imply a CSS override. Foundation tokens have neither. The catalog is a read-only description, not a runtime theme setter. See styling for host use.

Shared roles ​

RolePublic names or catalog group
Categorical identity--color-chart-series-1 through -10, with -line variants
Status/severity--color-chart-semantic-ROLE, with -line variants
Surfaces and textsemantic.surface, semantic.text, semantic.border
Rulerscomponent.axis
Hover, selection and rangescomponent.inspection
Compact readingscomponent.tooltip
Headless densitycomponent.report
Entity labels and contourscomponent.hierarchy

Categorical slots represent identity, not a numeric gradient. Status colors have fixed meanings. Action/focus color remains separate from neutral selection. CSS uses native light-dark() against the view's selected scheme.

The exported catalog contains the complete palette. To change the library defaults, follow token maintenance.