Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alvst/infinite-accordion

A React plugin for creating an infinite accordion dropdown
https://github.com/alvst/infinite-accordion

accordion accordion-component react

Last synced: 24 days ago
JSON representation

A React plugin for creating an infinite accordion dropdown

Awesome Lists containing this project

README

        

# infinite-accordion

## Install

```bash
npm install --save infinite-accordion
```

## Usage

```jsx
import React, { Component } from "react";
import InfiniteDropdown from "infinite-accordion";

class Example extends Component {
render() {
,
Nested Button 2 Dropdown,
,
]}
dropdownClass={[styles["dropdown-style"], styles["dropdown-style"]]}
dropdownStyle={[{}, { backgroundColor: "aqua" }]}
buttonStyle={[{ backgroundColor: "red", width: "100%" }]}
buttonClass={[styles["pink-background"], {}]}
dropdownContent={[



Unlike other Dropdown Libraries, Infinite Accordion Dropdown allows
you to have as many nested dropdowns as you want



You can have multiple items (as long as they are properly wrapped).


,
,
,
Third Nested Dropdown
,
]}
// autoClose={true}
// delay={10}
/>;
}
}

function DropdownButtonOne() {
return (


Styled button

);
}

function NestedDropdown() {
return (


Infinite Dropdown is fully customizable



);
}

function Content() {
return <>Some Nice Fun Content>;
}

function DropdownContent2() {
return (


Dropdown 2



);
}
```

## Future Features

There are a few features I'm considering adding like the ability to use a custom button for dropping down the content.

## License

MIT © [alvst](https://github.com/alvst)