> For the complete documentation index, see [llms.txt](https://docs.digitalsamba.com/reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalsamba.com/reference/sdk/methods/addtileaction.md).

# 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()](/reference/sdk/methods/removetileaction.md) 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()](/reference/sdk/methods/addcustomtile.md) 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()](/reference/sdk/methods/removetileaction.md) method.
{% endhint %}
