8.9.2 • Published 3 days ago

@transferwise/neptune-tokens v8.9.2

Weekly downloads
1,565
License
UNLICENSED
Repository
github
Last release
3 days ago

Neptune Tokens npm

Design tokens for Neptune, TransferWise'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 i @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;
}

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-1616
size-2424
size-3232
size-4040
size-4848
size-5656
size-6464
size-7272
size-8080
size-8888
size-9696
size-104104
size-112112
size-120120
size-128128

⚠️ 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-bold800
8.9.2

6 days ago

8.9.1

6 days ago

8.9.0

11 days ago

8.8.1

4 months ago

8.8.0

5 months ago

8.6.0-beta.1

6 months ago

8.6.0-beta.2

6 months ago

8.6.0

6 months ago

8.6.0-beta.3

6 months ago

8.7.0

6 months ago

8.5.1

7 months ago

8.5.0

1 year ago

8.2.3

1 year ago

8.4.0

1 year ago

8.2.2

1 year ago

8.2.5

1 year ago

8.2.4

1 year ago

8.1.0

1 year ago

8.3.0

1 year ago

8.3.1

1 year ago

8.0.1

1 year ago

8.2.1

1 year ago

8.2.0

1 year ago

8.0.0-next.18

2 years ago

8.0.0-next.17

2 years ago

8.0.0-next.19

2 years ago

8.0.0-next.21

1 year ago

8.0.0-next.20

2 years ago

8.0.0

1 year ago

7.1.0-next.1

2 years ago

8.0.0-next.7

2 years ago

8.0.0-next.6

2 years ago

8.0.0-next.9

2 years ago

8.0.0-next.8

2 years ago

8.0.0-next.3

2 years ago

8.0.0-next.2

2 years ago

8.0.0-next.5

2 years ago

1.0.0-next.1

2 years ago

8.0.0-next.4

2 years ago

8.0.0-next.1

2 years ago

8.0.0-next.14

2 years ago

8.0.0-next.13

2 years ago

8.0.0-next.16

2 years ago

8.0.0-next.15

2 years ago

7.0.0-beta.2

2 years ago

8.0.0-next.10

2 years ago

7.0.0-beta.0

2 years ago

8.0.0-next.12

2 years ago

7.0.0-beta.1

2 years ago

8.0.0-next.11

2 years ago

7.0.0

2 years ago

5.1.0

2 years ago

5.0.0

3 years ago

6.1.0

2 years ago

6.0.0

2 years ago

4.2.0-beta.3

3 years ago

4.2.0-beta.2

3 years ago

4.2.0-beta.1

3 years ago

4.1.0-beta.1

3 years ago

4.1.0-beta.2

3 years ago

4.1.0-beta.3

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago