Skip to content

[dialog] Can we add Positioner in Dialog anatomy? #3596

@U-OK

Description

@U-OK

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: dialogChanges related to the dialog component.type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions