Component changelog
Drawer changelog
Component-specific release notes collected from the full changelog. This page filters the published entries that mention Drawer.
Release
v1.2.0
Minor Changes
-
befc825: New
Drawer.Provider,Drawer.IndentandDrawer.IndentBackground: the page eases back while any drawer is open. -
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.
Patch Changes
- cc18a8aFix modals used from inside a
Drawer. ADialogorAlertDialogopened from a drawer now stacks on top of it: screen readers can read it, clicks in it no longer close the drawer, Escape closes only the top one, and focus returns into the drawer. A portalledSelect(or menu) inside a drawer can be picked with the mouse again; the drawer no longer treats a press on it as the start of a swipe.
Release
v1.1.0
Patch Changes
-
0af1268: fix: Drawer focus management and stable Toast manager functions
- Drawer: focus now moves into the drawer when it opens, and Tab stays trapped inside. The focus manager used to engage as soon as
data-stateflipped toopen, but the themes keep the popupvisibility: hiddenuntil the entrance transition starts. Initial focus found nothing focusable and silently failed, so keyboard and screen-reader users were left on the page behind the modal. It now waits until the popup is actually visible (capped at about 0.5s). - Toast: the functions from
useToastManager()(add,close,update,promise,dismiss,dismissAlland the variant helpers) are stable for a given manager, as in Base UI. They used to be recreated on every render. An effect keyed on one of them, such as an unmount cleanup callingdismissAll, then re-ran on every render and dismissed each toast as soon as it was added.
- Drawer: focus now moves into the drawer when it opens, and Tab stays trapped inside. The focus manager used to engage as soon as
Release
v1.0.0
Patch Changes
-
87604b7: Document Drawer keyboard interactions and ARIA references.
-
7d338d9: docs(drawer): add the component documentation page and align the internal context type
-
1ec9c6d: fix(drawer): resolve peekStyle temporal dead zone in DrawerContent
DrawerContentreferencedpeekStyleinside thegetFloatingPropscall before the variable was declared further down the component body. Theconstdeclarations sat below an earlyreturn, so the reference landed in the temporal dead zone. The file failed to type-check, which broke four Drawer test suites at compile time.Hoisting the
peekOffset/peekStylepair above thegetFloatingPropscall fixes the ordering.getFloatingPropsis also cast to its user-props signature, matching the convention already used by Dialog, Combobox and Menu. -
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.5.0
Minor Changes
- fd2bd8bdrawer preview added