to-tailwind

This parser helps you generate a Tailwind theme from all your design tokens coming from Specify.

Interface

interface parser {
  name: 'to-tailwind';
  options: {
    removeSingleMode: boolean;
    removeModesIfSameValue: boolean;
  };
  output: {
    type: 'file';
    filePath: string; // e.g theme.js
  };
}

Options

Parameter
Required
Type
Default
Description

removeSingleMode

false

boolean

false

Return a single token value if the token has only one mode.

removeModesIfSameValue

false

boolean

false

Return a single token value if the values of all modes of one token are identical.

Basic usage

Last updated

Was this helpful?