Comments (2)
Thanks @tcbegley! I did a lot of googling, not sure how I didn't find that thread, but I appreciate your response. This solution works great for me!
from dash-bootstrap-components.
Hi @marcstern14
Check out this topic on the Plotly Forums.
The "Loading..." appears while the javascript bundles are being fetch and Dash is starting up, so the correct solution is to use some CSS that will be applied on initial page load. Updated and Bootstrap specific example below.
import time
import dash_bootstrap_components as dbc
from dash import Dash
def slow_serve_layout():
# this is just to slow down the initial load to make the spinner clear
time.sleep(5)
return dbc.Container(
dbc.Alert("Hello, world!", color="success"), className="p-5"
)
app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
app.layout = slow_serve_layout
if __name__ == "__main__":
app.run_server(debug=True)
._dash-loading {
margin: auto;
color: transparent;
width: 2rem;
height: 2rem;
text-align: center;
}
._dash-loading::after {
content: '';
display: inline-block;
width: 2rem;
height: 2rem;
color: var(--bs-secondary);
vertical-align: text-bottom;
border: 0.25em solid currentColor;
border-right-color: transparent;
border-radius: 50%;
-webkit-animation: spinner-border 0.75s linear infinite;
animation: spinner-border 0.75s linear infinite;
margin-top: 2rem;
}
from dash-bootstrap-components.
Related Issues (20)
- Support tooltips without IDs HOT 3
- [Bug] Console warning on dbc.Tooltip component HOT 3
- Web site is not showing components HOT 5
- Graphs in tabs example not rendering HOT 2
- Support 'clearable' in Input HOT 1
- Allow not showing up-down arrows in numeric HOT 1
- [BUG] dbc.Modal(style) is passed to fade-modal-show layer instead modal HOT 3
- Bootstrap stopped working HOT 4
- [docs] Burger hard to see in dark mode
- Enter does not change line inside textarea component HOT 1
- Debounce support for numeric value of seconds (like dcc.Input)
- [POPOVER] Legacy trigger error inside an iframe
- Offcanvas component not rendering as intended HOT 1
- Remove migration guide in docs
- selected attribute for dbc.Select HOT 1
- `dbc.Checklist` does not accept `label` as `list[Component]` like `dcc.Checklist` does HOT 3
- dash_bootstrap_components version versus python version HOT 5
- Nested tabs in `Offcanvas` component trigger scroll up event on tab change HOT 2
- Tooltip closing race condition with children change callback HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dash-bootstrap-components.