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.

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 the relative-position CSS class declared.

Basic Usage

<div class="row justify-center" style="margin-top: 40px">
<q-card style="width: 288px; height: 262px;" color="grey-2" class="text-dark relative-position">
Lorem Ipsum
<div v-show="showSimulatedReturnData">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel magna eu risus laoreet tristique. Nulla ut fermentum elit, nec consequat augue. Morbi et dolor nec metus tincidunt pellentesque. Nullam non semper ante. Fusce pellentesque sagittis felis quis porta. Aenean condimentum neque sed erat suscipit malesuada. Nulla eget rhoncus enim. Duis dictum interdum eros.
<q-inner-loading :visible="visible">
<q-spinner-gears size="50px" color="primary"></q-spinner-gears>

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 PropertyTypeDescription
darkBooleanDarkens the color of the opaque overlay for darker designs
visibleBooleanThe loading effect becomes visible when true
sizeNumber, StringChanges the default size of the default spinner. The default is 42 pixels.
colorStringSpecify color of the default spinner.

If you add your own spinner, use the spinner’s own size and color 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" />

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.