SDTF Engine
Leverage the Specify core APIs to manipulate the SDTF token tree and produce any output you need.
Last updated
Was this helpful?
Leverage the Specify core APIs to manipulate the SDTF token tree and produce any output you need.
Last updated
Was this helpful?
The SDTF Engine brings together the core APIs that enable most of Specify features to seamlessly integrate, whether you're working in Figma or Token Studio, managing GitHub pull-requests, or directly within your codebase with the SDK or the CLI.
all parsers written by Specify uses the SDTF Engine under the hood.
At the core of the SDTF Engine, the query and mutation methods.
The SDTF Engine provides a set of built-in getter functions to access tokens, groups, collections and aliases over the loaded token tree.
getAllTokenStates
, getChildrenOf
, getParentsOf
, getAliasReference
… - give you the opportunity to traverse and iterate over the different instances of TokenState
, GroupState
, and CollectionState
.
The SDTF Engine provides a set of built-in mutation functions to locally manipulate the underlaying token tree in order to meet your project and/or company standards.
updateTokenModeValue
, updateTokenValue
, moveToken
, addToken
, deleteToken
, renameToken
… - assemble into a CRUD API giving you the control to bend your data just right for your use cases, without ever making changes to the original design data from the repository.
Elevating your control over the data, the SDTF Query Language offers sophisticated techniques to navigate and cherry-pick the token tree with precision. You will find functions that allow complex querying patterns, matching specific criteria and conditions, vital for advanced manipulation and data extraction tasks.
With this powerful language at your disposal, it becomes easy to implement custom scenarios and data transformations.
The Stateful Value API grants direct access to examine the values assigned to tokens.
Through an exhaustive map interface, the API simplifies the process of keeping your design tokens and their implementations in sync despite the creation of aliases along the way.
Looking for the SDTF Query Language details? 👉 review the reference
The SDTF Query Language is accessible in the and in some via a dedicated option.