# lightning:tabClosed

Indicates that a tab has been closed.

## Response

| Name    | Type   | Description               |
| ------- | ------ | ------------------------- |
| `tabId` | string | The ID of the closed tab. |

## Example

This example prints a line to the browser’s developer console when a tab is closed.

Component code:

```html
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >	
    <aura:handler event="lightning:tabClosed" action="{! c.onTabClosed }"/> 
</aura:component>
```

Controller code:

```javascript
({
    onTabClosed : function(component, event, helper) {
        var tabId = event.getParam('tabId');
        console.log("Tab closed: " + tabId);
    } 
})
```
