1

I have toggles in my app that communicate with the backend. Is it bad to show a loader on click of the button until you have a response? It somehow doesn't feel right.

Is it an option to just switch it on and if it fails turn it back to off? That also doesn't seem right to me since it might make the user feel frustrated.

Am I not supposed to use toggles for something awaiting a response from the backend?

Sinan Samet
  • 115
  • 3
  • when you say 'toggles' are you referring to a split button, or a simple 'switch', like going into Airplane mode on an iphone? I ask because I've seen both called toggles. Please add a simple visual for clarity. And what is the context? Is this a configuration panel? a list? any details will help the community – Mike M Feb 24 '21 at 22:40
  • Whether the response from the backend has anything to do with the user ? Do you need to show any updated data ? as @MikeM already mentioned, please provide a mock/simple visual for community members to understand what happens once the response is received from the backend. – Ismail Vittal Feb 25 '21 at 05:10

1 Answers1

2

How about using the processing status animation within the toggle. I have attached the Google material documentation screenshot below.

Read the documentation here: https://material.io/components/switches#behavior

enter image description here