TokenForge
Design tokens, fluid scales, utility classes, contrast and accessibility checks for any WordPress site, with Bricks and WooCommerce support.
Install in
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 all CSS variables and classes, built into one static stylesheet that loads on your front end, in the block editor and, with Bricks, in the builder.
Why TokenForge
- One place to set your whole design: colours, type, spacing, layout and components.
- Works with the block editor, Bricks, Etch, Oxygen, Breakdance, Divi and Elementor. Bricks has the deepest support today.
- Etch, Oxygen, Breakdance, Elementor and Divi: the TokenForge window inside the editor, TokenForge variables by right-click in style fields, TokenForge classes by right-click in the class field (Divi: its Attributes list), the input helper (space-m becomes var(–space-m)), variable, class and recipe suggestions in the custom CSS box, placeholder text recipes in text fields and the TokenForge stylesheet in the canvas. The builder’s own Save keeps every change.
- Block editor: your colours, font sizes, spacing, font families and shadows are the presets the editor offers. It also gets ready patterns, a Button style for each button family, a class field with suggestions on top of the block sidebar, and optional editor tools (a compact, builder-style block sidebar, swapped and resizable sidebars, a dark interface, outlines in the canvas, the TokenForge window). Placeholder text recipes (?ipsum-short, ?ipsum, ?ipsum-long) work in the editor canvas too. All of it is set on the Block editor screen.
- Bricks: your tokens stay in step with Bricks variables, colours, global classes and the theme style. The dashboard and a design check also open inside the builder.
- Moving from another utility framework? Press Import from Automatic.css under Import, export & reset. You confirm before it runs, and the settings history can undo it. Custom CSS does not come across, so move it into your builder’s own CSS box.
- One stylesheet, built when you save, not on every page load. Unused classes can be left out after a site scan.
- Accessibility checks: contrast in light and dark mode, with a suggested fix you can apply in one click.
- Export your tokens as W3C design token files, for Figma, Tokens Studio and Style Dictionary.
- Settings history: the last 20 saves are kept, and a restore can be undone.
- Free under GPLv2 or later. No account needed. The only outside service is Google Fonts, and only when you ask for it.
A new site starts ready: a complete starter design system (every token, colour family and setting), so there is nothing to import. Reset to defaults any time, for everything or one section.
Design system
- Colour families: shades generated from one colour in light and dark mode, with a live preview. Add, remove or edit your own families.
- Fluid type and spacing scales from one setting each, plus a width scale, a root font size, grids and automatic gaps.
- Layout, gutters, boxed or full width, borders, radius, shadows, icons, header height and prose styles.
- Utility classes for spacing, grids and grid placement, flex grids (equal-width items with a centred or stretched last row), flex and alignment, text styles, corners and more, with optional breakpoint variants ({class}-at-{bp}). Unused classes can be left out of the stylesheet after a site scan, to keep it small.
- A Tokens screen that lists every variable, the setting that makes it and where it is used. Add your own tokens in a built-in or your own category.
- Dark mode: assign it by section and add a light or dark switch anywhere, with a shortcode or a block.
Accessibility
- Contrast check of text, links, focus rings and buttons against their backgrounds, in light and dark mode (WCAG 2 AA, with the APCA value shown). Each problem gets a suggested colour token, applied with one click.
- Automatic attributes for the front end, every one off by default: hidden decorative icons, alt text from the media library, menu labels, the current page mark, a new tab notice and two labelled guesses. TokenForge adds only what is missing and stores nothing.
- Data attributes for layout and behaviour without custom code, listed under Data attributes below, with a screen that shows where each one is used.
- A page check in the builder, based on the open-source axe-core engine. It runs only when an administrator presses Run check, and nothing is saved unless you choose a fix.
Fonts
- Self-hosted fonts: upload TTF or OTF files and TokenForge turns them into WOFF2 (or WOFF), preloads them and lists them in the builder’s font list.
- Or download a Google font once to your server. Your visitors never contact Google.
WooCommerce
- While WooCommerce is active: shop, product, cart, checkout and account pages, product cards and filters, header carts, and the Cart and Checkout blocks, styled with your tokens.
- Every part has its own switch. The shop styles load only on pages that show the shop, or on every page if you choose.
Data and tools
- Export and import your settings, and export your tokens as W3C design token files (light and dark) for Figma, Tokens Studio and Style Dictionary. Each import shows a preview of every change first.
- Settings history: before every save, import, reset or setup, TokenForge keeps a copy (the last 20). You can see what changed and put any copy back, and a restore can be undone.
- WP-CLI commands: regenerate, export, import (with –dry-run), snapshot, history, restore, status and contrast.
- Guidance and abilities for AI agents (MCP and Bricks AI).
- The dashboard and its settings are translatable (translate.wordpress.org).
With Bricks
When Bricks is active, TokenForge also:
- Syncs your tokens into Bricks global variables, the colour palette and global classes, so they appear in the builder’s pickers and autocomplete. The sync runs both ways.
- Keeps a Bricks theme style for the whole website in step with your settings, both ways.
- Adds the full dashboard inside the builder, right-click menus for variables and classes, a BEM class generator, a design check (typed colours and font sizes that should be tokens, contrast in light and dark mode, sizes off the type scale) and the page check.
- Extends the Bricks form element with steps (back, next and a progress bar), conditional fields, required-if rules, calculated fields, sliders, star ratings, ranges, input masks, character counters, date rules, choices filled from your content, live values on the page, send limits, an Update meta action, an Add to cart action, and form presets. Each has its own switch.
- Keeps the form submissions in the builder: search, read and unread marks, statuses, notes, editable entries, CSV or JSON export, and optional auto-delete after a set number of days (only after a dry run you confirm).
- Has a setup wizard that sets Bricks’ own settings for working with TokenForge in one go. You choose which, and Undo puts them back.
Data attributes
These attributes work on any element in Bricks, the block editor or your own markup. Each one is listed on the Data attributes screen with where it is used.
- data-tf-stack: switches a row to a column below a breakpoint.
- data-tf-space: section spacing or stack gap.
- data-tf-surface: a raised panel from your colour tokens.
- data-tf-reveal: shows an element on scroll, using the visible effects.
- data-tf-clamp and data-tf-ratio: limit lines of text and keep a fixed shape.
- data-tf-copy: a copy button for a value on the page.
- data-tf-tooltip: a tooltip that stays on screen, also on a phone.
- data-tf-filter-group, data-tf-filter and data-tf-term: a list filter with no code.
- data-tf-decorative: marks an image as decorative (Mark as decorative in the builder).
- 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.
TokenForge is original software released under the GPLv2 or later.
Developers
A developer can add SCSS from code. The filter tokenforge_global_scss receives an empty string and returns SCSS. TokenForge compiles it with its own library (mixins and functions) and adds it last to the stylesheet. A compile error never breaks the site.
This is code, not a setting. Put it 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.
An add-on can load its scripts and styles in the editor of every supported page builder. The action tokenforge_builder_enqueue passes the builder (bricks, etch, oxygen, breakdance, elementor or divi). It fires in the editor page for users who can edit posts, after TokenForge’s own assets (the window, handle tokenforge-panel, for administrators; the tools, handle tokenforge-builder, outside Bricks). Call wp_enqueue_script and wp_enqueue_style as usual; where the builder’s editor skips the WordPress queue (Oxygen, Breakdance), TokenForge prints them. In Divi it fires in the top window, where the settings panels are; the canvas is the same-origin frame #et-vb-app-frame. The block editor has its own action, tokenforge_block_editor_enqueue, which passes the editor switches.
Roadmap
Planned, with no dates yet:
- Block editor: panels for block styles and the global styles.
- More accessibility checks, with clearer fixes.
Example: add add_filter( 'tokenforge_global_scss', 'my_pricing_scss' ); to your functions.php, then define my_pricing_scss( $scss ) so it appends .pricing { padding: var(--space-m); } to $scss and returns it.
TokenForge is developed by Prista Digital. Website: https://pristadigital.com
Written by Joobi from the project's own listing. See the source page
The full history is in CHANGELOG.md, also shown from the Changelog link next to TokenForge on the Plugins screen.
0.58.1
- Effects: entrance effects on elements already on screen when the page opens (a hero, for example) now play as the page loads. Before, they waited for a scroll that never came.
- Importing another framework’s settings now brings over its site colour scheme and card inner radius from its newer version.
0.58.0
- Page builders: Etch, Oxygen 6, Breakdance, Elementor (classic widgets and containers) and Divi 5 now get the TokenForge window, variables and classes by right-click, the input helper, suggestions and recipes in custom CSS, and the TokenForge stylesheet in the canvas while editing.
- Recipes: placeholder text recipes (?ipsum-short, ?ipsum, ?ipsum-long and your own Text recipes) work in every supported builder and in the block editor sidebar.
- Block editor: a new setting picks the default unit for empty size fields (rem by default, px keeps WordPress as it is).
- Developers: the new action tokenforge_builder_enqueue loads an add-on’s scripts and styles in every supported builder.
- Fixed: dark text on the dark Appearance list in the dark editor interface, and Divi’s settings panels getting the front-end styles.
0.57.0
- Block editor: a new Block editor screen holds every block editor setting. Your colours, font sizes, spacing, font families and shadows become the editor presets (replace the theme’s presets, sit beside them, or off), and the theme’s old preset names point at the nearest token so existing posts keep their look.
- Block editor tools, each with its own switch: a class field with suggestions, TokenForge patterns, a Button style for each button family, blocks hidden from the inserter, a compact sidebar laid out like the builder, swapped sidebars, drag handles to resize the sidebars, a dark interface and canvas, canvas outlines and the TokenForge window.
- Recipes: ?ipsum (a medium paragraph) and ?ipsum-long join ?ipsum-short, and all three also work in the block editor canvas (type the name, then a space or a semicolon).
- Fixed: dashboard fields lost their name for screen readers when changed from the default, and two suggestion lists could open on top of each other in the builder’s CSS box.
0.56.0
- Bricks Style Manager: the text, heading and space sizes show as typography and spacing scales, and the HTML font size, screen widths and default mode fill its Settings. Changes made there come back into TokenForge.
- AI agents: the guide now covers BEM naming for an agent’s own classes and, on Bricks, adding classes as global classes. The FAQ explains how to connect an AI client through the MCP Adapter.
- Fixed: the BEM class generator gave empty names in a builder shown in another alphabet (such as Bulgarian); labels are transliterated and unnamed elements are named by type.
- Deleting TokenForge also removes its short upgrade lock. The admin bar menu shows the TokenForge icon.
0.55.0
- Flex grids: flex-grid-1 to flex-grid-12 with equal-width items and a centred last row, flex-grid–start, flex-grid–end and flex-grid–stretch, and per-breakpoint counts such as flex-grid-2-at-m.
- Breakpoint variants (off by default): {class}-at-{bp} copies of the layout and text classes, such as col-span-1-at-m.
- Grid classes: column and row placement, per-breakpoint and stacking grids, grid-alternate, ratio auto grids, masonry and order.
- Layout classes: more flex and alignment, centring, height, container queries, opacity, z-index, display, flip, sticky offsets, aspect ratio, object position, line clamp and column classes.
- Text classes: weights, italics, case, underline styles, balanced text, list reset, edge fades, border sides, dividers, and optional link, focus and bullet colours per colour.
- Optional live header height: –header-height follows the real header, plus –admin-bar-height.
- Builder: input helper (variable names to var(), maths to calc()), hide switched-off classes in the class list, checkerboard behind transparent swatches, TokenForge classes reused on template import (all optional except the checkerboard).
- Fixed: oklch() and light-dark() palette colours get their colour classes again; columns-2 to 4 leave WooCommerce product lists alone; Bricks buttons without a btn class keep their border.
- Hardening: a value with an unclosed bracket, quote or comment is no longer saved, so it cannot blank the rest of the stylesheet; on multisite, saving, importing and restoring settings needs the Additional CSS right (edit_css); damaged font files and oversized AI checks are refused.
- Security: stricter checks on form cart prices, products, open meta writes and date rules; presets listed to editors only; safer font and AI CSS checks; on multisite, settings need edit_css.
- Fixed: flex grids lay out in a row on builder blocks; columns breakpoint variants override columns-N; sticky-top with a 0 offset; focus-parent keeps field focus rings.
0.54.2
- Developers can extend Export / Import and the Starter reset: the hooks tokenforge_transfer_parts, tokenforge_transfer_export_data, tokenforge_transfer_imported, tokenforge_starter_parts and tokenforge_starter_reset.
- Undo now restores add-on parts too, and an import passes only the parts you selected to the import hook.
- Export leaves out keys that look like secrets (licence, token, password), except the core and registered parts.
- Nothing changes for sites that do not use these hooks.
0.54.1
- Developers can add to the dashboard from a plugin or theme: sections, navigation entries, icons and panels through the wp.hooks filters tokenforge.sections, tokenforge.nav, tokenforge.icons, tokenforge.render and tokenforge.section_html.
- Developers can add recipes with the tokenforge_recipes filter.
- Nothing changes for sites that do not use these filters.
- Developer and website details updated: Prista Digital, https://pristadigital.com.
0.54.0
- The Global SCSS editor is removed from the WordPress.org version. Developers can still add SCSS with the tokenforge_global_scss filter.
- Custom recipes (your own CSS snippets) are removed from the WordPress.org version; built-in recipes stay. Export them first if you need them.
0.53.7
- WordPress.org review: the WP-CLI export no longer writes to a chosen file; use the shell redirect instead.
- WordPress.org review: removed links to outside documentation from the admin screens.
0.53.6
- The attribute suggestion menu is easier to read and use with a screen reader or in high contrast; unused builder code removed.
0.53.5
- Form entries: the auto-delete confirmation, the delete dry run, titles, notes, search and the menu entry are tidied.
0.53.4
- The page check treats an image role written as Presentation or “none ” the same way as everywhere else, so it no longer lists that image as having empty alt text.
0.53.3
- Saving from the dashboard no longer drops a colour family made with Generate in the builder or another window; the stored ones are kept and you are told.
- The Saved message stays visible next to the site scan result, and Save no longer says “CSS updated” when the stylesheet could not be written.
- “Leave out unused utility classes” also leaves out the styles of data attributes the site does not use (after a scan).
- The tooltip bubble stays on screen inside a scaled or zoomed container.
- Nested filter groups work: each group changes only its own buttons and items.
0.53.2
- A tooltip near the edge of a phone screen stays in view, and a hidden one no longer makes the page scroll sideways.
- Switching on “Leave out unused utility classes” no longer scans the whole site during Save.
- Uninstall cleans every site of a multisite network.
0.53.0
- New data attributes: data-tf-stack, data-tf-space, data-tf-surface, data-tf-reveal, data-tf-copy, data-tf-tooltip, and a no-code list filter (data-tf-filter-group, data-tf-filter, data-tf-term).
- Data attributes screen under Foundations: lists every TokenForge data attribute with where it is used, unused ones and misspelt names.
- Mark as decorative in the builder’s page check; the Attributes control suggests data-scheme and the form attributes.
0.52.0
- One Accessibility hub in the TokenForge window: the page check, palette contrast, automatic attributes, focus, reduced motion, the external-link indicator and the canvas badge.
- Fix a failing contrast pair with any token or colour you pick, with the ratio shown as you choose.
- Design check in the builder: typed colours and font sizes that should be tokens, contrast in light and dark mode, and sizes off the type scale.
- Global SCSS outline: section comments, a Jump to list with search (Ctrl+Shift+O).
0.51.0
- Page check in the builder: lists accessibility problems on the page you are editing, with Show and, where it is safe, Fix. Nothing is saved; Undo works.
- Automatic accessibility attributes for the front end, every switch off. Needs WordPress 6.2 or newer.
- Data attributes for clamped text, ratios, states and decorative images, with suggestions in the builder.
0.50.0
- Forms: submissions in the builder get search, read and unread marks, statuses and notes, editable entries, column choice, CSV or JSON export, and auto-delete after a set number of days (only after a confirmed dry run).
- Dashboard: a Light look beside Builder panels and Flat.
0.49.0
- Forms: sliders, star ratings, two-handle ranges, input masks, character counters, date rules, choices filled from posts, terms, users or custom field choices.
- Forms: live answers on the page, send counts and places left, close after a number of sends, signed-in only, and once per user. All checked again on the server.
- Forms: Update meta and Add to cart actions, and whole-form, field and style presets.
0.48.0
- Design token files: export and import W3C design token files (light and dark) with a preview of every change. History keeps a copy, so an import can be undone.
- WP-CLI commands: regenerate, export, import, snapshot, history, restore, status and contrast.
0.47.0
- Contrast check: text, links, focus rings and buttons against their backgrounds, in light and dark mode, with a suggested colour token for each problem.
0.46.0
- Settings history: before every save, import, reset and setup, TokenForge keeps a copy of its settings, tokens, colour families, fonts and Global SCSS (the last 20).
- WooCommerce: product, cart and checkout styles load only where the shop appears.
0.45.1
- On a site without a supported page builder, the builder screen lists the builders TokenForge knows instead of switches that do nothing.
Follow this listing's changes (Atom feed)