Skip to main content
Version: Next

Taro.getMenuButtonBoundingClientRect()

Gets the location of the menu button (the Mini Program control button in the upper right corner). The top left corner of the screen is the origin.

Reference

Type

() => Rect

Parameters

Rect

The location of the menu button

PropertyTypeDescription
widthnumberWidth (in px)
heightnumberHeight (in px)
topnumberThe coordinate of the upper boundary (in px)
rightnumberThe coordinate of the right boundary (in px)
leftnumberThe coordinate of the left boundary (in px)
bottomnumberThe coordinate of the bottom boundary (in px)

API Support

APIWeChat Mini-ProgramH5React Native
Taro.getMenuButtonBoundingClientRect✔️