#
Accordion
This is a multi-item accordion that expands on click
React / Next.js
This is a teaching and community platform built with React and Funcss.
Register, complete your profile, and begin learning from courses.
Yes, every lesson has a discussion section for questions.
Accordion
Accordion is a toggleable component used to expand and collapse content.
PropDescriptionValue(s)
`items`Array of objects with `title` and `content` keys.`{ title: string; content: ReactNode; }[] (required)`
`allowMultiple`Allows multiple items to be expanded at once.`boolean | default: false`
`defaultOpenIndexes`Indexes of items that should be open on load.`number[] | default: []`
`itemClass`Custom class for each accordion item.`string`
`titleClass`Class for the title/header area.`string`
`iconClass`Class for the arrow icon.`string`
`contentClass`Class for the inner content area.`string`
`activeClass`Class applied when an item is open.`string`