---
url: https://plugin.stripo.email/extensions/reference/api/ModulesPanelTabApi.md
---
# ModulesPanelTabApi

::::tip Version Availability
This interface is available starting from v3.7.0
::::

API interface for Modules Panel Tab implementations.

```typescript
interface ModulesPanelTabApi extends BaseApi, BaseModifierApi
```

## Description

The `ModulesPanelTabApi` provides access to editor functionalities specifically for [ModulesPanelTab](../controls/ModulesPanelTab.md) instances. It extends [BaseApi](./BaseApi.md) and [BaseModifierApi](./BaseModifierApi.md) to support UI element management, translation, and document modifications.

## Import

```typescript
import { ModulesPanelTabApi } from '@stripoinc/ui-editor-extensions';
```

## Inheritance

* Extends: [BaseApi](./BaseApi.md), [BaseModifierApi](./BaseModifierApi.md)

## Methods

### setVisibility()

Sets the visibility of a specific UI element within the tab's scope.

```typescript
setVisibility(uiElementName: string, isVisible: boolean): void
```

#### Parameters

| Name | Type | Description |
|------|------|-------------|
| uiElementName | `string` | ID of the UI element to show/hide |
| isVisible | `boolean` | True to show the element, false to hide it |

***

### setUIEAttribute()

Sets a specific attribute on a target UI element within the tab's scope.

```typescript
setUIEAttribute(uiElementName: string, attribute: string, value: unknown): void
```

#### Parameters

| Name | Type | Description |
|------|------|-------------|
| uiElementName | `string` | ID of the target UI element |
| attribute | `string` | Attribute name (use values from [UEAttr](../constants/UEAttr.md)) |
| value | `unknown` | Attribute value |

***

### updateValues()

Updates the values of multiple UI elements within the tab's scope at once.

```typescript
updateValues(valuesMap: Record<string, unknown>): void
```

#### Parameters

| Name | Type | Description |
|------|------|-------------|
| valuesMap | `Record<string, unknown>` | UI element IDs mapped to their new values |

***

### getValues()

Returns the current values of all UI elements managed by this tab.

```typescript
getValues(): Record<string, unknown>
```

#### Returns

`Record<string, unknown>` - Current values keyed by UI element ID

***

### onValueChanged()

Registers a callback function to be invoked when the value of a specific UI element changes.

```typescript
onValueChanged(
  uiElementName: string,
  callback: (newValue: unknown, oldValue: unknown) => void
): void
```

#### Parameters

| Name | Type | Description |
|------|------|-------------|
| uiElementName | `string` | ID of the UI element to listen to |
| callback | `(newValue: unknown, oldValue: unknown) => void` | Callback for value changes |
