React wrappers for bi-web-components
npm install bi-web-components-reactAll components can be seen at designsystem.bi.no.
This is the React equivalent of bi-web-components
Install the React components and the required CSS tokens and fonts: npm i bi-web-components-react @bi-digital/css
Import a components:
``ts`
import { BiButton } from 'bi-web-components-react';
Then add the styles, either in a CSS-file:
`css`
@import '@bi-digital/css';
Or in jsx/tsx:
`ts`
import '@bi-digital/css';
The fonts and tokens from the @bi-digital/css package is required.
How can I include only the fonts and tokens?
The @bi-digital/css package allows you to only import the styles that you want. For example:
`css`
@import '@bi-digital/css/dist/fonts.css';
@import '@bi-digital/css/dist/tokens.css';
In your head-section in your html, import the following script:
`html`
We recommend replacing latest` with a specific version to avoid errors when the library is updated.