You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 9, 2026. It is now read-only.
Is your feature request related to a problem? Please describe.
We've recently had a request from a client (Campbell's) to extend the accordion component with functionality to control its initial expanded state upon page load. By default, this feature is not built-in and would probably have to be added manually (which I'm almost sure has been done several times in the past). This seemed to be a handy feature that could benefit other projects/clients as well.
Describe the solution you'd like
As a solution, we've implemented ToggleControls on two levels:
A global toggle that controls the expanded state for all accordion items. When the global switch is enabled, all inner child items will inherit the setting
Item-specific toggle that only controls its own expanded state. This option is only available if the global option has been disabled
As a result, not only would administrators have more control to customize the initial state of the accordion, but it would also improve the user experience in the editor at the same time.