PHPackages                             alto/commonmark-tabs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. alto/commonmark-tabs

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

alto/commonmark-tabs
====================

CommonMark extension that renders accessible tabbed content from @tabs / @tab / @endtabs markers with full ARIA support.

v1.0.0(yesterday)00MITPHPPHP ^8.3

Since Jul 30Pushed yesterdayCompare

[ Source](https://github.com/altophp/commonmark-tabs)[ Packagist](https://packagist.org/packages/alto/commonmark-tabs)[ Docs](https://github.com/altophp/commonmark)[ GitHub Sponsors](https://github.com/sponsors/smnandre)[ RSS](/packages/alto-commonmark-tabs/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Tabs Extension
==============

[](#tabs-extension)

Summary
-------

[](#summary)

One directive, fully accessible tabbed UI, zero JavaScript to write. `@tabs` / `@tab` / `@endtabs` markers are parsed into proper ARIA `tablist`, `tab`, and `tabpanel` roles with a self-contained switching script included. The cleanest path from markdown syntax to an interactive UI component in the PHP CommonMark ecosystem.

Installation
------------

[](#installation)

### composer require

[](#composer-require)

```
composer require alto/commonmark
```

### Registration

[](#registration)

```
use Alto\CommonMark\Extension\Tabs\TabsExtension;
use League\CommonMark\Environment\Environment;

$environment = new Environment();
$environment->addExtension(new TabsExtension());
```

Usage
-----

[](#usage)

```
@tabs
@tab "PHP"
```php
