0.1.5 • Published 3 months ago
@digital-go-jp/design-tokens v0.1.5
Design Tokens
デジタル庁 デザインシステム(Figma)のデザイントークンです。 CSS, JavaScript のいずれかで扱えます。
パッケージのインストール
$ npm install @digital-go-jp/design-tokens
使用例
CSS
@import url("node_modules/@digital-go-jp/design-tokens/dist/tokens.css");
.std-45B-4 {
font-size: var(--font-size-45);
font-weight: var(--font-weight-700);
line-height: var(--line-height-1-4);
letter-spacing: var(--letter-spacing-0-9);
}
JavaScript
import plugin from "tailwindcss/plugin";
import tokens from "@digital-go-jp/design-tokens";
const themePlugin = plugin(() => {}, {
theme: {
extend: {
colors: {
cyan: {
50: tokens.Color.Primitive.Cyan[50].value,
100: tokens.Color.Primitive.Cyan[100].value,
200: tokens.Color.Primitive.Cyan[200].value,
300: tokens.Color.Primitive.Cyan[300].value,
400: tokens.Color.Primitive.Cyan[400].value,
500: tokens.Color.Primitive.Cyan[500].value,
600: tokens.Color.Primitive.Cyan[600].value,
700: tokens.Color.Primitive.Cyan[700].value,
800: tokens.Color.Primitive.Cyan[800].value,
900: tokens.Color.Primitive.Cyan[900].value,
1000: tokens.Color.Primitive.Cyan[1000].value,
1100: tokens.Color.Primitive.Cyan[1100].value,
1200: tokens.Color.Primitive.Cyan[1200].value,
},
},
fontSize: {
"std-45B-4": [
tokens.FontSize["48"].value,
{
fontWeight: tokens.FontWeight["700"].value,
lineHeight: tokens.LineHeight["1_4"].value,
letterSpacing: tokens.LetterSpacing["0_9"].value,
},
],
},
},
},
});
export default themePlugin;
Figma(デザインシステム)とのバージョン対応表
Figma のバージョン | npm のバージョン |
---|---|
1.4.1 | 0.1.5 |
1.4.0 | 0.0.16 |
0.1.4
3 months ago
0.1.5
3 months ago
0.1.3
5 months ago
0.0.10
9 months ago
0.0.11
9 months ago
0.0.12
9 months ago
0.0.13
8 months ago
0.0.14
7 months ago
0.1.0
7 months ago
0.1.1
6 months ago
0.0.15
7 months ago
0.0.9
9 months ago
0.0.16
7 months ago
0.0.7
11 months ago
0.0.6
11 months ago
0.0.5
12 months ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago
0.0.0
1 year ago