npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

allcollapsible

v1.1.0

Published

one collapsible for all

Downloads

387

Readme

AllCollapsible

one collapsible for all

GitHub version npm version

DEMO:

https://adityasrivast.github.io/AllCollapsible/demo/example.html

QUICKSTART:

  • Download the latest release of AllCollapsible directly from GitHub.
  • Clone the repo: git clone https://github.com/AdityaSrivast/AllCollapsible.git
  • Include the files via jsDelivr.
  • Install with npm: npm install allcollapsible

CDN:

Just add the link to the files in your <head> tag.

  <!--Minified css file-->
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/adityasrivast/[email protected]/allcollapsible.min.css">
  <!--Minified js file-->
  <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/adityasrivast/[email protected]/allcollapsible.min.js"></script>

Apart from these don't forget to add cdn for jquery before <script> tag for js file.

<script src="https://cdn.jsdelivr.net/gh/jquery/jquery@3/dist/jquery.min.js"></script>

USAGE:

Default

<ul class="collapsible">
    <li>
      <div class="collapsible-title">First</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet.</span></div>
    </li>
    <li>
      <div class="collapsible-title">Second</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
    <li>
      <div class="collapsible-title">Third</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
</ul>

Extensible

<ul class="collapsible extensible">
    <li>
      <div class="collapsible-title">First</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet.</span></div>
    </li>
    <li>
      <div class="collapsible-title">Second</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
    <li>
      <div class="collapsible-title">Third</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
</ul>

Collapsible With Arrows

Default

<ul class="collapsible with-arrow">
    <li>
      <div class="collapsible-title">First</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet.</span></div>
    </li>
    <li>
      <div class="collapsible-title">Second</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
    <li>
      <div class="collapsible-title">Third</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
</ul>

Extensible

<ul class="collapsible extensible with-arrow">
    <li>
      <div class="collapsible-title">First</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet.</span></div>
    </li>
    <li>
      <div class="collapsible-title">Second</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
    <li>
      <div class="collapsible-title">Third</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
</ul>

Similar format is to be followed for classes: with-plus,with-vertical-bar,with-star,with-pencil,with-bullets,with-pointer,with-caret,with-right-caret.

For Demo of these classes, click here.

Coloured Collapsible

You can even beautify the title and body for the collapsible by adding colours to it. The only thing you have to do is add a class to <div class="collapsible-title"> and(or) <div class="collapsible-body">. There are total 178 shades available as of now. For Example:

  <ul class="collapsible">
    <li>
      <div class="collapsible-title teal">First</div>
      <div class="collapsible-body teal-lighten-3"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
    <li>
      <div class="collapsible-title red">Second</div>
      <div class="collapsible-body red-lighten-2"><span>Lorem ipsum dolor sit amet</span></div>
    </li>
    <li>
</ul>

The colours available are: red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, available in 10 shades of each, viz., base-color, color-lighten-1, color-lighten-2, color-lighten-3, color-lighten-4, color-lighten-5, color-accent-1, color-accent-2, color-accent-3, color-accent-4. In addition, colours, brown, grey, blue-grey are also available, with 6 six shades each, viz., base-color, color-lighten-1, color-lighten-2, color-lighten-3, color-lighten-4, color-lighten-5.

Special Effects

In addition to these, special effects for hover on collapsible title can be used. For hover, two effects can be used: fade-in and fade-out. Correspondingly, two classes, fadein-effect and(or) fadeout-effect need to be added to <ul> tag.

BUGS

For any bugs or issue, report at: https://github.com/AdityaSrivast/AllCollapsible/issues

You may also mail at: [email protected]

DEPENDENCIES

JQuery 1.4 or higher

LICENSE

MIT License

Copyright (c) 2018 Aditya Srivastava