0.0.8 • Published 2 years ago

olympus-ds-design-tokens v0.0.8

Weekly downloads
-
License
-
Repository
bitbucket
Last release
2 years ago

@olympus-ds/design-tokens

Design tokens for using the Olympus Design System

Getting started

To install @olympus/design-tokens in your project, you will need to run the following command using npm:

npm install @olympus/design-tokens

If you prefer Yarn, use the following command instead:

yarn add @olympus/design-tokens

Usage

You can use the @olympus/design-tokens module in your JavaScript and CSS/SASS.

CSS

You can get all tokens by doing:

@import '@olympus/design-tokens/index.css';

or individually by doing:

@import '@olympus/design-tokens/css/colors';

These variables follow the naming convention: --{prefix}-{category}-{type}-{variation}. For example:

--ods-border-stroke-lg;
--ods-color-neutral-50;
--ods-font-family-base;

Sass

You can get all tokens by doing:

@import '@olympus/design-tokens';

or individually by doing:

@import '@olympus/design-tokens/scss/colors';

These variables follow the naming convention: ${prefix}-{category}-{type}-{variation}. For example:

$ods-border-stroke-lg;
$ods-color-neutral-50;
$ods-font-family-base;

JavaScript

For JavaScript, you can import and use this module by doing the following in your code:

// ESM
import { borderStrokeLg, colorNeutral50, fontFamilyBase } from '@olympus/design-tokens';

// CommonJS
const { borderStrokeLg, colorNeutral50, fontFamilyBase } = require('@olympus/design-tokens');

or individually by doing:

// ESM
import { colorNeutral50 } from '@olympus/design-tokens/lib/color';

// CommonJS
const { colorNeutral50 } = require('@olympus/design-tokens/lib/color');

Design Tokens

CategoryTypesVariations
borderstrokenone / xxs / xs / sm / md / lg
colorneutral00-100 / white / black / base
colorprimary success warning danger00-100 / base
fontfamilybase
fontsizetiny / sm / md / lg / xl / xxl / xxxl / mega / ultra / giga / base
fontweight100-900 / thin / light / regular / bold / black
opacitylevelsemiopaque / intense / medium / light / semitransparent
radii-none / xxs / xs / sm / md / lg / circular / pill
size-nano / xxxs/ xxs / xs /sm / md / lg / xl / xxl / xxxl / mega / ultra / giga
spacing-nano / xxxs/ xxs / xs /sm / md / lg / xl / xxl / xxxl / mega / ultra / giga
timetransitionshort / base / long / xl
timedelay durationshort / base / long
zIndex-min / 1-9 / overlay / max
0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago