2.0.1 • Published 1 year ago

@three11/accordion v2.0.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

GitHub release GitHub issues GitHub last commit Build Status npm npm Analytics

Accordion

Accordion widget using max-height and CSS transitions

Install

npm i @three11/accordion

or

yarn add @three11/accordion

Usage

First, import the module:

import Accordion from '@three11/accordion';

Then initialize a new instance of the module:

const el = doc.querySelector('[data-accordion]');
const accordion = new Accordion(el, (settings = {}));

Settings

The default settings are:

{
	headSelector: '[data-title]',   // Selector for the head element
	bodySelector: '[data-content]', // Selector for the body element
	hiddenClass:  'is--hidden',     // Hidden class name
	activeClass:  'is--active'      // Active class name
}

License

GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

3 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago