GUI zIndex (in stackPanel)


Is there way to change GUI control zIndex / rendering order. I have few cases where I want content to overflow from parent container (in stackPanel) and to be rendered top of other GUI controls. Dropdown menu, tooltips etc.

I have this playground example:
If I try to change zIndex of that element rectangle it will be moved to the end of stackPanel. Or is this just limitation of stackPanel implementation?

cc @carolhmj

Yep it’s a limitation of the GUI implementation unfortunately, zIndex forces the controls to be reordered: Babylon.js/container.ts at master · BabylonJS/Babylon.js (

Ok. :frowning:
Thanks. Need to do some custom stuff then. Maybe absolute positioned element into root and try to keep position updated with observable.