Views Slideshow - Views Vanilla JavaScript Slideshow (VVJS)
Security covered Maintenance fixes only 926 sitesThis project provides a lightweight, jQuery-free JavaScript solution for creating dynamic slideshows directly from Drupal Views. It offers various customization options for navigation, animations, transitions, and accessibility, along with features like deep linking and a JavaScript API for advanced integrations.
VVJS adds a slideshow format to Drupal Views. It is for site builders who want a view's results shown one slide at a time, or as a full-width hero with overlay content, without custom code.
Each result row becomes one slide. Slides advance on a timer or by arrows, dots or numbers. What sets VVJS apart from the other VVJ formats is the timing and control set: autoplay with a play and pause button, progress, swipe, looping, a start slide, a Hero mode and a JavaScript API. It requires VVJ Core, which holds the settings shared by all VVJ formats.
Start here
Features
VVJS has no settings page of its own. Open a view under Structure > Views, set "Format" to "Views Vanilla JavaScript Slideshow", then open "Settings". The "Fields" row plugin is required only when "Hero slideshow" is ticked.
- "Hero slideshow settings": tick "Hero slideshow" for a full-width slideshow with overlay content. Then set "Max width (px)" (default 1200), "Min height (vw)" (default 40), "Content Width (%)" (default 60), "Overlay position" (12 choices), "Overlay background color" (default #000000) and "Overlay background opacity" (0 to 1, default 0.3). These fields appear only while Hero is ticked.
- "Responsive settings": "Responsive breakpoint" is 576 (default), 768, 992, 1200 or 1400 px. There is no "all screens" choice.
- "Timing settings": "Auto-rotate interval (ms)". Set 0 to turn autoplay off; otherwise use 2000 to 15000, default 5000.
- "Navigation settings": "Slide navigation arrows" is None, Sides, Sides (Big), Top or Top (Big). "Slide indicators (bottom navigation dots/numbers)" is None, Dots or Numbers. "Scrollable navigation width (px)" is 0 or 120 to 700.
- "Animation settings": "Slide Animation Type" is None, Zoom, Fade, or Slide from Top, Bottom, Left or Right. When it is None, "Transition type" offers Instant and three crossfades. "Transition duration" runs from 200 to 2000 ms, default 600.
- "Display options": "Show total slide number" (such as "Slide 1 of 5"), "Show animation progress" and "Show play/pause button". The play and pause button is always shown while slides advance on their own.
- "Behavior settings": "Pause on hover", "Enable touch/swipe gestures", "Enable keyboard navigation" (arrow keys, Space to pause or play, Home and End), "Enable looping" and "Start index".
- Deep linking: in "Deep linking settings", tick it and set a "URL identifier". It needs dots or numbers as slide indicators. The words
slideshow,slide,vvjsandvvjare reserved. - Form checks: the form shows an error if the auto-rotate interval is between 1 and 1999 ms, or if the progress display or the play and pause button is on while autoplay is off.
- Tokens: in the view header, footer or empty text, use
[vvjs:field]or[vvjs:field:plain]. - JavaScript API:
Drupal.vvjs.getInstance,getAllInstances,goToSlide(counts from 1),getCurrentSlide,getTotalSlides,nextSlide,prevSlide,pause,resume,isPaused,isInitialized,pauseAllandresumeAll. - Theme bridges: two stylesheets map Pattern colors to the APEX and Solo themes.
- Help page: read
/admin/help/vvjsafter you enable the module. - Example view: an optional view named "VVJS Example" is available at
/vvjs-example. It needs the Article content type.
Patterns
A Pattern is a ready-made design. Enable the VVJ Patterns submodule from VVJ Core, then choose a Pattern in the "Patterns" section. VVJS ships five:
- Iris: dark. A full-bleed photo hero; the next photo opens as a circle from the control you press, with a floating glass dock.
- Deck: light. A portrait card on two ghost cards with story bars that fill with the time left; tap either half of the card.
- Filmstrip: light. A boxed photo stage with the words on a solid card and a numbered rail; the active tab widens and fills with the time left.
- Ledger: light. An editorial split with numbered chapter tabs, a giant outlined numeral and the words, and the photo cut in on a diagonal. It is manual and does not loop.
- Nightfall: dark. A 21:9 cinema hero on black, where a curtain opens from the center, with one large centered title and a timeline bar with a playhead.
After you pick a Pattern, the list headed "To finish the Pattern" shows what is left to set. With vvj_patterns_demo enabled, example content and demo views are added.
Installation: get started in 3 steps
- Install the module with Composer. This also installs VVJ Core:
composer require 'drupal/vvjs:^2.0' - Enable it on the Extend page, or with Drush:
drush en vvjs - Open a view under Structure > Views, set "Format" to "Views Vanilla JavaScript Slideshow", and open "Settings" to choose the timing 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.
Ask your assistant about Views Slideshow - Views Vanilla JavaScript Slideshow (VVJS)
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.