Skip to content

React JS for the web#

The most basic way to use the @dnb/eufemia is like this:

Basic Buttons#

<Button text="Basic Button" />

Importing the Components#

To make the Button component work, we have to import it as well:

import { Button } from '@dnb/eufemia'

And here is an example with several imports:

import { Button, Icon } from '@dnb/eufemia/components'
import { H1, P, Link } from '@dnb/eufemia'
import { hamburger as hamburgerIcon } from '@dnb/eufemia/icons'

Events#

<Button text="Button" onClick={() => console.log('click')} />

Now, let's jump to the Button Docs for more details.

Suggest an edit