Skip to main content

UI API

UI API

getMenuButtonBoundingClientRect()

Retrieves the position information of the top-right menu button. Used for UI layout positioning.

Return Value:

FieldTypeDescription
topnumberTop coordinate (px)
rightnumberRight coordinate (px)
bottomnumberBottom coordinate (px)
leftnumberLeft coordinate (px)
widthnumberButton width (px)
heightnumberButton height (px)
const rect = TudadaSDK.getMenuButtonBoundingClientRect();
console.log('Position:', rect.top, rect.right, rect.bottom, rect.left);
console.log('Size:', rect.width, 'x', rect.height);