
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@sage/design-tokens
Advanced tools
This repository contains the design tokens from the Sage Design System. These are maintained by the Sage DS team. This library is for distributing these tokens across multiple platforms.
Design Tokens are Design System’s most basic, lowest level element. In atomic design terminology those would be the protons or electrons.
Basically those are key-value records named and organized the same way regardless of the platform (e.g. web, Android, iOS, Figma). They can define various properties, such as colors, paddings, margins, sizes, font sizes, font families, transitions, animations, and others. They represent certain design decisions.
Design tokens purpose is to:
To make use of these tokens in your application, import the correct variable definitions based on your styling technology.
To add to a project using npm:
# If you're using npm:
npm install --save @sage/design-tokens
# OR If you're using yarn:
yarn add @sage/design-tokens
You can also add the files directly by downloading from the releases page on Github.
To make use of the css variables, import them into your code like so:
/* Inside css */
@import "~@sage/design-tokens/css/<theme>.css";
// For projects where you can import css files into JS
import "@sage/design-tokens/css/<theme>.css";
This will add the variables to the root element of the page.
To make use of the scss variables, import them into your scss files like so:
@use '~@sage/design-tokens/scss/<theme>.scss';
You can also use @import
, but for scss this is being deprecated in favour of @use
;
const tokens = require('@sage/design-tokens/js/<theme>/common')
// Then use in code:
element.style.color = tokens.colorsBase500
import tokens from "@sage/design-tokens/js/<theme>/es6";
// Then use in code:
element.style.color = tokens.colorsBase500
A type definition file is also included to work in projects with typescript installed.
It is possible to export design tokens to any format or language. If you need to use design tokens in your technology, please contact us and describe your needs.
If you would like to help contribute to this library, please read our contributing documentation,
Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at Apache 2.0 license.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2024 Sage Group Plc. All rights reserved.
FAQs
Design tokens for the Sage Design System.
The npm package @sage/design-tokens receives a total of 11,580 weekly downloads. As such, @sage/design-tokens popularity was classified as popular.
We found that @sage/design-tokens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.