Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@volue/design-colors

Package Overview
Dependencies
Maintainers
0
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volue/design-colors

Color primitives for Volue design primitives

  • 3.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@volue/design-colors

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

Installation

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

Usage

JavaScript

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

const tokens = require('@volue/design-colors');
console.log(tokens.core.blue100); // rgb(0, 133, 159)
console.log(tokens.background.neutral.default);
Flat tokens

Use flat entrypoint to consume flattened tokens:

const tokens = require('@volue/design-colors/flat');
console.log(tokens.colorBlue100);
console.log(tokens.backgroundNeutralSubtle);

JSON

In JSON, design token names are formatted in SNAKE_CASE.

const tokens = require('@volue/design-colors/dist/index.json');
console.log(tokens['COLOR_WHITE']); // rgb(255, 255, 255)

Sass

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

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

a {
  color: $color-accent90;
}

CSS variables

CSS variables/custom properties are formatted in kebab-case.

@import '~@volue/design-colors/dist/index.custom-properties.css';

a {
  color: var(--color-accent90);
}

FAQs

Package last updated on 17 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc