# SiTabComponent documentation

**Kind:** component

**Selector:** `si-tab`

```
import { SiTabComponent } from '@siemens/element-ng/tabs';
```

Creates a normal tab that can contain any content.

Example:

```html
<si-tabset>
  <si-tab heading="Tab 1">
    <p>Content of Tab 1</p>
  </si-tab>
</si-tabset>
```

```
component SiTabComponent extends SiTabBaseDirective implements OnDestroy
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [active](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab.component.ts#L43-L43>) | `boolean` | `false` | Whether the tab is active or not. If set to `true`, the tab will be selected and its content will be displayed.<br><br>Inherited from `SiTabBaseDirective` |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab-base.directive.ts#L65-L65>) (inherited) | `string \| undefined` |  | Background color of the badge. If no color is provided a red dot badge will be rendered.<br><br>Inherited from `SiTabBaseDirective` |
| [badgeContent](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab-base.directive.ts#L60-L60>) (inherited) | `boolean \| TranslatableString \| undefined` |  | Additional badge content. A value of<br><br>• `true` will render a red dot<br><br>• any string without a `badgeColor` will render a red dot with text<br><br>• any string with a `badgeColor` will render a normal badge<br><br>Inherited from `SiTabBaseDirective` |
| [canActivate](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab.component.ts#L49-L49>) | `(() => boolean) \| undefined` |  | Guard to check if the tab can be activated. If not provided, the tab can always be activated. |
| [canDeactivate](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab.component.ts#L54-L54>) | `(() => boolean) \| undefined` |  | Guard to check if the tab can be deactivated. If not provided, the tab can always be deactivated. |
| [closable](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab-base.directive.ts#L81-L83>) (inherited) | `boolean` | `false` | Close the current tab.<br><br>Inherited from `SiTabBaseDirective` |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab-base.directive.ts#L71-L75>) (inherited) | `boolean` | `false` | Disables the tab.<br><br>Inherited from `SiTabBaseDirective` |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab-base.directive.ts#L48-L48>) (required, inherited) | `TranslatableString` |  | Title of the tab item.<br><br>Inherited from `SiTabBaseDirective` |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab-base.directive.ts#L53-L53>) (inherited) | `string \| undefined` |  | Icon of the tab item. If provided, heading text will be ignored and only icon will be displayed.<br><br>Inherited from `SiTabBaseDirective` |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [activeChange](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab.component.ts#L43-L43>) | `boolean` | Whether the tab is active or not. If set to `true`, the tab will be selected and its content will be displayed.<br><br>Inherited from `SiTabBaseDirective` |
| [closeTriggered](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab-base.directive.ts#L85-L85>) (inherited) | `void` | Event emitter to notify when a tab is closed.<br><br>Inherited from `SiTabBaseDirective` |

#### Attributes and Methods

##### selectTab

[Source for selectTab](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab.component.ts#L64-L75>)

{@inheritDoc}

Inherited from `SiTabBaseDirective`

```
selectTab(retainFocus?: boolean): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [retainFocus](<https://github.com/siemens/element/blob/main/projects/element-ng/tabs/si-tab.component.ts#L64-L64>) (optional) | `boolean` |  |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### Types Documentation

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```
