npm / @chakra-ui/react
@chakra-ui/react
What changed in @chakra-ui/react 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
33 breaking1 security117 new APIs and options3 performance22 behavior and defaults2 tooling165 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@chakra-ui/react 3341 changes
Breaking changes 31
remove and removeAll now resolve pending promises from open, close, and waitForExit with undefined.
Listbox.ItemText now renders a span instead of a div, and its ref is typed as HTMLSpanElement.
Popover.Title now renders an h2, and its ref is typed as HTMLHeadingElement.
Adds data-current, data-complete, and data-incomplete to the item, and moves aria-current="step" to the trigger.
An exclamation mark inside a style value is no longer treated as !important; only a trailing ! or !important is recognized.
Toggle.Indicator now renders a span instead of a div, and its ref is typed as HTMLSpanElement.
Tests asserting the field error announcement should use toHaveAccessibleDescription instead of toHaveAccessibleErrorMessage.
Runs a supplied onClick handler before closing the dialog, and no longer submits an ancestor form by default.
Runs a supplied onClick handler before closing the drawer, and no longer submits an ancestor form by default.
No longer submits an ancestor form when clicked.
Now represents the full per-level indent, including indent-size and half icon-size; zero fully removes nested indentation and custom values no longer receive an extra offset.
Pressing Enter no longer submits the form when an item is highlighted or a value is rejected by allowCustomValue: false.
The focus ring now appears only for :focus-visible, not on mouse click.
Animation styles are added for composing animation properties and built-in keyframe animations; the prop was renamed from motionStyle.
The hooks package is removed; use dedicated libraries like react-use and usehooks-ts instead.
All component packages are consolidated into a single package.
The custom select component now requires createListCollection.
Pass an object with a key property instead of the recipe key string.
The API is renamed to createSlotRecipeContext.
Fieldset.Control is renamed to Fieldset.Content.
The Input and Textarea variant is renamed from filled to subtle.
gray becomes the default color palette.
Prose is moved to snippets so users can customize it.
The emptyColor prop is removed; use --spinner-track-color instead.
The speed prop is removed; use animationDuration instead.
The thickness prop is removed; use borderWidth instead.
Stepper is renamed to Steps, manages state internally, and no longer requires useSteps.
trackLabel replaces the onLabel and offLabel props.
The hover trigger is removed in favor of HoverCard.
The signature changes; the notes identify a breaking change but show the new object argument only for useSlotRecipe and createSlotRecipeContext.
Pass an object with a key property instead of the recipe key string.
Security 1
Fixes an XSS vector in the hidden input-width measurement element by using textContent instead of parsing tag values as HTML.
New APIs and options 117
The loading prop sets aria-busy on the list and holds back the empty state while loading, while keeping content visible.
onSelect details now include modifiers, and onSelect is called when a link item is modifier-clicked.
Adds a searchable command menu built on Combobox and Dialog, with an overlay, keyboard navigation, and a mod+k shortcut.
Set closeOnSelect={false} to keep the command palette open after an item is selected.
Adds KbdGroup to group shortcut keys; its size and variant apply to every Kbd inside.
Adds api.type and api.getPageUrl(page) to Pagination.
Adds a return-value generic so awaiting open() returns the value passed to close() instead of any; the generic defaults to unknown.
Accepts a content type parameter so toast title and description can use values other than ReactNode; the default remains ReactNode.
Lets Dialog and Drawer content mark the element to focus when an overlay opens, without using initialFocusEl and a ref.
Lets Dialog and Drawer content exclude an element from automatic focus selection when an overlay opens.
Adds a segmented date field for typing dates without a calendar, with locale-formatted keyboard-navigable segments, range selection, constraints, and time-only input support.
Lets portalled content remain inside the focus trap when it is not reachable through aria-controls or aria-expanded; getters resolve elements lazily.
Controls how kept-mounted content is hidden when closed: the default display-none mode keeps effects running, while activity uses React 19 Activity to pause them.
Adds configurable keyboard stepping while Shift is held; defaults to 10 times step, preserving existing arrow-key behavior.
Adds configurable keyboard stepping while Alt is held; defaults to step divided by 10, preserving existing arrow-key behavior.
Adds a Presence callback that runs when enter animations finish.
Adds configurable larger keyboard steps, applied with Shift and PageUp/PageDown; defaults to 10 times step.
The return value of createOverlay now has a has() method.
Placement-aware parts in Color Picker, Combobox, Date Picker, Hover Card, Menu, Popover, Select, and Tooltip expose data-side for placement-based styling.
Adds a draggable, resizable floating panel component with trigger, positioning, content, header, body, control, and resize parts.
Adds per-panel resizeBehavior with the "preserve-pixel-size" option.
Size props accept CSS units including px, em, rem, vh, and vw.
Adds
Field.Itemfor multi-control fields, re-exported asFieldItemandField.Item.Adds the
targetprop for multi-control fields.Adds
keyboardPriorityfor Home/End and arrow keys, plus highlight-first, last, next, and previous controls.The format prop accepts a function, enabling localized page text.
Fixes deletion, focus, and Home/End behavior, and adds
enterKeyHint,autoSubmit, andsanitizeValueprops.Multiple triggers can share one popover instance; translation support and
finalFocusElandrestoreFocusprops are also added.Adds CSS variable overrides for slide-from keyframe distances.
Adds CSS variable overrides for slide keyframe distances, including the distance from the top.
Adds CSS variable overrides for slide-to keyframe distances.
Adds
allowDuplicatesandsanitizeValueprops, and supportsenterKeyHinton mobile.Exports the ComboboxSelectionDetails type in the Combobox namespace.
Adds a datepicker component for date selection.
Exports the ListboxScrollToIndexDetails type in the Listbox namespace.
Exports the ListboxSelectionDetails type in the Listbox namespace.
Exports the ListboxSelectionMode type in the Listbox namespace.
Exports the MenuValueChangeDetails type in the Menu namespace.
Exposes Select.List, enabling virtualization support.
Added the data-instant attribute for instant animations when switching between multiple tooltip triggers.
Added an overflow CSS variable for scroll fade effects.
Added an overflow CSS variable for scroll fade effects.
Added an overflow CSS variable for scroll fade effects.
Added an overflow CSS variable for scroll fade effects.
Added thumbCollisionBehavior to control thumb collision handling with none, push, or swap behavior.
Added isStepSkippable support for step validation.
Added isStepValid support for step validation.
Added onStepInvalid support for step validation.
Added a placeholder prop that shows when no tags exist.
A new Marquee component is available.
Add a CSS variable to configure the ActionBar offset from edges.
Add a placement variant to position the bar at bottom, bottom-start, or bottom-end.
Export the listbox slot recipe from Theme.
Add markerLabel to Slider component anatomy for theming marker labels.
Export a component for custom Slider marker label rendering.
Adds a border semantic token to all color palettes, improving outline component appearance.
Adds the autoSize prop for variable width or height slides.
Exports the FocusOutsideEvent type.
Exports the InteractOutsideEvent type.
Exports the PointerDownOutsideEvent type.
Introduces a resizable splitter component with Root, Panel, and ResizeTrigger parts.
Adds a carousel component for building carousel interfaces.
Adds
collapsedHeightto control the collapsible content's dimensions in its collapsed state.Adds
collapsedWidthto control the collapsible content's dimensions in its collapsed state.Adds
getPageUrlfor generatinghrefattributes when using pagination as links.Adds a component for entering multiple values as tags, with tag creation, deletion, and keyboard navigation.
CSS accentColor is added to the style props.
An ActionBar component is added.
The /anatomy entrypoint is added to package exports.
The stepper gains an aria-current attribute.
The chakra factory gains asChild support; Icon also sets it to true by default.
A CardDescription component is added.
A CardTitle component is added.
A card-based checkbox selection component is added.
A CheckboxCardDescription component is added.
A CheckboxDescription component is added.
A pseudo prop is added for styling closed selectors.
A Collapsible recipe with default open/close animation is added.
A component namespace is added to reduce imports and provide better composition.
The conditions object supports arrays, allowing complex selectors such as media hover queries.
Recipe definitions can be inlined in createRecipeContext, reducing the need for CLI-generated types for custom components.
Inline recipes are supported to reduce the need for CLI-generated types for custom components.
createSystem accepts multiple system configs directly, replacing the need to merge them first.
A DataList component is added.
A built-in disabled layer style is added.
A component for rendering empty-state messages is added.
Field components are decomposed so Label, ErrorMessage, and HelpText can be used independently.
A new fieldset component is added.
A FileUpload component is added.
A built-in fill layer style is added for quickly composing designs with automatic dark mode.
A style prop is added to quickly style the focus-visible state of form controls; values can be extend or contain.
A style prop is added to set the focus-ring color.
Support for the FormatByte component is added.
Support for the FormatNumber component is added.
A pseudo prop is added for styling descendants of closed groups.
A pseudo prop is added for styling descendants of open groups.
A built-in indicator layer style is added.
Style prop names are added to the LayerStyleProperty union type.
A pseudo prop is added for styling open selectors.
A built-in border layer style is added for quickly composing designs with automatic dark mode.
A Pagination component is added.
A new entrypoint exposes Chakra's default theme and recipes.
A new entrypoint exposes the base utilities and conditions used internally.
A card-based selection component is added.
A RadioCardDescription component is added.
A Rating component is added.
A RatingGroup component is added.
The Avatar component gains referrerPolicy.
A SegmentControl component is added.
A Status component is added.
The CLI adds support for strictTokens.
A Tag.EndElement component is added for easier styling of tag end elements.
A Tag.StartElement component is added for easier styling of tag start elements.
Custom theme conditions or pseudo props can be defined through theme.conditions.
A thumbLabel prop lets developers render an icon within the thumb.
A component for presenting chronological information or activities is added.
toastStore is exported from the toast component.
Performance 3
Dragging is faster in large documents.
No longer re-renders whenever its subtree mutates when helper and error text are unchanged.
Recipe components such as Button, Badge, and Skeleton render faster in large lists and tables through per-system recipe caching and memoized variant style resolution.
Behavior and default changes 22
In Dialog, Drawer, Popover, Color Picker, and Floating Panel, initialFocusEl can return false to open without moving focus.
Single keys such as K now render square.
onSelect details now include modifiers, and onSelect is called when a link item is modifier-clicked.
Disabled elements use tokens.cursor.disabled instead of a hardcoded not-allowed cursor.
Allows partial translations so applications can override individual messages and use defaults for the rest.
Accepts locale-native numerals when typing, not just ASCII digits.
After a pointer drag, the resize trigger no longer displays the focus ring from :focus-visible, while retaining focus for keyboard resizing.
FloatingPanel.Root now defaults minSize to { width: 240, height: 100 } to prevent resizing the panel to zero; pass your own minSize to override it.
Removes the input placeholder override so DatePicker placeholders use the same global *::placeholder styling as Input.
Multiple triggers can share one dialog instance.
Multiple triggers can share one hover card instance.
Dialog, Drawer, Menu, and HoverCard use a unified z-index with zIndex.popover and --layer-index for proper overlay stacking.
Improve focus ring styles for Slider.Thumb.
The outline variant uses colorPalette.border instead of colorPalette.muted or the global border token, with CSS variable fallbacks for backward compatibility.
The outline variant uses colorPalette.border instead of colorPalette.muted or the global border token, with CSS variable fallbacks for backward compatibility.
The outline variant uses colorPalette.border instead of colorPalette.muted or the global border token, with CSS variable fallbacks for backward compatibility.
The outline variant uses colorPalette.border instead of colorPalette.muted or the global border token, with CSS variable fallbacks for backward compatibility.
initialItems now accepts readonly arrays.
In modal mode, elements referenced by
aria-controlscan be included in the focus trap scope.In modal mode, elements referenced by
aria-controlscan be included in the focus trap scope.Modal and Drawer gain a default preserveScrollBarGap setting.
Theme recipe naming is aligned with panda.
Tooling 2
Improves hook types with
BreakpointName.The CLI can scaffold an already composed steps component.
Fixes and other changes 165
SSR hydration mismatches caused by the style cache ignoring property order are fixed.
Fixes the array form of the css prop being ignored by Flex, Square, and Circle.
Theme cursor token overrides are now respected by Checkbox Card, Radio Card, and Slider.
Variants named after CSS shorthands such as rounded, bg, or p are no longer dropped.
Field.ErrorText is linked to the input via aria-describedby instead of aria-errormessage, improving announcements by VoiceOver and Narrator.
Helper and error text announcements are fixed for Select, Tags Input, Color Picker, File Upload, Rating Group, and Pin Input.
Field.Root readOnly now makes File Upload read-only.
Disabled delete triggers no longer show an active cursor and full-opacity icon.
strategy="absolute" now places the panel within its boundary, and the panel follows that boundary when an ancestor scrolls.
Fixes an Illegal invocation error during setup when tools such as Storybook replace HTMLElement.prototype.focus.
Values containing semicolons, such as data URLs, are no longer cut off when props merge.
Shift+click range selection now anchors on the clicked item instead of the highlighted item.
When NumberInput.Label is inside NumberInput.Root, the control is anchored to the root bottom and sized to the input height instead of overflowing into the label.
Escape now closes content opened immediately beforehand, and floating content no longer flashes at the top-left on first open.
When type="link", Pagination items and triggers render as anchors.
After blocked native required validation, keystrokes no longer go into the hidden input; focus moves to a visible input.
autoFocus={false} is now respected for modal popovers.
A stylesheet z-index on the positioner is now respected in Popover, Select, and Menu.
Fixes exit-animated elements staying mounted invisibly in Safari and blocking clicks.
The formatter now updates when formatOptions changes.
The vertical scrollbar no longer appears for only horizontal overflow, and vice versa.
Programmatic tab selection no longer triggers link navigation.
When a focused toast is dismissed, focus moves to the next toast.
Toaster now respects dir.
Toaster now respects getRootNode.
Listbox items use tokens.cursor.option.
When the breakpoints option is omitted, useBreakpoint no longer always returns "base".
The getWindow option is now respected, fixing media queries in iframes and Shadow DOM; this also applies to useBreakpointValue.
Now returns the correct entry when its value object gains or loses a breakpoint.
Changes to the supplied queries are now evaluated and subscribed to, so state-derived queries no longer report only the first render's result.
Tokens with a value of 0 no longer return the fallback.
No longer causes unintended form submission when used inside a form.
Clicking a label no longer incorrectly adds data-focus-visible to the control.
Prevents the channel input from committing a partial value when Enter confirms an IME composition.
Prevents scrolling an item into view from causing pointerleave to be treated as a real hover and changing the highlighted item.
Fixes lagging segment text and dropped edits during typing or auto-advance, preserves wall-clock values with a custom formatter and no timeZone, and accepts locale-native numerals.
Fixes keyboard range selection to match pointer behavior, including restarting on a third date and resuming a range reopened with only a start date.
Corrects the view trigger's aria-label and announces dates inside a range as In range rather than Choose.
Disabled and read-only pickers no longer react to cell clicks, clear triggers, or presets; read-only retains roving-focus navigation and disabled pickers leave the tab order.
Enforces maxSelectedDates on month and year cells in multiple mode.
Respects minView, maxView, and defaultView when resolving the initial view instead of hardcoding the day-through-year range.
A controlled open prop is no longer overridden by defaultOpen.
Locks page scrolling behind an open overlay when html is the scroll container.
Locks page scrolling behind an open overlay when html is the scroll container.
Dialog, Drawer, Menu, and Popover now handle Escape immediately after opening instead of sometimes swallowing the keypress.
Closing a panel removes it from the stack so the next panel becomes topmost; focusing a panel raises its positioner above siblings.
Prevents scrolling an item into view from causing pointerleave to be treated as a real hover and changing the highlighted item.
Scroll duration now accounts for content size and actual translation distance, so speed remains consistent when content is narrower than the viewport.
Prevents scrolling an item into view from causing pointerleave to be treated as a real hover and changing the highlighted item.
Prevents the context trigger from flashing at the top-left on first right-click and fixes long-press context menus opening at (0,0).
Cmd/Ctrl with arrow keys now produces values on the step grid.
Prevents api.setValue from throwing when passed a number while formatOptions is set.
Closing an overlay no longer steals focus from an element focused by the app in the meantime; nested closing handles disconnected outer containers, and Escape restores the visible focus ring.
Tabbing out of portalled content now moves focus to the next tabbable element after the trigger instead of looping back into the content.
Semantic i and em elements now render in italics when preflight is enabled.
getDataUrl() and the download trigger now preserve overlays such as logos and badges in exported codes.
Clicking a label no longer incorrectly adds data-focus-visible to the control.
Resolves the optional Activity export at runtime and falls back to display-none when the React build does not expose it, avoiding Next.js 15 production build failures.
Prevents scrolling an item into view from causing pointerleave to be treated as a real hover and changing the highlighted item.
Cmd/Ctrl with arrow keys now produces values on the step grid.
Collapsed panels now size to collapsedSize instead of minSize, and keyboard resizing works when a resize trigger receives focus while hovered.
No longer submits an ancestor form when clicked.
No longer renders its children twice.
Clicking a label no longer incorrectly adds data-focus-visible to the control.
No longer causes unintended form submission when used inside a form.
Native form submissions now include current tags in FormData after tags are added, removed, or cleared.
Prevents height flicker when expanding the stack in overlap mode by measuring heights without the scale transform.
Fixes incorrect CSS prop application.
The outline-variant checked ring on RadioCard and CheckboxCard is drawn with an inset shadow so it is not clipped when a parent has overflow hidden, auto, or scroll.
Fixes incorrect CSS prop application.
Fixes incorrect CSS prop application.
Fixes custom className removing the base chakra-image class.
LinkOverlay now forwards the rel attribute to the rendered anchor instead of dropping it.
Recipe merging normalizes compiled and raw configs before combining them, preventing errors when composing recipe-based components through the chakra factory and avoiding mutation of source configs.
Fixes incorrect CSS prop application.
Item triggers no longer render redundant aria-disabled attributes.
onValueChangeEnd now fires when a color is picked with the EyeDropper API.
Fixes range-mode clearing so it resets active and hovered state.
Hovering an outside day no longer changes the visible month.
Fixes the native month/year select inside modals in Firefox.
Nested token overrides are normalized when merging the default theme; adding overrides such as colors.black.100 promotes the original colors.black value to DEFAULT and resolves nested tokens.
Fixes shared custom trigger elements being ignored and trigger lookups in shadow DOM.
Fixes the page being left uninteractive after closing in React 19 Strict Mode.
Token dictionary lookups preserve semantic token condition metadata.
Fixes blur behavior when the input is cleared and min is greater than 0.
Fixes data-filled being set on every input during the first render.
Fixes recipe definition types so defaultVariants accepts variant keys when using the broad RecipeDefinition type.
Clicking a resize trigger now moves focus to that trigger.
Returns the semantic CSS variable reference for semantic tokens with light/dark conditions instead of a dark-mode-resolved value.
Item trigger props now include the missing
data-focusattribute.Fixes controlled carousels inside dialogs, navigation in transformed containers, scroll drift, and page synchronization with indicators.
Vertical slider orientation is corrected during pointer updates.
VoiceOver announces highlighted options on Apple devices using a live region.
Fixes body scroll locking and restores
pointer-eventscorrectly when overlays run under React StrictMode.Fixes calendar popup clipping constrained by available height.
Exports the previously missing date picker slot recipe.
Prevents the panel from appearing behind the dimmed overlay when opening and closing quickly or with certain global z-index styles.
Prevents the panel from appearing behind the dimmed overlay when opening and closing quickly or with certain global z-index styles.
Duplicate files are rejected with
FILE_EXISTS.Array shorthand is no longer mistaken for responsive arrays.
Responsive array values in selector rules such as
#idor.classnow generate responsive breakpoint styles instead of being serialized incorrectly.Fixes incorrect application of the CSS prop.
Rejects malformed CSS length values such as
1a5remand1-5rem.Closed menus expose
aria-expanded, submenu hover no longer flashes diagonally, and multiple triggers are supported.Uses a React 19-safe state-based implementation and compares values with
Object.isfor correctNaNand-0behavior.Fixes a TypeScript error when passing a ref to CheckboxGroup.
Fixes the default size so the icon stays aligned with error text instead of expanding when the error area is full width.
Element selectors matching utility shorthands, such as p, m, h, and w, are no longer silently ignored.
Individual checkbox props are no longer overridden by CheckboxGroup when rendering.
Overlay and floating elements no longer scroll out of view when horizontally scrolling long code lines.
Selecting black shades now updates the color in controlled mode.
Closing a nested dialog no longer incorrectly closes parent layers.
Submenu behavior is no longer glitchy when quickly hovering between trigger items.
Cursor positioning issues after clicking the label or scrubbing are fixed.
The next trigger is now disabled when count is 0.
Closing a nested popover no longer incorrectly closes parent layers.
Thumb dragging from the edge is fixed in contain alignment mode.
Fixed api.toggleChecked() not working.
The change event is now emitted after clearing a controlled textarea.
Initial focus is fixed when the first node or branch is disabled.
Backdrop blur now applies as expected when used with backdropFilter="auto".
The keyframe now animates width instead of height for horizontal collapse transitions.
The base value is now respected during server-side rendering.
Fix z-index stacking when ColorPicker is used inside dialogs.
Fix z-index stacking when Combobox is used inside dialogs.
Normalize base styles so shorthand properties do not overwrite variant styles.
Fix menu content backgrounds not rendering by using the full token path for the CSS variable.
Fix z-index stacking when Select is used inside dialogs.
Fix duplicated children when loading is set to false.
Fixes dragging after tab switches or scrolling, and mouse-wheel scrolling when allowMouseDrag is enabled.
Fixes onHighlightChange not firing when filtering produces no results.
Fixes focus stealing in controlled mode.
Removes problematic aria-hidden behavior.
Non-interactive children in the dropzone now open the file picker.
Fixes arrow direction in RTL layouts.
Fixes arrow direction in RTL layouts.
Fixes inconsistent data-focus-visible and data-focus attributes.
Fixes the indicator appearing before its rectangle is resolved when used with Tabs.
The indicator now updates when the tab list resizes during responsive reflow.
Fixes the indicator appearing before its rectangle is resolved when used with Radio Group.
Long tags now truncate with an ellipsis instead of overflowing the container.
Fixes arrow direction in RTL layouts.
Improves padding management to prevent input text from overflowing onto triggers.
Adds the missing client directive to CodeBlock.
Fixes setting the initial checked state to
indeterminate.Ensures
api.checkedStatereturns the correct checked state.Fixes the
dirprop so its value is applied correctly.Fixes propagation of the initial value to
inputValuefor controlled single-select comboboxes.Pressing Enter when no item is highlighted no longer calls
event.preventDefault().Fixes the cursor jumping to the end when typing in the middle with
formatOptionssuch asstyle: "currency".Fixes
Cmd+BackspaceandCmd+Deleteinserting "undefined" instead of clearing the field.Fixes horizontal scrollbar positioning on Safari in RTL mode.
Fixes resize tracking so it observes the root element.
Fixes the accessibility violation caused by the required state not being set correctly on the trigger.
Fixes continued dragging when a slider is disabled during a drag operation.
Fixes inconsistent application of
data-activewhen the disabled state changes at runtime.A transform function is added to handle the text value appropriately.
The boxSize type is fixed to allow number values.
Autocomplete suggestions are fixed for hideBelow.
Autocomplete suggestions are fixed for hideFrom.
NumberInput is converted to use Ark UI.
Tabs is converted to use Ark UI.
The target prop is passed to link overlay.
A mobile issue affecting toast is fixed.
Missing use client directives are added to several components.
@chakra-ui/react 22 changes
Breaking changes 2
In v2, render the returned ToastContainer in your application code; createStandaloneToast no longer renders the toast container DOM element for you.
The peer dependency requirement for React and ReactDOM is now >=18.