Tokenmend docs
1. Audit
When it opens, Tokenmend loads every page of the file and reads its local variable collections, variables and paint, text, effect and grid styles. For each one it counts what uses it:
- layers on any page that bind the variable (fills, strokes, effects, layout grids, sizes, gaps, padding, radius, opacity, text fields) or use the style, including ranges of mixed text;
- other variables whose value is an alias to it;
- styles that bind the variable (a color style made from a variable, a text style whose size is a variable);
- prototype actions and conditions that read or set it, and component properties bound to it.
The audit lists:
| Check | What it means | Fix |
|---|---|---|
| Broken aliases | A value points to a variable that no longer exists, to one of another type, or back to itself through other aliases. | Repoint it to another variable of the same type. |
| Missing mode values | A collection has a mode in which the variable has no value. | Copy the default mode's value. |
| Unused | Nothing above uses it. | Review and delete (see 3). |
| Duplicates by value | Variables in the same collection with the same value in every mode (numbers and strings also need the same scopes), or styles that look the same. | Merge: swap every use to the most used one and delete the other. |
| Naming | Within a collection (or a style type), names that break the convention most names follow: kebab-case among camelCase, a capitalised word among lowercase ones, extra spaces, empty groups, dots used as groups, the same name twice. | Preview the suggested names and apply them, or rename by hand. |
Library variables used in the file are counted but not listed: change them in their library. Download audit (CSV) writes every variable and style with its value, usage per kind, pages, issues, code syntax, scopes and description.
2. Edit in bulk
On the Edit tab, filter the list by type, collection, issue or text and check what to change. Every action shows each name before and after, and what it leaves alone and why, before you apply.
- Rename. Find and replace on the whole name, the name without its groups, or the groups only. With Regular expression on, the find is a JavaScript regular expression and the replacement can use
$1,$2and$<name>. Case changes each group (kebab-case, snake_case, camelCase, PascalCase, Title Case, Sentence case, lowercase, UPPERCASE). Prefix and suffix go on the last part; Move to group replaces the groups. Two items can't end up with the same name, variable names can't contain.,{or}, and variables in extended collections are renamed in their parent collection. - Descriptions. Find and replace (plain or regex), or set one description for all.
- Scopes. Set exactly, add or remove scopes; only scopes that fit each variable's type are written. Figma's rules apply: "Show in all supported properties" stands alone, and the three fill scopes together become "All fills".
- Code syntax. Fill Web, Android or iOS code syntax from a template with
{kebab},{snake},{camel},{pascal},{name},{leaf},{collection}or{swift}, or remove it. The Web presetvar(--{kebab})matches the CSS and Tailwind exports, and the iOS preset{swift}matches the SwiftUI export (Color.brand500,Tokens.space4), so Dev Mode shows the names your code uses. - Sort styles. Sorts the checked styles within their own group by name (numbers in numeric order) or by value (colours dark to light, text by size, effects by blur). Figma's plugin API has no way to reorder variables.
- Delete unused. See 3.
3. Deleting safely
Only checked items that nothing uses are deleted. Items checked together can go together: a primitive used only by an alias that's also being deleted goes with it, never on its own. Items published to a team library stay unless you tick the option, because other files may use them. Right before deleting, Tokenmend scans the file again, so anything that got used since the preview is kept and listed.
4. Convert hard-coded values
Pick the selection, the page or the whole file and the properties to look at: fills, strokes, corner radius, gap, padding, stroke width, layer opacity and font size. Tokenmend lists every value that isn't bound to a variable or covered by a style, grouped by value, with the number of layers. For each value it offers the variables (and, for colours, the color styles) that match exactly in their collection's default mode: same colour and opacity, or the same number (opacity variables are percentages). Scoped variables only appear for properties they're scoped to, unless you ignore scopes. When several match, semantic variables (aliases) come first, or primitives if you prefer. Layers inside instances, locked layers and hidden layers can be skipped. A color style replaces all of a layer's fills, so it's only applied to layers with one fill.
5. Swap
Pick a variable or style and another of the same type. Tokenmend counts every layer, text range, alias and style that uses the first, then switches them to the second, main components before instances so instances don't get needless overrides. Optionally the old one is deleted if nothing uses it any more. Prototype actions that set the old variable and component properties bound to it can't be rewritten by plugins; the count tells you how many to change by hand.
6. Tokens
Export. Design tokens follow the W3C Design Tokens format (2025.10): groups from the slashes in names, $type, $value, $description, aliases as references like {Primitives.color.blue.500}. Colours are sRGB objects with a hex fallback (or hex strings for older tools). Numbers scoped only to sizes become px dimensions, numbers scoped to font weight become font weights, everything else a number. Scopes, code syntax and publishing go in $extensions["com.figma"]. With one file, $value holds each collection's default mode and every mode is in $extensions["com.figma"].modes; with one file per mode you get a ZIP of Collection.Mode.tokens.json files, like Figma's own export. Styles are included: color styles as colours or gradients, text styles as typography, effect styles as shadows (blurs and grid styles have no token form and are listed in the notes). Where a token and a group share a name, the token becomes the group's $root.
Code. CSS custom properties put each collection's default mode on :root and other modes in a block per mode ([data-theme="dark"], .theme-dark, [data-mode="dark"] or a dark-mode media query), with aliases as var(), plus color and shadow styles as properties and text styles as classes. Tailwind v4 writes an @theme block with namespaces from scopes (--color-*, --spacing-*, --radius-*, --text-*, --font-*, --shadow-*); Tailwind v3 writes a theme.extend object. SwiftUI writes extension Color (light and dark modes become one adaptive colour), enum Tokens for numbers, text and booleans, and extension Font for text styles. Names come from code syntax when it's set.
Import. Choose one or more token files. Tokenmend reads DTCG files and the older value/type style, with $type inherited from groups. Top-level groups become collections (or put everything in one). Files named Collection.Mode.tokens.json become modes, and modes in $extensions["com.figma"].modes are read too. Colours can be hex, rgb() or sRGB objects; dimensions in px, rem or em (1rem = 16px by default); font weights as numbers or names. References become aliases, across collections, once every variable exists, and they're checked first, so an import never leaves a broken alias. Typography, shadow, gradient and other composite tokens are listed as left out: variables can't hold them. Figma plans limit how many modes a collection can have; if a mode can't be added, the import says so and carries on.
Trial and licenses
The trial is 10 runs over 7 days, starting with your first change or export. A run is one applied change set (rename, descriptions, scopes, code syntax, sort, delete, convert, swap, import, repoint or fill) or one export, download or copy, and during the trial a run changes at most 50 variables and styles and 300 layers. The audit, the lists, the CSV and every preview are always free. A license key is activated per Figma account; each seat covers two accounts (for example work and personal). Manage billing changes seats, plans and cards.
Questions: hello@greatwork.company. A person replies within one business day.