Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@transferwise/neptune-tokens

Package Overview
Dependencies
Maintainers
0
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transferwise/neptune-tokens

Design tokens for the Neptune Design System

  • 8.10.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Neptune Tokens npm

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.

Installation

For npm environments, install the package and consume the bundles below.

npm install @transferwise/neptune-tokens

Web

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";

Figma

To import or update colours on the Figma libraries for Neptune:

  1. Copy the values from the colors.json file in the dist folder
  2. Paste them into the plugin Import from Style Dictionary

Properties

Colours

Our current colour palette is built on a main set of 7 base colours with different levels of brightness. From lightest to darkest:

  • Fade
  • Light
  • Mid
  • Dark

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.

Source values

Radius

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.

NameSize
radius-small3
radius-medium10

Sizes

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.

NameSize
size-44
size-88
size-1212
size-1414
size-1616
size-2424
size-3232
size-4040
size-4848
size-5656
size-6060
size-6464
size-7272
size-8080
size-8888
size-9696
size-104104
size-112112
size-120120
size-128128
size-146146
size-154154

⚠️ These tokens were previously called spacing before version 1.0.0

Spaces

Space tokens should be used for defining spaces between elements.

We currently only provide a token for horizontal content spacing.

NameSize
space-content-horizontal16

Typography

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.

NameSizeDefault rendering size
font-size-120.7512px
font-size-140.87514px
font-size-16116px
font-size-201.2520px
font-size-261.62526px
font-size-32232px
NameLine height
line-height-title1.2
line-height-body1.5
line-height-control1.2
NameFont weight
font-weight-regular500
font-weight-semi-bold600
font-weight-bold700

FAQs

Package last updated on 06 Sep 2024

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