Yo! New Unstyled component of the day: :traffic_li...
# feed
a
Yo! New Unstyled component of the day: 🚥 ToggleSwitch Use it to make your own Toggles in Compose Live Demos + Code Samples: https://composeunstyled.com/toggleswitch/ Source Code: https://github.com/composablehorizons/compose-unstyled/
K 8
❤️ 2
p
Something I really like from Apple's toggle switch that we added for ours is that pressing on the switch stretches the thumb in the direction it will go. It gives it a little bit of life. Just food for thought
a
That is a design decision and it's up to you to implement it 🙂 Unstyled gives you the pattern of a Toggle so that you can implement your own Toggles for your design system w/o having to worry about accessibility, keyboard interactions etc. It doesn't make any design choices for you
👍 1
p
Oh very cool 👍
I guess that makes sense with the name haha
a
What you see above is an example of styling. You can copy paste the code at https://composeunstyled.com/toggleswitch/
👍 1