Note: this guide details upgrading from PatternFly v3 to v4, and references major release 2020.07 from 2020-06-05.
Hey, Flyers! We’ve been busy for the past 12 weeks keeping up with changes to PatternFly’s HTML and CSS. We’ve replaced babel with tsc as our compiler of choice and removed prop-types in favor of using our .d.ts types, which are supported in most editors.
This upgrade guide details what was broken and how to fix it. To learn why a change was made, check out the linked pull requests.
Global
- We no longer support UMD builds for individual packages. Consider using our react-core.umd.js bundle instead. (#4076)
- We no longer define propTypesfor our components. Consider using our Typescript types under each package'sdist/jsfolder instead. (#4076)
- We have updated our React peer dependencies so that our packages now can possibly use hooks, which requires react@^16.8.0instead ofreact@^16.4.0. We recommend upgrading your version of React if it is below 16.8.0.
React core
- Major changes include removing the Toolbarlayout in favor of a newPageHeaderToolscomponent.DataToolbarhas been renamedToolbar.Expandablehas been renamedExpandableSection.
About modal
- AboutModalContainer:- Removed prop ariaLabelledbyIdin favor ofaboutModalBoxHeaderId
- Removed prop ariaDescribedByIdin favor ofaboutModalBoxContentId
 
- Removed prop 
Accordion
- Removed prop noBoxShadow. If a shadow is needed, the accordion can be placed in a card, or a shadow can be applied either using CSS or a box-shadow utility class. (#4022)
Alert
- Changed default variant to default. To maintain current default behavior, set thevariantproperty toinfo. (#3903).
- If you were previously using the actionprop for the close button, use theactionCloseprop instead (#4190)
- If you were previously using the actionprop for a link button, use theactionLinksprop instead (#4190)
Application launcher
- Removed deprecated prop dropdownItems. the propitemsshould be used instead (#3929)
Background image
- Replaced [BackgroundImageSrc.{sm,xs2x,sm,sm2x,lg}]with strings'sm' | 'xs2x' | 'sm' | 'sm2x' | 'lg'(#3886)
- Removed always ignored [BackgroundImageSrc.filter]for newfilterprop of typeReactNode(#3886)
Button
- Removed props isHoverandisFocus(#4116)
Card
- CardHeader:- Renamed to CardTitle (#4170)
 
- CardHeadMain:- Renamed to CardHeaderMain (#4170)
 
- CardHead:- Renamed to CardHeader (#4170)
 
Chip group
- Chip:- The overflow chip no longer contains a button. To specify an overflow chip as a button do use <Chip component='button' isOverflowChip>Chip</Chip>(#4246)
 
- The overflow chip no longer contains a button. To specify an overflow chip as a button do use 
- ChipGroup :
- ChipGroupToolbarItem: This component has been removed in favor of <ChipGroup categoryName="name">. All props that were on the<ChipGroupToolbarItem>have been added to<ChipGroup>. To use the new API, move props from<ChipGroupToolbarItem>to<ChipGroup>. (#4246)
Context selector
- ContextSelectorItem:- Removed prop isHover(#4116)
 
- Removed prop 
- ContextSelectorToggle:- Removed props isHoveredandisFocused(#4116)
 
- Removed props 
Data list
- Renamed noPaddingtohasNoPadding. (#4133)
Divider
- Removed promoted component from experimental index file. Change import path from  import { Divider } from '@patternfly/react-core/dist/esm/experimental';to'import { Divider } from '@patternfly/react-core/dist/esm/components';(#4029).
Drawer
- Renamed noPaddingtohasNoPadding. (#4133)
- Removed import path '@patternfly/react-core/dist/js/experimental'. The import path'@patternfly/react-core'should be used instead. (#4176)
Dropdown
- Dropdown:
- DropdownToggle:- Removed prop ariaHasPopupin favor ofaria-haspopup
- Renamed iconComponenttotoggleIndicator(#4038)
 
- Removed prop 
- DropdownItemIcon:- This component has been removed in favor of <DropdownItem icon={<Icon />} />(#4147)
 
- This component has been removed in favor of 
Empty state
- EmptyState
- EmptyStateIcon:- Removed deprecated sizeandtitlefrom IconProps.
 
- Removed deprecated 
Expandable section (formerly Expandable)
- Renamed component to ExpandableSection(#4116)
- Removed props isFocusandisHoveredfrom ExpandableSection (#4116)
Flex
- Flex:- Removed breakpointModsprop in favor ofspacer,spaceItems,grow,shrink,flex,direction,alignItems,alignContent,alignSelf,align,justifyContent,display,fullWidthandflexWrap(#4310)
 
- Removed 
- FlexItem:- Removed breakpointModsprop in favor ofspacer,grow,shrink,flex,alignSelf,align, andfullWidth(#4310)
 
- Removed 
Form select
- Removed boolean isValidprop in favor ofvalidated?: 'default' | 'success' | 'error' | ValidatedOptions;. Update your boolean logic to use the new 'default' or 'error' options instead. (#3975)
Gallery
- Removed prop gutterin favor ofhasGutter(#4014)
Grid
- Removed prop gutterin favor ofhasGutter(#4014)
Label
- Removed prop isCompactfrom Label (#4116)
- Default color changed to grey. Design also adjusted. (#4165)
Level
- Removed prop gutterin favor ofhasGutter(#4014)
Login page
- LoginForm:- Removed prop rememberMeAriaLabel(#3924)
 
- Removed prop 
Modal
- Modal- Collapsed the isLargeandisSmallproperties into a singlevariantproperty. To maintain the current behavior, set thevariantproperty tolargeorsmall, or use the newly addedModalVariantenum asModalVariant.largeorModalVariant.small. (#3920)
- Removed prop ariaDescribedByIdin favor ofmodalContentAriaDescribedById(#3924)
- Removed prop isFooterLeftAligned. This prop is now always enabled and cannot be opted out of. (#4017)
- Removed prop hideTitle. To hide the Modal header, do not pass a title prop, a description prop, or a header prop. If there is no title or header passed, provide anaria-labelprop to the Modal component to make it accessible. (#4140)
 
- Collapsed the 
- ModalContent:- Removed prop ariaDescribedByIdin favor ofmodalBoxAriaDescribedById
 
- Removed prop 
- ModalFooter:- Removed prop isLeftAligned(#4017)
 
- Removed prop 
Nav
- Nav:- Changed default theme to dark. To use the light variant, use theme="light". (#4116)
 
- Changed default theme to dark. To use the light variant, use 
- NavList:- Removed prop variant. Passvariant="horizontal"orvariant="tertiary"toNavinstead. (#4225)
 
- Removed prop 
Options menu
- OptionsMenu:- Removed prop ariaLabelMenu.
 
- Removed prop 
- OptionsMenuItemGroup:- Removed prop ariaLabelin favor ofaria-label
 
- Removed prop 
- OptionsMenuToggleWithText:- Removed prop ariaHasPopupin favor ofaria-haspopup
- Removed props isFocusedandisHovered(#4116)
 
- Removed prop 
- OptionsMenuToggle:- Removed props isFocusedandisHovered(#4116)
 
- Removed props 
Page
- Page:- Made mainContainerId a required property for skip to content component (#3904)
- Changed default theme to dark. Use theme="light"if you wish to use the light variant. (#4116)
- Renamed noPaddingtohasNoPadding. (#4133)
- Removed prop hasNoPaddingin favor ofpadding={{ default: 'noPadding' }}to prevent conflicts when setting bothhasNoPaddingandpadding={{ default: 'padding' | 'noPadding' }}(#4310)
 
- PageSection:
- PageHeader:- Removed prop avatar. Add the avatar to thePageHeaderToolscomponent instead (which is passed intoPageHeadervia theheaderToolsprop) (#4223)
- Removed prop toolbar. Use theheaderToolsprop instead. Also, if you previously used theToolbar,ToolbarGroup, orToolbarItemcomponents for the header, replace them with thePageHeaderTools,PageHeaderToolsGroup, andPageHeaderToolsItemcomponents. (#4223)
 
- Removed prop 
Pagination
- Removed obsolete 'left' and 'right' variants. These should be replaced with 'top' (default) or 'bottom'. (#4202)
Popover
- PopoverHeader:- Title size now defaults to medium instead of extra large (#4030)
 
Progress
- Progress:- Removed deprecated ProgressVariant.infothat adds no styling. Do not pass this prop or passnullinstead. (#3886)
 
- Removed deprecated 
- ProgressBar:- Removed prop ariaPropsin favor ofprogressBarAriaProps(#3924)
 
- Removed prop 
- ProgressContainer:- Removed prop ariaPropsin favor ofprogressBarAriaProps(#3924)
 
- Removed prop 
Select
- Select:- Removed prop ariaLabelledByin favor ofaria-labelledby(#3924)
- Removed prop ariaLabelTypeAheadin favor oftypeAheadAriaLabel(#3924)
- Removed prop ariaLabelClearin favor ofclearSelectionsAriaLabel(#3924)
- Removed prop ariaLabelTogglein favor oftoggleAriaLabel(#3924)
- Removed prop ariaLabelRemovein favor ofRemovedelectionAriaLabel(#3924)
- Renamed isExpandedproperty toisOpen(#3945)
- Removed deprecated CheckboxSelectandCheckboxSelectOptionin favor ofvariant="checkbox"
 
- Removed prop 
- SelectOption:- Removed prop isFocus(#4116)
 
- Removed prop 
- SelectToggle
Skip to content
- Removed componentprop in favor of always using an anchor tag (#4116)
Split
- Removed prop gutterin favor ofhasGutter(#4014)
Stack
- Removed prop gutterin favor ofhasGutter(#4014)
Tabs
- Tab:- The title should be wrapped with <TabTitleText>for proper styling. If you would like to place an icon in the tab, it should be wrapped with<TabTitleIcon>for proper styling. (#4146)
 
- The title should be wrapped with 
- Tabs:
Table
- Updated onSelect type from (event: React.ChangeEvent<HTMLInputElement>) => voidto(event: React.FormEvent<HTMLInputElement>) => void(#3296)
- Removed cellHeightAutotransformer (#4170)
- cellWidth('max')has been replaced with- cellWidth(100)(#4170)
Text input
- Removed boolean isValidprop in favor ofvalidated?: 'default' | 'success' | 'error' | ValidatedOptions;. Update your boolean logic to use the new 'default' or 'error' options instead. (#3975)
Text area
- Removed boolean isValidprop in favor ofvalidated?: 'default' | 'success' | 'error' | ValidatedOptions;. Update your boolean logic to use the new 'default' or 'error' options instead. (#3975)
Title
- Make headingLevelrequired and remove default ofh2to improve accessibility (#3922)
- Removed enum TitleLevel. Use one of the string valuesh1,h2,h3,h4,h5, orh6instead.
- Heading levels should be set contextually and and always be increasing or decreasing by 1 when read top-to-bottom in the DOM.
- Rename enum TitleSizetoTitleSizes(#3922)
- Removed invalid values xsandsmforsizeprop. Use sizemdinstead.
Toolbar (formerly DataToolbar)
- Toolbar:
- ToolbarItem:- Removed breakpointModsprop in favor ofvisibility,alignment, andspacer(#4310)
 
- Removed 
- ToolbarToggleGroup:- Removed breakpointModsprop in favor ofvisibility,alignment,spacer, andspaceItems(#4310)
 
- Removed 
Wizard
- Wizard - Removed prop ariaLabelNavin favor ofnavAriaLabel(#3924)
- Removed prop ariaLabelCloseButtonin favor ofcloseButtonAriaLabel(#3924)
- Removed props isFullHeightandisFullWidth(#4116)
- Renamed prop hasBodyPaddingtohasNoBodyPadding. (#4136)
- Removed inPageprop. By default the wizard will be displayed in page, filling its parent container. If the consumer passes a managedisOpenflag then the wizard will be displayed in a modal. (#4140)
 
- Removed prop 
- WizardBody: - Renamed hasBodyPaddingtohasNoBodyPadding. (#4136)
 
- Renamed 
- WizardHeader: - Removed prop ariaLabelCloseButtonin favor ofcloseButtonAriaLabel(#3924)
 
- Removed prop 
- WizardNav: 
- WizardNavItem: - Renamed prop texttocontent. The type of the prop has been changed toReact.ReactNodeto allow for flexibility. (#4063)
 
- Renamed prop 
React charts
- Updated Victory to package versions to 34.3.9 (#3974)
- Removed the @types/victorydependency and updated the PatternFly charts to use the types introduced with Victory 34.x. (#4138)
- Updated label prop types to sync with Victory 34.3.9 (#4152)
- Use containerComponent={<VictoryZoomComponent />}with Chart instead ofallowZoom. (#4278)
- Use containerComponent={<VictoryZoomComponent />}with ChartGroup instead ofallowZoom. (#4278)
- The allowTooltipprop was removed fromChartVoronoiContainerbecause Victory always provides a default tooltip.
React icons
- Updated types.
- Removed OutlinedFontAwesomeLogoFullIcon. (#3978)
React inline edit extension
- Changed and added many types while converting this project to TypeScript. (#4073)
React styles
- Removed all exports except for the cssfunction and CSS-in-JS stylesheets in thecssfolder since we no longer useemotion. To use these functions, import directly fromemotioninstead. (#3886)
React tokens
- Removed tokens global_BackgroundColor_150andglobal_BackgroundColor_300(see associated Core PR). At the discretion of design, useglobal_BackgroundColor_200with its new value#f0f0f0instead.
- Updated some of our tokens' values to be correct. (#4058)
- Added new files with a different structure to the index. (#4058)
View source on GitHub

