xel icon indicating copy to clipboard operation
xel copied to clipboard

Can animation be disabled on elements?

Open dbrnz opened this issue 1 year ago • 4 comments

In particular for <x-accordion> although I'm wondering if there is a general property that can be used.

Thanks.

dbrnz avatar Aug 29 '23 03:08 dbrnz

Currently this is not possible. In case of <x-accordion> I can add --animation-duration custom CSS property which could be set to 0s to disable animation.

jarek-foksa avatar Aug 29 '23 09:08 jarek-foksa

@jarek-foksa I'll give this a try if it's fine for you. I'm thinking adding an atrribute (animated or something along the line). If the attribute is set then we set animation duration to 0 on the component (at least it looks possible on x-accordion).

phamduylong avatar Dec 19 '23 12:12 phamduylong

@phamduylong For now I would prefer to not add any new attributes to x-accordion. If we add something like noanimate or disableanimation boolean attribute to it, then for the sake of consistency it would have to be added to all other animatable widgets.

jarek-foksa avatar Dec 19 '23 18:12 jarek-foksa

Starting from version 0.25.0 you can call <x-accordion>.expand(false) and <x-accordion>.collapse(false) to expand/collapse the accordion without animations.

jarek-foksa avatar Dec 31 '23 18:12 jarek-foksa