Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@servicensw/accordion

Package Overview
Dependencies
Maintainers
11
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@servicensw/accordion

accordion component

latest
Source
npmnpm
Version
4.0.7
Version published
Weekly downloads
595
354.2%
Maintainers
11
Weekly downloads
 
Created
Source

@servicensw/accordion

accordion  component

Service NSW package documentation and examples
(Login credentials required)

Installation

npm install @servicensw/accordion --save-dev

How to use

CSS

  • PostCSS workflow: @import '@servicensw/accordion';
  • Sass/Eyeglass: @import 'servicensw-accordion';
  • Native CSS: @import url('dist/accordion.css');
  • Link tag: <link href="dist/accordion.css" rel="stylesheet" type="text/css">

Vanilla JS

The recommended usage is of ES modules, to take advantage of code-splitting.

import Accordion from "@servicensw/accordion"

new Accordion(".accordion:not(.is-excluded)")

Legacy usage;

  • IIFE: <script src="dist/accordion.js" type="text/javascript"></script> (initialized for all .accordion elements)
  • Common JS: const Accordion = require("@servicensw/accordion") (initialize yourself)

HTML

<div class="accordion__group">
  <section class="accordion">
    <h2 class="accordion__title"><span>Title</span></h2>
    <div class="accordion__body">
      <p>Body content</p>
    </div>
  </section>
</div>

or for a group of accordions...

<div class="accordion__group">
  <section class="accordion">
    <h2 class="accordion__title"><span>Title</span></h2>
    <div class="accordion__body">
      <p>Body content</p>
    </div>
  </section>
  <section class="accordion">
    <h2 class="accordion__title"><span>Title</span></h2>
    <div class="accordion__body">
      <p>Body content</p>
    </div>
  </section>
  <section class="accordion">
    <h2 class="accordion__title"><span>Title</span></h2>
    <div class="accordion__body">
      <p>Body content</p>
    </div>
  </section>
</div>

Change log

FAQs

Package last updated on 02 Apr 2025

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