
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@maggioli-design-system/design-tokens
Advanced tools
This is the Design Token library of Maggioli Design System, here you'll find all the visual data used around the libraries.
Generates design tokens for colors and other type of agnostic tokens targeted on specific plaforms, like web, Dart, Android or iOS formats.
This library is based on Adobe Leonardo and Amazon Style Dictionary.
Install the component via npm by running the following command:
npm i @maggioli-design-system/design-tokens
This package works also with yarn:
yarn add @maggioli-design-system/design-tokens
you can generate custom palettes via cli command, it takes a configuration file to create palettes
npx magma-design-tokens
| Option | Alias | Description |
|---|---|---|
--config [configFile] | -c | Path to configuration file if not respect default naming |
--outDir [dirPath] | -d | Path destination for generated palettes |
--generate [platform] | -g | Output format for palette, choose one or more between css, tailwind, dart |
--export-tokens | -t | export palette as JSON design tokens format |
--outTokensDir [tokensDir] | Directory path for JSON tokens, required if --export-tokens is presents |
You can include configuration in a configuration file or a field in package.json named magma-design-tokens
Naming standard for configuration file:
.magma-design-tokensrc.json.magma-design-tokensrc.js.magma-design-tokensrc.cjs.magma-design-tokensrc.mjs.config/magma-design-tokensrc.config/magma-design-tokensrc.json.config/magma-design-tokensrc.js.config/magma-design-tokensrc.cjs.config/magma-design-tokensrc.mjsmagma-design-tokens.config.jsmagma-design-tokens.config.cjsmagma-design-tokens.config.mjsIf you change configuration file name you need to set with --config option
Basic config
{
"colors": [
{ "color": "#94a3b8", "name": "tone.slate" },
{ "color": "#EA3464", "name": "label.amaranth" }
]
}
You can export different color in different output file defining export field
{
"colors": [
{ "color": "#94a3b8", "name": "tone.slate", "export": ["tones"] },
{ "color": "#EA3464", "name": "label.amaranth", "export": ["label"] }
]
}
You can choose the ratio with which to generate the color scale with ratios field
{
"colors": [
{ "color": "#94a3b8", "name": "tone.slate", "ratios": "tone" },
{ "color": "#EA3464", "name": "label.amaranth", "ratios": "v1" }
]
}
NOTE: there are four different ratios as follow value contrast
{
"v1": [
1.05, 1.1, 1.17, 1.24, 1.32, 1.41, 1.51, 1.65, 1.9, 2.25, 2.7, 3.3,
4, 4.8, 5.75, 7, 8.5, 10.3, 12.45, 15
],
"v2": [1.09, 1.22, 1.42, 1.82, 2.57, 3.71, 5.13, 6.71, 8.75, 10.29],
"default": [1.09, 1.22, 1.42, 1.82, 3.29, 5.13, 6.71, 8.45, 10.29, 17.22],
"tone": [1.05, 1.1, 1.24, 1.47, 2.54, 4.83, 7.56, 10.31, 14.68, 16]
}
./color.js as configuration filenpx design-tokens --config ./color.js
npx design-tokens --generate css
npx design-tokens --generate 'css, tailwind'
FAQs
This is the Design Token library of Maggioli Design System, here you'll find all the visual data used around the libraries.
The npm package @maggioli-design-system/design-tokens receives a total of 0 weekly downloads. As such, @maggioli-design-system/design-tokens popularity was classified as not popular.
We found that @maggioli-design-system/design-tokens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.