Inline loading
General guidance
Inline loading spinners are used when performing actions. They help notify user’s that their action is being processed. The waiting experience is a crucial design opportunity. Although it may not be obvious what is occurring on the back-end, we can communicate clearly to reassure the user that progress is happening.
It is best practice to use an Inline loading component for any Create, Update, or Delete actions. The component provides feedback to the user about the progress of the action they took. This could be in a table, after a primary or secondary button click, or even in a modal.
Format
If the inline loading is being used to submit a form, the form fields should get disabled.
Descriptive text for the action is optional, but encouraged. If you have limited room or find adding text to be unnecessary you can just run through the animations.
The success state of the inline loading component is active for 1.5 seconds before calling a optional function onSuccess. Use the onSuccess function to refetch new data, close a modal, or reset a form. If no function is specified the success state will last indefinitely.
If an error occurs, the Inline loading component should be hidden and a error notification should be added or error handling within a form should appear.
The inline loading component should never be used to load a page or data.
States
Loading
The loading state indicates that the action is still in progress.
Success
The success state indicates that the action completed successfully.
Error
The error state indicates that the action did not complete successfully.