Free cookie consent management tool by TermsFeed Generator
All Products & Integrations

jalpi page builder docs

Design Tokens

The site-wide token and preset schema stored in the jalpi_settings_design_system option.

Jalpi CoreDeveloper
1 min read Β· November 2026

Ten atomic token lists plus two composite preset lists, stored as one option and emitted as CSS custom properties.

Shape#

interface DesignToken {
  id: string; name: string; value: string;
  tabletValue?: string; mobileValue?: string;
}

interface DesignSystem {
  colors: DesignToken[];        fontFamilies: DesignToken[];
  fontSizes: DesignToken[];     lineHeights: DesignToken[];
  letterSpacing: DesignToken[]; borderRadius: DesignToken[];
  boxShadows: DesignToken[];    spacing: DesignToken[];
  containerWidths: DesignToken[]; opacity: DesignToken[];
  typography: TypographyPreset[];
  buttons: ButtonPreset[];
}

Category map#

TokenCategory (link key)Storage keyCSS variable prefix
colorcolors--jalpi-color-
fontFamilyfontFamilies--jalpi-font-
fontSizefontSizes--jalpi-fs-
lineHeightlineHeights--jalpi-lh-
letterSpacingletterSpacing--jalpi-ls-
borderRadiusborderRadius--jalpi-radius-
boxShadowboxShadows--jalpi-shadow-
spacingspacing--jalpi-space-
containerWidthcontainerWidths--jalpi-container-
opacityopacity--jalpi-opacity-

The TypeScript TokenCategory union uses the storage keys; Jalpi_Settings::TOKEN_CATEGORIES maps the short link keys to them. globalStyleRef.tokens[prop].category is validated against that map.

The Design System panel with brand colour swatches, a heading type scale, spacing steps and radius presets
Figure: Centralized design system editor managing site-wide tokens and CSS custom property output.

Composite presets#

interface TypographyPreset {
  id, name, fontFamily?, fontSize?, fontWeight?,
  lineHeight?, letterSpacing?, textTransform?, color?
}

interface ButtonPreset {
  id, name, backgroundColor?, color?, borderRadius?,
  paddingTop?, paddingBottom?, paddingLeft?, paddingRight?,
  fontSize?, fontWeight?, fontFamily?, border?, boxShadow?, textTransform?
}

Linking expands to var(--jalpi-typo-{presetId}-{kebab-prop}, {literal}) or var(--jalpi-btn-{presetId}-…).

CSS output#

:root {
  --jalpi-color-primary: #6366f1;
  --jalpi-fs-base: 16px;
  --jalpi-space-lg: 32px;
}
@media (max-width: 1024px) { :root { --jalpi-fs-base: 15px; } }
@media (max-width: 767px)  { :root { --jalpi-fs-base: 14px; } }

Emitted by Jalpi_Settings::output_design_system_css() and filterable through jalpi_design_system_css_vars.