New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@digdir/design-system-tokens

Package Overview
Dependencies
Maintainers
7
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digdir/design-system-tokens

Tokens for Designsystemet

  • 0.13.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

@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);
}

FAQs

Package last updated on 07 Feb 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