Skip to content

Properties

NumberFormat is only exposed as a namespace. Pick the variant you need – this keeps the bundle small because only the variants you import are included.

NumberFormat.Number

PropertyTypeDescription
valuenumber
string
(optional) A number or a string containing a number.
localestring(optional) Use a 2 Letter Language Code or an extended code such as nb-NO. Use auto to detect the locale from the browser (navigator.language). Defaults to the Norwegian locale: nb-NO.
decimalsnumber(optional) Set a number to define the number of decimals. Like decimals="0" will ensure that decimals are simply not shown. The default decimals for currency usage are 2 (Browser API default).
rounding"omit"
"half-even"
"half-up"
(optional) If omit is given, the decimal will NOT be rounded. If set to half-even, the value will be rounded to the nearest even number. If set to half-up, the fractional part is 0.5 or greater, the number is rounded up. If the fractional part is less than 0.5, the number is rounded down. Defaults to half-up.
signDisplay"auto"
"always"
"exceptZero"
"negative"
"never"
(optional) When to display the sign for the number. Use auto (default) for negative numbers only, always to always display sign, exceptZero for positive and negative numbers but not zero, negative for negative numbers only including negative zero, or never to never display sign.
cleanboolean(optional) If set to true a dirty string will be parsed to extract the number (prefix -123.45 suffix would result in e.g. kr -123,45).
prefixReact.ReactNode(optional) Add a string or React component before the number, including white space.
suffixReact.ReactNode(optional) Appends a string or React component after the number, including white space. When the suffix is a string starting with /, no space is added (e.g. suffix="/mnd" renders "123/mnd").
selectAllboolean(optional) Use false to disable the auto select all on the first click. Defaults to true.
alwaysSelectAllboolean(optional) Use true to always auto select all on the first click. Defaults to false.
copySelectionboolean(optional) Use false to disable the auto copy feature. Defaults to true.
cleanCopyValueboolean(optional) If set to true the copy&paste value will be provided without e.g. a currency sign or a percent sign. Defaults to false.
srLabelReact.ReactNode(optional) Will add a visually hidden label, to give screen reader users the missing context to easier understand what the number represents.
monospaceboolean(optional) Sets the font to DNB Mono Regular.
elementstring(optional) Define what HTML element should be used. Defaults to <span>.
optionsobject(optional) Accepts all number.toLocaleString or Intl.NumberFormat options as an object - can also be a JSON given as the parameter e.g. options={{ 'minimumFractionDigits': 2 }}.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
tooltipReact.ReactNode(optional) Provide a string or a React Element to be shown as the tooltip content.
compactboolean
string
(optional) Shortens any number or currency including an abbreviation. Available on both NumberFormat.Number and NumberFormat.Currency. It gives you zero decimal by default decimals={0}. Use either short or long. Defaults to short if true is given.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

NumberFormat.Currency

PropertyTypeDescription
valuenumber
string
(optional) A number or a string containing a number.
localestring(optional) Use a 2 Letter Language Code or an extended code such as nb-NO. Use auto to detect the locale from the browser (navigator.language). Defaults to the Norwegian locale: nb-NO.
currencystring
boolean
(optional) Currency code (ISO 4217) or true to use the default NOK. Defaults to true when using NumberFormat.Currency. Uses two decimals by default.
currencyDisplaystring(optional) Use either empty/false to hide the sign/name or use code (NOK), name (kroner), symbol (kr) or narrowSymbol (for a shorter symbol variant). Defaults to narrowSymbol when the locale is no else we default to code.
currencyPositionstring(optional) Use either before or after to change/define the position of the currency. Defaults to auto (Browser API defaults, but with an exception, if the locale is nb-NO or no, use after as the default position).
compactboolean
string
(optional) Shortens any number or currency including an abbreviation. Available on both NumberFormat.Number and NumberFormat.Currency. It gives you zero decimal by default decimals={0}. Use either short or long. Defaults to short if true is given.
decimalsnumber(optional) Set a number to define the number of decimals. Like decimals="0" will ensure that decimals are simply not shown. The default decimals for currency usage are 2 (Browser API default).
rounding"omit"
"half-even"
"half-up"
(optional) If omit is given, the decimal will NOT be rounded. If set to half-even, the value will be rounded to the nearest even number. If set to half-up, the fractional part is 0.5 or greater, the number is rounded up. If the fractional part is less than 0.5, the number is rounded down. Defaults to half-up.
signDisplay"auto"
"always"
"exceptZero"
"negative"
"never"
(optional) When to display the sign for the number. Use auto (default) for negative numbers only, always to always display sign, exceptZero for positive and negative numbers but not zero, negative for negative numbers only including negative zero, or never to never display sign.
cleanboolean(optional) If set to true a dirty string will be parsed to extract the number (prefix -123.45 suffix would result in e.g. kr -123,45).
prefixReact.ReactNode(optional) Add a string or React component before the number, including white space.
suffixReact.ReactNode(optional) Appends a string or React component after the number, including white space. When the suffix is a string starting with /, no space is added (e.g. suffix="/mnd" renders "123/mnd").
selectAllboolean(optional) Use false to disable the auto select all on the first click. Defaults to true.
alwaysSelectAllboolean(optional) Use true to always auto select all on the first click. Defaults to false.
copySelectionboolean(optional) Use false to disable the auto copy feature. Defaults to true.
cleanCopyValueboolean(optional) If set to true the copy&paste value will be provided without e.g. a currency sign or a percent sign. Defaults to false.
srLabelReact.ReactNode(optional) Will add a visually hidden label, to give screen reader users the missing context to easier understand what the number represents.
monospaceboolean(optional) Sets the font to DNB Mono Regular.
elementstring(optional) Define what HTML element should be used. Defaults to <span>.
optionsobject(optional) Accepts all number.toLocaleString or Intl.NumberFormat options as an object - can also be a JSON given as the parameter e.g. options={{ 'minimumFractionDigits': 2 }}.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
tooltipReact.ReactNode(optional) Provide a string or a React Element to be shown as the tooltip content.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

NumberFormat.Percent

PropertyTypeDescription
valuenumber
string
(optional) A number or a string containing a number.
localestring(optional) Use a 2 Letter Language Code or an extended code such as nb-NO. Use auto to detect the locale from the browser (navigator.language). Defaults to the Norwegian locale: nb-NO.
decimalsnumber(optional) Set a number to define the number of decimals. Like decimals="0" will ensure that decimals are simply not shown. The default decimals for currency usage are 2 (Browser API default).
rounding"omit"
"half-even"
"half-up"
(optional) If omit is given, the decimal will NOT be rounded. If set to half-even, the value will be rounded to the nearest even number. If set to half-up, the fractional part is 0.5 or greater, the number is rounded up. If the fractional part is less than 0.5, the number is rounded down. Defaults to half-up.
signDisplay"auto"
"always"
"exceptZero"
"negative"
"never"
(optional) When to display the sign for the number. Use auto (default) for negative numbers only, always to always display sign, exceptZero for positive and negative numbers but not zero, negative for negative numbers only including negative zero, or never to never display sign.
cleanboolean(optional) If set to true a dirty string will be parsed to extract the number (prefix -123.45 suffix would result in e.g. kr -123,45).
prefixReact.ReactNode(optional) Add a string or React component before the number, including white space.
suffixReact.ReactNode(optional) Appends a string or React component after the number, including white space. When the suffix is a string starting with /, no space is added (e.g. suffix="/mnd" renders "123/mnd").
selectAllboolean(optional) Use false to disable the auto select all on the first click. Defaults to true.
alwaysSelectAllboolean(optional) Use true to always auto select all on the first click. Defaults to false.
copySelectionboolean(optional) Use false to disable the auto copy feature. Defaults to true.
cleanCopyValueboolean(optional) If set to true the copy&paste value will be provided without e.g. a currency sign or a percent sign. Defaults to false.
srLabelReact.ReactNode(optional) Will add a visually hidden label, to give screen reader users the missing context to easier understand what the number represents.
monospaceboolean(optional) Sets the font to DNB Mono Regular.
elementstring(optional) Define what HTML element should be used. Defaults to <span>.
optionsobject(optional) Accepts all number.toLocaleString or Intl.NumberFormat options as an object - can also be a JSON given as the parameter e.g. options={{ 'minimumFractionDigits': 2 }}.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
tooltipReact.ReactNode(optional) Provide a string or a React Element to be shown as the tooltip content.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

NumberFormat.PhoneNumber

PropertyTypeDescription
valuenumber
string
(optional) A number or a string containing a number.
localestring(optional) Use a 2 Letter Language Code or an extended code such as nb-NO. Use auto to detect the locale from the browser (navigator.language). Defaults to the Norwegian locale: nb-NO.
decimalsnumber(optional) Set a number to define the number of decimals. Like decimals="0" will ensure that decimals are simply not shown. The default decimals for currency usage are 2 (Browser API default).
rounding"omit"
"half-even"
"half-up"
(optional) If omit is given, the decimal will NOT be rounded. If set to half-even, the value will be rounded to the nearest even number. If set to half-up, the fractional part is 0.5 or greater, the number is rounded up. If the fractional part is less than 0.5, the number is rounded down. Defaults to half-up.
signDisplay"auto"
"always"
"exceptZero"
"negative"
"never"
(optional) When to display the sign for the number. Use auto (default) for negative numbers only, always to always display sign, exceptZero for positive and negative numbers but not zero, negative for negative numbers only including negative zero, or never to never display sign.
cleanboolean(optional) If set to true a dirty string will be parsed to extract the number (prefix -123.45 suffix would result in e.g. kr -123,45).
prefixReact.ReactNode(optional) Add a string or React component before the number, including white space.
suffixReact.ReactNode(optional) Appends a string or React component after the number, including white space. When the suffix is a string starting with /, no space is added (e.g. suffix="/mnd" renders "123/mnd").
selectAllboolean(optional) Use false to disable the auto select all on the first click. Defaults to true.
alwaysSelectAllboolean(optional) Use true to always auto select all on the first click. Defaults to false.
copySelectionboolean(optional) Use false to disable the auto copy feature. Defaults to true.
cleanCopyValueboolean(optional) If set to true the copy&paste value will be provided without e.g. a currency sign or a percent sign. Defaults to false.
srLabelReact.ReactNode(optional) Will add a visually hidden label, to give screen reader users the missing context to easier understand what the number represents.
monospaceboolean(optional) Sets the font to DNB Mono Regular.
elementstring(optional) Define what HTML element should be used. Defaults to <span>.
optionsobject(optional) Accepts all number.toLocaleString or Intl.NumberFormat options as an object - can also be a JSON given as the parameter e.g. options={{ 'minimumFractionDigits': 2 }}.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
tooltipReact.ReactNode(optional) Provide a string or a React Element to be shown as the tooltip content.
linkstring(optional) Use tel (default) or sms to enable a clickable / touchable anchor link. Only available on NumberFormat.PhoneNumber.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

NumberFormat.BankAccountNumber

Norwegian bank account number (e.g. 2000 12 34567).

PropertyTypeDescription
valuenumber
string
(optional) A number or a string containing a number.
localestring(optional) Use a 2 Letter Language Code or an extended code such as nb-NO. Use auto to detect the locale from the browser (navigator.language). Defaults to the Norwegian locale: nb-NO.
decimalsnumber(optional) Set a number to define the number of decimals. Like decimals="0" will ensure that decimals are simply not shown. The default decimals for currency usage are 2 (Browser API default).
rounding"omit"
"half-even"
"half-up"
(optional) If omit is given, the decimal will NOT be rounded. If set to half-even, the value will be rounded to the nearest even number. If set to half-up, the fractional part is 0.5 or greater, the number is rounded up. If the fractional part is less than 0.5, the number is rounded down. Defaults to half-up.
signDisplay"auto"
"always"
"exceptZero"
"negative"
"never"
(optional) When to display the sign for the number. Use auto (default) for negative numbers only, always to always display sign, exceptZero for positive and negative numbers but not zero, negative for negative numbers only including negative zero, or never to never display sign.
cleanboolean(optional) If set to true a dirty string will be parsed to extract the number (prefix -123.45 suffix would result in e.g. kr -123,45).
prefixReact.ReactNode(optional) Add a string or React component before the number, including white space.
suffixReact.ReactNode(optional) Appends a string or React component after the number, including white space. When the suffix is a string starting with /, no space is added (e.g. suffix="/mnd" renders "123/mnd").
selectAllboolean(optional) Use false to disable the auto select all on the first click. Defaults to true.
alwaysSelectAllboolean(optional) Use true to always auto select all on the first click. Defaults to false.
copySelectionboolean(optional) Use false to disable the auto copy feature. Defaults to true.
cleanCopyValueboolean(optional) If set to true the copy&paste value will be provided without e.g. a currency sign or a percent sign. Defaults to false.
srLabelReact.ReactNode(optional) Will add a visually hidden label, to give screen reader users the missing context to easier understand what the number represents.
monospaceboolean(optional) Sets the font to DNB Mono Regular.
elementstring(optional) Define what HTML element should be used. Defaults to <span>.
optionsobject(optional) Accepts all number.toLocaleString or Intl.NumberFormat options as an object - can also be a JSON given as the parameter e.g. options={{ 'minimumFractionDigits': 2 }}.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
tooltipReact.ReactNode(optional) Provide a string or a React Element to be shown as the tooltip content.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

NumberFormat.NationalIdentityNumber

Norwegian national identification number (e.g. 180892 12345).

PropertyTypeDescription
valuenumber
string
(optional) A number or a string containing a number.
localestring(optional) Use a 2 Letter Language Code or an extended code such as nb-NO. Use auto to detect the locale from the browser (navigator.language). Defaults to the Norwegian locale: nb-NO.
decimalsnumber(optional) Set a number to define the number of decimals. Like decimals="0" will ensure that decimals are simply not shown. The default decimals for currency usage are 2 (Browser API default).
rounding"omit"
"half-even"
"half-up"
(optional) If omit is given, the decimal will NOT be rounded. If set to half-even, the value will be rounded to the nearest even number. If set to half-up, the fractional part is 0.5 or greater, the number is rounded up. If the fractional part is less than 0.5, the number is rounded down. Defaults to half-up.
signDisplay"auto"
"always"
"exceptZero"
"negative"
"never"
(optional) When to display the sign for the number. Use auto (default) for negative numbers only, always to always display sign, exceptZero for positive and negative numbers but not zero, negative for negative numbers only including negative zero, or never to never display sign.
cleanboolean(optional) If set to true a dirty string will be parsed to extract the number (prefix -123.45 suffix would result in e.g. kr -123,45).
prefixReact.ReactNode(optional) Add a string or React component before the number, including white space.
suffixReact.ReactNode(optional) Appends a string or React component after the number, including white space. When the suffix is a string starting with /, no space is added (e.g. suffix="/mnd" renders "123/mnd").
selectAllboolean(optional) Use false to disable the auto select all on the first click. Defaults to true.
alwaysSelectAllboolean(optional) Use true to always auto select all on the first click. Defaults to false.
copySelectionboolean(optional) Use false to disable the auto copy feature. Defaults to true.
cleanCopyValueboolean(optional) If set to true the copy&paste value will be provided without e.g. a currency sign or a percent sign. Defaults to false.
srLabelReact.ReactNode(optional) Will add a visually hidden label, to give screen reader users the missing context to easier understand what the number represents.
monospaceboolean(optional) Sets the font to DNB Mono Regular.
elementstring(optional) Define what HTML element should be used. Defaults to <span>.
optionsobject(optional) Accepts all number.toLocaleString or Intl.NumberFormat options as an object - can also be a JSON given as the parameter e.g. options={{ 'minimumFractionDigits': 2 }}.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
tooltipReact.ReactNode(optional) Provide a string or a React Element to be shown as the tooltip content.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

NumberFormat.OrganizationNumber

Norwegian organization number (e.g. 123 456 789). Screen readers read digit by digit.

PropertyTypeDescription
valuenumber
string
(optional) A number or a string containing a number.
localestring(optional) Use a 2 Letter Language Code or an extended code such as nb-NO. Use auto to detect the locale from the browser (navigator.language). Defaults to the Norwegian locale: nb-NO.
decimalsnumber(optional) Set a number to define the number of decimals. Like decimals="0" will ensure that decimals are simply not shown. The default decimals for currency usage are 2 (Browser API default).
rounding"omit"
"half-even"
"half-up"
(optional) If omit is given, the decimal will NOT be rounded. If set to half-even, the value will be rounded to the nearest even number. If set to half-up, the fractional part is 0.5 or greater, the number is rounded up. If the fractional part is less than 0.5, the number is rounded down. Defaults to half-up.
signDisplay"auto"
"always"
"exceptZero"
"negative"
"never"
(optional) When to display the sign for the number. Use auto (default) for negative numbers only, always to always display sign, exceptZero for positive and negative numbers but not zero, negative for negative numbers only including negative zero, or never to never display sign.
cleanboolean(optional) If set to true a dirty string will be parsed to extract the number (prefix -123.45 suffix would result in e.g. kr -123,45).
prefixReact.ReactNode(optional) Add a string or React component before the number, including white space.
suffixReact.ReactNode(optional) Appends a string or React component after the number, including white space. When the suffix is a string starting with /, no space is added (e.g. suffix="/mnd" renders "123/mnd").
selectAllboolean(optional) Use false to disable the auto select all on the first click. Defaults to true.
alwaysSelectAllboolean(optional) Use true to always auto select all on the first click. Defaults to false.
copySelectionboolean(optional) Use false to disable the auto copy feature. Defaults to true.
cleanCopyValueboolean(optional) If set to true the copy&paste value will be provided without e.g. a currency sign or a percent sign. Defaults to false.
srLabelReact.ReactNode(optional) Will add a visually hidden label, to give screen reader users the missing context to easier understand what the number represents.
monospaceboolean(optional) Sets the font to DNB Mono Regular.
elementstring(optional) Define what HTML element should be used. Defaults to <span>.
optionsobject(optional) Accepts all number.toLocaleString or Intl.NumberFormat options as an object - can also be a JSON given as the parameter e.g. options={{ 'minimumFractionDigits': 2 }}.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
tooltipReact.ReactNode(optional) Provide a string or a React Element to be shown as the tooltip content.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Translations

More info about translations can be found in the general localization and Eufemia Forms localization docs.

Keynb-NOen-GBsv-SEda-DK
NumberFormat.clipboardCopyKopiertCopiedKopieradKopieret
NumberFormat.notAvailableIkke tilgjengeligNot availableInte tillgängligIkke tilgængelig