Installation
Usage
import AccordionNested from "@/components/ruixen/accordion-nested";
const items = [
{
id: "1",
title: "Account Settings",
content: "Manage your account preferences.",
subItems: [
{
id: "1-1",
title: "Profile Information",
content: "Update your name and email.",
},
{
id: "1-2",
title: "Security",
content: "Change password and enable 2FA.",
},
],
},
];
export default function MyAccordion() {
return <AccordionNested items={items} defaultValue="1" />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | AccordionNestedItem[] | - | Array of accordion items |
defaultValue | string | - | ID of the initially open item |
className | string | - | Additional CSS classes |

