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

@cockroachlabs/design-tokens

Package Overview
Dependencies
Maintainers
18
Versions
675
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cockroachlabs/design-tokens

Design tokens for Cockroach Labs.

  • 0.4.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
18
Created
Source

design-tokens

Uses style-dictionary to transform tokens defined in json into different formats.

Install dependencies

pnpm install

Generate tokens from json

pnpm run build

Exported Tokens

Sass

_tokens.scss contains exported token values as Sass variables.

@import "~@cockroachlabs/design-tokens/dist/web/tokens"

.example {
    background-color: $color-background-button-primary-success-base;
    color: $color-font-button-primary-success-base;
    border-width: 1px;
    border-style: solid;
    border-color: $color-border-button-primary-success-base;
}

Stylus

tokens.styl contains exported token values as Stylus variables.

@require "~@cockroachlabs/design-tokens/dist/web/tokens"

.example
  color $color-intent-success-4
  background-color $color-intent-success-1
  border-radius 3px

JavaScript

tokens.js contains exported token values as JavaScript constants.

import {
  ColorFont1,
  ColorBaseBlue,
  ColorBasePurple,
} from "@cockroachlabs/design-tokens";

// ...

<SomeComponent
  fontColor={ColorFont1}
  interactionColor={ColorBaseBlue}
  progressColor={ColorBasePurple}
/>;

a tokens.d.ts file is also generated to act as types for tokens for TypeScript support.

Keywords

FAQs

Package last updated on 12 Sep 2023

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