directory
pageON THIS PAGE

Customize the menu bar

Customize the menu bar button list

The Call Kit (ZegoUIKitPrebuiltCall) allows you to configure the buttons of the menu bar. To remove the default buttons or add custom ones to the bottom menu bar, you can configure the bottomMenuBarConfig:

(Similarly, to configure top menu bar buttons or add custom buttons to the top menu bar, use the topMenuBarConfig.)

  1. buttons: Built-in buttons placed in the menu bar. By default, all buttons are displayed. If you need to hide some buttons, use this to configure them.

  2. maxCount: Maximum number of buttons that can be displayed by the menu bar. Value range [1 - 5], the default value is 5.

  3. extendButtons: Use this configuration to add your own custom buttons to menuBar.

If the total number of built-in buttons and custom buttons does not exceed 5, all buttons will be displayed. Otherwise, other buttons that cannot be displayed will be hidden in the three dots (⋮) button. Clicking this button will pop up the bottom sheet to display the remaining buttons.

The effect will be like this:

null

Here is the reference code:

Copy
Copy

Add chat button to the menu bar

Here is the reference code:

Copy
Copy

Customize the hidden behavior of the menu bar

The Call Kit (ZegoUIKitPrebuiltCall) supports automatic or manual hiding of the menu bar. You can control this by using the following two configurations in the ZegoBottomMenuBarConfig:

  1. hideByClick: Whether the menu bar can be hidden by clicking on the unresponsive area, enabled by default.

  2. hideAutomatically: Whether the menu bar is automatically hidden after 5 seconds of user inactivity, enabled by default.

Customize menubar's styles

In addition, we also support customizing some styles, like the following:

  1. padding: padding for the top/bottom menu bar.

  2. margin: margin for the top/bottom menu bar.

  3. backgroundColor: background color for the top/bottom menu bar.

  4. height: height for the top/bottom menu bar, height = border + padding + content.

null

Here is the reference code:

Copy
Copy
null
pageON THIS PAGE
backBack to top