ds.tokensByType
with appropriate type instead.tokenIds
property), this function retrieves all tokens of a specified group from the targeted design system as a flattened array. The type can be any of the design token types.ds.allTokenGroups
, this function retrieves all token groups defined inside the design system. However, in this case, instead of returning all groups a flat array, it returns trees instead. There will be exactly as many trees in the resulting array as there are token categories (ie. one for colors, one for gradients, and so on). traverse
flow, recursive for
variant. ds.allTokenGroups
, but other types than the provided one are filtered out.ds.allTokenGroups
, this function retrieves all token groups defined inside the design system for one specific token type. However, in this case, instead of returning all groups a flat array, it returns the root group instead. There is always only one root group per token type, so the result of this call is an object.