0.1.1 • Published 10 months ago

@meteora-digital/accordion-grids v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Accordion Grid

Use this class to make Accordion Grid Layouts a breeze

Installation

npm i @meteora-digital/accordion-grids
yarn add @meteora-digital/accordion-grids

Usage

import AccordionGridController from '@meteora-digital/accordion-grids';

// Setting animate to false will prevent the TweenController dependency from being loaded and allow you to animate the content yourself
const Dropdown = new AccordionGridController(element, {
    // Defaults
    animate: true,
    duration: 300,
});

// Load the content into the dropdown controller
Dropdown.setContent(content);

// Event listeners
Dropdown.on('open', () => element.classList.add('active'));
Dropdown.on('close', () => element.classList.remove('active'));

element.addEventListener('click', () => Dropdown.toggle());

License

MIT

0.1.0

10 months ago

0.1.1

10 months ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

3 years ago

0.0.0

3 years ago