https://github.com/amiut/accordionify
A simple react accordion component
https://github.com/amiut/accordionify
accordion collapse component react
Last synced: about 2 months ago
JSON representation
A simple react accordion component
- Host: GitHub
- URL: https://github.com/amiut/accordionify
- Owner: amiut
- Created: 2021-12-22T22:34:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-07T13:47:43.000Z (almost 4 years ago)
- Last Synced: 2025-09-22T10:57:23.187Z (9 months ago)
- Topics: accordion, collapse, component, react
- Language: TypeScript
- Homepage: https://amiut.github.io/accordionify/
- Size: 523 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Install
```sh
npm install accordionify
```
or
```sh
yarn add accordionify
```
## Basic usage
Each expandable accordion can be created using `` component, to make each accordion opened by default simply pass a `defaultOpen` prop:
```jsx
Click to open
Accordion Content Goes here
```
as you can see in the above example we're dealing with some additional components
- `` is responsible for toggling (open/close) the accordion once it's clicked.
- `` is just a button that shows arrow up/down icon
- `` is responsible to hold accordion content
You can also Group multiple accordions with `` component, if you need only one opened accordion at a time, simply pass `atomic` prop to ``
```jsx
Click to open
Accordion 1 Content Goes here
Click to open
Accordion 2 Content Goes here
Click to open
Accordion 3 Content Goes here
```
# Contributing
This is a beta project, feel free to contribute