This module adds a "Hero" display style to Drupal Views, allowing users to create visually striking, full-width hero sections with text overlays and customizable animations using pure JavaScript. It also supports creating "Hero Cards" that can be displayed individually or in lists, and it works seamlessly with responsive images.
VVJH is a Views format for Drupal site builders. It shows each result as a hero: the first field is the background image, and the other fields become an animated text overlay.
It is one of the VVJ format modules and needs VVJ Core, which Composer installs with it. What sets VVJH apart from the other VVJ formats is the text overlay: it sits in one of 11 positions, on an optional colored panel, and the minimum height can be set in viewport units, pixels or ems.
Start here
See it working
The live demo shows VVJH heroes on a page. For the settings that VVJ Core shares with every format, see the VVJ Core page.
Features
Choose "Views Vanilla JavaScript Hero" as the "Format" of a view. Set "Show" to "Fields". Use an image field as the first field. All other fields form the overlay text. One row is a full-width hero. With several rows, set "Hero card width (px)" above 0 to show hero cards side by side.
- "Layout settings": "Max width (px)" (default 1200), "Minimum height", "Max Content Width (%)" (default 60) and "Hero card width (px)" (default 0). "Minimum height" has a "Height value" (default 50) and a "Height unit": "Viewport Width (vw)" (default), "Viewport Height (vh)", "Pixels (px)", "Ems (em)" or "Root Ems (rem)". Hero cards need more than one item. A width of 0 gives a list of full-width heroes.
- "Position settings": "Overlay position": Middle (default), Left, Right, Top, Bottom, Top Left, Top Right, Bottom Left, Bottom Right, Top Middle or Bottom Middle. Sliding animations may not center the content as expected. Middle may not work correctly with them.
- "Animation settings": "Hero Style" (Fade, Zoom, Slide from Top, Slide from Right, Slide from Bottom or Slide from Left; default Fade), "Hero animation speed" from 0.1 (fast) to 2 (slow) (default 0.9) and "Animation easing" ("Ease", "Linear", "Ease-in", "Ease-out", "Ease-in-out"). Visitors who prefer reduced motion see no animation.
- "Style settings": "Overlay background color" (default #ffffff) and "Overlay background opacity" from 0.0 to 1.0 (default 0.7).
- "Responsive settings": "Available Breakpoints for Hero", from "576 px / 36 rem" (default) to "1400 px / 87.5 rem". The hero is off up to that width. There is no "all screens" choice.
- Tokens: use
[vvjh:field]and[vvjh:field:plain]in the view header, footer or empty text. - Deep linking: VVJH does not offer it.
- Theme bridges:
pattern-bridge-soloandpattern-bridge-apexmap Pattern colors to those themes. Under any other theme the look stays black and white. - Help page: read
/admin/help/vvjhafter you enable the module.
Patterns
A Pattern is a ready-made design. VVJH ships four. Each one needs a set number of items in the view:
- Aperture: one full-bleed hero. Needs one item, with the fields image, kicker, title, summary and link.
- Bento: hero cards in a grid, the first one large. Needs four items.
- Panels: a row of vertical strips. Needs three to five items.
- Stack: split cards of photo and words that pile up as the page scrolls. Needs two to five items.
Choose a Pattern under "Patterns" in the format settings. It sets the overlay position, style, speed, easing, overlay color and opacity, breakpoint, minimum height and widths, and turns "Enable CSS library" off. Enable the VVJ Patterns submodule of VVJ Core first. The list headed "To finish the Pattern" shows what is left to do.
Installation: get started in 3 steps
- Install the module with Composer:
composer require 'drupal/vvjh:^2.0' - Enable it on the Extend page, or with Drush:
drush en vvjh - Open a view under Structure > Views. Set "Format" to "Views Vanilla JavaScript Hero" and set "Show" to "Fields". Then open the format settings and set "Overlay position".
Requirements
- Drupal ^11.3 || ^12
- PHP 8.3 or later
- VVJ Core
- Views and Filter (both in Drupal core)
No other contributed module is needed. Sites on Drupal 10 or on PHP 8.1 or 8.2 stay on VVJ 1.x. To upgrade from 1.x, update every installed VVJ module to 2.x together. Mixing 1.x and 2.x is not supported.
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 Hero - Views Vanilla JavaScript Hero (VVJH)
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
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.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.12 | Stable | 10–11 | Jan 30, 2026 | ||
| 1.0.11 | Stable | 10–11 | Nov 12, 2025 | ||
| 1.0.10 | Stable | 10–11 | Jun 3, 2025 | ||
| 1.0.9 | Stable | 10–11 | Jun 1, 2025 | ||
| 1.0.8 | Stable | 10–11 | Jan 21, 2025 |