TabPanelWidget
This module provides a reusable library for creating responsive tabs that transform into accordions on smaller screens, ensuring accessibility. It offers integrations with Quick Tabs and Views to easily implement these tab and accordion interfaces across your Drupal site.
Makes the TabPanelWidget library available for various tab and accordion display purposes. Our (government) organization had a need for responsive tabs that would collapse to accordions at narrower widths, and also met accessibility requirements. TabPanelWidget met both needs.
The main TabPanelWidget module makes the library available and provides a class for setting options, generating markup, and attaching the library.
The TabPanelWidget Quick Tabs module provides a TabRenderer plugin for Quick Tabs.
The TabPanelWidget Views module provides a style plugin for Views.
Installing the library with Composer
Note that this module only supports version 1.x of the library. I hope to add
support for 3.x of the library in a future release.
If you're using **wikimedia/composer-merge-plugin** in your project, add this
line to your merge-plugin include array:
"docroot/modules/contrib/tabpanelwidget/composer.libraries.json",
Running composer update should then install the tabpanelwidget library.
If not using merge-plugin, add the following to your composer.json
repositories list:
{
"type": "package",
"package": {
"name": "tabpanelwidget/tabpanelwidget",
"version": "1.5.0",
"type": "drupal-library",
"dist": {
"url": "https://github.com/tabpanelwidget/tabpanelwidget/releases/download/1.5.0/tabpanelwidget-1.5.0.zip",
"type": "zip"
}
}
},...and use:
composer require tabpanelwidget/tabpanelwidget:^1.5
...to add it to your project.