14.0.2 • Published 28 days ago

@wonderflow/tokens v14.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
28 days ago

Wanda Design Tokens

This repo contains all the design tokens generated from the Wonderflow design language. These tokens are the foundation for our digital products.

How to use

To use the tokens you have to install the npm package first:

npm i @wonderflow/tokens

based on the platform you're working on, you can import the tokens from the relative platform folder inside node_modules. For example if you're working on web, you can import the tokens as JSON or CSS (custom-properties):

Platforms

Currently we ship tokens only for the web platform, others may be added in the future.

Inside javascript

If you want to import and use tokens inside your javascript-based project, you can import the json version and use it. Note that the color tokens are provided in HSL format, without the css hsl() notation, which you have to add each time.

import tkns from "@wonderflow/tokens/platforms/web/tokens.json";

<div style={{ color: `hsl(${tkns.color.blue["50"]} / 10%)` }} />;

Typescript

If your codebase is based on typescript you can import the tokens types which provide types validation for tokens when you use them inside other components. Here an example:

import { TokensTypes } from "@wonderflow/tokens/platforms/web/types";
import React from "react";

type MyComponentProps = {
  padding: TokensTypes["space"],
};

Inside CSS

Inside css files the tokens are available as custom env variables (env(--[TOKEN-NAME])), they are then converted into the final value at build-time.

@import "@wonderflow/tokens/platforms/web/tokens.css";

div {
  /* Colors are defined as HSL-4 but without the hsl() notation */
  color: hsl(env(--color-primary-50) / 50%);
}

NOTE

You need to use postcss-import or postcss-easy-import to import files from node_modules

14.0.2

28 days ago

14.0.1

28 days ago

14.0.0

1 month ago

13.0.0

2 months ago

12.11.0

2 months ago

12.10.0

2 months ago

12.9.0

3 months ago

12.8.0

5 months ago

12.7.0

5 months ago

12.4.0

9 months ago

12.6.0

6 months ago

12.2.0

9 months ago

12.5.2

7 months ago

12.3.0

9 months ago

12.5.0

8 months ago

12.5.1

8 months ago

12.0.0

12 months ago

12.1.2

11 months ago

12.1.3

11 months ago

12.1.4

11 months ago

12.1.0

12 months ago

12.1.1

11 months ago

11.0.6

1 year ago

11.0.7

1 year ago

11.0.4

1 year ago

11.0.5

1 year ago

11.0.2

1 year ago

11.0.3

1 year ago

11.0.0

1 year ago

11.0.1

1 year ago

10.6.0

2 years ago

10.8.0

2 years ago

10.20.0

1 year ago

10.0.0

2 years ago

10.2.0

2 years ago

10.4.0

2 years ago

10.0.0-next.0

2 years ago

10.0.0-next.3

2 years ago

10.0.0-next.2

2 years ago

10.17.0

1 year ago

10.15.0

1 year ago

10.13.0

2 years ago

10.11.0

2 years ago

10.17.1

1 year ago

10.19.0

1 year ago

10.5.0

2 years ago

10.7.0

2 years ago

10.7.1

2 years ago

10.9.0

2 years ago

9.5.1

2 years ago

10.9.1

2 years ago

10.1.0

2 years ago

10.3.0

2 years ago

7.0.0

2 years ago

10.0.0-beta.2

2 years ago

10.0.0-beta.0

2 years ago

10.0.0-beta.1

2 years ago

10.8.0-beta.0

2 years ago

8.0.0

2 years ago

10.16.0

1 year ago

10.14.0

2 years ago

10.12.0

2 years ago

10.10.0

2 years ago

9.2.0

2 years ago

10.18.2

1 year ago

10.18.0

1 year ago

10.18.1

1 year ago

5.4.0

2 years ago

5.3.0

2 years ago

5.2.0

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

3 years ago

6.0.0

2 years ago

1.4.0-beta.0

2 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.2.0

3 years ago

1.3.1

3 years ago

1.2.2

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago