Design tokens
Tokens are the only values an Elevate class can use. The Design panel lets you add them by looking at them, and keeps every class that uses them in step.
A token is a named value: a colour called proof, a size called lede, a spacing step called d5. Classes refer to tokens by name, so text:proof is valid only if proof is a colour token. Elevate ships a full set of defaults, and your site adds its own on top.
Where tokens come from
elevate/config/design.ts builds the design system by spreading maps together, one per token type: Elevate’s defaults, then site.ts, then tokens.json. Later entries win, so your tokens can replace a default with the same name.
import { siteColors, siteFonts, siteSizes } from "../design/site.js";
import tokens from "../design/tokens.json";
export const designSystem = {
ColorToken: { ...colors, ...siteColors, ...tokens.ColorToken },
FontSizeToken: { ...typography.size, ...siteSizes, ...tokens.FontSizeToken },
// …
};
Tokens added in the Design panel live in elevate/design/tokens.json, one map per type. A new site keeps its own colours, fonts and sizes there, so you can change them in the panel. elevate/design/site.ts is for extras written by hand, like a colour whose value is a CSS variable, which the panel doesn’t take. It starts empty. If design.ts doesn’t import tokens.json, the panel says so and shows the line to add.
The Design panel
Open it from the palette button in the editor’s bar, from the page menu on a phone, or from the command palette. It has five tabs.
| Tab | What you can do |
|---|---|
| Colours | A single colour, or a nine-step ramp from one colour |
| Type | Font sizes, including fluid sizes, and font families from font files |
| Spacing | Spacing steps |
| Effects | Shadows and gradients |
| Text | Style article text: paragraphs, headings, links, lists, quotes, callouts, code, pictures and tables |
Every token change is written to tokens.json, the CSS is recompiled, and the page updates in place.
Colour ramps
Give a ramp a name and one hex colour. Verso makes nine steps named the way Elevate names its own: clay-4 through clay to clay+4, dark to light. Your colour is the middle step. The others are spaced evenly in perceived lightness, with chroma easing off at the ends so the palest and deepest steps stay clean. Each step shows its contrast against white and against the darkest step, so you can see which take white text.
Fluid sizes
Give a size for a phone and a size for a wide screen, like 1.25rem and 2rem (or pixels). Verso writes a clamp() that grows smoothly from the first on a 20rem screen to the second on an 80rem screen.
Fonts
Drop in a WOFF2, WOFF, TTF or OTF file. Verso reads the font's family name, weight and style from the file itself, and whether to fall back to a serif, a sans or a monospace, so there's nothing to type. Drop each weight and the italic of a family, one file at a time; they all join the same family.
A variable font is one file for every weight. Verso sees that and writes the whole range, so bold text uses the font's own bold. Under Name it or set its weight yourself you can overrule what the file says; set those before dropping it.
The file goes in public/fonts/, its @font-face rule goes in elevate/extend/fonts.css, and that file is added to Elevate’s Extend list if it isn’t there already. Removing a font family in the panel removes its files and rules too.
Text styles
The Text tab sets how rich text looks everywhere on the site. It shows a sample of everything rich text can hold, in your site’s own styles. Pick a kind of text, like Large headings or Links, and choose its font, size, weight, line height, colour, background, space above and below, padding and corners, each from your tokens. Under Advanced you can write the style as Elevate classes; Verso checks them before saving.
The Screens tab names, moves, adds and removes the site's screen sizes. See Screen sizes.
Text styles are saved as "rich" in verso.json, the same class map you can write by hand. See Rich text fields. Rich text on the page takes the new style straight away.
Names and values
- Names use lowercase letters, numbers and dashes, starting with a letter.
- Colours are hex values like
#B8471F, orrgb(),hsl(),oklch(),oklab()orcolor(). - Values can’t contain
;,{,},<or>. - If a name is already one of Elevate’s defaults, Verso asks before replacing it.
Renaming and removing
Each of your tokens shows how many places use it. Renaming one rewrites every class string that uses it, in templates/, blocks/, components/ and the rich text map in verso.json, including prefixed uses like round- or from-. Before you remove a token, the panel lists where it’s still used. If it is, the button reads Remove anyway, and those classes stop working until you change them, so change them first or rename the token instead.
Colours on the page
A color field lets an editor choose one of the site’s colour tokens for a page. It renders the colour’s CSS value, so it belongs in a style attribute:
<article style="--accent: {{ accent:color }}">