New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@baianat/accordion

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baianat/accordion

ES6 accordion extension for Base framework.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Accordion

ES6 accordion extension for Base framework.

Getting Started

Installation

You can install accordion as part of base.extensions

npm install @baianat/base.extensions

# or using yarn
yarn add @baianat/base.extensions

If you want the standalone version

npm install @baianat/accordion

# or using yarn
yarn add @baianat/accordion

Include necessary files

<head>
  <link rel="stylesheet" href="dist/css/accordion.css">
</head>
<body>
    ...
    <script type="text/javascript" src="dist/js/accordion.js"></script>
</body>

HTML Layout

  • .accordion
    • .accordion-item
      • .accordion-title
        • .accordion-icon
      • .accordion-body
    • .accordion-item
      • ...
<ul class="accordion" id="myAccordion">
  <li class="accordion-item is-active">
    <a class="accordion-title">
      <span class="accordion-icon"></span>
      Title 1
    </a>
    <div class="accordion-body">
      <p> Awesome content! </p>
    </div>
  </li>

  <li class="accordion-item is-active">
    <a class="accordion-title">
      <span class="accordion-icon"></span>
      Title 2
    </a>
    <div class="accordion-body">
      <p> Awesome content! </p>
    </div>
  </li>

  <li class="accordion-item is-active">
    <a class="accordion-title">
      <span class="accordion-icon"></span>
      Title 3
    </a>
    <div class="accordion-body">
      <p> Awesome content! </p>
    </div>
  </li>
</ul>

If you want the clean version of accordion add .is-clean class to main div

  <ul class="accordion is-clean" id="myAccordion">
    ...
  </ul>

Make it work

One last step is to call create new accordion

  let myAccordion = new Accordion('#myAccordion');

You can use the static method Accordion.create to search for all accordions in the page and create a new instant of it.

  Accordion.create();

License

MIT

Copyright (c) 2017 Baianat

FAQs

Package last updated on 04 Feb 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