You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
70% of Design Systems don’t display any content inside their switches
30% display content on the track
18% display content on the thumb
88% use the background color transition animation
16% use a track slide animation
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?
The text was updated successfully, but these errors were encountered:
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?The text was updated successfully, but these errors were encountered: