Accordion

The Accordion component lets users show and hide sections of related content on a page.

code
Expend code

#ExpandIcons

code
Expend code

#SingleOpen

code
Expend code

#DefaultExpanded & Disable

code
Expend code

Accordion

the properties of the accordion component that allows you to show or hide related content sections on the page.

PropTypeDefaultDescription
childrenReact.ReactNode-Includes the AccordionItem component as a child element.
classNamestring-CSS class for additional styling.
singleOpenbooleanfalseSets that only a single accordion item can be opened.

AccordionItem

the properties of the components that make up the individual items inside the accordion

PropTypeDefaultDescription
valuestring-A unique value to identify each accordion item.
childrenReact.ReactNode-Includes the AccordionSummary and AccordionDetails components as child elements.
isOpenbooleanfalseIndicates whether the item is open.
onToggle() => void-This function toggles the opening or closing of an item.
defaultExpandedbooleanfalseSets whether the component will be expanded by default.
disablebooleanfalseSets whether the item is inactive.

AccordionSummary

the properties of the component, including the title and expansion icon of the accordion item.

PropTypeDefaultDescription
childrenReact.ReactNode-Contains content to display the title or summary of the accordion item.
isOpenbooleanfalseIndicates whether the accordion item is open.
onToggle() => void-A function toggles the open or closed status of an accordion item.
expandIconReactNode<ChevronDown />Specifies the expansion icon to be displayed in the accordion summary section.

AccordionDetails

the properties of the component that display the details of the accordion item.

PropTypeDefaultDescription
childrenReact.ReactNode-Contains details of the accordion item.
isOpenbooleanfalseIndicates whether the accordion item is open.