1.0.0 • Published 2 years ago
@anthane/core-tokens v1.0.0
Anthane Core Tokens
Visual design atoms of the Core design system.
Installation
npm install @anthane/core-tokens
Usage
Javascript
Accessing all of the available token groups
// Token values only
import { tokens } from '@anthane/core-tokens';
console.log(tokens.colors.background); // 'rgba(246, 246, 247, 1)'
// Tokens with metadata
import { metadata } from '@anthane/core-tokens';
console.log(metadata.colors.background.value); // 'rgba(246, 246, 247, 1)'
console.log(metadata.colors.background.description); // 'For use as a background color, in components such as Page and Frame backgrounds.'
CSS
Importing all of the css variables. CSS variables are prefixed with --p
to signal that these variables are core variables.
import '@anthane/core-tokens/css/styles.css';
div {
background: var(--p-background);
}
JSON
Accessing a specific token group file via the dist folder
const spacing = require('@anthane/core-tokens/json/spacing.json');
1.2.4
2 years ago
1.2.3
2 years ago
1.2.0
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.2.2
2 years ago
1.1.3
2 years ago
1.2.1
2 years ago
1.1.2
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago