@volue/design-sizing
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

@volue/design-sizing

Sizing primitives/tokens to be used across Volue's products

Installation

npm install @volue/design-sizing --save
# or
yarn add @volue/design-sizing

Usage

JavaScript

In JavaScript, design token names are formatted in lower camelCase. Tokens are exported as nested object structure.

const tokens = require('@volue/design-sizing');
console.log(tokens.spacing.xs); // 0.25rem

In JSON, design token names are formatted in SNAKE_CASE.

const tokens = require('@volue/design-sizing/dist/index.json');
console.log(tokens['SIZE_SPACING_XS']); // 0.25rem

Sass

Sass variables and map keys are formatted in kebab-case.

// Using variables
@import '~@volue/design-sizing/dist/index';

div {
  padding: $size-spacing-xs;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @volue/design-sizing

Weekly Downloads

682

Version

0.3.0

License

UNLICENSED

Unpacked Size

21.2 kB

Total Files

15

Last publish

Collaborators

  • aleksanderxxx
  • fima1