Skip to content

Why isn't there a Switch/Toggle component in Polaris? #7297

Answered by dustinmalik
chloerice asked this question in General
Discussion options

You must be logged in to vote

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.

Replies: 2 comments

Comment options

chloerice
Sep 28, 2022
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by chezHarper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pattern Discussion, issue, or work in progress regarding design patterns
2 participants