Skip to content

Properties

Component-specific props

PropertyTypeDescription
thousandSeparatorstring(optional) Character to use for separating every three digits.
decimalSymbolstring(optional) What character to use for separating digits and decimals. Defaults to ','.
decimalsnumber(optional) Max number of decimals. Values with more decimals will be rounded.
fixedDecimalsnumber(optional) Fixed number of decimals. Will round numbers with more decimals, and add trailing zeros when less.
prefixstring(optional) Text added before the value input.
suffixstring(optional) Text added after the value input.
minimumnumber(optional) Validation for inclusive minimum number value (greater than or equal).
maximumnumber(optional) Validation for inclusive maximum number value (less than or equal).
exclusiveMinimumnumber(optional) Validation for exclusive minimum number value (greater than).
exclusiveMaximumnumber(optional) Validation for exclusive maximum number value (less than).
multipleOfnumber(optional) Validation that requires the number to be a multiple of given value.
widthstring or false(optional)false for no width (use browser default), small, medium or large for predefined standard widths, stretch for fill available width.
helpobject(optional) Provide a help button. Object consisting of title and contents
autoCompleteon or string(optional) For HTML autocompleteattributes.
SpaceVarious(optional) Spacing properties like top or bottom are supported.

Standard data value component props

PropertyTypeDescription
classNamestring(optional) Outer DOM element class name.
valuenumber(optional) Source data value for the input.
idstring(optional) Outer DOM element id attribute.
namestring(optional) Outer DOM element name attribute.
layoutstring(optional) Layout for the label and input. Can be horizontal or vertical.
labelstring(optional) Field label to show above / before the input feature.
labelDescriptionstring(optional) A more discreet text displayed beside the label (i.e for "(optional)").
labelSecondarystring(optional) Secondary information displayed at the end of the label line (i.e character counter).
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 Form.Handler or DataContext). The path will also be set as the name attribute for the string-field.
infoError or string(optional) Info message shown below / after the input.
warningError or string(optional) Warning message shown below / after the input.
errorError(optional) Error message shown below / after the input.
disabledboolean(optional) Set true to show the field but without the possibility of changing the value.
emptyValueany(optional) The value to use (in onChange events etc) when emptying the field. Makes it possible for instance to provide undefined instead of an empty string when clearing the content of a text input.
requiredboolean(optional) When set true, the input will give an error if the value cannot be empty.
schemaobject(optional) Custom JSON Schema for validating the value.
validateInitiallystring(optional) Set true to show validation based errors initially (from given value-prop or source data) before the user interacts with the field.
validateUnchangedstring(optional) Set true to show validation based errors when the field is touched (like focusing a field and blurring) without having changed the value. Since the user did not introduce a new error, this will apply when the value was initially invalid based on validation.
continuousValidationstring(optional) Set true to show validation based errors continuously while writing, not just when blurring the field.
errorMessagesobject(optional) Custom error messages for each type of error, overriding default messages.
validatorfunction(optional) Custom validator function that will be called for every change done by the user. Can be asynchronous or synchronous.
onBlurValidatorfunction(optional) Custom validator function that will be called when the user leaves the field (blurring a text input, closing a dropdown etc). Can be asynchronous or synchronous.
toInputfunction(optional) Derivate called when the received / active value is sent to the input. Can be used for casting, changing syntax etc.
fromInputfunction(optional) Derivate called when changes is made by the user, to cast or change syntax back to the original (opposite of toInput).