Why does Polaris not offer a toggle button?

Given that Polaris is required/recommended in BFS, why isn’t there a dedicated board in this community?

When I try to migrate from Tailwind to Polaris, I don’t find an equivalent toggle button in Polaris. But I can find it in the Shopify admin => Settings => Customer accounts. How can I use this component?

1 Like

There’s not an official Polaris component for every one you see in the Shopify admin but @devwithalex created https://www.polariscomponents.com/ which includes some additional ones, including a knob/toggle component

3 Likes

Thanks for your components. But I use Vue & Polaris Vue. I don’t use React.

In that case, you’ll have to recreate it on your own. You can use the Knob Polaris Component as a base/reference

Rough demo, based on the react one (this is very rough, please don’t use as-is)

1 Like

Not sure what happened as I thought there was one but it ended up unresolved in discussions and pull requests?

The primitives should all be there though, see the depreciated example for the setting-toggle UI

And the toggle icons:
https://polaris.shopify.com/icons?q=toggle

See anything about dark-mode toggles in shopify|polaris for the patterns as that may lead somewhere though only one I know of is in restyle