🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@netlify/netlify-design-tokens

Package Overview
Dependencies
Maintainers
15
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/netlify-design-tokens

Repo contains Netlify's design tokens for sharing across products and repos

3.0.0
Source
npm
Version published
Weekly downloads
72K
14.33%
Maintainers
15
Weekly downloads
 
Created
Source

Netlify Design Tokens NPM version Netlify Status

Repo contains Netlify's design tokens for sharing across products and repos. These tokens are co-owned by Netlify's Engineering and Marketing teams.

Install

Clone this repository, then run:

npm install

Build

Changes should be made to relevant files in the tokens folder.

Once tokens have been updated, you need to regenerate the CSS output (which lives in the dist/css folder).

npm run build

We use Style Dictionary to generate the output.

Releasing

New versions of the package are automatically published to NPM via the release-please GitHub workflow:

  • Conventional commits are enforced via @commitlint/cli
  • A new release PR is generated for an engineer to review
  • When the release PR is merged, release-please does the following:
    • Updates CHANGELOG with the contents of the commits
    • Bumps the version of the package based on the contents of the commits
    • Tags the commit with the version number
    • Creates a GitHub Release based on the tag
    • Publishes the new version to NPM

Usage

Install the package in the project of your choice:

npm install @netlify/netlify-design-tokens

From there, you may import any of the dist files into your codebase for reuse as desired:

CSS

@import '@netlify/netlify-design-tokens/dist/css/colors';

:root {
  --colorBlack: var(--color-black-default);
}

SCSS

@import '@netlify/netlify-design-tokens/dist/scss/colors';


$black: $color-black-default;

Javascript

import tokens from '@netlify/netlify-design-tokens';

const black = tokens.color.black.default;

Consumers

FAQs

Package last updated on 20 May 2022

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