Skip to content

React JS for the web

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

Basic Buttons

Code Editor
<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 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

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

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