v1.3.0 28

Accordion

A vertically stacked set of interactive headings that reveal or hide associated content.

Interactive Requires: veritheme.js JS init: automatic

Default

Only one item can be open at a time. Click an item to expand or collapse it.

html
Yes. It adheres to the WAI-ARIA design pattern. All interactive elements are keyboard accessible and screen reader friendly.
Yes. It comes with default styles that match the other components. You can also customize it with your own CSS or utility classes.
Yes. It includes smooth transitions for opening and closing. The chevron icon rotates to indicate the current state.
<div data-vt-accordion="single" data-vt-accordion-shift="">
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="true">
      Is it accessible?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region">
      Yes. It adheres to the WAI-ARIA design pattern. All interactive elements are keyboard accessible and screen reader friendly.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      Is it styled?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      Yes. It comes with default styles that match the other components. You can also customize it with your own CSS or utility classes.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      Is it animated?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      Yes. It includes smooth transitions for opening and closing. The chevron icon rotates to indicate the current state.
    </div>
  </div>
</div>

Multiple Open

Multiple items can be expanded at the same time.

html
We offer a full refund within 30 days of purchase. No questions asked. Simply contact our support team and we will process your refund.
Yes, we provide 24/7 technical support via email and live chat. Our team typically responds within 2 hours during business hours.
Absolutely! You can upgrade or downgrade your plan at any time from your account settings. Changes take effect immediately.
<div data-vt-accordion="multiple" data-vt-accordion-shift="">
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      What is your refund policy?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      We offer a full refund within 30 days of purchase. No questions asked. Simply contact our support team and we will process your refund.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      Do you offer technical support?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      Yes, we provide 24/7 technical support via email and live chat. Our team typically responds within 2 hours during business hours.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      Can I upgrade my plan later?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      Absolutely! You can upgrade or downgrade your plan at any time from your account settings. Changes take effect immediately.
    </div>
  </div>
</div>

With Icons

Accordion items with leading icons for visual context.

html
We accept all major credit cards (Visa, MasterCard, American Express), PayPal, Apple Pay, and Google Pay. All transactions are securely encrypted.
Standard shipping takes 5-7 business days. Express shipping is available for 2-3 day delivery. Free shipping on orders over $50.
Items can be returned or exchanged within 30 days of delivery. Items must be in original condition with tags attached. Return shipping is free.
<div data-vt-accordion="single" data-vt-accordion-shift="">
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      <span class="vt-accordion-label">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
          <path d="M10 4H14C17.7712 4 19.6569 4 20.8284 5.17157C22 6.34315 22 8.22876 22 12C22 15.7712 22 17.6569 20.8284 18.8284C19.6569 20 17.7712 20 14 20H10C6.22876 20 4.34315 20 3.17157 18.8284C2 17.6569 2 15.7712 2 12C2 8.22876 2 6.34315 3.17157 5.17157C4.34315 4 6.22876 4 10 4Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M2.5 9H21.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M14 15L18 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
        </svg>
        Payment Methods
      </span>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-accordion-inset vt-hidden">
      We accept all major credit cards (Visa, MasterCard, American Express), PayPal, Apple Pay, and Google Pay. All transactions are securely encrypted.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      <span class="vt-accordion-label">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
          <circle cx="17" cy="18" r="2" stroke="currentColor" stroke-width="1.5"></circle><circle cx="7" cy="18" r="2" stroke="currentColor" stroke-width="1.5"></circle><path d="M11 17H15M13.5 7H14.4429C15.7533 7 16.4086 7 16.9641 7.31452C17.5196 7.62904 17.89 8.20972 18.6308 9.37107C19.1502 10.1854 19.6955 10.7765 20.4622 11.3024C21.2341 11.8318 21.6012 12.0906 21.8049 12.506C22 12.9038 22 13.375 22 14.3173C22 15.5596 22 16.1808 21.651 16.5755C21.636 16.5925 21.6207 16.609 21.6049 16.625C21.2375 17 20.6594 17 19.503 17H19" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M13 7L13.9942 9.48556C14.4813 10.7034 14.7249 11.3123 15.2328 11.6561C15.7407 12 16.3965 12 17.7081 12H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M4.86957 17C3.51684 17 2.84048 17 2.42024 16.5607C2 16.1213 2 15.4142 2 14V7C2 5.58579 2 4.87868 2.42024 4.43934C2.84048 4 3.51684 4 4.86957 4H10.1304C11.4832 4 12.1595 4 12.5798 4.43934C13 4.87868 13 5.58579 13 7V17H8.69565" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
        </svg>
        Shipping Info
      </span>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-accordion-inset vt-hidden">
      Standard shipping takes 5-7 business days. Express shipping is available for 2-3 day delivery. Free shipping on orders over $50.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      <span class="vt-accordion-label">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
          <path d="M3.04712 13C3.01082 12.6717 2.99219 12.338 2.99219 12C2.99219 7.02944 7.02162 3 11.9922 3C14.8195 3 17.3422 4.30367 18.9922 6.34267M20.9373 11C20.9736 11.3283 20.9922 11.662 20.9922 12C20.9922 16.9706 16.9628 21 11.9922 21C9.16492 21 6.64214 19.6963 4.99219 17.6573" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15.9922 7H16.9922C18.4064 7 19.1135 7 19.5528 6.56066C19.9922 6.12132 19.9922 5.41421 19.9922 4V3" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M7.99219 17H6.99219C5.57797 17 4.87087 17 4.43153 17.4393C3.99219 17.8787 3.99219 18.5858 3.99219 20V21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
        </svg>
        Returns &amp; Exchanges
      </span>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-accordion-inset vt-hidden">
      Items can be returned or exchanged within 30 days of delivery. Items must be in original condition with tags attached. Return shipping is free.
    </div>
  </div>
</div>

Bordered

Each item in a separate bordered container for visual separation.

html
We support React, Vue, Svelte, Angular, and plain HTML/CSS. Each framework has its own set of components and documentation.
You can customize the theme by modifying the CSS variables in your global stylesheet. Override colors, spacing, and border-radius values to match your brand.
Yes, we provide a comprehensive Figma library with all components, variants, and design tokens. It stays in sync with the code implementation.
<div data-vt-accordion="single" data-vt-accordion-variant="bordered">
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      What frameworks are supported?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      We support React, Vue, Svelte, Angular, and plain HTML/CSS. Each framework has its own set of components and documentation.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      How do I customize the theme?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      You can customize the theme by modifying the CSS variables in your global stylesheet. Override colors, spacing, and border-radius values to match your brand.
    </div>
  </div>
  <div data-vt-accordion-item="">
    <button data-vt-accordion-trigger="" aria-expanded="false">
      Is there a Figma library available?
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true" data-vt-accordion-icon="true">
        <path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
      </svg>
    </button>
    <div data-vt-accordion-content="" role="region" class="vt-hidden">
      Yes, we provide a comprehensive Figma library with all components, variants, and design tokens. It stays in sync with the code implementation.
    </div>
  </div>
</div>

Guidelines

Full refund within 30 days of purchase, no questions asked.
Yes, 24/7 via email and live chat.
Do Use accordions for long, secondary content like FAQ answers.
Go to dashboard
Go to settings
Don't Don't hide primary navigation inside an accordion — use tabs or a sidebar.
Standard shipping takes 5-7 business days.
Do Keep triggers short and scannable so users can find the right section.

Anatomy

div[data-vt-accordion="single|multiple"]   ← Accordion root
└── div[data-vt-accordion-item]                 ← Single item wrapper
    ├── button[data-vt-accordion-trigger]          ← Clickable header
    │   ├── span[.vt-accordion-label]           ← Label text (+ leading icon)
    │   └── svg[data-vt-accordion-icon]             ← Rotating chevron
    └── div[data-vt-accordion-content]             ← Collapsible panel

API Reference

Class Type Description
data-vt-accordion="single" Base Single-open accordion — only one item expands at a time
data-vt-accordion="multiple" Base Multi-open accordion — multiple items can be open
data-vt-accordion-item Structure Wraps each accordion item (trigger + content); a divider below
data-vt-accordion-trigger Structure The clickable header: question and chevron, Body/SM
data-vt-accordion-content Structure The collapsible panel, Body/SM secondary; vt-hidden while closed
data-vt-accordion-icon Structure Chevron, 16px; turns over while the trigger has aria-expanded="true"
vt-accordion-label Part Question with a leading icon (20px, muted), 12px apart
vt-accordion-inset Part On the panel: lines the answer up with the question after a leading icon
data-vt-accordion-shift Modifier Adds left-padding shift on item hover
data-vt-accordion-variant="bordered" Variant Each item in a separate rounded bordered container, 12px apart

Accessibility

Feature Details
Role Triggers use button element, content uses region role
Keyboard Enter and Space toggle the accordion item
ARIA aria-expanded on trigger, aria-controls links trigger to content
Focus Visible focus ring via :focus-visible on trigger buttons