Version 1, Update 121
Extended variable collections (Enterprise only)
Extended variable collections enable theming for variables. When you extend a collection, the extension inherits all modes and variables from its parent collection. You can then override variable values in the extended collection to create theme-specific variations while maintaining a single source of truth.
New type
ExtendedVariableCollection: A variable collection that extends another collection
New methods
figma.variables.extendLibraryCollectionByKeyAsync(collectionKey, name): Create an extended collection from a library or local variable collectionvariableCollection.extend(name): Create an extended collection from a local variable collectionvariable.valuesByModeForCollectionAsync(collection): Get variable values for a specific collection, including overrides in extended collectionsvariable.removeOverrideForMode(extendedModeId): Remove an override for a specific modeextendedVariableCollection.removeOverridesForVariable(variableId): Remove all overrides for a variable
New properties
extendedVariableCollection.variableOverrides: A map of all overridden variable values in the extended collectionmode.parentModeId: For modes in extended collections, references the corresponding mode in the parent collection
Updated behavior
variable.setValueForMode(modeId, value): When themodeIdbelongs to an extended collection, the value will be set as an override on the extension
For examples and more details, see Working with Variables.