Skip to content

Theme Variables Reference

This page documents all Tier 1 CSS custom properties — the 53 variables you must provide in every custom theme. They are enforced by the GlyphThemeVars TypeScript type.

For an overview of how theming works, including the two-tier model and component-specific Tier 2 overrides, see the Theming guide.


Core Colors

Used across all components as the foundational visual layer.

VariableLightDarkDescription
--glyph-bgtransparent#0a0e1aPrimary background color
--glyph-text#1a2035#d4dae3Primary text color
--glyph-text-muted#6b7a94#6b7a94Secondary/muted text color
--glyph-heading#0a0e1a#edf0f5Heading text color
--glyph-link#0a9d7c#00d4aaLink color
--glyph-link-hover#088a6c#33e0beLink hover color
--glyph-border#d0d8e4#1a2035Default border color
--glyph-border-strong#a8b5c8#2a3550Emphasized border color
--glyph-surface#e8ecf3#0f1526Surface/card background
--glyph-surface-raised#f4f6fa#162038Elevated surface background

Accent

The primary brand color and its variants. Used by interactive elements, highlights, and call-to-action indicators.

VariableLightDarkDescription
--glyph-accent#0a9d7c#00d4aaPrimary accent color
--glyph-accent-hover#088a6c#33e0beAccent hover state
--glyph-accent-subtle#e6f6f2#0a1a1aSubtle accent background
--glyph-accent-muted#b0ddd0#1a4a3aMuted accent color
--glyph-text-on-accent#fff#0a0e1aText color on accent-colored backgrounds

Code

VariableLightDarkDescription
--glyph-code-bg#e8ecf3#0f1526Inline code background
--glyph-code-text#1a2035#d4dae3Inline code text color

Typography

VariableValueDescription
--glyph-font-body"Inter", "Helvetica Neue", system-ui, sans-serifBody text font stack
--glyph-font-heading"Inter", "Helvetica Neue", system-ui, sans-serifHeading font stack
--glyph-font-monoui-monospace, "Cascadia Code", "Fira Code", monospaceMonospace font stack

Spacing

Consistent spacing scale used across all components.

VariableValueDescription
--glyph-spacing-xs0.25remExtra small spacing (4px)
--glyph-spacing-sm0.5remSmall spacing (8px)
--glyph-spacing-md1remMedium spacing (16px)
--glyph-spacing-lg1.5remLarge spacing (24px)
--glyph-spacing-xl2remExtra large spacing (32px)

Border Radius

VariableValueDescription
--glyph-radius-xs0.25remExtra small radius (4px)
--glyph-radius-sm0.375remSmall radius (6px)
--glyph-radius-md0.5remMedium radius (8px)
--glyph-radius-lg0.75remLarge radius (12px)

Effects

VariableLightDarkDescription
--glyph-shadow-sm0 1px 3px rgba(0,0,0,0.1)0 1px 3px rgba(0,0,0,0.4)Subtle shadow
--glyph-shadow-md0 4px 12px rgba(0,0,0,0.15)0 4px 12px rgba(0,0,0,0.5)Medium shadow
--glyph-shadow-lg0 8px 30px rgba(0,0,0,0.2)0 8px 30px rgba(0,0,0,0.6)Large shadow
--glyph-transition0.2s ease0.2s easeDefault transition timing
--glyph-focus-ring0 0 0 2px #0a9d7c0 0 0 2px #00d4aaFocus ring box-shadow
--glyph-opacity-muted0.70.7Muted element opacity
--glyph-opacity-disabled0.40.4Disabled element opacity

Semantic States

Four universal state colors used by components that indicate success, warning, error, and informational states. These drive KPI sentiment, Kanban priority, Comparison results, Steps states, Quiz feedback, Callout types, and Form validation.

VariableLightDarkDescription
--glyph-color-success#16a34a#4ade80Success / positive state
--glyph-color-warning#d97706#fbbf24Warning / caution state
--glyph-color-error#dc2626#f87171Error / negative state
--glyph-color-info#38bdf8#38bdf8Informational / neutral state

Shared Palette

Ten color slots for multi-series visualizations: Chart, Timeline, Infographic, and Graph group colors. The palette is also used for architecture node fills and other categorical encodings.

VariableLightDark
--glyph-palette-color-1#00d4aa#00d4aa
--glyph-palette-color-2#b44dff#b44dff
--glyph-palette-color-3#22c55e#4ade80
--glyph-palette-color-4#e040fb#e040fb
--glyph-palette-color-5#00e5ff#00e5ff
--glyph-palette-color-6#84cc16#bef264
--glyph-palette-color-7#f472b6#f472b6
--glyph-palette-color-8#fb923c#fb923c
--glyph-palette-color-9#818cf8#818cf8
--glyph-palette-color-10#38bdf8#38bdf8

Misc

VariableLightDarkDescription
--glyph-tooltip-bgrgba(10,14,26,0.9)rgba(0,0,0,0.9)Tooltip background
--glyph-tooltip-text#f4f6fa#d4dae3Tooltip text color
--glyph-rating-star-fill#f59e0b#fbbf24Rating star fill color

Tier 2 — Component-specific overrides

Component-specific CSS properties (like --glyph-kanban-card-bg or --glyph-steps-active-color) are not in the required TypeScript union. They cascade from the Tier 1 tokens above via CSS fallback chains built into each component.

You can override any of them at the CSS level without touching your theme object:

/* Tier 2 override — CSS only, no TypeScript required */
[data-glyph-theme="corporate"] {
--glyph-kanban-card-bg: #f0f4ff;
--glyph-kanban-priority-high: #c62828;
--glyph-steps-active-color: #0066cc;
--glyph-callout-info-bg: #e3f2fd;
--glyph-callout-info-border: #2196f3;
--glyph-table-header-bg: #1e3a5f;
}

Tier 2 variables follow this naming pattern:

PatternExample
--glyph-{component}-{property}--glyph-table-border
--glyph-{component}-{variant}-{property}--glyph-callout-info-bg

Usage examples

Minimal custom theme

Only the 53 Tier 1 vars are required:

import { ThemeProvider } from '@glyphjs/runtime';
const myTheme = {
name: 'corporate',
variables: {
'--glyph-bg': '#ffffff',
'--glyph-text': '#333333',
'--glyph-text-muted': '#666666',
'--glyph-heading': '#111111',
'--glyph-link': '#0066cc',
'--glyph-link-hover': '#0052a3',
'--glyph-border': '#e0e0e0',
'--glyph-border-strong': '#bdbdbd',
'--glyph-surface': '#f5f5f5',
'--glyph-surface-raised': '#ffffff',
'--glyph-accent': '#0066cc',
'--glyph-accent-hover': '#0052a3',
'--glyph-accent-subtle': '#e3f0ff',
'--glyph-accent-muted': '#90c0f0',
'--glyph-text-on-accent': '#ffffff',
'--glyph-code-bg': '#f5f5f5',
'--glyph-code-text': '#333333',
'--glyph-font-body': '"Inter", system-ui, sans-serif',
'--glyph-font-heading': '"Inter", system-ui, sans-serif',
'--glyph-font-mono': 'ui-monospace, monospace',
'--glyph-spacing-xs': '0.25rem',
'--glyph-spacing-sm': '0.5rem',
'--glyph-spacing-md': '1rem',
'--glyph-spacing-lg': '1.5rem',
'--glyph-spacing-xl': '2rem',
'--glyph-radius-xs': '0.25rem',
'--glyph-radius-sm': '0.375rem',
'--glyph-radius-md': '0.5rem',
'--glyph-radius-lg': '0.75rem',
'--glyph-shadow-sm': '0 1px 3px rgba(0,0,0,0.1)',
'--glyph-shadow-md': '0 4px 12px rgba(0,0,0,0.15)',
'--glyph-shadow-lg': '0 8px 30px rgba(0,0,0,0.2)',
'--glyph-transition': '0.2s ease',
'--glyph-focus-ring': '0 0 0 2px #0066cc',
'--glyph-opacity-muted': '0.7',
'--glyph-opacity-disabled': '0.4',
'--glyph-color-success': '#2e7d32',
'--glyph-color-warning': '#e65100',
'--glyph-color-error': '#c62828',
'--glyph-color-info': '#0288d1',
'--glyph-palette-color-1': '#0066cc',
'--glyph-palette-color-2': '#7b1fa2',
'--glyph-palette-color-3': '#2e7d32',
'--glyph-palette-color-4': '#c62828',
'--glyph-palette-color-5': '#00838f',
'--glyph-palette-color-6': '#f9a825',
'--glyph-palette-color-7': '#ad1457',
'--glyph-palette-color-8': '#e65100',
'--glyph-palette-color-9': '#4527a0',
'--glyph-palette-color-10': '#00695c',
'--glyph-tooltip-bg': 'rgba(0,0,0,0.85)',
'--glyph-tooltip-text': '#ffffff',
'--glyph-rating-star-fill': '#fbc02d',
},
};
function App() {
return (
<ThemeProvider theme={myTheme}>
{/* All GlyphJS components use these variables */}
</ThemeProvider>
);
}

Extending a built-in theme

import { ThemeProvider, darkTheme } from '@glyphjs/runtime';
const customDark = {
name: 'custom-dark',
variables: {
...darkTheme.variables,
'--glyph-accent': '#ff6b6b',
'--glyph-accent-hover': '#ff8787',
'--glyph-color-success': '#69db7c',
},
};
<ThemeProvider theme={customDark}>
{children}
</ThemeProvider>

Dark mode setup

import { ThemeProvider } from '@glyphjs/runtime';
// Built-in dark theme
<ThemeProvider theme="dark">
{children}
</ThemeProvider>