A Simple Easily Configurable Accordion Component for Vue

Simple Vue component library that allows you to create fully configurable accordion components in a Vue.js application.

dynamic accordion in vue js, custom accordion javascript, nested accordion javascript, simple jquery accordion, create accordion with javascript, expand/collapse in vue js

Pure CSS Accordion Which Works Without Javascript

How to make use of it:

Install and download:

# Yarn
$ yarn add vue-simple-accordion

# NPM
$ npm i vue-simple-accordion --save

1. Import components into your Vue.js application.

// import components
import {
  VsaList,
  VsaItem,
  VsaHeading,
  VsaContent,
  VsaIcon
} from 'vue-simple-accordion';
// import stylesheet
import 'vue-simple-accordion/dist/vue-simple-accordion.css';
// register components
export default {
  components: {
    VsaList,
    VsaItem,
    VsaHeading,
    VsaContent,
    VsaIcon
  }
}

2. Create a basic accordion component as follows:

<vsa-list>
  <vsa-item>
    <vsa-heading>
      Accordion Heading
    </vsa-heading>
    <vsa-content>
      Accordiong Panel
    </vsa-content>
  </vsa-item>
</vsa-list>

3. Props available to configure the accordion component.

tags: {
  type: Object,
  required: false,
  default: {
    list: "dl",
    list__item: "div",
    item__heading: "dt",
    heading__content: "span",
    heading__icon: "span",
    item__content: "dd"
  }
},
transition: {
  type: String,
  required: false,
  default: undefined // vsa-collapse. 
},
initActive: {
  type: Boolean,
  required: false,
  default: undefined
},
forceActive: {
  type: Boolean,
  required: false,
  default: undefined
},
autoCollapse: {
  type: Boolean,
  required: false,
  default: undefined
},
roles: {
  type: Object,
  required: false,
  default: {
    presentation: false,
    heading: false,
    region: true
  }
},
navigation: {
  type: Boolean,
  required: false,
  default: undefined
}

Simple Configurable Accordion Component, vue simple accordion Plugin/Github


See Demo And Download

Official Website(tkhquang): Click Here

This superior jQuery/javascript plugin is developed by tkhquang. For extra Advanced Usages, please go to the official website.

Related Posts

Autocomplete-and-Typeahead-Javascript-Library

Simple and Fast Autocomplete and Typeahead Javascript Library | autoComplete.js

autoComplete.js is a simple, pure, and incrementally designed JavaScript library for speed, high versatility, and seamless integration with a wide variety of projects and systems. Features Pure…

Bootstrap-Notification-Message-Alert-Plugin

Bootstrap Notification Message Alert Plugin with jQuery

BootstrapMsg is a jQuery plugin for displaying messages with Bootstrap alert classes to generate hierarchical in-page navigation for an extended webpage sectioned by heading components. Using Bootstrap…

jquery-google-chart-plugin

jQuery Plugin for Transforming HTML Tables Into Charts Using Google Charts

Chartinator is a jQuery plugin for converting HTML tables, Google Sheets and js arrays into charts using Google Charts. Use data from HTML tables Chartinator is designed…

free-vue-chart-library

Customizable & Composable Charts for VueJS | vue-wcharts

WCharts is a library that makes it easy to create your own charts using Vuejs. You can easily create reusable chart components. Use a basic layout or…

javascript-emoji-gif-picker-library

A Modern GIF | Emoji Picker Vue3 Components For Your App

vue3 discord picker is a new emoji/gif picker for your app! based on disagreement. This component is only available in vue3. Reworking the Print and Configuration API….

neon-button-css

Animated Neon Light Buttons Animation Effects In Pure CSS

Animated Neon Buttons is a set of neon buttons with animated reflections and borders, written in pure CSS/CSS3. Must Read: Simple Superb Animations Particle Effect Buttons For…