Why isn't there a Switch/Toggle component in Polaris? #7297
-
Gather context or contribute thoughts and alternatives to the ever-contentious SwitchTl;dr:This question comes up at least a few times a year--last month it came up three times in one week 😅. The switch/toggle pattern has been and still is a hot-button topic in the design community and Shopify is no exception! The discussion it stirs up generally gets lost in Slack threads, along with the context unearthed from links shared to long forgotten GitHub issues and PRs. This discussion (and all Polaris discussions) is open for folks evolving the Shopify admin now and in the future to find the context and have the conversations they need to make great decisions quickly and build the best experience for merchants. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Related linksGitHub Issues and PRs
Specs and documentationBlog posts and articles |
Beta Was this translation helpful? Give feedback.
-
Use a checkbox when the state is dirty like in settings. You have to click save to apply things. Use a toggle when the API/save state is called immediately. For example turning on a flow in your store. I believe there are toggles in other locations other than flow too. |
Beta Was this translation helpful? Give feedback.
Use a checkbox when the state is dirty like in settings. You have to click save to apply things.
Use a toggle when the API/save state is called immediately. For example turning on a flow in your store.
I believe there are toggles in other locations other than flow too.