This manual describes TokenForge 0.58.2.
TokenForge is a design system you set up once and use everywhere. Colours, type and spacing scales, layout, buttons, cards, icons, effects and more are CSS variables and classes. They are built into one static stylesheet. It loads on your front end, in the block editor and, when a supported page builder is active, in the builder.
Everything runs on your own site. There is no account and no licence key. TokenForge is free under the GPLv2 or later. The only outside service is Google Fonts, and only when you ask for it (see Privacy and external services).
TokenForge works on any WordPress site. The builder tools switch on only when a supported builder is active.
| Area | What it does | Where to set it |
|---|---|---|
| Design tokens | Colour families, fluid type and spacing scales, layout, borders, shadows and icons as CSS variables | Colors, Typography, Spacing, Layout, Borders & Shadows, Tokens |
| Utility classes | Spacing, grids, flex grids, flex and alignment, text styles, colour and more, with optional breakpoint variants | Options > Utility framework, Cheatsheet |
| Components | Buttons, links, cards, ribbons, icons, form fields, overlays, surfaces and prose | The Components and Content & Effects groups |
| Effects | Entrance, exit, visible and hover effects | Effects |
| Dark mode | Light and dark values for every colour, by section, with an optional visitor switch | Colors |
| Accessibility | Contrast checks, automatic attributes, focus rings, reduced motion | Accessibility |
| Fonts | Your own font files, or a Google font copied once to your server | Typography |
| WooCommerce | Shop, product, cart, checkout and account pages styled with your tokens | WooCommerce |
| Builders | The TokenForge window, right-click menus, suggestions and more | Builder, Setup wizard, Options |
| Block editor | Presets, patterns, button styles and editor tools | Block editor |
| Data and tools | Export, import, design token files, settings history, WP-CLI, tools for AI agents | Import, export & reset, Options |
You change settings in the dashboard and press Save. TokenForge then writes the stylesheet to uploads/tokenforge/. The CSS is built when you save, not on every page load. With WooCommerce, the shop styles go into a second file that loads only on pages that show the shop. While "Leave out unused utility classes" is on, a separate file with every class is also written, for the builder canvas.
You can reset to the starter values at any time, for everything or for one part. See Import, export and reset.
tokenforge folder to /wp-content/plugins/, or install the zip from Plugins > Add New > Upload.The Home screen has a Getting started list. These are its six steps, in order (Connect the builder shows only when a supported builder is active):
Then open Accessibility and look at Palette contrast. It lists text and button colours that are hard to read, with a suggested fix.
The top bar has three buttons. Save (also Ctrl + S, or Cmd + S on a Mac) stores your changes and rebuilds the stylesheet. Regenerate rebuilds the stylesheet without changing anything. Discard changes appears while you have unsaved changes and undoes every change since the last Save.
If the active builder supports it, the Setup wizard sets the builder's own settings the way TokenForge works best and connects the two. Until it has run, Home shows a card with the text "New site? Set up the builder in one go." The wizard has two steps:
You choose what is ticked, then press Apply. Undo builder settings puts the builder's settings back as they were before the first run. The wizard never touches site-specific settings such as licences, API keys, user and role assignments or remote template sources. You can run it again at any time. Reload the builder after it has run.
The sidebar shows the screens in five groups, in this order. Some screens only show when they apply: the Setup wizard, the Block editor (while the block editor is in use) and WooCommerce (while WooCommerce is active). The Builder screen always shows. Without a supported builder it lists the builders TokenForge knows instead of switches.
Fields work the same everywhere. A field shows its default as grey placeholder text. When you change it, a small button next to its name resets it ("Reset to" and the default). A question mark next to a name opens a short explanation. Most panels have a switch in their header that turns that part on or off. The top bar of a screen has Open all and Close all for its panels, and, on a screen that is a module, a Module on switch.
Every screen as a row, with a short description. Screens that are modules have a switch: switch one off and its classes and styles leave the stylesheet, while its settings stay saved. The colour, size and space variables stay, because other parts use them. The modules are Colors, Typography, Spacing, Layout, Borders, Buttons, Cards, Icons, Forms, WooCommerce, Content, Overlays, Effects, Base, Recipes and Builder. Above the list you may see the setup wizard card, the Getting started list (hide it with Hide, bring it back with "Show getting started") and a warning with a Check contrast button when some colour pairs are below the minimum.
Every class, variable and recipe, one click to copy. See Utility classes and the cheat sheet.
One hub for the accessibility tools: This page (the page check and the Design check, inside the builder window of a builder that supports them), Palette contrast, Automatic accessibility attributes, Focus, Reduced motion, External-link indicator and Canvas badges. See Forms, WooCommerce and other features.
Ready-made snippets typed as ?name. See Recipes.
Sets the builder up in one go. See Install and first steps.
How the dashboard looks, the TokenForge window, AI agents, builder sync, performance, breakpoints, cascade layers and the utility framework.
The tools for the page builder in use: canvas aids, the dark mode preview of the canvas, right-click menus, the input helper and more. Which panels show depends on the builder. See Builders.
Presets, editor interface, canvas, patterns and button styles for the block editor. See The block editor.
Move settings to another site, back up, restore and start over. See Import, export and reset.
Colour families, shade generation, dark mode, colour assignments, background relationships and the text selection colours. See Tokens, colours and scales.
The viewport range, the text and heading scales, size overrides, self-hosted fonts, body text and headings, per-heading overrides and text size classes. The root font size is here too.
The space scale, section spacing and the automatic gaps.
Content width, sections and gutters, boxed layout, the content grid and grids. Header height, Sticky, Content offset and Scrolling are here too.
Radius, auto radius, borders, dividers, inverted radius, and box, text and drop shadows.
Every CSS variable TokenForge writes, with the setting that makes it. You can edit tokens by hand and add your own.
Every TokenForge data attribute, and where your site uses it. See Forms, WooCommerce and other features.
The button system (btn--* classes), the button style, colours per family and link styles.
The .card class, its headings, media and avatars, boxed icons and buttons, and corner ribbons.
Icon sizes, icon style (plain or boxed) and icon lists.
Form field styles and the form extras for the builder's own form, plus the form submissions tools.
Styles for the shop, product, cart, checkout and account pages, each part with its own switch.
Flow spacing (vertical rhythm), prose styling for long text and blockquotes.
The .overlay tint, custom overlays (.overlay-1 and so on) and background textures (.surface-1 and so on).
Transitions and easing, the scroll, visible and hover effects, and the default button effects. See Effects.
A light reset and helper classes: object fit, background layers, screen-reader text and CSS columns.
A token is a CSS variable with a name, such as --primary, --space-m or --text-m. You use it anywhere with var(--space-m). Most tokens come from your settings. Colors makes the colour families. Typography, Spacing, Layout, Borders & Shadows, Icons and Effects make their own variables. All of them are written when the stylesheet is built.
This screen lists every variable TokenForge writes, in tabs by category, with a Filter box. The last column, "From / category", says which setting makes a variable, so you know where to change it.
var(--...). It only reads. Afterwards Unused shows only what is used nowhere.The starter design system has eleven families: primary, secondary, tertiary, accent, base, neutral, action, success, danger, warning and info. Each one is made from a single base colour. TokenForge makes the base colour, a hover step and six shades (ultra-light, light, semi-light, semi-dark, dark and ultra-dark) in OKLCH.
The variables follow the family name: --primary, --primary-hover, --primary-light, --primary-ultra-dark and so on. A family also gets -ref and colour channel variables (--primary-hex, --primary-rgb, --primary-hsl, --primary-h, --primary-s, --primary-l, --primary-r, --primary-g and --primary-b) and transparent steps from --primary-trans-10 to --primary-trans-90.
--primary-alt).Dark mode is set on the Colors screen, in the Dark mode panel.
light-dark(). A new site starts with it on.[tokenforge_scheme_toggle] (it takes a class attribute), with the Light/Dark Toggle element or block, or with the class scheme-toggle or the attribute data-scheme-toggle on any button. The choice stays in the visitor's own browser..scheme--light and .scheme--dark, and the attribute data-scheme="dark", force a scheme on any element and everything inside it.Color assignments are the named colours behind .bg--ultra-light, .bg--light, .bg--dark, .bg--ultra-dark and the text colours .text--dark, .text--dark-muted, .text--light and .text--light-muted. A .bg--* class sets a background and a readable text colour. Background relationships shows what each .bg--* sets for everything inside it: text, headings, links, the colour family of buttons and the icon scheme. Add .unrelate to a button to keep its own colours.
On Typography you set a viewport range: the narrowest and the widest screen width (the starter values are 360 and 1366 px). Every fluid value grows smoothly between them. Each scale has a base size and a ratio at both ends.
| Scale | Variables | Set on |
|---|---|---|
| Text | --text-xs to --text-xxl (m is the base) | Typography > Text scale |
| Headings | --h1 to --h6 (h4 is the base) | Typography > Heading scale |
| Space | --space-xs to --space-xxl | Spacing > Space scale |
| Section spacing | --section-space-*, the space steps times a multiplier | Spacing > Section spacing |
h1-max=64 or space-xs-min=8.--text-l-to-m and --space-xl-to-m: the larger step on desktop, easing down to the smaller one on mobile.--content-width and the gutter-aware --content-width-safe. The width scale adds --width-10 to --width-90 (percentages of the content width) and --width-xs to --width-xxl.--grid-1 to --grid-12, the ratio variables such as --grid-2-1, --grid-gap and, when Auto grids is on, --grid-auto-2 to --grid-auto-12.--radius and --radius-xs to --radius-xxl. Borders make --border, --border-light and --border-dark. Box shadows make --shadow-1 to --shadow-5..woff2, .woff, .ttf or .otf file, or paste a URL. TokenForge turns TTF and OTF files into WOFF2. If your server cannot make WOFF2 (it needs the Brotli extension), it makes WOFF instead. Each file is one entry with a family name, weight, style and font display. A variable font, a fallback file, preloading and a character range are optional. Uploads are stored in uploads/tokenforge/fonts/.TokenForge writes utility classes for your tokens. Four switches under Options > Utility framework control the families:
text-primary, bg-primary-light and border-primary, and the transparent forms such as bg-primary-trans-40.Three more switches add optional sets, all off by default. "Link, focus, bullet and column rule colour classes" adds link-{colour}, link-hover-{colour}, focus-{colour}, marker-{colour} and col-rule-{colour} for every colour. It adds about 30 KB. "Colour classes with double dashes too (bg--primary)" also writes the double-dash spelling of the colour classes, such as bg--primary and link-hover--primary, for pages moved from another utility framework. It adds about 10 KB. "Breakpoint variants (-at-xs to -at-xxl)" is described below.
Where the builder supports it, the switch "Register classes with the builder" (on by default) adds the utility classes to the builder's class list, so they autocomplete in its class field.
| Group | Examples |
|---|---|
| Sections and widths | section--m, section--l-to-m, section--none, header--m, content-width, content-grid (switch on Layout > Content grid first), content--feature, content--feature-max, content--full. On a new site every top-level section is already a content grid. |
| Spacing | pad-m, pad-block-m, pad-inline-m, mar-m, mar-block-m, mar-inline-m, gap-m. A size can shrink on small screens: pad-l-to-m. Block is top and bottom, inline is left and right. |
| Automatic gaps | container-gap, content-gap, grid-gap, gap--none |
| Typography | h1 to h6, text--xs to text--xxl, text-center |
| Colour | bg--light, bg--dark, text--dark, text-primary, bg-primary, border-primary |
| Buttons | btn--primary, btn--primary-dark, btn--primary-light, btn--outline, btn--s, btn--none |
| Cards and icons | card, is-clickable, is-above, icon--m, icon--boxed, icon--plain |
| Borders and shadows | border, border--light, divider, radius-m, shadow-1 to shadow-5, text-shadow--1, drop-shadow--1 |
| Overlays and surfaces | overlay, overlay-1, surface-1, ribbon, ribbon--top-right |
The Cheatsheet lists the exact name of every class your site has, so use it as the source of truth.
Coming from another utility framework? Its class names work where the result is the same, for example grid--3 works like grid-3, flex-grid--3 like flex-grid-3 and text--center like text-center. Its breakpoint names are matched by width, so with the starter breakpoints grid--m-2 works like grid-2-at-s (this needs Breakpoint variants). Its colour names with two dashes, such as bg--primary, need the switch "Colour classes with double dashes too (bg--primary)". Names whose result would differ are not copied: use the TokenForge name for those.
grid-1 to grid-12 make equal columns. grid-1-2, grid-2-1, grid-1-3, grid-3-1, grid-2-3 and grid-3-2 make ratio columns. The gap is --grid-gap.auto-grid (also grid-auto) wraps to fewer columns by itself. With "Auto grids" on (Layout > Grids), grid--auto-2 to grid--auto-12 start at that many columns and wrap as space runs out. Add grid--auto-fill, grid--auto-fit or grid--auto-rows to change the flow.col-span-1 to col-span-12, col-span-all, col-start-N, col-end-N, col-end-last, row-span-N, row-start-N and row-end-N.grid-alternate (rows alternate 1:2 and 2:1), ratio auto grids such as grid--auto-1-2 that stack when space runs out, masonry-1 to masonry-5, and order-first, order-last and order-none.grid-N-at-{bp} and grid-1-2-at-{bp}, or stack it with grid-stack-at-{bp}. These need Breakpoint variants.A flex grid puts equal-width items in rows that wrap. A short last row is centred instead of leaving an empty gap on one side.
flex-grid-1 to flex-grid-12 set the number of items per row.flex-grid--start and flex-grid--end place a short last row at the start or the end. flex-grid--stretch stretches its items to fill it.flex-grid-N-at-{bp} changes the count at and below a breakpoint, for example flex-grid-2-at-m. This needs Breakpoint variants.--grid-gap. Set --flex-grid-gap on the element to change it for that grid only.<div class="flex-grid-3 flex-grid-2-at-m"> <div class="card">One</div> <div class="card">Two</div> <div class="card">Three</div> <div class="card">Four</div> </div>
flex, inline-flex, grid, block, hidden, flex-col, flex-row, flex-wrap, flex-col-reverse, flex-grow, flex-shrink-0.items-center, items-start, items-end, items-baseline, items-stretch, justify-center, justify-between, justify-around, justify-evenly, and the self-*, content-* and justify-items-* families. Centring helpers: center-all, center-x, center-y.aspect-16-9 and eight more ratios, object-top and eight more positions, sticky-top--s, sticky-top--m, sticky-top--l, opacity-0 to opacity-100, z-0 to z-90, flip-x, flip-y, flip-xy.columns-1 to columns-6, col-width-s, col-width-m, col-width-l, line-clamp-1 to line-clamp-6.query-container and query-container-size.font-100 to font-900, bold, italic, not-italic, uppercase, lowercase, capitalize, normal-case.underline (with wavy, dotted, dashed and double styles), overline, line-through, no-underline, text-justify, text-balance, text-pretty, text-wrap, list-none.fade-top, fade-bottom, fade-left, fade-right, fade-block, fade-inline (the length is --fade-amount), border classes per side, and dividers between children: divider--all, divider--top, divider--bottom.selection--alt and focus-parent (the whole card shows the focus ring when its link is focused).When you switch on Breakpoint variants (-at-xs to -at-xxl), the layout and text classes get a copy for each breakpoint, named {class}-at-{bp}. The breakpoint names are xs, s, m, l, xl and xxl. The class applies at that width and below. Examples: col-span-1-at-m, flex-col-at-s, flex-grid-2-at-m.
The widths come from Options > Breakpoints. Variants are off by default because they add a lot of CSS. Turn on "Leave out unused utility classes" together with them, so only the ones you use stay.
This setting (Options > Utility framework) gives visitors a smaller stylesheet. After a scan of your site, TokenForge keeps only the utility classes and the data attribute styles your content uses.
* to keep every class that starts with it, for example bg-primary*, or use data-tf-* to keep all the data attributes.The Cheatsheet screen lists the classes, variables, recipes and data attributes your site has, each with a plain explanation and the CSS it applies. It is built from your current settings, so a switched-off class is not listed.
var(--name) and recipes copy as ?name.The Effects screen has one panel for transitions, one for each kind of effect and one for the default button effects. The whole module starts switched off on a new site. Switch it on at Home.
--transition, --transition-duration, --transition-timing and --transition-delay. You set the default duration, timing and delay. A separate switch adds a .transition class.--ease-* variables from a list of name=value lines. The starter list has names such as smooth, snappy, gentle, bouncy and elastic.An entrance effect plays while an element scrolls into view. The classes are .on-enter--fade, --float, --sink, --slide-left, --slide-right, --grow, --shrink and --blur (each starts with .on-enter). Effects combine: on-enter--fade on-enter--float.
.on-enter-all--fade and the other -all-- classes on a parent animate every child. Add .on-enter--stagger to the parent to delay each child a little more than the one before. The Stagger interval setting sets the step..on-enter--parallax moves an element while you scroll, by the Parallax distance..on-exit--* and .on-exit-all--* use the same effects as the entrance ones, except parallax, while an element scrolls out of view. .on-exit--stagger works like the entrance one. Their settings mirror the entrance ones; the amounts are named "Fade: end opacity", "Grow: end scale" and "Shrink: end scale".
.on-visible--* effects play once when an element becomes visible. .on-visible-all--* on a parent does it for every child, and .on-visible--stagger delays each child a little more than the one before. The Threshold (0 to 1) says how much of the element must show first: 0.2 means 20 percent. Without JavaScript the content simply shows. The attribute data-tf-reveal uses these effects too, so the Effects module and the Visible (once) panel must be on for it. data-tf-reveal="fade" fades the element in, and data-tf-reveal="up" fades it in and slides it up into place.
.on-hover--grow, --shrink, --float, --sink, --slide-right, --slide-left, --shadow, --glow, --fade and --brighten..on-hover--ripple-out, --ripple-in, --outline-out, --outline-in, --underline-left, --underline-center and --underline-right..btn and btn--*, but not btn--none) gets it without a class. All three start on None. Each one only works while its own group above (Hover, Entrance (scroll) or Hover borders) is switched on. With Buttons, "Restyle every button (builder, block editor, plain HTML)" on, the builder, block and plain buttons get them too.A recipe is a ready-made snippet you call by name. Type ?name in the builder's custom CSS box, pick it from the list or finish with a semicolon, and it expands into CSS. In a recipe, %root% stands for the selector of the selected element. The Recipes screen has a switch for the whole feature and a list of the built-in recipes with a filter.
?primary-clr, expand to a colour with an alpha you can edit. ?color-mix, ?transparency and the six plain gradients (?linear-gradient, ?gradient-radial, ?gradient-conic, ?gradient-sharp, ?gradient-fade and ?gradient-vignette) work the same way. Finish with a semicolon. This needs a builder with style fields and the second switch on the Recipes screen, "Also in builder fields".?ipsum-short, ?ipsum (a medium paragraph) and ?ipsum-long. Type the name followed by a space or a semicolon. They work in the builder's text fields, text areas, rich text and text edited on the canvas, in the block editor canvas and in the block editor's sidebar text fields. Code editors are left alone.| Category | Recipes |
|---|---|
| Color | ?primary-clr, ?primary-light-clr, ?primary-hover-clr and the same for every family and shade, plus ?color-mix and ?transparency |
| Gradients | ?linear-gradient, ?gradient-radial, ?gradient-conic, ?gradient-sharp, ?gradient-fade, ?gradient-vignette, ?gradient-text, ?gradient-border |
| Pseudo | ?before, ?after, ?before-after, ?hover, ?focus-visible, ?hover-focus, ?hover-exclude-touch |
| Grid | ?auto-grid, ?variable-grid, ?grid-1 to ?grid-12, ?grid-1-2 and the other ratios, ?flex-row, ?flex-column, ?flex-grid, ?masonry, ?content-grid |
| Text | ?ipsum-short, ?ipsum, ?ipsum-long |
| Media queries | ?breakpoint-xs to ?breakpoint-xxl, ?breakpoint-up-xs to ?breakpoint-up-xxl, ?card-container, ?container |
| Interaction | ?clickable-parent, ?clickable-card, ?focus-parent, ?btn, ?tooltip, ?skip-link |
| Layout | ?columns, ?divider-all, ?divider-top, ?divider-bottom, ?line-clamp, ?concentric-radius, ?concentric-radius-reverse, ?list-none, ?border, ?overlap, ?overlap-alt, ?footer-reveal, ?is-bg, ?border-check, ?center-all, ?center-top, ?center-bottom, ?center-left, ?center-right |
| Fades | ?fade-top, ?fade-right, ?fade-bottom, ?fade-left, ?fade-block, ?fade-inline, ?fade-all |
| Code | ?script and ?query-children (snippets for builder elements), ?property (an @property rule) |
The breakpoint recipes use the widths from Options > Breakpoints. Your own custom recipes are not part of the WordPress.org version of TokenForge. Developers can add recipes with the tokenforge_recipes filter (see For developers).
TokenForge works on any WordPress site. The builder tools switch on only when a supported page builder is active. The supported builders are Bricks, Etch, Oxygen 6, Breakdance, Elementor (classic widgets and containers) and Divi 5. The block editor has its own screen (see The block editor). The Builder screen shows the panels that fit the active builder. If no supported builder is active, it lists the builders TokenForge knows, with their status, instead of switches.
| Tool | Bricks | Etch | Oxygen 6 | Breakdance | Elementor | Divi 5 |
|---|---|---|---|---|---|---|
| TokenForge stylesheet in the editor canvas | Yes | Yes | Yes | Yes | Yes | Yes |
| The TokenForge window | Yes | Yes | Yes | Yes | Yes | Yes |
| Right-click the class field to add or remove TokenForge classes | Yes | Yes (the class area of the CSS panel) | Yes | Yes (the Classes field) | Yes (the CSS Classes field) | Yes (the Attributes list, Advanced tab) |
| Right-click a style field to insert a TokenForge variable | Yes | No | Yes | Yes | Yes (size fields) | Yes (size fields) |
| Input helper | Yes | No | Yes | Yes | Yes (fields with the custom unit) | Yes |
| Variable, class and recipe suggestions in the custom CSS box | Yes | Yes (the CSS editor) | Yes | Yes | Yes (Custom CSS needs Elementor Pro) | Yes (Free-Form CSS) |
| Placeholder text recipes in text fields | Yes | Yes | Yes | Yes | Yes | Yes |
| Light and dark preview of the canvas (moon button, while dark mode is on) | Yes | Yes | Yes | Yes | Yes | Yes |
| Sync of variables, colours and classes, theme style, Style Manager | Yes | No | No | No | No | No |
| Page check, Design check, BEM class generator | Yes | No | No | No | No | No |
| Canvas tools, Add Elements panel tools, template tweaks, setup wizard | Yes | No | No | No | No | No |
| Form tools | Yes | No | No | No | No | No |
Elementor's new atomic elements are not covered yet. Divi 5 is supported; older Divi is not. Oxygen 6 and Breakdance share one code base and cannot run together on one site.
The window is the whole dashboard, docked inside the builder. Open it with the shortcut (set under Options > TokenForge window; the starter value is Alt + Shift + T) or the TokenForge button. It is shown to administrators only. It is the same dashboard, so every screen is there. Where the builder supports it, "Show in builder canvas while editing" adds a TokenForge button in the corner of the canvas. While dark mode is on, a small moon button beside the TokenForge button switches the canvas between light and dark, so you can check both colour schemes while you edit. Only you see it and nothing is saved (Builder, Dark mode preview switches it off). The window also opens on your site's pages for administrators, with the shortcut or the admin bar link.
Leave a style field or press Enter. A TokenForge variable typed by name (space-m or --space-m) becomes var(--space-m). Maths with a variable, such as var(--space-m) * 2, is wrapped in calc(). A name with no dash in it, such as primary, needs the two leading dashes. Anything else stays as typed, and the builder's undo takes the change back. The switch is "Turn typed variable names and maths into var() and calc()" under Builder > Inputs & class list.
block__element pattern from each element's label, and applies them as global classes when you press Apply Classes.A developer can load scripts and styles in the editor of every supported builder with the action tokenforge_builder_enqueue. See For developers.
The block editor works on any site. Everything for it is on the Block editor screen. The screen shows while the block editor is in use, and every switch has a tooltip. Reload the editor after saving.
Your colours, font sizes, spacing, font families and shadows become the presets the editor offers. The setting "TokenForge presets" has three choices:
primary, text-m and space-m.tf-.With Replace, "Map the theme's old preset names to the nearest tokens" points the theme's old preset names at the nearest token, so existing posts and the theme's own styles keep their look. It adds CSS only and never changes your content. Where the theme uses one of TokenForge's names for another value (a white "base" in a theme, for example), the theme keeps the name and TokenForge's preset gets tf- in front.
TokenForge never changes the styles you saved in the Site Editor. A preset list you saved there still shows first in its picker. The Site Editor parts need a block theme. Presets, patterns and button styles work with any theme.
These switches change how the editor looks and opens for you. Nothing here reaches your pages.
is-style-tf-primary and so on), under Styles in the block sidebar.core/verse, core/pullquote. Blocks already in your content keep showing and can still be edited.?ipsum-short, ?ipsum, ?ipsum-long) expand in the canvas: type the name, then a space (it stays) or a semicolon.tokenforge_editor_classes and load their own assets with tokenforge_block_editor_enqueue.The Forms screen styles form fields everywhere and, in a builder that supports it, adds extras to the builder's own form element. No new elements are added, and the answers reach the email, webhook, saved submission and other actions as before. Each part has its own switch. The Builders section lists the builders that have the form tools.
.form--light or .form--dark on the form (or around it) and the whole form follows: field colours, spacing, labels, messages and the submit button in your button style. The classes form--columns, form--inline, form--compact and form--card are ready layouts. form--underline, form--rounded and form--soft are style presets.{Budget} > 1000, with all or any. A field can also be required only when another field has a given answer. Calculate ({Quantity} * {Price} + 25) makes a live result that is worked out again on the server. Hidden fields are not sent and never required.# is a digit, @ a letter, * either) and a character counter.{tf_form_value:Field} shows an answer anywhere on the page as the visitor types. {tf_form_count:form ID} and {tf_form_left:form ID} show how many times a form was sent and how many places are left.Form submissions adds to the builder's own submissions screen without changing its table: search, one entry laid out, read and unread marks with a count in the menu, statuses (new, done, spam), private notes, column choice, editing an entry, and export of ticked rows as CSV or JSON. Cells that start with =, +, - or @ get a leading quote in an export, so a spreadsheet does not run them. "Who can use these" sets the lowest role. Editing answers and deleting always need an administrator.
Delete old submissions automatically removes submissions older than a number of days, once a day. Nothing is deleted until you run a Dry run, look at what it would remove and confirm it. After you change the days, it waits for a new dry run. Each form can also have its own number of days in its Save submission settings.
While WooCommerce is active, the WooCommerce screen styles your shop with your tokens: shop, product, cart, checkout and account pages, product cards and filters, header carts, and the Cart, Checkout, Mini-Cart and product blocks. Every part has its own switch: Shop pages, Buttons, Prices, Sale badge, Ratings, Notices, Fields, Product grid, Product filters and Blocks. Look and spacing and Tables, tabs & pagination hold shared styles.
tokenforge_woo_shop_styles filter. Header carts are styled everywhere either way.alt="", is never changed, and nothing is saved in your pages. Put data-tf-a11y="off" on an element to leave it and everything inside it alone. This needs WordPress 6.2 or newer. Hiding icons and the icon-link guess need 6.5.These attributes work on any element. The Data attributes screen lists each one, scans your site to show where it is used, flags unused ones and warns about misspelt data-tf- names, with a suggestion. Hover or focus the question mark for what each does.
| Attribute | What it does |
|---|---|
data-tf-stack | A row becomes a column below a breakpoint. Values: xs, s, m, l. |
data-tf-space | Section spacing, or the gap between children when used with data-tf-stack. Values: s, m, l. |
data-tf-surface | A raised panel from your colour tokens. Values: 1, 2, 3. |
data-tf-reveal | Shows the element on scroll, once. Values: fade, up. |
data-tf-clamp | Cuts text after 1 to 6 lines with an ellipsis. |
data-tf-ratio | A fixed shape: 1/1, 4/3, 3/2, 16/9, 21/9, 3/4, 2/3 or 9/16. |
data-tf-copy | Makes a button or link copy text when clicked: the value you type, or the element's own text when the value is empty. |
data-tf-tooltip | Shows its text in a small bubble above the element on hover and on keyboard focus. Near the edge of a small screen the bubble moves sideways to stay in view. |
data-tf-filter-group, data-tf-filter, data-tf-term | A list filter with no code. |
data-tf-decorative | Marks decoration: aria-hidden on it and an empty alt on images. |
data-tf-state | Marks an element as open, active or disabled so your CSS can style that state. Disabled also dims the element and blocks mouse clicks, but the keyboard can still reach it. |
data-tf-a11y | Set to off to exclude an element from the automatic accessibility attributes. |
data-scheme | Forces light or dark on an element and everything inside it. |
data-scheme-toggle | On any button: a click switches the page between light and dark (the same as .scheme-toggle). |
data-tf-form | Marks a form as a TokenForge form, so steps, conditions, calculations and saved answers work in it. |
data-tf-steps | On the form: the step settings and the summary shown before sending. |
data-tf-step | On a field wrapper: a new step starts here, with an optional title, such as data-tf-step="Contact". |
data-tf-step-show | On the field wrapper that starts a step: the condition that decides whether the step is shown. |
data-tf-show | On a field wrapper: shows the field only when another field has a given answer. |
data-tf-require | On a field wrapper: makes the field required only when another field has a given answer. |
data-tf-calc | On a field wrapper: shows a total worked out from other fields. |
data-tf-save | On the form: keeps the visitor's answers in their own browser until the form is sent. |
The form controls in the builder set the form attributes for you, so you rarely type them. The icon, ribbon and inverted radius attributes (data-icon, data-icon-size, data-icon-style, data-icon-list, data-icon-hover, data-ribbon-position, data-inverted-radius-1-position) are listed on the Cheatsheet.
btn--* class makes a button. "Families (comma separated)" picks the colour families that get a class, with optional dark and light variants and outline variants. "Restyle every button (builder, block editor, plain HTML)" makes every button on the site a TokenForge button, even without a class. It is off on a new site, so only elements with a .btn or btn--* class become buttons..card is a padded flex column. .is-clickable makes the link in its heading cover the whole card while a screen reader still hears one link. .is-above on a second link or button inside the card keeps it clickable.TokenForge's tools for AI agents are on by default (Options > AI agents). They are read only and are available to logged-in users who can edit content. An agent that builds your site through the WordPress MCP Adapter, or through the builder's own AI tools, sees four tools and is told to use TokenForge classes and variables instead of hard-coded CSS, and to name its own classes in BEM:
tokenforge-get-framework: the framework guide. The agent should call it first.tokenforge-search: finds a class, variable, recipe or data attribute by words.tokenforge-check-css: checks CSS (and optionally HTML) for hard-coded values and misspelt classes before saving.tokenforge-get-recipe: returns the CSS of a recipe.To connect an AI client (Claude, ChatGPT, Cursor and others):
npx -y @automattic/mcp-wordpress-remote@latest, with three environment values: WP_API_URL (your site's /wp-json/mcp/mcp-adapter-default-server), WP_API_USERNAME (your user name) and WP_API_PASSWORD (the application password).tokenforge-get-framework first. The server instructions already tell it to.Two switches under Options > AI agents turn the tools and the guidance off.
Everything is on Import, export & reset. Before every save, import, reset, restore and setup, TokenForge keeps a copy of your settings, so each of these can be undone under History.
tokenforge.tokens.json with every colour, size, font and shadow (light values), and tokenforge.dark.tokens.json with the colours that differ in dark mode. Fluid sizes go out as their desktop size, with the full range kept for the way back. A note says how many tokens were exported and which were left out, and why.Choose what to reset: All settings (every switch and value), Tokens and colour families (the starter colours) and Font list (the files stay in uploads). Press Reset to defaults and confirm. It puts TokenForge back to how a new site starts, with the Effects module off. You can undo it under History. On any single field, the small reset button next to its name puts that one default back.
TokenForge keeps the last 20 copies. The table says when each was taken and what triggered it: before a save, an import, a reset, the setup wizard or a restore. What changed lists the differences between that copy and now. Restore puts a copy back after a confirmation. The restore takes a copy of the current state first, so it can be undone. Your pages are never touched.
The panel "Settings importer" brings over the variables and settings of another utility framework. It works even after that plugin was deactivated.
When the other framework is a newer version, its site colour scheme ("light only", "dark only" and "light dark" become Light, Dark and Follow the visitor) and the card inner radius come across. Its "standard" card radius has no match in TokenForge and is named in the report. The import also brings over the default button effects, where the block editor class field sits, the floating dashboard button on the site's pages, and whether switched-off classes are hidden from the builder class list. If something is wrong, open History and restore the copy from before the import.
Every screen and its panels, in the order of the sidebar. Each setting has a tooltip (the question mark next to its name) with the details. Use "Search settings" at the top of the sidebar to find one by name.
| Screen | Panels |
|---|---|
| Home | Module switches, Getting started, the setup wizard card |
| Cheatsheet | Every class, variable, recipe and data attribute |
| Accessibility | This page (in the builder window), Palette contrast, Automatic accessibility attributes, Focus, Reduced motion, External-link indicator, Canvas badges |
| Recipes | Recipes, Built-in recipes |
| Setup wizard | Step 1: builder settings, Step 2: connect TokenForge and the builder |
| Options | Dashboard look, TokenForge window, AI agents, Builder sync, Performance, Breakpoints, Cascade layers, Utility framework |
| Builder | Add Elements panel, Canvas, Dark mode preview, Style tab & code, Contextual menus, Inputs & class list, Templates, Theme style, Builder built-in (which ones show depends on the builder) |
| Block editor | Presets, Editor interface, Canvas, Content, TokenForge window |
| Import, export & reset | Export, Import, Design token files, Reset to defaults, History, Settings importer |
| Colors | Color families, Shade generation, Dark mode, Color assignments, Background relationships, Selection |
| Typography | Root font size, Viewport, Text scale, Heading scale, Size overrides & transitions, Self-hosted fonts, Body text, Headings, Per-heading overrides, Text size classes |
| Spacing | Space scale, Section spacing, Automatic gaps |
| Layout | Content width, Sections & gutters, Boxed layout, Content grid, Grids, Header height, Sticky, Content offset, Scrolling |
| Borders & Shadows | Radius, Auto radius, Borders, Dividers, Inverted radius, Box shadows, Text shadows, Drop shadows |
| Tokens | Every variable, + Add token, Use settings, Find uses |
| Data attributes | Every data attribute and where your site uses it |
| Buttons & Links | Buttons, Button style, Button colours per family, Links |
| Cards & Ribbons | Card, Headings & links, Media & avatars, Icons & buttons, Corner ribbons |
| Icons | Icon sizes, Icon style, Icon lists |
| Forms | Form fields, Form submissions |
| WooCommerce | WooCommerce, Shop pages, Buttons, Prices, Sale badge, Ratings, Look and spacing, Notices, Fields, Product grid, Product filters, Tables, tabs & pagination, Blocks |
| Content | Flow spacing, Prose, Blockquotes |
| Surfaces & Overlays | Basic overlay, Custom overlays, Surfaces |
| Effects | Transitions & easing, Entrance (scroll), Exit (scroll), Visible (once), Hover, Hover borders, Button effects, Builders & accessibility |
| Base | Reset, Utilities |
All commands start with wp tokenforge. Import and restore take a history copy first, so they can be undone.
| Command | What it does |
|---|---|
wp tokenforge regenerate | Rebuilds the stylesheets. |
wp tokenforge export > tokenforge-export.json | Prints every setting, token, colour family and font as JSON. Redirect it to keep it in a file. |
wp tokenforge import <file> | Imports an export file (2 MB at most). --parts=tokens,palette picks parts from tokens, palette, settings, modules, recipes and fonts. --dry-run shows what would change and writes nothing. |
wp tokenforge snapshot | Takes a history copy now, unless nothing changed since the last one. --note=before-release adds a short label (letters, digits and dashes). |
wp tokenforge history | Lists the history copies, newest first. --format is table, json, csv, yaml or count. |
wp tokenforge restore <id> | Puts a history copy back. --yes skips the question. |
wp tokenforge status | Shows the version, the stylesheet files, the active builders and the number of history copies. Writes nothing. --format is table, json, csv or yaml. |
wp tokenforge contrast | Checks text contrast. It exits with code 1 when a pair fails, so it can stop a release. --all lists passing pairs too. --format is table, json, csv or yaml. |
Put your code in a child theme's functions.php or in a mu-plugin, never in TokenForge's own files, so an update does not remove it.
The filter tokenforge_global_scss receives an empty string and returns SCSS. TokenForge compiles it with its own mixins and functions and adds it last to the stylesheet. A compile error never breaks the site.
add_filter( 'tokenforge_global_scss', 'my_pricing_scss' );
function my_pricing_scss( $scss ) {
return $scss . '.pricing { padding: var(--space-m); }';
}
tokenforge_global_scss: SCSS added last to the stylesheet (above).tokenforge_recipes: add or change recipes.tokenforge_editor_classes: the classes the block editor class field suggests.tokenforge_woo_shop_styles: true or false, whether this page loads the shop styles. It gets true when the page shows shop content.tokenforge_woo_global_styles: whether the WooCommerce price, sale badge and rating blocks take their look from global styles. The default is true with a block theme.tokenforge_header_selectors: the CSS selectors used to find the header when its height is measured on the page.tokenforge_css_dir: the folder the stylesheets are written to (an absolute path).tokenforge_transfer_parts and tokenforge_transfer_export_data: add parts and data to an export.tokenforge_starter_parts: add parts to Reset to defaults.tokenforge_builder_enqueue: load an add-on's scripts and styles in the editor of every supported builder. It passes the builder: bricks, etch, oxygen, breakdance, elementor or divi. It fires for users who can edit posts, after TokenForge's own assets. Use wp_enqueue_script and wp_enqueue_style as usual. Where the builder's editor skips the WordPress queue, TokenForge prints them.tokenforge_block_editor_enqueue: the same for the block editor. It passes the editor switches.tokenforge_transfer_imported: runs after an import, with only the parts you selected.tokenforge_starter_reset: runs after a reset.The dashboard runs these filters through wp.hooks in the browser: tokenforge.sections (add a section), tokenforge.nav (add a sidebar entry), tokenforge.icons (add an icon), tokenforge.render (draw a section that has its own render type), tokenforge.section_html (add a panel to a section), tokenforge.import_labels (name the parts an add-on adds to the import list) and tokenforge.reset_parts (add a part to the Reset to defaults list).
No. The stylesheet loads on the front end and in the block editor on any WordPress site. The builder tools switch on only when a supported builder is active.
No CSS is built while a page loads: TokenForge writes one static stylesheet when you save. A new site prints it inline (Options > Performance, Inline the stylesheet). You can switch off any module you do not use at Home, and leave out the utility classes your site does not use. The shop styles are in a second file that loads only where the shop shows.
Yes. Use the builder's own custom CSS box (or the CSS of the builder's theme style), or your theme's Additional CSS in the Customizer. Developers can add SCSS from code (see For developers).
uploads/tokenforge/fonts/, because other CSS may still use them.var(--...) values, which no longer work once the variables are gone, so set those fields again or pick another theme style. Builder settings the setup wizard changed stay as the wizard left them.No. The limit counts sends, not people. One visitor or a script can send the form until it closes, and two sends at the same moment can both get the last place. For places that matter, such as event seats, also turn on the form's CAPTCHA or "Only signed-in visitors can send" with "Sends per user".
Set WooCommerce > Shop pages > Load shop page styles to On every page.
Yes. The dashboard and the builder settings use the tokenforge text domain, so translations from translate.wordpress.org load by themselves. This manual is in English only.
-at-{bp} class needs Breakpoint variants. If "Leave out unused utility classes" is on, press Scan now, or add the class to "Always keep these classes".TokenForge contacts another server only when an administrator asks it to, and there is one such service: Google Fonts, when you press Download to this site (Typography > Self-hosted fonts). Your server asks fonts.googleapis.com for the family's CSS, then downloads the font files from fonts.gstatic.com, once. It sends the family name, the weights and styles you picked, and your server's IP address, like any web request. The files are stored in uploads/tokenforge/fonts/, so your visitors never contact Google. Google's terms are at developers.google.com/terms and its privacy policy at policies.google.com/privacy.
The accessibility checker (axe-core) is bundled with the plugin and runs only in the builder when an administrator presses Run check. Nothing else is contacted.