Skip to content

Theemo / @theemo/style-dictionary / attributeConstraintsTransform

Variable: attributeConstraintsTransform

ts
const attributeConstraintsTransform: Transform;

Defined in: transforms/attribute-constraints.ts:43

Copies constraints from platform to the token, so they are available for filtering

Example

Usage:

js
import StyleDictionary from 'style-dictionary';
import { attributeConstraintsTransform } from '@theemo/style-dictionary';

StyleDictionary.registerTransform(attributeConstraintsTransform);

export default {
  source: ['tokens/**/*.json'],
  platforms: {
    css: {
      transforms: ['attribute/constraints']
    }
  }
};