# [Android Components](../../../README.md) > Browser > Menu A generic menu with customizable items primarily for browser toolbars. ## Usage ### Setting up the dependency Use Gradle to download the library from [maven.mozilla.org](https://maven.mozilla.org/) ([Setup repository](../../../README.md#maven-repository)): ```Groovy implementation "org.mozilla.components:browser-menu:{latest-version}" ``` ### BrowserMenu Sample code can be found in [Sample Toolbar app](https://github.com/mozilla-mobile/android-components/tree/main/samples/toolbar). There are multiple properties that you customize of the menu browser by just adding them into your dimens.xml file. ```xml 4dp 4dp 250dp 200dp 300dp 8dp ``` BrowserMenu can have a dynamic width: - Using the same value for `mozac_browser_menu_width_min` and `mozac_browser_menu_width_max` means BrowserMenu will have a fixed width - `mozac_browser_menu_width`. _This is the default behavior_. - Different values for `mozac_browser_menu_width_min` and `mozac_browser_menu_width_max` means BrowserMenu will have a dynamic width depending on the widest BrowserMenuItem and between the aforementioned dimensions also taking into account display width. ### BrowserMenuDivider ```kotlin BrowserMenuDivider() ``` To customize the divider you could use a 1. Quick customization or a 2. Full customization: 1) If you just want to change the height of the divider, add this item your ``dimes.xml`` file, and your prefer height size. ```xml YOUR_HEIGHT ``` 2) For full customization, override the default style of the divider by adding this style item in your `style.xml` file, and customize to your liking. ```xml ``` ### BrowserMenuImageText ```kotlin BrowserMenuImageText( label = "Share", imageResource = R.drawable.mozac_ic_share_android_24, iconTintColorResource = R.color.photonBlue90 ) { Toast.makeText(applicationContext, "Share", Toast.LENGTH_SHORT).show() } ``` To customize the menu you could use separate properties 1 or full access to the style of the menu 2: 1) If you just want to change a specify property, just add one these dimen items to your ``dimes.xml`` file. ```xml 16sp 24dp 24dp 20dp ``` 2) For full customization, override the default style of menu by adding this style item in your `style.xml` file, and customize to your liking. ```xml ``` ## Facts This component emits the following [Facts](../../support/base/README.md#Facts): | Action | Item | Extras | Description | |--------|-------------------------|-------------------|--------------------------------------| | Click | web_extension_menu_item | `menuItemExtras` | Web extension menu item was clicked. | #### `menuItemExtras` | Key | Type | Value | |------|--------|----------------------------------------------------------| | "id" | String | Web extension id of the clicked web extension menu item. | ## License This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/