Skip to content

Some properties provide flexibility for specific integrations. Follow the component's usage guidance. Customizations beyond the documented patterns need a use case approved by DNB UX. Read about intended use and customization.

Properties#

TypeDescription
requiredboolean(optional) When set to true, the field will give an error if the value fails the required validation. When set to false, the field will not be required, but will add a "(optional)" suffix to the label.
disabledboolean(optional) Set true to show the field but without the possibility of changing the value.
layout"horizontal"
"vertical"
(optional) Layout for the label and input. Can be horizontal or vertical.
layoutOptionsobject(optional) Use this to set additional options for the horizontal layout, e.g. { width: "medium" }. You can also use a custom width {number}rem. Instead of a width, you can use a min/max width, e.g. { minWidth: "6rem", maxWidth: "12rem" }.
localestring(optional) Locale (language) to use for all nested Eufemia components.
translationsobject(optional) Provide translation strings. Can be a flat or nested object keyed by locale, e.g. { "nb-NO": { MyKey: "value" } }. See Localization.
translationsLoaderfunction(optional) Async function that receives the current locale and returns a translations object. Called on mount and when the locale changes. Loaded translations are merged on top of static translations. See Load translations dynamically.
messageFormatterICUFormatMessage(optional) Message formatter for advanced message formatting (e.g. ICU MessageFormat). Import and pass icu from @dnb/eufemia/shared to enable pluralization, select, and other ICU features in translation strings.
Suggest an edit