New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sage/design-tokens

Package Overview
Dependencies
Maintainers
6
Versions
269
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sage/design-tokens

Design tokens for the Sage Design System.

  • 1.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
increased by30.48%
Maintainers
6
Weekly downloads
 
Created
Source

Sage Design Tokens

stability-alpha GitHub release License Maintenance PRs Welcome

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 playforms.

Beta

Currently this library is in an unstable open beta stage. It is not ready for production at this point as the tokens are liable to drastically change between now and the production release.

Using the design tokens

Web

To make use of these tokens in your application, import the correct variable definitions based on your styling technology.

Install

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.

CSS

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.

SCSS

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;

Common JS module
const tokens = require('@sage/design-tokens/js/<theme>/common')

// Then use in code:
element.style.color = tokens.colorsBase500
ES6 module
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.

iOS

COMING SOON

Android

COMING SOON

Contributing

If you would like to help contribute to this library, please read our contributing documentation,

Licence

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.

Repository maintainer

Mark Mizen, User Experience Engineer.

Copyright (c) 2021 Sage Group Plc. All rights reserved.

FAQs

Package last updated on 03 Aug 2021

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