flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Feature: Accordion: Rotate icon by X degrees

Open msigurd opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. I have an accordion where I want to rotate icons by 90 degrees on open, but the component has a hardcoded value of 180.

Describe the solution you'd like It would be nice to have a data attribute on the icon element to set the degrees value, e.g. data-accordion-degrees='90'.

msigurd avatar Aug 02 '24 12:08 msigurd

In Html Add a data-accordion-degrees attribute to the icon element to specify the rotation angle. CSS: Define styles for rotation using a CSS class and a CSS variable for flexibility. JS: add logic to read the data-accordion-degrees attribute and apply the rotation when the accordion is toggled.

nitesh2920 avatar Aug 03 '24 08:08 nitesh2920