Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alvst/infinite-accordion
- Owner: alvst
- Created: 2022-12-02T16:08:46.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-22T17:26:10.000Z (almost 2 years ago)
- Last Synced: 2024-08-10T10:11:12.098Z (5 months ago)
- Topics: accordion, accordion-component, react
- Language: JavaScript
- Homepage:
- Size: 463 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)