Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@transferwise/neptune-tokens
Advanced tools
Design tokens for Neptune, Wise's design system. Currently includes colours, radiuses, and sizes.
Tokens always start with a base
layer that directly accesses the values, and can be extended with a semantic layer that describes the token's intended purpose, rather than how it looks.
For npm environments, install the package and consume the bundles below.
npm install @transferwise/neptune-tokens
Bundles are offered both in CSS and Less.
We currently only have one theme on web, so the bundles directly reference the colour values from the light
theme.
@import "@transferwise/neptune-tokens/tokens.css";
.tw-card {
color: var(--color-text-primary);
padding: var(--size-16);
}
@import "@transferwise/neptune-tokens/tokens.less";
.tw-card {
color: @color-text-primary;
padding: @size-16;
}
Too add the new personal theme please add our new tokens
@import "@transferwise/neptune-tokens/dist/themes/personal/tokens.css";
To import or update colours on the Figma libraries for Neptune:
Our current colour palette is built on a main set of 7 base colours with different levels of brightness. From lightest to darkest:
The base set also includes 3 brand colours, currently used exclusively in marketing pages outside product, that don't have brightness variations.
We have 2 themes, light
and dark
, that refer to the colours semantically. This is the recommended way of using our colour tokens, as the base colours have a higher risk of deprecation. There are no dependencies between the imports, the values are flattened on the themes, so base colours don't usually need to be imported.
Radius tokens are available in small
and medium
sizes. We want to encourage a small manageable set of radiuses in Neptune, so we use T-shirt sizes to define their names.
Name | Size |
---|---|
radius-small | 3 |
radius-medium | 10 |
Size tokens should be used for defining spaces and dimensions.
We start with a 4-point scale that gives fine control for aligning elements inside components and optimising space on smaller screens. From 16 onwards it becomes an 8-point scale where the difference in steps is more visible. There's currently no semantic layer for sizes.
Name | Size |
---|---|
size-4 | 4 |
size-8 | 8 |
size-12 | 12 |
size-14 | 14 |
size-16 | 16 |
size-24 | 24 |
size-32 | 32 |
size-40 | 40 |
size-48 | 48 |
size-56 | 56 |
size-60 | 60 |
size-64 | 64 |
size-72 | 72 |
size-80 | 80 |
size-88 | 88 |
size-96 | 96 |
size-104 | 104 |
size-112 | 112 |
size-120 | 120 |
size-128 | 128 |
size-146 | 146 |
size-154 | 154 |
⚠️ These tokens were previously called
spacing
before version 1.0.0
Space tokens should be used for defining spaces between elements.
We currently only provide a token for horizontal content spacing.
Name | Size |
---|---|
space-content-horizontal | 16 |
Our size scale was created around the standard size for proportional fonts on most platforms, 16. It then includes smaller values for lower hierarchy body copy, and larger ones mostly used for headings.
Name | Size | Default rendering size |
---|---|---|
font-size-12 | 0.75 | 12px |
font-size-14 | 0.875 | 14px |
font-size-16 | 1 | 16px |
font-size-20 | 1.25 | 20px |
font-size-26 | 1.625 | 26px |
font-size-32 | 2 | 32px |
Name | Line height |
---|---|
line-height-title | 1.2 |
line-height-body | 1.5 |
line-height-control | 1.2 |
Name | Font weight |
---|---|
font-weight-regular | 500 |
font-weight-semi-bold | 600 |
font-weight-bold | 700 |
FAQs
Design tokens for the Neptune Design System
We found that @transferwise/neptune-tokens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.