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

react-collapsible-accordion

v1.0.5

Published

A React collapsible and accordion wrapper with smooth transition.

Downloads

14

Readme

React-Collapsible-Accordion

A React Collapsible and Accordion Component. You can easily implement collapsible and accordion with smooth transitions.

Demo

You can try the demo Here.

Installation

Install using npm:

npm install --save react-collapsible-accordion

Install using yarn:

yarn add react-collapsible-accordion

Usage

// Import from the library
import {Collapsible,Accordion,AccordionItem} from 'react-collapsible-accordion';

// use collapsible in your component
<Collapsible  Title="My Title">
 Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto numquam temporibus beatae recusandae in quisquam ipsa aperiam natus libero, ad labore quod
 a similique facilis non rerum dolor voluptatem odit eveniet repellendus deserunt? Minima, commodi odio. Nulla sint molestiae delectus debitis sed
 reiciendis fugiat! Velit itaque quis enim dolore maxime!
</Collapsilble>

// or use Accordion
<Accordion allowMultipleOpen={true}>
    <AccordionItem Title="one">
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto numquam temporibus beatae recusandae in quisquam ipsa aperiam natus libero, ad labore quod
      a similique facilis non rerum dolor voluptatem odit eveniet repellendus deserunt? Minima, commodi odio. Nulla sint molestiae delectus debitis sed
      reiciendis fugiat! Velit itaque quis enim dolore maxime!
    </AccordionItem>
    <AccordionItem Title="two" >
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat ratione laudantium quo, nobis dolorem, dicta eum doloribus sunt corporis illo numquam hic,
      at totam id expedita debitis fugit saepe mollitia?
    </AccordionItem>
    <AccordionItem Title="three">
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto numquam temporibus beatae recusandae in quisquam ipsa aperiam natus libero, ad labore quod
      a similique facilis non rerum dolor voluptatem odit eveniet repellendus deserunt? Minima, commodi odio. Nulla sint molestiae delectus debitis sed
      reiciendis fugiat! Velit itaque quis enim dolore maxime!
    </AccordionItem>
  </Accordion>

API

Below we have all the props that we can use with the <Collapsible> component. | Name | Type | Default | Description | | ------------ | ------- | ------- | ----------- | | Title | string / ComponentType<{}> | | title of the collapsible item. Title can be a string or you can provide a custom component.| | Icon | string / ComponentType<{}> | | Icon can be a font icon class name (string) or a component. if you don't provide it, there will be a default Icon | | open | boolean | false | is the collapsible opened or closed by default. | | onClick | function | () => void | Optional click handler.| | className | string | | Custom class name for the outer div.|

Below we have all the props that we can use with the <AccordionItem> component. | Name | Type | Default | Description | | ------------ | ------- | ------- | ----------- | | Title | string / ComponentType<{}> | | title of the collapsible item. Title can be a string or you can provide a custom component.| | Icon | string / ComponentType<{}> | | Icon can be a font icon class name (string) or a component. if you don't provide it, there will be a default Icon | | open | boolean | false | is the collapsible opened or closed by default. | | className | string | | Custom class name for the outer div.|

Below we have all the props that we can use with the <Accordion> component. | Name | Type | Default | Description | | ------------ | ------- | ------- | ----------- | | allowMultipleOpen | boolean | false | set it to true if you want to be able to view multible items opened at the same time. | | className | string | | Custom class name for the outer div.|

License

React Collapsible Accordion is licensed under MIT license, see LICENSE for the full license.