The Tabby JS library was chosen as it is lightweight, accessible,
just vanilla JS, and is already being used by Webform so many Drupal installs will already have the library present.
Features
Create a default set of tabs:
$build['tabs'] = [
'#theme' => 'tabby_tabs',
'#labels' => ['Label One', 'Label Two'],
'#content' => [
['#markup' => 'Content One'],
['#markup' => 'Content Two'],
],
];
Additional Requirements
This module requires the tabby js library.
See the readme file for instructions on installing this via composer.
Recommended modules/libraries
Tabby viewfield creates a field formatter for fields of type viewfield.
This means if you have a multi-cardinality view field you can place each view in a different tab.
Similar projects
Quick Tabs
- Not possible to create tabs with a render array.
- Not accessible unless you use quicktabs-accessible library which currently has some issues with D11.
Block Tabs
- Not possible to create tabs with a render array.
- No Drupal 11 version
- Is based on jQuery
Bootstrap Horizontal Tabs
- Not possible to create tabs with a render array.
- Does not come with a JS library - you have to install Bootstrap yourself.
Supporting organizations:
Project information
- Project categories: Content display, Developer tools
8 sites report using this module
- Created by dahousecat on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.

