# Can I skip activating the .\_dash-loading-callback div for some callbacks?

**URL:** <https://community.plotly.com/t/can-i-skip-activating-the-dash-loading-callback-div-for-some-callbacks/10951>\
**Category:** Dash Python\
**Created:** [June 15, 2018, 2:46pm UTC](https://community.plotly.com/t/can-i-skip-activating-the-dash-loading-callback-div-for-some-callbacks/10951 "2018-06-15T14:46:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RagingRoosevelt](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/ragingroosevelt/32/2821_2.png) [@RagingRoosevelt](https://community.plotly.com/u/RagingRoosevelt)\
**Post date:** [June 15, 2018, 2:46pm UTC](https://community.plotly.com/t/can-i-skip-activating-the-dash-loading-callback-div-for-some-callbacks/10951/1 "2018-06-15T14:46:06Z")

</div>

For almost every single callback, I’d like to activate the `._dash-loading-callback` div since I have css that styles it as a loading spinner animation. I have one specific callback where I don’t want to activate that loading spinner animation (by skipping turning on that div). Is there an option I can pass to the callback decorator that might prevent that loading div? Or maybe some other approach to keeping it from activating?

For reference, I have the following css that affects the div in question:

```
._dash-loading-callback::before {
    z-index: 10;
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: rgba(0,0,0,0.5);
}
._dash-loading-callback::after {
    background: rgba(0,0,0,0.5);
    box-sizing: border-box;
    z-index: 11;
    position: fixed;
    width: 15ch;
    height: 15ch;
    top: calc(50vh - 15ch / 2);
    left: calc(50vw - 15ch / 2);
    border-left: 3px solid white;
    border-right: 3px solid white;
    border-top: 3px solid rgba(0,0,0,0);
    border-bottom: 3px solid rgba(0,0,0,0);
    border-radius: 50%;
    line-height: 15ch;
    color: #ffffff;
    text-align: center;
    content: "Loading ...";
    animation: spin 4s ease, loadingtext 1s linear;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
}
@keyframes loadingtext {
    0% {content: "Loading ...";}
    16.7% {content: "Loading ..";}
    33.3% {content: "Loading .";}
    50% {content: "Loading ";}
    66.7% {content: "Loading . ";}
    83.3% {content: "Loading .. ";}
    100% {content: "Loading ...";}
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    } to {
        transform: rotate(360deg);
    }
}
```

---

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [June 15, 2018, 8:12pm UTC](https://community.plotly.com/t/can-i-skip-activating-the-dash-loading-callback-div-for-some-callbacks/10951/2 "2018-06-15T20:12:30Z")

</div>

> [@RagingRoosevelt](#):
>
> I have one specific callback where I don’t want to activate that loading spinner animation (by skipping turning on that div).

This is a really good idea. It’s not possible right now but we’re working on a more generic framework for loading states in [A Flexible "Loading Status" API for Component Authors · Issue #267 · plotly/dash · GitHub](https://github.com/plotly/dash/issues/267)

---

<div class="post-metadata">

**Author:** ![Abeserra](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Abeserra](https://community.plotly.com/u/Abeserra)\
**Post date:** [June 18, 2018, 3:42pm UTC](https://community.plotly.com/t/can-i-skip-activating-the-dash-loading-callback-div-for-some-callbacks/10951/3 "2018-06-18T15:42:36Z")

</div>

Well, If you want to avoid showing a spinner animation for short callbacks, you can use an animation with an animation-delay that doesn’t start to show the spinner until certain time.  
For example, we have a loading components with a fadein animation that has a animation-delay of 1 sec., so the spinner only starts to appear after 1 second delay since .\_dash-loading-callbacks shows up. See here the code: [https://github.com/Grasia/grasia-dash-components/blob/master/src/components/loading.css](https://github.com/Grasia/grasia-dash-components/blob/master/src/components/loading.css)

More on CSS animations: [https://www.w3schools.com/css/css3\_animations.asp](https://www.w3schools.com/css/css3_animations.asp)
