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#
| Type | Description | |
|---|---|---|
required | boolean | (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. |
disabled | boolean | (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. |
layoutOptions | object | (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" }. |
locale | string | (optional) Locale (language) to use for all nested Eufemia components. |
translations | object | (optional) Provide translation strings. Can be a flat or nested object keyed by locale, e.g. { "nb-NO": { MyKey: "value" } }. See Localization. |
translationsLoader | function | (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. |
messageFormatter | ICUFormatMessage | (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. |