Skip to content

getpingback/design-tokens

Repository files navigation

Stash Icons Cover

@getpingback/design-tokens
CSS variables and JS constants generated from Token Studio via Style Dictionary.

Install

With yarn

yarn add @getpingback/design-tokens

With npm

npm install @getpingback/design-tokens

Getting started

Use the generated CSS variables (Light on :root, Dark under the .dark selector) or import JS constants when you need values at runtime.

CSS usage

@import url('@getpingback/design-tokens/css/light.css');
@import url('@getpingback/design-tokens/css/dark.css');

Toggle Dark Mode by applying the class on a root container:

<html class="dark">
  ...
</html>

Consume variables in your components:

background: var(--background-default);
color: var(--text-default-primary);

JS usage

import { BACKGROUND_DEFAULT } from '@getpingback/design-tokens/js/light';
// or
import { BACKGROUND_DEFAULT as DARK_BACKGROUND_DEFAULT } from '@getpingback/design-tokens/js/dark';

Development

Before starting development, run the following command:

sh npmrcconfig.sh

It will generate a .npmrc file with env tokens.

Build the tokens (CSS and JS) with:

yarn build

License

Licensed under the MIT License, Copyright © 2025-present Pingback LLC.

See LICENSE for more information.

About

All design tokens into a JSON file for multiple projects.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5