Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Design components

Pål Larsen edited this page Jan 31, 2019 · 3 revisions

design.nav.no

How to install and use Nav Design Components

Nav Design uses Less (CSS) files which doesn't work out of the box with React's Creat React App (CRA). We then use a compiler to compile it to CSS.

An example on how to install 'Nav Frontend Etiketter'

  1. Go to https://design.nav.no, and select 'Etikett' under 'Komponenter' from the sidebar.
  2. Select the tab 'Utviklerdokumentasjon'
  3. Copy the text under 'Installering' and install it in the fronted/ directory.
  4. Go to the index.less file in ```frontend/src`` directory.
  5. Add the line @import "~nav-frontend-etiketter-style"
  6. Then import the component from 'nav-frontend-etiketter'.
Clone this wiki locally