The theme object, along with its utility functions, introduce a minimal set of breaking changes for Garden version 9. It is important to proceed with caution when upgrading each Garden package individually. All existing v8 packages must be v8.75.0 or higher in order to complete a successful individual package migration to v9. Detailed theming change instructions are provided under the @zendeskgarden/react-theming package.
Garden has transitioned from utilizing Popper to adopting the enhanced Floating UI library. In the past, Popper's modifiers were directly accessible as component props, creating a rigid dependency that hindered updates to the positioning library. To address this, these properties have been removed since Floating UI is designed to intuitively handle component positioning in the majority of scenarios. Should you find yourself in need of specific functionality provided by the former modifiers, we encourage you to file an issue, making sure to mention the relevant Floating UI middleware for clarity. Garden will consider additional positioning prop support on a case-by-case basis.
-
Garden v9 packages use
styled-components
version range^5.3.1
.react-theming@v9
uses version range^4.2.0 || ^5.3.1
to supportv8
tov9
upgrades.
-
Garden v9 upgraded from
react-merge-refs
v1 to v2.- The breaking change exports ESM only.
- Build and test pipelines may need to be updated to account for the
.mjs
extension. See Garden's jest.config.js for details.
- The following React component prop types have changed:
- Removed
IItem
type export. UseITimelineItemProps
instead. IStepperLabelProps['icon']
:ReactNode
->ReactElement
ITimelineItemProps['icon']
:ReactNode
->ReactElement
- Removed
- Removed
ButtonGroup
: UI no longer recommended by Garden - Removed
IIconProps
type export. UseIButtonStartIconProps
orIButtonEndIconProps
instead. Anchor
: renders with an underline for improved accessibility. The same treatment applies to<Button isLink>
. The default can be removed with<Anchor isUnderlined={false}>
for word-wrapped or redundant UI where the underline is considered to be a visual distraction. While technically not a breaking change, the migration guide highlights this change for upgrade cases that may render unexpected styling.
- Removed
Sidebar
andSubnav
: UI no longer recommended by Garden - Removed
PRODUCT
type export. UseIHeaderItemProps['product']
instead. - Removed
hasFooter
prop forBody
(no replacement needed) - Removed
message
andconnect
values fromproduct
prop inHeader.Item
andNav.Item
Typings have been updated accordingly - The following React component types have changed:
- Removed
IBodyProps
type export. Header.ItemIcon
:HTMLAttributes<HTMLElement>
->SVGAttributes<SVGElement>
Nav.ItemIcon
:HTMLAttributes<HTMLElement>
->SVGAttributes<SVGElement>
- Removed
- Subcomponent exports have been deprecated and will be removed in a future major version. Update
to subcomponent properties:
FooterItem
->Footer.Item
HeaderItem
->Header.Item
HeaderItemIcon
->Header.ItemIcon
HeaderItemText
->Header.ItemText
HeaderItemWrapper
->Header.ItemWrapper
NavItem
->Nav.Item
NavItemIcon
->Nav.ItemIcon
NavItemText
->Nav.ItemText
- Added
Nav.List
as a semantic wrapper forNav.Item
. See the README for details.
Colorpicker
: renamed toColorPicker
ColorpickerDialog
: renamed toColorPickerDialog
- removed
popperModifiers
prop (see note)
- removed
ColorSwatch
- The new
name
prop is required because the refactored component is now backed by a native radio or checkbox group. - Removed
rowIndex
,colIndex
,defaultRowIndex
, anddefaultColIndex
. For the sake of accessibility, focus state should not be exposed or controlled.
- The new
ColorSwatchDialog
- same breaking changes as
ColorSwatch
. popperModifiers
prop (see note)
- same breaking changes as
- Removed
GardenPlacement
type export. UseIDatePickerProps['placement']
instead. Datepicker
: renamed toDatePicker
- removed
eventsEnabled
prop (no longer exposed by Floating UI) - removed
popperModifiers
prop (see note)
- removed
DatepickerRange
: renamed toDatePickerRange
- Use this package if you were using
@zendeskgarden/react-drag-drop
inv8
- Use this package if you were using
@zendeskgarden/react-dropdowns.next
inv8
- The
v8
version of@zendeskgarden/react-dropdowns
is no longer maintained and is renamed to@zendeskgarden/react-dropdowns.legacy
inv9
- The
Menu
: valueauto
is no longer valid for thefallbackPlacements
prop.- Removed
label
prop fromOptGroup
. Uselegend
instead. - Subcomponent exports have been deprecated and will be removed in a future major version. Update
to subcomponent properties:
Hint
->Field.Hint
Label
->Field.Label
Message
->Field.Message
- Removed
MultiThumbRange
: UI no longer recommended by Garden - The following types have changed:
- removed
IFieldProps
- removed
IIconProps
. UseIFauxInputStartIconProps
orIFauxInputEndIconProps
instead. IMediaInputProps['start']
:any
->ReactElement
IMediaInputProps['end']
:any
->ReactElement
- removed
- Subcomponent exports have been deprecated and will be removed in a future major version. Update
to subcomponent properties:
Hint
->Field.Hint
Label
->Field.Label
Message
->Field.Message
- Exported constants prefixed with
ARRAY_
no longer have a prefix. - The following types have been removed:
ALIGN_ITEMS
,ALIGN_SELF
,DIRECTION
,JUSTIFY_CONTENT
,TEXT_ALIGN
,GRID_NUMBER
,BREAKPOINT
,SPACE
, andWRAP
- Subcomponent exports for
Grid
have been deprecated and will be removed in a future major version. Update to subcomponent properties (e.g.,Grid.Row
).
DrawerModal
: renamed toDrawer
TooltipModal
: removedpopperModifiers
prop (see note)- Removed internal
useFocusVisible
hook for bothModal
andDrawer
. For non-Garden modal content that still depends on the polyfill for focus styling, either:- Use updated
:focus-visible
styling provided by thefocusStyles
andgetFocusBoxShadow
theming utilities, or - Use @zendeskgarden/container-focusvisible to restore the polyfill
- Use updated
- Removed
GARDEN_PLACEMENT
type export. UseITooltipModalProps['placement']
instead. - Subcomponent exports for
Modal
have been deprecated and will be removed in a future major version. Update to subcomponent properties (e.g.,Modal.Body
).
- The following types have changed:
- removed
ToastPlacement
. UseIToastOptions['placement']
instead. - removed
ToastContent
. UseIToast['content']
instead.
- removed
- Subcomponent exports have been deprecated and will be removed in a future major version. Update
to subcomponent properties:
Close
->Alert.Close
,Notification.Close
Paragraph
->Alert.Paragraph
,Notification.Paragraph
,Well.Paragraph
Title
->Alert.Title
,Notification.Title
,Well.Title
Pagination
: renamed toOffsetPagination
- changed type export from
HTMLAttributes<HTMLUListElement>
toHTMLAttributes<HTMLElement>
- removed
transformPageProps
prop - added
labels
prop
- changed type export from
- Renamed
PAGE_TYPE
type export toPageType
- All subcomponent exports have been deprecated and will be removed in a future major version.
Update to subcomponent properties (e.g.,
Table.Body
). - Removed
isHovered
,isActive
, andisFocused
props fromTable.OverflowButton
- All subcomponent exports have been deprecated and will be removed in a future major version.
Update to subcomponent properties (e.g.,
Tabs.TabList
).
- The default
theme
object has removed values forcolors.background
andcolors.foreground
. Use the'background.default'
and'foreground.default'
variables together with the v9getColor
utility instead. - The theming
palette
has undergone a comprehensive redesign and now includes enhanced support for both light and dark modes. To facilitate a smoother transition, we have introduced a temporary utility,getColorV8
, which is deprecated. This utility enables the application of the legacy version 8 color scheme to custom components that are not part of the Garden framework. It is recommended to utilize this stopgap measure until such components can be updated to leverage the full capabilities of v9getColor
. - The
focusVisibleRef
prop (and the resulting scoping<div>
) has been removed from<ThemeProvider>
. Current browser support obviates the need for a:focus-visible
polyfill. - Removed
message
andconnect
values fromPALETTE.product
- Utility function
getColor
has been refactored with a signature that supports v9 light/dark modes. Replace usage withgetColorV8
until custom components can be upgraded to utilize the newgetColor
function. - Utility functions
getFocusBoxShadow
andfocusStyles
no longer takehue
,shade
,spacerHue
, orspacerShade
parameters. Use thecolor
orshadeColor
parameters instead. The new object parameters take the shape of refactoredgetColor
. - Utility function
getDocument
has been removed. UseuseDocument
instead. - Utility function
isRtl
has been removed. Useprops.theme.rtl
instead. - Utility function
withTheme
has been removed. Usestyled-components
useTheme instead. - The following exports have changed:
- removed
retrieveTheme
. UseretriveComponentStyles
instead. - constants prefixed with
ARRAY_
no longer have a prefix.
- removed
- The following types have changed:
- renamed
ARROW_POSITION
toArrowPosition
- renamed
MENU_POSITION
toMenuPosition
- renamed
Tooltip
- removed
eventsEnabled
prop (no longer exposed by Floating UI) - removed
popperModifiers
prop (see note)
- removed
- All subcomponent exports have been deprecated and will be removed in a future major version.
Update to subcomponent properties (e.g.,
Tooltip.Title
).
CodeBlock
: Thelanguage
set has been reduced from 32 to 13, for a significant decrease in bundle size. If you encounter any essential languages that are missing, please create an issue. Garden will evaluate incorporating any business-critical languages.- The following React component types have changed:
Span.Icon
:HTMLAttributes<HTMLElement>
->SVGAttributes<SVGElement>
Span.StartIcon
:HTMLAttributes<HTMLElement>
->SVGAttributes<SVGElement>
- This package has been removed.
- Migrate to
@zendeskgarden/container-utilities
and@zendeskgarden/react-theming
to continue receiving updates.