Skip to main content

How to Add a Loading Spinner in Power Apps

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

While a screen loads its data, show that something is happening. The modern Spinner control is a spinning ring with an optional label; make it visible only while a loading variable is true.

Prerequisites​

Step 1: Insert a Spinner​

Select where it should go, here the Career Development Plan app's conBodyMPS container, then Insert → Display → Spinner:

The Insert pane with the Display category listing Text, Information button, Icon, Avatar, Badge, Card, Progress bar and Spinner, with Spinner outlined in red

Rename it, for example spnLoadingMPS. In the example it started at 48 by 48, with no label.

Step 2: Give It a Label​

spnLoadingMPS → Label
"Loading your plan"

The formula bar with the Label property of spnLoadingMPS set to "Loading your plan", and the properties pane with Label, Appearance Primary and Label position After

LabelPosition puts the label After the ring by default (Before, Above and Below also exist). Microsoft says that when AccessibleLabel is empty, screen readers use the Label (Spinner modern control).

Step 3: Show It Only While Loading​

spnLoadingMPS → Visible
locIsLoading

The formula bar with the Visible property set to locIsLoading, the preview strip reading locIsLoading = false with Data type boolean, and Visible Off in the properties pane

This is the pattern Microsoft's own example uses: set the variable to true, load the data, set it to false. Hide what isn't ready yet the opposite way: the example's gallery and messages have !locIsLoading in their Visible.

Step 4: Test It​

Preview the app and go to the screen. In the example the spinner showed for a moment, right after My plan was selected:

The My Plan screen in preview with the spinner and the text Loading your plan below the header

In a container, a hidden control takes no space, so the content moved up into the spinner's place once it had loaded.

Common Mistakes​

MistakeWhat happensDo this instead
Leaving Visible at its defaultThe spinner shows all the timeBind it to the loading variable
Showing the content while loadingEmpty or wrong values flash before the data arrivesHide it with !locIsLoading
A spinner with no label and no accessible labelScreen readers can't say what's happeningSet Label or AccessibleLabel

Troubleshooting​

SymptomLikely causeFix
The spinner never showsThe loading is very quick, or the variable is never trueCheck the variable in the Variables pane
The spinner never goes awayThe variable is never set back to falseEnd the loading formula with it

FAQ​

Spinner or progress bar?​

A spinner for a wait you can't measure; Microsoft points to the Progress bar when you can show a percentage.

Galleries have a LoadingSpinner property for rows that are still loading. A screen-level spinner also covers what the gallery doesn't, such as data loaded into variables.

Conclusion​

Insert Display → Spinner, give it a Label, and set Visible to your loading variable. Hide the content with the opposite condition until it's ready.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.