DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Accordion

The Accordion component contains several panels displayed one under another. Users can expand or collapse these panels, which makes this component useful to present information in a limited amount of space.

DevExtreme Accessibility Compliance
DevExtreme component libraries meet a variety of WCAG and Section 508 compliance standards. To assess this demo’s accessibility level, click the Run AXE® Validation button to launch the AXE® web accessibility evaluation tool.
All trademarks or registered trademarks are property of their respective owners. AXE® Terms of Use
The overall accessibility level of your application depends on the Accordion features used.
To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API

Bind Accordion to Data

You can display Accordion items from the items array or a dataSource. If you use the items array, specify the title and text properties.

Configure Item Selection and Collapsibility

Enable the multiple property to allow users to select multiple panels. Use the selectedItems array to store selected items. Toggle the "Multiple enabled" checkbox in the Options demo section to see how it affects the selection.

If you want to allow users to close panels on click, set the collapsible property to true. Check the "Collapsible enabled" checkbox in the Options demo section to enable this feature.

Configure Animation

The animationDuration property allows you to specify the animation duration when users expand/collapse a panel. Use the "Animation duration" slider in the Options demo section to see how it affects the animation.

Customize Item Appearance

Use the itemTemplate and itemTitleTemplate properties to customize the panel appearance. If you use the items array, you can also specify the icon property.