Skip to header Skip to main navigation Skip to main content Skip to footer
Cookies UI
Site branding
Alaa Haddad - Drupal Expert
Consultant • Architect • Developer • Themer - Expert Drupal Solutions
Main navigation
Alaa Haddad Offers Exceptional Drupal Custom Theming and Modules in Austin TX Alaa Haddad - Drupal Expert
  • Professional Profile
  • Drupal Services
    • Drupal Development
    • Drupal Developer
    • Drupal Themer
    • Drupal Architect
    • Drupal Consultant
  • My Drupal Modules & Themes
      • Cloudflare Purge
      • Solo Copy Blocks
      • W3CSS Paragraphs
      • Paragraphs Bundles
      • Acquia Purge Varnish
      • Reference Blocked Users
      • Module Matrix
      • Paragraphs Bundles Import
      • Selectify
      • Solo Utilities
      • Utilikit
      • Solo
      • Amun
      • Anhur
      • Amunet
      • W3CSS Theme
      • 3D Carousel
      • 3D FlipBox
      • Accordion
      • Carousel
      • Hero
      • Lightbox
      • Parallax
      • Reveal
      • Slideshow
      • Tabs
  • Blog
  • Videos
  • Contact
  • Hire Me (opens in new tab)

Views Vanilla JavaScript Accordion (VVJA)

Breadcrumbs

Breadcrumb

  • Home
  • Views Vanilla JavaScript Accordion (VVJA)

Main page content

Alaa Haddad, professional Drupal developer based in Austin, TX   Alaa Haddad
  9:31 PM CDT, Mon September 14, 2026
Share

After watching, you can publish a collapsible accordion from a Drupal View and control it from your own JavaScript.

Behaviour first, styling second

The Behavior Settings group is where the accordion's personality is decided, and the four options interact:

  1. Show Collapse or Expand (Single) puts an icon on each panel.
  2. Show Collapse or Expand All (Global) adds one button above the whole accordion.
  3. Enable Exclusive Mode keeps exactly one panel open at a time — and is incompatible with the global toggle and with expanding everything by default.
  4. Default Expand Behavior decides what is open on page load: none, the first panel, or all of them.

Spacing, speed and icons

Animation Settings holds the animation preset and Transition Speed, which runs from 0.1 to 2 seconds and defaults to 0.3. Layout Settings holds three numbers: Expandable Card Width (px), which turns panels into fixed-width cards when it is above zero, plus Content Padding (px) and Panel Gap (px), both 16 by default. Under Custom Icons you can paste your own SVG markup for the panel toggles and the expand-all button; the pasted SVG is run through an allowlist sanitiser before it is ever rendered.

Driving it from code

The module exposes a small public API on Drupal.vvja — openPanel, closePanel, togglePanel, getOpenPanels, getTotalPanels and getInstance — addressed by the deep-link identifier you set. So a marketing "expand everything" button on the page can loop from one to getTotalPanels and open each one, without touching the module.

Screen readers and the keyboard

Arrow Up and Down, Home and End move between headers; only one button sits in the tab order at a time; and links, buttons and inputs inside a closed panel are given tabindex="-1" so the keyboard cannot fall into a panel nobody can see.

Compatibility

Declared in vvja.info.yml: core_version_requirement: ^11.3 || ^12, php: 8.3, and dependencies on Views, Filter and VVJ Core.

Next

Full documentation on the Views Accordion module page, and for announcing state changes well, see Implementing ARIA Live Regions.

If this is one piece of a bigger build, Drupal architecture services is where that conversation starts — or get in touch.

Views Vanilla JavaScript

Our mission is to make Drupal more accessible and user-friendly, empowering businesses of all sizes, especially small enterprises with powerful tools that streamline content customization and enhance digital experiences.

Need help with your Drupal project? Hire Me through Flash Web Center, LLC.

Search

The Drupal 11 Module and Theme Stack, With Versions Checked

ARIA Live Regions in Drupal 11: What Core Does, What You Add

Drupal Architect: The Decisions Expensive to Reverse

Drupal Services: Development, Theming, Upgrades | Austin TX

Paragraphs Bundles

Drupal Module - Paragraphs Bundles

Drupal Theme - Solo

Drupal Theme - Solo

Drupal Work List - Drupal Work

Reference Blocked Users (Drupal Module)

Solo Utilities (Drupal Module)

Views Hero (Drupal Module)

Solo (Drupal Theme)

Paragraphs Bundles Import (Drupal Module)

Drupal Theme - W3CSS Theme

Drupal Theme - W3CSS Theme

Drupal Module - W3CSS Paragraphs

Drupal Module - W3CSS Paragraphs

Inspiration

Inspiration is the fuel that powers our creative engine, often coming from our surroundings, experiences, or the works of others. It's that magical moment when something clicks inside your brain, and you suddenly see a path forward that you hadn't noticed before. Inspiration can strike at any time, providing the motivation and energy needed to explore new possibilities and bring your ideas to life.

Unique Ideas

Unique Ideas

Unique ideas are the seeds of innovation, representing original thoughts or concepts that stand out from the usual. They're the sparks that ignite the process of creating something new and different, often leading to unexpected and groundbreaking solutions or products. Whether in art, science, business, or technology, unique ideas challenge the status quo and pave the way for progress.

Brainstorming

Brainstorming

Brainstorming is a creative group activity designed to generate a large number of ideas or solutions to a problem. It's a free-flowing and open-ended discussion where every suggestion is welcomed and considered, no matter how outlandish it may seem. Brainstorming encourages thinking outside the box, fostering an environment where creativity and collaboration lead to innovative solutions.

Planning

Planning

Planning is the blueprint for turning your ideas into reality. It involves setting goals, outlining steps, and organizing resources in a way that makes achieving your objectives possible. Good planning considers potential challenges and opportunities, making it easier to navigate the journey from concept to completion. It's about preparing the groundwork so that your projects can grow and flourish.

Drupal Developer

A Drupal Developer stands as the technical powerhouse behind dynamic websites, wielding expertise in PHP, custom module development, and Drupal's sophisticated API ecosystem. This role transforms business requirements into functional, secure, and scalable web solutions that power everything from small business sites to enterprise platforms serving millions of users. A Drupal Developer's expertise spans the entire development lifecycle—from architecting custom modules and integrating third-party services to optimizing performance and ensuring security compliance. Discover the complete guide to Drupal Developer skills, career paths, and hiring strategies.

Drupal Themer

A Drupal Themer serves as the artistic craftsperson who transforms wireframes and design mockups into pixel-perfect, accessible, and responsive user experiences using Twig templates, CSS, and JavaScript. This specialized role bridges the gap between design vision and technical implementation, ensuring every website not only looks exceptional but performs flawlessly across all devices and meets WCAG accessibility standards. A Drupal Themer's work encompasses the entire front-end ecosystem—from creating custom theme architectures and optimizing Core Web Vitals to implementing complex responsive designs and ensuring seamless integration with Drupal's rendering system. Explore the comprehensive guide to Drupal Themer expertise, theming best practices, and career advancement.

Drupal Architect

A Drupal Architect emerges as the strategic visionary of web construction, armed with encyclopedic knowledge of enterprise architecture patterns, infrastructure design, and Drupal's extensive technological ecosystem. This senior role operates at the highest technical level, making critical decisions that determine whether complex implementations scale successfully or collapse under real-world demands. A Drupal Architect's responsibilities begin long before development starts—during strategic planning phases where the foundation for secure, performant, and maintainable systems is established through careful evaluation of technology stacks, integration strategies, and scalability requirements. Learn about Drupal Architect skills, enterprise architecture strategies, and career progression to principal roles.

Footer menu

  • Contact
  • Professional Resume
  • Resume Summary
  • Technical Skills
  • Privacy Policy
  • Terms & Conditions
  • Search
  • Login
  • Sitemap

Copyright © 2026 Flash Web Center, LLC - All rights reserved

Developed & Designed by Alaa Haddad