Transforms design tokens to vanilla extract themes and styles
Install package:
# npm
npm install @design-sync/styled-components-plugin
# yarn
yarn add @design-sync/styled-components-plugin
# pnpm
pnpm install @design-sync/styled-components-plugin
# bun
bun install @design-sync/styled-components-pluginin the config file add the plugin to the plugins array
import { vanillaExtractPlugin } from '@design-sync/styled-components-plugin'
export default {
plugins: [vanillaExtractPlugin({
// relative path in the `out` root config, default ''
outDir: 'styled-components',
// name of the exported variable from the theme contract, default: 'contract'
contractName: 'contract',
// global theme selector, default: ':root'
globalThemeSelector: ':root',
// create global themes, default: false
createGlobalThemes: false,
// create global theme contract, default: false
createGlobalContract: false,
})],
}- Clone this repository
- Install latest LTS version of Node.js
- Enable Corepack using
corepack enable - Install dependencies using
pnpm install - Run interactive tests using
pnpm dev
Made with 💛
Published under MIT License.