# addTileAction()

Adds a custom action to the 3-dots menu of the tiles. When the user clicks that custom menu item, then the callback listener function will be invoked.

{% hint style="info" %}
The first parameter "**name**" is just an internal identifier so you can remove the custom action later with the [removeTileAction()](https://docs.digitalsamba.com/reference/sdk/methods/removetileaction) method if it is needed.
{% endhint %}

{% hint style="info" %}
Valid tile scopes are '**remote**', '**local**', '**custom**', '**screenshare-local**' and '**screenshare-remote**'. Remote means tiles of other (remote) users, while local means tile of local user. Custom is for custom tiles - see [addCustomTile()](https://docs.digitalsamba.com/reference/sdk/methods/addcustomtile) method.
{% endhint %}

In the below example a send email action is added to all remote tiles.

<pre class="language-javascript"><code class="lang-javascript"><strong>const onSendEmailClicked = () => {
</strong><strong>   console.log('Send Email callback called');
</strong><strong>};
</strong>
<strong>sambaFrame.addTileAction(
</strong><strong>  'sendEmail', 
</strong><strong>   {"label": 'Send Email', scope: 'remote'}, 
</strong><strong>   onSendEmailClicked 
</strong><strong>);
</strong></code></pre>

{% hint style="info" %}
This method is often used in conjunction with the [removeTileAction()](https://docs.digitalsamba.com/reference/sdk/methods/removetileaction) method.
{% endhint %}
