A useful and simple package to create an react accordion.
npm install --save reactjs-accordions
import React from 'react'
import Accordions from 'reactjs-accordions';
import 'reactjs-accordions/dist/index.css';
const Example = () => {
const items = [
{title: 'Accordion title 1', caption: 'Accordion content 1'},
{title: 'Accordion title 2', caption: 'Accordion content 2'},
{title: 'Accordion title 3', caption: 'Accordion content 3'},
{title: 'Accordion title 4', caption: 'Accordion content 4'},
];
return (
<div className="border px-3 rounded-lg">
<Accordions
items={items}
className=""
/>
</div>
);
};
export default Example;
We are glad you choose this package. If this package is useful for you, please give us a star.
MIT © MostafaRostami72