Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@three11/accordion

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@three11/accordion

Front-end Accordion widget using max-height

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

Accordion

Front-end accordion widget using max-height written in vanilla ES2017

Install

npm i @three11/accordion

or

yarn add @three11/accordion

or

Just download this repository and link the files located in dist folder:

<link rel="stylesheet" href="dist/index.css" type="text/css" media="all" />

<script src="dist/index.min.js"></script>

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

Keywords

FAQs

Package last updated on 16 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc