Skip to content

Import

import { Value } from '@dnb/eufemia/extensions/forms'
render(<Value.SelectCurrency />)

Description

Value.SelectCurrency will render the selected currency display name by the value's ISO code (ISO 4217 code). It displays the currency name in the current locale, together with the currency ISO code, like Norwegian krone (NOK). If the value provided is not a valid/supported ISO code, it displays the value.

There is a corresponding Field.SelectCurrency component.

import { Value } from '@dnb/eufemia/extensions/forms'
render(<Value.SelectCurrency path="/currency" />)

Relevant links

The useCurrency hook

You can use the Value.SelectCurrency.useCurrency hook to get the currency display name by ISO code (ISO 4217 code). It returns the currency name in the current locale, together with the currency ISO code, like Norwegian krone (NOK).

import { Value } from '@dnb/eufemia/extensions/forms'
const MyComponent = () => {
const { getCurrencyDisplayNameByIso } =
Value.SelectCurrency.useCurrency('NOK')
}