Socket
Socket
Sign inDemoInstall

@contentful/f36-tokens

Package Overview
Dependencies
0
Maintainers
3
Versions
244
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @contentful/f36-tokens

Forma 36 Tokens


Version published
Weekly downloads
45K
increased by11.17%
Maintainers
3
Install size
57.7 kB
Created
Weekly downloads
 

Readme

Source

Forma 36 Tokens

The design tokens for Forma 36, available as JSON, CSS, and SCSS.

These tokens are a key part of our design system and power f36-components.

Library usage

Install the package to your project

yarn add @contentful/f36-tokens

Or for NPM

npm i @contentful/f36-tokens

Import into your project

JS
import F36Tokens from '@contentful/f36-tokens';
CSS
@import '@contentful/f36-tokens/dist/css/index.css';
JSON
import tokens from '@contentful/f36-tokens/dist/json/transitions/transition-easings';

Development

For local development run npm i from the root of this repo to install all dependencies and run npm run-script build from the root of this repo to build all packages.

All tokens are kept in the src/tokens directory and organised as so:

.
├── border-radius
│   ├── border-radius.js
├── box-shadows
│   ├── box-shadows.js
│   └── glows.js
├── colors
│   ├── colors-blue.js
│   ├── colors-contrast.js
│   ├── colors-coral.js
│   ├── colors-elements.js
│   ├── colors-green.js
│   ├── colors-ice.js
│   ├── colors-mint.js
│   ├── colors-orange.js
│   ├── colors-peach.js
│   ├── colors-red.js
│   ├── colors-semantic.js
│   ├── colors-text.js
│   └── colors-white.js
├── spacing.js
├── transitions
│   ├── transition-durations.js
│   └── transition-easings.js
├── typography
│   ├── font-base.js
│   ├── font-size.js
│   ├── font-stack.js
│   ├── font-weight.js
│   ├── letter-spacing.js
│   └── line-height.js
└── typography.js

Creating a build

npm run-script build

Running the build script will populate the dist directory with separately built JSON, CSS and JS file with TS typings.

This script populates the dist folder with all tokens as JSON, CSS and JS. For CSS builds, an index file is included for ease of importing.

FAQs

Last updated on 03 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc