---
schema_version: "1"
id: 9aeb980227a8948b09bd9ed2941f821e3080a67e916408839a4cf0d517f65914
title: Menu Trigger Press (Deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/aura/components/ui/menuTriggerPress/ui-menu-trigger-press.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/ui-menu-trigger-press.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 44ac9787f3afcff96dfcde105a054e9cb21b4a4d4c7a56522090fec47c804570
products:
  - Lightning Component Reference
---
# Menu Trigger Press (Deprecated)

**`ui:menuTriggerPress`**

Deprecated as of API version 47.0. Use [`lightning:buttonMenu`](/docs/platform/lightning-component-reference/guide/aura-button-menu.html) instead.

::::::tabset{tabs='[ "Develop", "Specifications"]'}

:::::tab

This event is fired when you click on the `ui:menuTriggerLink` component. To set a handler for the `ui:menuTriggerLink` event, use the `menuTriggerPress` attribute on `ui:menuTriggerLink`.

The following example shows a menu with two list items. The `handleTriggerPress` client-side controller action handles the `ui:menuTriggerPress` event.

```xml
<aura:component>
  <ui:menu>
    <ui:menuTriggerLink
      aura:id="trigger"
      label="Contacts"
      menuTriggerPress="{!c.handleTriggerPress}"
    />
    <ui:menuList class="actionMenu" aura:id="actionMenu">
      <ui:actionMenuItem aura:id="item1" label="All Contacts" click="{!c.doSomething}" />
      <ui:actionMenuItem aura:id="item2" label="All Primary" click="{!c.doSomething}" />
    </ui:menuList>
  </ui:menu>
</aura:component>
```

This client-side controller retrieves the label of the trigger when it’s clicked.

```javascript
({
  handleTriggerPress: function (component, event, helper) {
    var trigger = component.find("trigger");

    // Get the label on the trigger
    var triggerLabel = trigger.get("v.label");
  },
});
```

If you're using this event with a component other than `ui:menuTriggerLink`, register the event first.

```xml
<aura:registerEvent
  name="menuTriggerPress"
  type="ui:menuTriggerPress"
  description="The event fired when the trigger is clicked."
/>
```


:::::

:::::tab
![No specifications to show](https://developer.salesforce.com/media/no-specs.png)

:::::

::::::
