0.13.0 • Published 3 months ago

@digdir/design-system-tokens v0.13.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@digdir/design-system-tokens

Transformed design tokens from the Digdir Common Designsystem to work in code.

Installation

npm|yarn|pnpm install @digdir/design-system-tokens

Usage

This package provides tokens for each of our supported brands.

Currently supported brands:

  • altinn
  • digdir
  • tilsynet
  • brreg

When importing the package make sure to specify which brand tokens you want to import. By default the digdir is imported if you don't specify a brand.

import '@digdir/design-system-tokens/brand/<brand>/tokens';

// This imports Digdir brand css tokens
import '@digdir/design-system-tokens';

//  This imports Altinn css tokens
import '@digdir/design-system-tokens/brand/altinn/tokens.css';

File formats

All tokens files have the same name, tokens, separated by file extension for desired format.

Currently supported token format is css.

CSS

When importing css tokens a set of css variables are added to your :root {}. You only need to import this once in your application, preferably somewhere in your "root" html.

All variables are prefixed with fds as to not polute your namespace.

import '@digdir/design-system-tokens/brand/altinn/tokens.css';
div {
  padding: var(--fds-spacing-1);
}
0.13.0

3 months ago

0.12.0

4 months ago

0.11.2

4 months ago

0.11.1

4 months ago

0.11.0

5 months ago

0.10.0

6 months ago

0.3.0

9 months ago

0.2.0

9 months ago

0.9.0

6 months ago

0.8.1

7 months ago

0.8.0

7 months ago

0.1.7

9 months ago

0.5.0

8 months ago

0.4.1

9 months ago

0.4.0

9 months ago

0.7.0

8 months ago

0.6.1

8 months ago

0.1.6

10 months ago

0.6.0

8 months ago

0.4.2

9 months ago

0.1.5

10 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago

0.0.3

1 year ago