---
schema_version: "1"
id: 5dc291b51a1090c45ba6b512e20db80a08afe7b95c9ba964818c847443c02180
title: Tab Closed
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/lightning/tabClosed/aura-tab-closed.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/aura-tab-closed.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c075fdc4fca3ac9a1430acc17ebeb74a57898c956376701ce983334a7ef6ff5c
products:
  - Lightning Component Reference
---
# Tab Closed

**`lightning:tabClosed`**

Fires when a Console workspace or subtab has been successfully closed.

**For Use In**

Lightning Experience

::::::tabset{tabs='[ "Develop", "Specifications"]'}

:::::tab

`lightning:tabClosed` is an application event that indicates a tab has been closed successfully. This event is supported in Lightning console apps only.

Handle the event using `aura:handler`.

```html
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
  <lightning:workspaceAPI aura:id="workspace" />
  <aura:handler event="lightning:tabClosed" action="{! c.onTabClosed }" />
</aura:component>
```

For more information, see the [Salesforce Console Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/).


:::::

:::::tab
## Attributes

| Name    | Description        | Type   | Default | Required                                     |
| ------- | ------------------ | ------ | ------- | -------------------------------------------- |
| `tabId` | The closed tab ID. | string |         | ![Yes](https://developer.salesforce.com/media/check.png) |

:::::

::::::
