iTwinUI css v2 migration guide - iTwin/iTwinUI GitHub Wiki
To help with the migration, we also provide a semi-automated migration tool that scans your project repo for old code and recommends replacements.
Download options:
- Clone iTwinUI-migration-tool GitHub repo (recommended)
- Download zip file (version: 08 May 2025) with the tool (for users outside the iTwin GitHub org)
This wiki page documents all breaking changes in @itwin/[email protected].
Also see: @itwin/[email protected] migration guide.
-
#1270: Change
line-heightto use a unitless value. -
#1302:
border-boxwill now be set for all elements underiui-root. - #1373: Converted all physical CSS properties to their logical equivalents.
-
#1247: Removed the use of
iui-alert-icon,iui-alert-button, andiui-alert-button-icon- class="iui-alert-icon" + class="iui-svg-icon" + data-iui-icon-color="status" // where "status" is informational, positive, negative, or warning
- class="iui-alert-button" + class="iui-button" + data-iui-variant="borderless" + data-iui-size="small"
- class="iui-alert-button-icon" + class="iui-button-icon"
-
#1446:
iui-avatarhas been refactored to be a single<span>, and the status is now applied using thedata-iui-statusattribute. The colors have been updated to pass AAA contrast ratio.
-
#1369: The
iui-breadcrumbs-item-overridesclass name has been removed. Breadcrumbs items now use theiui-breadcrumbs-contentclass name.<a - class="iui-breadcrumbs-text" + class="iui-breadcrumbs-content" href="#" > Anchor </a>
- <span class="iui-breadcrumbs-text">Span</span> + <span class="iui-breadcrumbs-content">Span</span>
<button type="button" - class="iui-breadcrumbs-button" + class="iui-breadcrumbs-content" > - <span class="iui-breadcrumbs-text"> + <span> Button </span> </button>
-
#1556: Items inside button-group no longer need a wrapping
<div>.<div class="iui-button-group"> - <div> <button>...</button> - </div> - <div> <button>...</button> - </div> </div>
-
#1559: Changed
iui-button-group-verticalclass toiui-button-groupwith attributedata-iui-orientation="vertical".- <div class="iui-button-group-vertical"> + <div class="iui-button-group" data-iui-orientation="vertical"> ... </div>
-
#1489:
--iui-color-dot-insethas been split into--iui-color-dot-inset-blockand--iui-color-dot-inset-inline.
-
#1269: All dialog variants have
flexapplied by default. This means the content should be wrapped withiui-dialog-contentfor optimal layout.
-
#1354: The following class names have been updated:
- class="iui-header" + class="iui-expandable-header"
- class="iui-icon" + class="iui-expandable-block-icon"
- class="iui-title" + class="iui-expandable-block-title"
- class="iui-caption" + class="iui-expandable-block-caption"
iui-expanded,iui-smallandiui-borderlesshave been removed and replaced with data attributes:- class="iui-expanded" + data-iui-expanded={true}
- class="iui-small" + data-iui-size="small" //or "default"
- class="iui-borderless" + data-iui-variant="bordereless" //or "default"
-
#1355:
iui-input-containerclass was removed, in favor ofiui-input-grid.
- #1529: Location marker styles are no longer offered.
-
#1295:
iui-menu-itemandiui-menu-descriptionclasses were removed, in favor ofiui-list-itemandiui-list-item-description. -
#1577:
iui-scrollclass was removed; menus are scrollable by default.
-
#1356:
iui-progress-radialhas been refactored to be a single<div>instead of using a nested svg. Size and status have been moved to data attributes. Also it is recommended to explicitly setsizewhen using in other components. -
#1370:
iui-progress-indicator-linearhas been refactored to be a single<div>. Size, status, indeterminate variant, animation, etc are now specified using data attributes.
-
#1420: Removed
<div class="iui-radio-tile-content">. Also,data-iui-disabledattribute must be set on the radio-tile for browsers that don't support:has(:disabled)(firefox).<label class="iui-radio-tile" + data-iui-disabled="true" > <input class="iui-radio-tile-input" type="radio" disabled /> - <div class="iui-radio-tile-content"> <svg class="iui-radio-tile-icon">...</svg> <div class="iui-radio-tile-label">...</div> <div class="iui-radio-tile-sublabel">...</div> - </div> </label>
-
#1328:
iui-progress-overlayhas been renamed toiui-overlayand moved tooverlay.scss
-
#1548: Using
aria-selectedinstead ofiui-activein Tabs to set active styling. -
#1548: Combined tabs stripe variables:
--iui-stripe-leftand--iui-stripe-topinto--iui-tabs-stripe-position;--iui-stripe-widthand--iui-stripe-heightinto--iui-tabs-stripe-size. -
#1548:
data-iui-scroll-placementattributes in Tabs were removed. Updated tabs start and end masks to be applied on scroll animation. -
#1548: The
iui-tabselement has changed from<ul>to<div>.iui-tabschildren are no longer wrapped in an<li>element. -
#1548: The
iui-tab-labelwrapper class has been removed. Theiui-tab-labelclass now applies to the<span>which holds the tab's label.iui-tab-descriptionis now a<span>element.
-
#1322: Removed input-container code from
utils.cssin favor ofinput-container.css.