Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views Carousel - Views Vanilla JavaScript Carousel (VVJB)

Security covered Maintenance fixes only 195 sites

This module allows you to create accessible, responsive, and configurable carousels for displaying content in Drupal views without relying on jQuery. It offers various customization options for layout, navigation, autoplay, and includes touch, swipe, and keyboard support for enhanced user interaction.

VVJB adds a basic carousel format to Drupal Views. It is for site builders who want a view's results shown as slides, several items per screen, without custom code.

Each result row becomes a slide. What sets VVJB apart from the other VVJ formats is that it shows several items at once, with separate counts for small and large screens, and can run horizontally, vertically or switch between the two at a breakpoint. It works with any Views row plugin. It requires VVJ Core, which holds the settings shared by all VVJ formats.

Start here

Features

VVJB has no settings page of its own. Open a view under Structure > Views, set "Format" to "Views Vanilla JavaScript Basic Carousel", then open "Settings".

  • "Layout settings": "Orientation" is "Horizontal", "Vertical" or "Hybrid (vertical below breakpoint)". "Items per screen (small)" and "Items per screen (large)" set how many slides show. "Gap between items (px)" and "Custom item max width (px, optional)" set the spacing and size. Defaults: horizontal, 1 item on small screens, 3 on large screens, a 16 px gap and automatic width.
  • "Behavior settings": "Autoplay interval (ms)" runs from 0 to 15000, and 0 turns autoplay off. "Enable looping", "Pause on hover", "Enable touch/swipe gestures" and "Enable keyboard navigation" are checkboxes. Keyboard navigation uses the arrow keys, Space, Home and End. Autoplay defaults to 5000 ms, and the four checkboxes are on by default.
  • "Control elements": "Show play/pause button", "Show progress bar" and "Show page counter". The play/pause button is always shown while autoplay is on; the checkbox matters when autoplay is off.
  • "Navigation settings": "Navigation type" is "Arrows only", "Dots only", "Arrows and Dots" or "None". "Scrollable dots width (px)" and "Dot navigation style" ("Circle (default)", "Bar" or "Square") apply to dots.
  • "Accessibility settings": "Pause on reduced motion preference".
  • "Responsive settings": "Responsive Breakpoint", with the choices 576, 768, 992, 1200 and 1400 pixels. It sets where the "Hybrid" orientation switches.
  • Shared sections: "Deep linking settings", "Token documentation" and "Patterns" come from VVJ Core. Deep linking needs "Dots only" or "Arrows and Dots" navigation. A link such as #carousel-products-3 opens the third slide. The words carousel, slide, vvjb and vvj are reserved as identifiers. VVJB has no "Enable CSS library" checkbox.
  • Tokens: in the view header, footer or empty text, use [vvjb:field] or [vvjb:field:plain].
  • JavaScript API: Drupal.vvjb.goToSlide, nextSlide, prevSlide, pause, resume, getCurrentSlide, getTotalSlides and getInstance.
  • Help page: read /admin/help/vvjb after you enable the module.
  • Example view: an optional view named "VVJB Example" is available at /vvjb-example.

Patterns

A Pattern is a ready-made design. Enable the VVJ Patterns submodule from VVJ Core, then choose a Pattern in the "Patterns" section. VVJB ships five, all on a dark ground:

  • Dockrail: three portrait cards with captions and a dock at the bottom with arrows, page dots, a counter and pause.
  • Ledger: a vertical list of numbered rows with a thumbnail on the right and a control rail on the left.
  • Switchboard: three cards across, list rows below 992 pixels, and a numbered control between chevron buttons. It has no autoplay.
  • Swatch: edge-to-edge square tiles that open as circles, with round arrows, dots and a ring progress.
  • Nightstory: two tall photo cards with text on a scrim, story bars over the photos and a headline that rises word by word.

Each Pattern needs fields in this order: image, kicker, title, summary and link. Give the field elements the classes vvj-media, vvj-kicker, vvj-title, vvj-summary and vvj-link. After you pick a Pattern, the list headed "To finish the Pattern" shows what is left to set. With vvj_patterns_demo enabled, demo pages appear at vvj/vvjb/dockrail, ledger, switchboard, swatch and nightstory.

Installation: get started in 3 steps

  1. Install the module with Composer. This also installs VVJ Core:
    composer require 'drupal/vvjb:^2.0'
  2. Enable it on the Extend page, or with Drush:
    drush en vvjb
  3. Open a view under Structure > Views, set "Format" to "Views Vanilla JavaScript Basic Carousel", and open "Settings" to choose orientation, items per screen and navigation.

To upgrade from VVJ 1.x, upgrade every installed VVJ module to 2.x together. Mixing 1.x and 2.x is not supported. The steps are on the VVJ Core page.

Requirements

  • Drupal ^11.3 || ^12
  • PHP 8.3 or later
  • VVJ Core
  • Views and Filter (both in Drupal core)

Sites on Drupal 10 or on Drupal 11.0 to 11.2, or on PHP 8.1 or 8.2, stay on VVJ 1.x.

Support and maintenance

Questions, ideas, and bug reports are welcome. Please use this project’s issue queue so discussions and solutions remain available to the Drupal community.

Maintainers monitor issues, but response times depend on availability.

Developed and maintained by Alaa Haddad of Flash Web Center, LLC.

AI disclosure: AI tools assisted with drafting and reviewing this project description. The maintainer verified the final content against the project source.

Drupal 11 · not 10 PHP 8.3

Ask your assistant about Views Carousel - Views Vanilla JavaScript Carousel (VVJB)

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • VVJ Core
  • filter Drupal core
  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
19
Tracked since
May 2025
Latest release
1 day ago
Releases (12 mo)
10 ▲ from 9
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.1.0 Stable 11 PHP 8.3 Nov 29, 2026
2.1.x-dev Dev 11 PHP 8.3 Nov 29, 2026
2.0.4 Stable 11 PHP 8.3 Nov 3, 2026
2.0.3 Stable 11 PHP 8.3 Oct 26, 2026
2.0.2 Stable 11 PHP 8.3 Oct 12, 2026
2.0.1 Stable 11 PHP 8.3 Oct 6, 2026
2.0.0 Stable 11 Jul 4, 2026
2.0.x-dev Dev 11 Jul 4, 2026
1.0.9 Stable 10–11 Jan 30, 2026
1.0.8 Stable 10–11 Dec 7, 2025