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.

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

Releases