# Tabs

> Renders the shared accessible tab pattern used by debug panels.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Helper](/docs/extensions/debug-core/reference/helper/index.md) › Tabs

| final class | `PHPForge\Debug\Helper\Tabs` |
| --- | --- |
| Source | [`src/Helper/Tabs.php`](https://github.com/php-forge/debug-core/blob/main/src/Helper/Tabs.php#L19) |

Renders the shared accessible tab pattern used by debug panels.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`render()`](#method-render) static | Renders the tab list and its panels as one markup fragment. | `Tabs` |

## Method details

### render() <span id="method-render"></span>

```php
public static function render(non-empty-string $id, non-empty-string $ariaLabel, list<array{label: string, content: string}> $tabs, int $activeIndex = 0): string
```

Renders the tab list and its panels as one markup fragment.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$id` | `non-empty-string` | Base ID every tab and panel ID derives from. |
| `$ariaLabel` | `non-empty-string` | Accessible name announced for the tab list. |
| `$tabs` | `list<array{label: string, content: string}>` | Tabs in display order. |
| `$activeIndex` | `int` | Zero-based index of the tab selected on initial render. |

**Returns**

`string`: Rendered tab list followed by its panels.