-
-
Notifications
You must be signed in to change notification settings - Fork 319
Description
Feature request
Summary
Add a Positioner for the Dialog component along with data attributes that expose the maximum available height and width (for example, relative to the viewport or positioning constraints), similar to how this is implemented in components like Combobox and Menu.
These attributes could be used to reflect the available layout space directly on the DOM node.
Examples in other libraries
Within base-ui itself, similar behavior already exists in components such as Combobox and/or Menu
Both provide a Positioner abstraction and expose layout-related data attributes (e.g. available size), which can then be consumed for styling and animation purposes.
This proposal aims to bring Dialog in line with those existing patterns.
Motivation
When a Dialog contains dynamic content (for example, content that loads asynchronously or changes based on user interaction), animating height and width transitions becomes difficult without knowing the maximum available space.
Exposing a Positioner and data attributes for maximum available height and width would make it significantly easier to implement smooth height/width animations