Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Accordion: Rotate icon by X degrees #940

Open
msigurd opened this issue Aug 2, 2024 · 1 comment
Open

Feature: Accordion: Rotate icon by X degrees #940

msigurd opened this issue Aug 2, 2024 · 1 comment

Comments

@msigurd
Copy link

msigurd commented Aug 2, 2024

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'.

@nitesh2920
Copy link

nitesh2920 commented Aug 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants