> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/component-builder/interactions/control-console-tab.md).

# Control Console Tab

The Control Console Tab interaction manages a Lightning Console tab or subtab programmatically after an interaction.

## Overview

The Control Console Tab interaction lets you manage the user's Lightning Console workspace programmatically after an interaction. You can close, focus, or refresh a console tab or subtab, apply or remove a custom label or icon, highlight a tab to draw attention, or control whether a tab can be closed.

{% hint style="info" %}

#### Console Apps Only

This interaction controls tabs and subtabs of a Lightning Console app. It has no effect when the Dynamic Component runs outside a console workspace.
{% endhint %}

***

## Configuration

### 1. Choose the Action

The Action setting determines what the interaction does to the tab. Choose one of the following:

| Action               | Behavior                                          |
| -------------------- | ------------------------------------------------- |
| **Close**            | Closes the tab.                                   |
| **Focus**            | Brings the tab into focus.                        |
| **Focus Next**       | Moves focus to the next tab in the workspace.     |
| **Focus Previous**   | Moves focus to the previous tab in the workspace. |
| **Refresh**          | Refreshes the tab's content.                      |
| **Set Label**        | Applies a custom label to the tab.                |
| **Set Icon**         | Applies a custom icon to the tab.                 |
| **Set Highlight**    | Highlights the tab with a colored state.          |
| **Remove Label**     | Removes a previously applied custom label.        |
| **Remove Icon**      | Removes a previously applied custom icon.         |
| **Remove Highlight** | Removes a previously applied highlight.           |
| **Disable Close**    | Prevents the user from closing the tab.           |
| **Enable Close**     | Allows the user to close the tab again.           |

### 2. Target a Tab (Optional)

* **Tab ID**: Optionally provide the ID of the tab you want to target. If you leave this empty, the action applies to the current tab — the one containing the Dynamic Component that triggered the interaction.

### 3. Action-Specific Settings

Depending on the action you selected, additional settings appear:

#### Refresh

* **Include Subtabs**: When refreshing a workspace tab, also refresh all subtabs inside that workspace.

#### Set Label

* **Label**: The custom label to apply to the tab.

#### Set Icon

* **Icon Name**: The icon to apply to the tab.
* **Icon Alternative Text**: Optional accessible alternative text for the custom tab icon.

#### Set Highlight

* **Highlight State**: The highlight color state to apply to the tab — `Success`, `Error`, or `Warning`.
* **Pulse**: If enabled, the tab highlight pulses (alternates colors smoothly) to draw the user's attention.

***

## Example

* **Close after save**: After an Update Record interaction succeeds, close the current subtab so the agent returns to their workspace.
* **Flag urgent work**: When a record meets an escalation condition, use Set Highlight with the `Error` state and Pulse enabled to make the tab stand out.
* **Reflect status in the label**: Use Set Label to rename the tab (e.g., "Case — Resolved") after a status change, then Remove Label to restore the default.
* **Protect in-progress work**: Use Disable Close while a user is filling out a form, then Enable Close once the data is saved.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.avonnicomponents.com/dynamic-components/component-builder/interactions/control-console-tab.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
