---
url: >-
  https://plugin.stripo.email/extensions/reference/integrations/ExternalImageLibraryTab.md
---
# ExternalImageLibraryTab

:::tip Version Availability
This class is available starting from v3.2.0
:::

Create custom tab within the external image library interface to organize images from different sources.

```typescript
class ExternalImageLibraryTab
```

## Description

The `ExternalImageLibraryTab` class allows you to add a custom tab to the image library interface.

## Import

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

## Methods

### getName()

Returns the translated name/label for the tab.

```typescript
public getName(): string
```

#### Returns

`string` - The tab label to display in the image library interface

***

### openImageLibraryTab()

Opens the custom tab and provides a container for rendering your image library UI.

```typescript
public openImageLibraryTab(
  container: HTMLElement,
  onImageSelectCallback: ExternalGalleryImageSelectCallback,
  selectedNode?: ImmutableHtmlNode
): void
```

#### Parameters

| Name | Type | Description |
|------|------|-------------|
| container | `HTMLElement` | DOM element where your custom UI should be rendered |
| onImageSelectCallback | `ExternalGalleryImageSelectCallback` | Callback to invoke when a user selects an image |
| selectedNode | `ImmutableHtmlNode` | (Optional) Selected node for which the gallery is being opened. Available from v3.4.0 |
