Open josepharhar opened 11 months ago
I am sure that
will have an animation by default for these things, but do we need to provide developer controls to change how they work?
I might be missing the intent of your question, so forgive me if that is the case :).
Even if design systems currently don't allow for the customization of the background animation, if we don't provide a method for developers to customize it wouldn't that prevent design systems authors from implementing their own custom animations?
Even if design systems currently don't allow for the customization of the background animation, if we don't provide a method for developers to customize it wouldn't that prevent design systems authors from implementing their own custom animations?
Yes it would! Can you think of any ways that a design system might want to customize the animations?
@josepharhar, Design Systems usually don't provide a way to customise the animation. The one example that offers a lot of variation is ant design system, where switches with content use the track slide animation and switches without content use the background transition. I think the default animation should be a background transition, due to popularity. The track slide animation should be something that authors can easily add (overriding the background transition).
Some track slide animations also have very slight variation with a parallax effect where content and track don't move at the same speed. In my understanding, it would complicate implementation a lot if there were two different animation techniques baked into the <switch>
.
I am interested in nailing down what the use cases for
<switch>
are. It seems like rendering content on top of the two sides of the track and the thumb are important.In @gfellerph's new switch explainer I saw this:
For the "background color transition animation" and "track slide animation", does the design system allow the developer to customize the animation itself? Or does it just mean that the design system has an animation that is not customizable?
I am sure that
<switch>
will have an animation by default for these things, but do we need to provide developer controls to change how they work?