Design thinking for better websites. Explore company profiles
Article Action feedback geometry

Button loading-state design: keep the action stable while it runs

Use button loading-state design to keep size, label and focus stable during an operation, with distinct completed and failed states instead of an indefinite spinner.

Editorial timeline diagram showing Ready action, Stable geometry, Running state, Confirmed result for button loading-state design.

Button loading-state design should show that an action is in progress without making the control jump, lose its identity or remain busy indefinitely. Preserve enough context to understand the original task, then distinguish the operation's result from the waiting state. A small spinner can support feedback, but it should not be the only clue to what is happening or a decorative substitute for a complete state design.

Identify which operation the button starts

Begin with the actual action and expected interface response. A short local calculation, a form submission and a file export can need different feedback arrangements.

Ask the implementation owner what states the operation can confirm. The visual design should not promise completion at a point where the product has only accepted a request for later work.

For a hypothetical report workspace, starting an export may produce a downloadable result immediately or begin a longer process. Those models should not share an indistinguishable success treatment merely because both start from an export button.

Preserve the button's identity

Keep the action understandable while it is running. If the visible wording changes, the editorial owner should choose the appropriate language; the design needs enough room for it without making the whole toolbar shift.

A spinner should not replace every useful label with an unexplained shape. People returning their attention to the page need to recognise which action is underway.

Use visual hierarchy to keep the button related to any nearby progress information. Do not create two competing messages that appear to describe different operations.

Reserve stable geometry

Compare the ready and running states at the longest real label lengths. A button that shrinks when its label disappears can move the next control into the position where someone was about to click.

Reserve space for any indicator deliberately. If the spinner sits before the label, keep both aligned and prevent the graphic from colliding with the text. The component should look intentional in every supported state rather than as though a symbol has been inserted into spare padding.

Test the button in a row of related actions, not only by itself. The surrounding layout often reveals movement that is easy to miss in an isolated component preview.

Keep focus and availability understandable

The control's running state needs to match the product's real interaction rules. If repeated activation is not available, communicate that state clearly. If another action such as cancellation is supported, give it a distinct identifiable route.

Do not let the loading treatment erase the visible focus indicator. A person using the keyboard should retain a sensible understanding of where they are while the page changes.

The form design guide helps keep action controls and feedback coherent. The developer should demonstrate the implemented focus and state behaviour rather than relying on an animation to imply it works for every input method.

Distinguish short waiting from longer progress

A compact running indicator can suit a brief operation. A longer task may need information outside the button, including what has been accepted and where the result will become available.

Avoid expanding a small button into a crowded progress dashboard. Keep the control's state concise and place richer information in an appropriate nearby region.

For the report example, the button could indicate that the request was accepted while a separate task area presents ongoing progress. The visual relationship should make clear that those are stages of one operation rather than two unexplained processes.

Design completion and failure deliberately

A confirmed result needs a clear state or nearby feedback. Do not leave the control spinning after the product knows the outcome. Equally, do not show success merely because a fixed animation duration has elapsed.

If the operation fails, preserve the relevant task context and provide the product's intended recovery route. The button should not quietly return to its original appearance while an important failure remains invisible elsewhere.

If retry is available, make the action understandable and connect it to the correct task. The visual design should reflect actual supported behaviour rather than promising that every failed operation can be repeated safely.

Review motion and narrow layouts

Use restrained motion and review the intended reduced-motion treatment. A static state with clear text may communicate more usefully than a highly animated icon with no task context.

The responsive design requirements should include running, completed and failed states with enlarged text. The default button may fit neatly while its state label wraps onto an awkward second line.

Test a quick result, a slow operation and an error in the assembled page. A successful design keeps action, waiting and outcome understandable while maintaining a stable place for the person to continue.

Frequently asked questions

Should every loading button disable immediately?

Use the rule appropriate to the operation and implementation. The visual state must explain what actions remain available. Do not infer the correct behaviour solely from a common spinner style.

Can the spinner replace the label?

Keep enough information to identify the action and state. An unexplained shape can lose the task context, particularly when several buttons appear together or attention returns after a delay.

Is a brief success tick enough after completion?

It may support feedback for a small confirmed action, but consequential information needs a dependable route. Match the result presentation to the task rather than using one temporary animation for every outcome.