The upgrade to Garden v8 is designed to allow you to upgrade each package individually. It is not necessary to upgrade all Garden packages to v8 at once. Each upgrade step can be completed in isolation.
- Upgrade all existing Garden React dependencies to their latest
v7version. - Upgrade
@zendeskgarden/react-themingtov8.react-theming@v8includes breaking changes. Refer to the Breaking Changes section for specific upgrade instructions.react-theming@v8is a valid peerDependency for allv7packages.
- Upgrade all other
@zendeskgarden/react-*packages tov8individually.- These upgrades included several breaking changes. Refer to the Breaking Changes section for specific upgrade instructions.
- Garden v8 packages use CSS-in-JS and no longer provide CSS files.
- Remove all Garden React CSS imports.
- i.e
@zendeskgarden/react-buttons/dist/styles.css
- All themable component IDs (
data-garden-idattributes) have been renamed for consistency across all packages. - Any custom theming provided to the
ThemeProvidercomponent should be checked for accuracy. - Garden v8 packages no longer provide UMD bundles.
- The
Textcomponent has been removed.- Use
Avatar.Textinstead.
- Use
- New props to ease color control:
surfaceColor,backgroundColor, andforegroundColor.
- The
Itemcomponent has been removed.- Instead of passing
Itemcomponents as children toBreadcrumb, consumers can now pass any inline elements of their choice. - For example, a child of
Breadcrumbcan be a<span>or a component that renders an<a>.
- Instead of passing
- The following props have been renamed:
Buttonbasic->isBasicdanger->isDangerexternal->isExternallink->isLinkpill->isPillprimary->isPrimarystretched->isStretchedmuted-> removed (use theming to adjustprimaryHue)
ButtonGroupselectedKey->selectedItemonStateChange->onSelect- The
onSelectcallback passesselectedItemdirectly rather than nesting it in an object.
- The
- The
ButtonGroupViewcomponent has been removed. - The
Iconcomponent has been removed.- Use an
IconButtonwith a modifiedisRotatedprop instead.
- Use an
- The
ButtonGroupcomponent now requires its children to contain avalueprop which is returned when selected. - Buttons no longer provide a minimum width.
- The following props have been renamed:
Headerstandalone->isStandalone
HeaderItemisRound->isRoundlogo->hasLogo
HeaderItemTextclipped->isClipped
Navexpanded->isExpanded
NavItemlogo->hasLogobrandmark->hasBrandmarkcurrent->isCurrent
CollapsibleSubNavItemexpanded->isExpanded
SubNavItemcurrent->isCurrent
- The
Navcomponent no longer takes adarkorlightprop.- Use the
Chromecomponent’shueprop to apply a custom color. - All themed components will dynamically change styling to create an accessible contrast level.
- Use the
- All state and styling props such as
active,focused, ‘hover` etc. have been removed.
- The following props have been renamed:
Datepickersmall->isCompactanimated->isAnimated
DatepickerRangesmall->isCompact
- The following props have been renamed or removed:
Autocomplete,MultiSelect,Selectsmall->isCompactbare->isBareopen->isOpenfocused-> removedhovered-> removed
Labelregular->isRegularsmall-> removed
Hintsmall-> removed
Menuanimate->isAnimatedsmall->isCompacthidden->isHiddenarrow->hasArrow
AddItem,HeaderItem,Item,MediaItem,NextItem,PreviousItemactive-> removedfocused-> removedhovered-> removed
- The following props have been renamed or removed:
- The following props have been removed from all components:
focusedhoveredmediaLayoutopenselecttagLayout
- Field
inline-> removed- Inline layouts can now be achieved with custom styling.
- Hint
small-> removed- Use
isCompacton theInputcomponent instead.
- Use
- Label
regular->isRegularhidden-> removedindeterminate-> removed- All attributes should be applied to the corresponding
<input>component (checked, disabled, indeterminate).
Input,Textarea,FauxInputbare->isBaresmall->isCompact
TextArearesizable->isResizable
- The following props have been removed from all components:
- Checkbox now uses the
indeterminateprop which was previously obfuscated under theLabelcomponent.
- The following props have been renamed or removed:
Gridfluid-> removed (which now defaults totrue)- Garden does not have an opinion re: non-fluid maximum container widths per breakpoint. If
you need these four
max-widthCSS properties across the small, medium, large, and extra-large breakpoints, either use Bootstrap's.containeror add them to your application.
- Garden does not have an opinion re: non-fluid maximum container widths per breakpoint. If
you need these four
Rowgutters-> removed- Use
<Grid gutters={false}>instead
- Use
ColjustifyContent-> removed- Row component’s
justifyContentprop can be used for alignment.
- Row component’s
- New features and fixes include:
- Ability to resize gutters (default = 20px).
- Ability to set number of columns (default = 12).
- Added Col
offsetand fixed RTL across all offsets. - Added Row
alignContentprop. - Most Row/Col props accept responsive variants for targeting screen size breakpoints.
- The following props have been renamed or removed:
Dotsvelocity-> removed- Use
durationinstead which accepts milliseconds. The default is 1250ms.
- Use
Skeletondark->isLight
- The following props have been renamed or removed:
Modalanimate->isAnimatedcenter->isCenteredlarge->isLarge
Headerdanger->isDanger
Closefocus-> removedhovered-> removed
- The
BackdropandModalViewcomponents have been removed.
- The following props have been renamed:
Wellfloating->isFloatingrecessed->isRecessed
- The following components have been removed:
GapNextPagePagePaginationViewPreviousPage
- A new
pageGapprop has been added.- It is used to modify the gap display positioning.
- All components in this package now use native
<table>styling.- Previous implementations may have hard-coded column widths. This may no longer be necessary.
- All state and styling props such as
active,focused, ‘hover` etc. have been removed. - The following props have been renamed:
Cellminimum->isMinimumtruncate->isTruncatedmenu->hasOverflow
Rowstriped->isStripedselected->isSelected
- A new structure is required for the
Tabscomponent.- This new structure allows consumers to style individual tags if necessary.
<Tabs>
<TabList>
<Tab item="tab-1">Tab 1</Tab>
</TabList>
<TabPanel item="tab-1">Content</TabPanel>
</Tabs>- All state and styling props such as
active,focused,hover,selected, etc. have been removed. - The
verticalprop has been renamed toisVertical.
- Child component exports
AvatarandClosehave been removed.- Use
Tag.AvatarandTag.Closeinstead.
- Use
- The following props have been renamed:
Tagpill->isPillround->isRoundtype->hue
retrieveThemehas been renamed toretrieveComponentStyles.- All theming is now provided through a single
themeprop.- RTL notation
- Previously
<ThemeProvider rtl> - Currently
<ThemeProvider theme={{ ...DEFAULT_THEME, rtl: true }}>
- Previously
- Custom
documentobject- Previously
<ThemeProvider document={doc}> - Currently
<ThemeProvider theme={{ ...DEFAULT_THEME, document: doc }}>
- Previously
- RTL notation
- Per component styles
- Previously
theme[COMPONENT_ID] - Currently
theme.components[COMPONENT_ID].
- Previously
- The following exports have been removed:
LightTooltipTooltipViewGARDEN_PLACEMENTSPOPPER_PLACEMENTSgetPopperPlacementgetRtlPopperPlacement
- The following props have been renamed or removed:
delayMilliseconds->delayMSarrow->hasArrowappendToBody->appendToNode- It is required to pass the HTML element which the tooltip should append to.
trigger-> removed- Tooltip
childrennow accepts a single element which acts as the triggering element
- Tooltip
- Tooltip
contentprop now accepts Tooltip content (previouschildren) - The Tooltip trigger no longer has a wrapping
<div>element- An optional
refKeyprop has been added for retrieving the ref from the triggering element.
- An optional
- The following props have been renamed:
Codetype->hue
Typography,MD,LG,SM,monospace->isMonospace
- This package has been deprecated and will be removed in a future major release.
- Migrate to
@zendeskgarden/container-utilitiesto continue receiving updates.