Skip to content

Currency

Description

Value.Currency is a wrapper component for displaying number values, with user experience tailored for currency values.

Demos

Empty

<Value.Currency showEmpty />

Placeholder

The value was not filled in
<Value.Currency placeholder="The value was not filled in" />

Value

150 kr
<Value.Currency value={150} suffix=" kr" />

Label

<Value.Currency label="Label text" showEmpty />

Label and value

60 000 000 kr
<Value.Currency label="Label text" value={60000000} />

Inline

This is before the component25 000 krThis is after the component

<p>
This is before the component
<Value.Currency value={25000} inline />
This is after the component
</p>

Inline and label

This is before the component25 000 krThis is after the component

<p>
This is before the component
<Value.Currency label="Label text" value={25000} inline />
This is after the component
</p>

Properties

Standard value component props

PropertyTypeDescription
valuenumber(optional) Source data value for the input
showEmptyboolean(optional) True to show the component even when the value is empty.
labelstring(optional) Field label to show above / before the input feature
placeholderstring(optional) Text showing in place of the value if no value is given
pathstring(optional) JSON Pointer for where the data for this input is located in the source dataset (when using DataContext)
inlineboolean(optional) True to show the value without any DOM elements surrounding it. I.e for putting it as part of a text.