@tempera/twind

0.2.0 • Public • Published

twind

An API that generates a Twind instance from a set of design tokens.

Installation

yarn add @tempera/twind

Usage

import getTwind from "@tempera/twind";

const { tw } = getTwind(tokens);

function Demo() {
  return (
    <div className={tw`text-primary`}>
  );
}

Tokens

The plugin expects these specs/tokens to be in the javascript/es6 format which you can generate using Style Dictionary.

In other words, flat modules in PascalCase are expected.

Example:

export const ColorPrimary = blue;
export const ColorSecondary = yellow;

View the source

Readme

Keywords

Package Sidebar

Install

npm i @tempera/twind

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

4.17 kB

Total Files

5

Last publish

Collaborators

  • mike1765