multiple-nested-accordion
v1.0.13
Published
create nested accordion
Downloads
11
Maintainers
Readme
Multiple Nested Accordion
multiple-nested-accordion is a customizable React component that allows you to create multiple nested accordions with ease. It's great for creating complex UIs that require nested content.
This component is designed to work with React and Next.js applications, but can also be used with other frameworks that support React.
Features
Create multiple nested accordions with ease Fully customizable styles and content Expand and collapse accordion panels with a click Option to keep multiple panels open at the same time Installation To install multiple-nested-accordion, run the following command:
bash Copy code npm install multiple-nested-accordion Usage To use multiple-nested-accordion, import it into your React component and pass in the necessary props.
jsx Copy code
import { NestedAccordion } from 'multiple-nested-accordion';
function MyComponent() {
return (
<NestedAccordion {...{data}}>
);
}
export default MyComponent; In this example, we're importing the NestedAccordion component from the multiple-nested-accordion package and using it in a new component called MyComponent. We're also passing two NestedAccordion.Panel components as children, each with their own title prop and content.
Props NestedAccordion supports the following props:
data formate:
[
{
id: "id",
label: "First Section",
link: "/link",
},
{
id: "id",
label: "Nested Section",
subItems:[
{label: "Nested Section", link: "/link",}
]
},
{
id: "id",
label: "Multiple Nested Section",
subItems:[
{label: "Nested Section",
subItems:[
{label: "Nested Section", link: "/link",}
]
}
]
}
]
License
This package is licensed under the MIT License. See the LICENSE file for details.