For the nestable accordion, I noticed that there is no option to choose another icon for the accordion when it’s opened.
Use case:
I usually use an arrow for the accordion. It shows the default direction when the accordion is closed, and the icon indicates the same icon but a different direction(like up and down) when it is opened.
My workaround for this is to do it with custom CSS to change the direction of the icon with the transform property when the nestable accordion is opened.
However, having the option for the 2nd icon(or having the option to change the direction of the icon in the nestable according’s setting) is easier for regular users who can’t code.
Yes. I wrote the custom CSS to rotate the icon for the time being until they implemented this setting. I can share the workaround with you if you need it.
Hi Jornes! Sorry, I think I wasnt very precise with my question… What I wanted to know is what would be the code to change the icon when the accordeon is open?
There is no direct option to add a second icon for the accordion’s open mode. Maybe we need a workaround to achieve that. That’s why I submitted this feature request.
Thanks Jornes, that worked!
I am using the Arrow up and down, so for all of you guys who need a 180 rotation and smoother transition, add this to the Icon CSS:
.brx-open > .accordion-title-wrapper i {
transform: rotate(180deg);
transition: transform 0.3s ease;
}
.accordion-title-wrapper i {
transition: transform 0.3s ease;
}```