v11
This page lists the changes introduced in v11. It focuses on breaking changes, removals, and required migrations, grouped by area for clarity.
Migration
v11 of @dnb/eufemia contains breaking changes. As a migration process, you can simply search and replace:
Install
To upgrade to @dnb/eufemia v11 with NPM, use:
$ npm i @dnb/eufemia@11# or$ yarn add @dnb/eufemia@11# or$ pnpm add @dnb/eufemia@11
Components
Section
- Most
style_typevariants were removed. Use the newvariantorbackgroundColorproperty instead:mint-greensea-greenemerald-greenlavenderblack-3sand-yellowpistachiofire-redfire-red-8
- Remove
spacing. UseinnerSpaceinstead. - Replace
inner_refwithinnerRef.
Anchor
- When using icons in an Anchor (text link), use the
iconproperty instead of inlining it. - Find and remove
scrollToHashHandler. Smooth hash scrolling is now supported by all major browsers.
FormLabel
- Replace
for_idwithforId. - Replace
sr_onlywithsrOnly.
Tag
- Replace
onDeletewithonClick, and addvariant="removable".
Definition lists
- Replace
directionin<Dl>withlayout.
BreadcrumbItem
- Removed passing down properties to the internal
span.
We don't think this has been used for anything other than passing down data-testids for testing. We believe the potential side effects of passing down properties to this span are greater than the advantages it gives for those who want to test this span using data-testid as their way of selecting the span.
We recommend other testing methods to select and test the inner parts of Eufemia components. You could use, e.g., screen.queryByRole or document.querySelector.
For more context, see this PR.
ProgressIndicator
- Replace
no_animationwithnoAnimation. - Replace
label_directionwithlabelDirection. - Replace
show_labelwithshowDefaultLabel. - Replace
on_completewithonComplete. - Replace
classwithclassName. - Replace
childrenwithlabel.
PaymentCard
- Remove translation
text_card_numberas it's not supported anymore.
Divider (Horizontal Rule)
- Remove
lightandmediumas they are not supported anymore. - Replace
fullscreenwithbreakout.
Checkbox
- Replace
label_positionwithlabelPosition. - Replace
label_sr_onlywithlabelSrOnly. - Replace
status_statewithstatusState. - Replace
status_propswithstatusProps. - Replace
on_changewithonChange. - Replace
childrenwithlabel.
Switch
- Replace
label_positionwithlabelPosition. - Replace
label_sr_onlywithlabelSrOnly. - Replace
status_statewithstatusState. - Replace
status_propswithstatusProps. - Replace
on_changewithonChange. - Replace
on_change_endwithonChangeEnd. - Replace
on_state_updatewithonStateUpdate. - Replace
status_no_animationwithstatusNoAnimation.
Logo
- Remove
size. Replace it withheightif it contains a numeric value, and withinheritSizewheresize='inherit'. - Remove the following properties:
altandratio. - Replace
inherit_colorwithinheritColor. - Change
widthfrom number to string. - Change
heightfrom number to string.
Button
- Replace
classwithclassName.
Modal, Dialog and Drawer
- Replace
classwithclassName.
Table
- Replace
accordionwithmode="accordion".
Pagination
- Replace
place_maker_before_contentwithplace_marker_before_content.
DatePicker
- Find
correctInvalidDateand remove it. You may rather use Field.Date from Eufemia Forms when usingminDateandmaxDate.
NumberFormat
- Replace
omit_roundingwithrounding="omit".
DrawerList
- Replace type
DrawerListDataObjectUnionwithDrawerListDataArrayItem. - Replace type
DrawerListDataObjectwithDrawerListDataArrayObject. - Replace
import { ItemContent } from '@dnb/eufemia/fragments/drawer-list/DrawerList'withimport { ItemContent } from '@dnb/eufemia/fragments/drawer-list/DrawerListItem'.
StepIndicator
- Major redesign of component. There is now only one variant (instead of two).
- Remove
on_item_render. No longer has any other function than each step'stitleproperty. - Remove step item
on_render. No longer has any other function than thetitleproperty. - Remove
sidebarId. No longer has any sidebar. If an id is needed, use theidproperty. - Remove
step_title_extended. Onlystep_titleis needed.
StepIndicator.Sidebar
- Component removed entirely after redesign. The variant that used this component no longer exists.
GlobalError
- Replace
statuswithstatusCode. - Replace
codewitherrorMessageCode.
Layout
Flex
- Replace
spacingwithgapon all Flex components. rowGapno longer accepts valuetrue. Replacetruewithundefinedor remove the property to get the same behavior.
Removal of FormRow and FormSet
For more information on how to replace these, see FormSet/FormRow deprecation.
- Replace
<FormRow>with<Flex.Horizontal align="baseline">. - Replace
<FormRow vertical>with<Flex.Vertical>. - Replace
<FormRow centered>with<Flex.Horizontal align="center">. - Replace
FormRow=withformElement=. - Replace
FormRow:withformElement:. - Replace
import { includeValidProps } from '@dnb/eufemia/components/form-row/FormRowHelpers'withimport { pickFormElementProps } from '@dnb/eufemia/shared/helpers/filterValidProps'.
Eufemia Forms
General
- Replace
useErrorwithuseValidation. - Replace
internal.errorwitherror. - Replace Form.Iterate label variable
{itemNr}with{itemNo}. - Replace
Form.FieldPropswithField.Provider. - Replace
<Card stack>...</Card>with<Form.Card>...</Form.Card>. - Replace
<Card>...</Card>with<Form.Card>...</Form.Card>.
Docs: Eufemia Forms
InputPassword moved to Field.Password
The InputPassword component has been moved to Field.Password, and is now a part of Eufemia Forms. Change your import statement from import InputPassword from '@dnb/eufemia/components/input/InputPassword' to import { Field } from '@dnb/eufemia/extensions/forms'.
Docs: Input, All Fields
Error handling
FormError
validationRule
// Fromnew FormError('Invalid value', {validationRule: 'pattern',})// Tonew FormError('Field.errorPattern')
- Remove the
validationRuleparameter in favor of a translation key, like so:new FormError('Field.errorRequired').
errorMessages object
// Fromconst errorMessages = {pattern: 'Show this when "pattern" fails!',}// Toconst errorMessages = {'Field.errorPattern': 'Show this when "pattern" fails!',}
- Replace
requiredwithField.errorRequired. - Replace
patternwithField.errorPattern. - Replace
minLengthwithStringField.errorMinLength. - Replace
maxLengthwithStringField.errorMaxLength. - Replace
minimumwithNumberField.errorMinimum. - Replace
maximumwithNumberField.errorMaximum. - Replace
exclusiveMinimumwithNumberField.errorExclusiveMinimum. - Replace
exclusiveMaximumwithNumberField.errorExclusiveMaximum. - Replace
multipleOfwithNumberField.errorMultipleOf.
useErrorMessage
- Removed. Provide your error messages as an object in the
errorMessagesproperty (e.g., with auseMemohook).
See also: Form error messages, useValidation
Form.Visibility
- Replace
continuousValidationwithvalidateContinuously. - Replace
withValuewithhasValue.
Every Field.* component
- Replace
continuousValidationwithvalidateContinuously.
Docs: All Fields
Field.PostalCodeAndCity
- Replace
countrywithcountryCode.
Iterate.PushContainer
- Replace
requireCommitwithpreventUncommittedChanges.
Wizard.Container
- Remove
variant. No longer has any variants. - Remove
sidebarId. No longer has any sidebar. If an id is needed, use theidproperty.
Wizard.Step
- Replace
activewithinclude. - Replace
activeWhenwithincludeWhen.
November 14, 2025