Inner Loading
The QInnerLoading component allows you to add a progress animation within a component. Much like the Loading feature, it’s purpose is to offer visual confirmation to the user that some process is happening in the background, which takes an excessive amount of time. QInnerLoading will add an opaque overlay over the delayed element along with a Spinner.
Note
In order for the spinner to be properly placed in the center of the element you want the loading display to show over, that element must have therelative-position
CSS class declared.
Basic Usage
<div class="row justify-center" style="margin-top: 40px"> |
View the source of the demo for the full example.
Use v-show
or v-if
and the Inner Loading component’s :visible
prop to toggle between the animation and your content.
Vue Properties
Vue Property | Type | Description |
---|---|---|
dark | Boolean | Darkens the color of the opaque overlay for darker designs |
visible | Boolean | The loading effect becomes visible when true |
size | Number, String | Changes the default size of the default spinner. The default is 42 pixels. |
color | String | Specify color of the default spinner. |
Note
If you add your own spinner, use the spinner’s ownsize
andcolor
prop to change the size and color.
To change the spinner, you can add your own as a child of QInnerLoading component. The below code would add a teal
-variation gear spinner with the size of 50 pixels.<q-inner-loading :visible="visible">
<q-spinner-gears size="50px" color="teal-4" />
</q-inner-loading>
In most cases, you’ll probably want to add your own spinner, color and size. For more information on spinner control, please refer to the Spinner section of the docs.