1.0.13 • Published 1 year ago

multiple-nested-accordion v1.0.13

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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.

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.0

1 year ago