Component changelog
Popover changelog
Component-specific release notes collected from the full changelog. This page filters the published entries that mention Popover.
Release
v1.2.1
Patch Changes
-
2d81c52: Triggers rendered with
asChildkeep the child's own semantics. A link insideTooltip.Trigger,Popover.Trigger,Dialog.Triggeror any other trigger used to getrole="button"andtype="button", so screen readers announced it as a button. Now a link stays a link, a native button keeps its owntype, and only other elements (aspan, adiv) getrole="button".Buttonalready worked this way; every trigger now does too (#2332). -
47693b3:
Select.Content,Combobox.ContentandAutocomplete.Contentacceptside,align,sideOffsetandalignOffset, asPopover.ContentandTooltip.Contentdo. They used to work only on the Root; on Content they were silently passed to the DOM, and React warned about unknown props. Values on Content win over the Root's (#2335).
Release
v1.2.0
Minor Changes
-
befc825: Dialog, AlertDialog, Popover, Tooltip, HoverCard, menus, Select, Combobox and NavigationMenu take
actionsRefwithclose(). Field and Form takeactionsRefwithvalidate(). Field takes controlledtouchedanddirty, andField.ControltakesonValueChange. -
befc825: Tooltip, HoverCard and Popover Content, menu Roots and the Select/Combobox/Autocomplete Root take
anchor(an element, virtual element, ref or function to position against instead of the trigger),positionMethod,collisionAvoidance(flip, shift or none per axis),stickyanddisableAnchorTracking. -
07e6783:
Tooltip.ContentandHoverCard.Contenttakeside,align,sideOffsetandalignOffset, likePopover.Content, and expose the resolveddata-sideanddata-align. HoverCard could only open below its trigger before.Tooltip.Root'splacementstill works whensideisn't set. Astyleprop onHoverCard.Contentno longer replaces its positioning styles. -
befc825:
HoverCard.Root'sonOpenChangegets details (reason,event,cancel()) as a second argument, and triggers takedelayandcloseDelaythat override the Root's.Popover.TriggertakesopenOnHover,delayandcloseDelay. -
07e6783: Add
onOpenChangeCompleteto Dialog, AlertDialog and Popover roots: it's called withtrueonce the open animation finishes and withfalseonce the close animation finishes and the content unmounts (immediately when nothing animates). Useful for moving focus, resetting forms or loading data after a transition. -
07e6783:
onOpenChangedetails also come from DropdownMenu, ContextMenu, Menubar menus, Select, Combobox and Tooltip, with anitem-pressreason when picking an item closes the popup. As with Dialog and Popover, only handlers that take a second argument receive them. -
07e6783: Popover, Dialog and AlertDialog
onOpenChangehandlers that take a second argument receive details: thereason(trigger-press,outside-press,escape-key,focus-out,close-pressand more), the DOMevent, andcancel()to keep the current state, for example an "unsaved changes" guard. Handlers that take one argument are called exactly as before. This matches Drawer, which already worked this way. -
07e6783: Popover supports detached triggers. Create a handle with
Popover.createHandle()and pass it toPopover.Rootand to triggers rendered anywhere, each with apayload. The popover anchors to whichever trigger opened it, its children can be a function of the payload, and clicking the open trigger again closes it. -
07e6783: Add
initialFocusandfinalFocustoPopover.Content, matching Dialog: choose where focus goes when the popover opens (first tabbable element, stay on the trigger, or a ref) and where it returns when it closes (the trigger, nowhere, or a ref). Each also accepts a function. -
07e6783: Add
openOnHovertoPopover.Root, withhoverOpenDelay(default 300ms) andhoverCloseDelay(default 0). The popover also opens while the pointer rests on the trigger, and the pointer can move into it without it closing. Clicking still toggles it, so touch and keyboard users aren't left out. -
07e6783:
Popover.Rootmodalnow also accepts"trap-focus": focus is trapped in the popover (and the page is hidden from assistive technology) while the rest of the page still takes pointer input.modal={true}and the defaultfalseare unchanged. -
ed15256: Add
triggerIdanddefaultTriggerIdto Dialog, AlertDialog, Popover, Tooltip, HoverCard and DropdownMenu roots used with ahandle: the DOMidof the detached trigger the popup belongs to. While open, the popup is anchored to that trigger, shows its payload and marks itaria-expanded, also when opened from code withopen. Closing through a controlledopennow releases the trigger too. -
07e6783: Popover, Tooltip, Dialog and AlertDialog content (and the Dialog overlay) support CSS transitions on enter and exit. Opening renders one frame with
data-starting-styleand closing setsdata-ending-style, and the element stays mounted until its animations and transitions finish, so a plaintransitionon opacity or transform animates both ways. With no exit animation it unmounts at once, as before. Closed content still on screen can't be clicked or focused.
Patch Changes
-
ed15256: Popover and Dialog (and AlertDialog) now call
onOpenChange(true, { reason: "trigger-press" })when a detached trigger opens them, so they can be controlled with a handle; canceling it keeps them closed. AdefaultOpenpopup with a handle no longer closes itself on mount. -
589f4ba: Dialog, AlertDialog and Popover now play their closing transition: content and overlay stay mounted with
data-state="closed"until the exit transition or animation finishes, then unmount (straight away with reduced motion or no animation). Focus still returns at the moment of closing.
Release
v1.1.0
Patch Changes
-
5a38eef: docs(guides): add a troubleshooting guide for SSR, portals, and focus
New
docs/app/docs/guides/troubleshootingpage covering the integration failures that are otherwise spread across guides, organised as symptom / likely causes / what to try:- hydration mismatches on overlay and theme components
- portal containers rendering in the wrong place or missing theme tokens
- focus not restoring after a dialog, popover, or menu closes
- focus traps that are too narrow or too wide
- overlays flashing or never opening on first paint
- scroll lock leaking after an overlay unmounts
Registered in
docsNavigationSectionsand cross-linked from the existing SSR & No-JS Fallback guide.
Release
v1.0.0
Patch Changes
-
66a89d5: Expose Popover anatomy data slots for root, anchor, trigger, content, close, and arrow parts.
-
0ccabb4: fix(scrollarea): hide the scrollbar while a document overlay is open
An overlay (Dialog, Menu, Popover, Combobox, Drawer) covers the page and locks body scroll, but a
ScrollAreawithtype="always"still painted its scrollbar and thumb on top of it.Adds a document-level overlay registry and suppresses the scrollbar and thumb while any overlay is open:
const isVisible = !overlaySuppressesScrollbar && (type === "always" || (type === "auto" && isOverflowing) || (isOverflowing && (type === "scroll" || type === "hover") && scrollbarVisible));The registry is ref-counted and mirrors its state onto
data-rad-ui-overlay-openon<html>, so overlays stack correctly (two open overlays decrement back to zero rather than clearing early).ScrollAreapicks the state up viauseDocumentOverlayOpenState, which also observes the attribute andbody's inlinestyle, so overlays from other libraries that only lock body scroll are covered too.resetDocumentOverlayOpenForTestsis wired into the globalafterEachinsetupTests.tsso the registry cannot leak between suites.
Release
v0.6.0
Patch Changes
- b577317popover - improve radix api parity, modal focus behavior, arrow styling, and positioning stability