New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

@frankhoodbs/accordion-cmp

Package Overview
Dependencies
Maintainers
4
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frankhoodbs/accordion-cmp

Accordion component

latest
npmnpm
Version
4.0.2
Version published
Maintainers
4
Created
Source

Accordion component

Introducing an accordion component designed with both customization and accessibility in mind. This component seamlessly integrates with your Vue projects, offering expandable and collapsible content panels. With built-in support for ARIA attributes, it ensures a user-friendly experience for all, including those using assistive technologies. Customize its appearance and behavior to fit your site's design aesthetics and functional requirements. Empower your web application with an accordion that's both visually engaging and inclusively designed.

Version License

API Reference

Props

NameTypeDescription
data-id-prefixstringrequired Prefix for all the id attributes
data-header-tagstringHTML tag for headers. Default "h3"
data-auto-closebooleanKeep open only one section at time

Slots

NameDescription
header-${index}Required. Slot for headers. Replace ${index} with an incremental number, starting at 1. Scoped slot with extended boolean parameter.
content-${index}Required. Slot for contents. Replace ${index} with an incremental number, starting at 1. The associated header and content must have the same index.

CSS custom properties

NameDefaultDescription
--accordion-cmp-transition-duration0.5sAccordion open animation time.
--accordion-cmp-transition-easingeaseAccordion open animation timing function.

Usage/Examples

<accordion-cmp
  data-id-prefix="AccordionCmp-1"
  :data-auto-close="true"
  data-header-tag="h2"
>
  <template #header-1="{ expanded }">
    <span :class="['header', { expanded }]">Header 1</span>
  </template>
  <template #content-1>
    <div class="content">
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
        eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
        enim ad minim veniam, quis nostrud exercitation ullamco laboris
        nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
        in reprehenderit in voluptate velit esse cillum dolore eu fugiat
        nulla pariatur. Excepteur sint occaecat cupidatat non proident,
        sunt in culpa qui officia deserunt mollit anim id est laborum.
      </p>
    </div>
  </template>
  <template #header-2="{ expanded }">
    <span :class="['header', { expanded }]">Header 2</span>
  </template>
  <template #content-2>
    <div class="content">
      <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
        eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
        enim ad minim veniam, quis nostrud exercitation ullamco laboris
        nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
        in reprehenderit in voluptate velit esse cillum dolore eu fugiat
        nulla pariatur. Excepteur sint occaecat cupidatat non proident,
        sunt in culpa qui officia deserunt mollit anim id est laborum.
      </p>
    </div>
  </template>
</accordion-cmp>

FAQs

Package last updated on 26 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts